Java for intermediate .NET Developer - java

I am a .NET Developer with about 5 years of web development experience using Microsoft technologies starting with classic ASP to ASP .NET 3.5.
I do have a little background in Java as well and can write/understand Java code very easily. I am looking for resources (online, books) that are compatible with my .NET experience. I am only interested in web development in Java and want to start at intermediate level even if it may require me to look up some details.
What path or resources would you recommend for intermediate .NET web developers to gain equivalent proficiency in Java web development tools?

Get an IDE: IntelliJ (my preference), Eclipse, Netbeans;
Get an application server: Glassfish (my preference; either v2 or v3 Prelude), JBoss or, if you're feeling adventurous, SpringSource dm server;
Get a JDK eg 6u11;
Get a copy of Spring 2.5.6 (or 3.0M2 if you're feeling adventurous);
Get a copy of the Spring reference documentation;
Put the pieces together.

Get yourself a copy of eclipse, and just start reading other people's code, and reading some java docs. The Java website has all the docs online, and they're one of the best language specs I've seen.
Really, if you know C# pretty well, Java should be a cake walk. The languages are pretty similar, so you just need to get to know the different frameworks.

Probably the most helpful book in regards to learning Java's web development framework, Java Server Faces:
Core JSF
- Great examples and explainations throughout on the whole process of using the JSF Framework.
And of course for anyone new to Java I would recommend:
Effective Java
- Covers various design patterns and practices.

In my experience that official Java exams are better than the .Net equivalents, so it may be worth starting there?

Search for a servlet/JSP tutorial (Good, albeit a little old, example here).
You'll get basic knowledge of Java web application development.

Whatever your level is, JSF for Nonbelievers is the best introduction to JSP/JSF.

I'd check out Bitter Java.
It's a book that shows you the wrong way to do things, why it's wrong, and then it shows you the right way.
It pretty much falls in line with the evolution of the j2ee framework. Started with servlets, then moved into jsps, then command pattern, etc.

Related

Java for Software Developers [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am a .NET developer (and have been for a while now). I work for an organization that was just recently acquired by a larger company whose primary development language is Java. There are a few .NET developers, but the ratio of .NET to Java has decreased substantially now that the teams have merged.
That being said, I've decided it would be best for me to start Java development. However, most of the books I've seen so far for "learning Java" all take a very basic approach (what is a class, OOP principles, etc etc). I am comfortable with this part of development and don't need a primer (unless there are differences so profound that someone recommends the fundamentals from a Java perspective...).
Anyway, I'm looking for a book recommendation for Java development from a software developer's perspective that discusses today's techniques. For example, MVC architecture, application best practices (I am a web developer, this includes web services), is it worthwhile to work with JSPs or consider Ruby instead, etc etc.
A HUGE bonus would be "learning through doing". Something like Murachs, where I can step through a project from start to finish, and is light enough on fundamentals that I don't get bored. I'm hoping to walk away with enough basic knowledge to volunteer for some internal projects and grow from there.
I'm sorry if my question is needlessly broad, but I'm struggling to find a starting point aside from my Eclipse installation (I am doing this on Ubuntu, deliberately avoiding Windows).
Thanks for any direction or insight you can offer.
EDIT - After discussing with a co-worker, and reading Bert's great suggestion (all of them have been excellent, thank you all very much), it turns out the main focus is on EE, and Glassfish. They use NetBeans for development, since it is tightly bound to Glassfish.
This doesn't mean much to me, except that I think the parallel drawn is IIS/Web apps to Win32 apps. But perhaps it will help clarify some of the more open-ended questions in my OP.
Effective Java By Josh Bloch
It may not be "learning by doing" but it gets into the details of how to use the Java language effectively.
I would then complement it with Java Puzzlers by Josh Bloch and Neal Gafter
My best bet is to learn Spring based on your requirements:
MVC architecture, application best
practices (I am a web developer, this
includes web services), is it
worthwhile to work with JSPs or
consider Ruby instead, etc etc.
You can start by visiting SpringSource at http://www.springsource.org/
There are a few points I would like to make to you:
The basic Java language is rather small and C-ish. To my understanding C# and Java works almost identically here.
The Java runtime library is VERY, VERY BIG, and rather unlike C#. Very few people know all of the Java 6 runtime library well.
There are several IDE's in common use for Java. You will want to learn the one used by the rest of the team.
I would suggest having a brisk walk through the Oracle Java Tutorial, just to get the hang of the spirit and do some of the exercises, and then look at the common "Java for C# programmer" cheat sheets on the internet. Then do a lot of code, and then read Effective Java.
(For those who think they know Java 6 runtime well, please consider if you are familiar with RMI, the Rhino Javascript engine, and XPath in the XSLT implementation and all the rest)
Please look at the following thread:
https://stackoverflow.com/questions/75102/best-java-book-you-have-read-so-far
Ruby makes no sense unless you're writing JRuby on the JVM.
If you're writing web apps, you'll need to know JSPs written using JSTL (JSP standard tag library), servlets, HTML, CSS, and JavaScript. Download Tomcat from Apache - it's a servlet/JSP engine that will let you deploy web apps locally for learning. It has an HTTP listener built in, so you don't need IIS or Apache.
You'll need to know how to create and deploy a web archive (WAR) file. That's a ZIP file that contains the standard format for a web application.
I'd have a look at the Tomcat "first web app" docs to get a feel for it.
Once you have that, come back and talk about frameworks. (When you do, I'll recommend Spring.)
Here are some references I like. I'm sure there are better, but there are the ones I have read and can vouch for:
Java in a Nutshell is a classic summary of the core language. If you need more, there are books like Java for Programmers for programmers transitioning to Java (I have not read it).
Sun's Core Servlets and JavaServer Pages was a good book for Java servlets and JSPs. But consider that a lot of web tech is built on top of this (e.g. Spring), so this may be giving you foundation but not direct knowledge of the specific framework you will be using. Also a lot of web tech these days are client-side/JavaScript/AJAX-based, e.g. jQuery.
As for MVC, consider focusing on MVP instead. I been playing around with Google Web Toolkit to leverage my Java background to create client-side apps, but it is also a good way to get some idea of MVP - read Large scale application development and MVP Part I and Part II, and the GWT MVP Development with Activities and Places. However, GWT keeps evolving.
My last suggestion is that you narrow your focus - try to figure out what frameworks are popular at work and decide if you want to focus on a tier: front (e.g. HTML/CSS/jQuery), middle (e.g. Spring), or back-end (e.g. Hibernate). Once you figure this out, then post a more specific question(s) (e.g. what are the best resources for learning XYZ).
Just from my experiences with java (limited but I took a Web Dev course teaching JSP's) Any decent technology for it is usually 3rd party. However, from what I can tell when doing web dev I would use Netbeans, Netbeans has Tomcat built in especially in Ubuntu for easy debugging.
More on similar lines you can find answers from this post
https://stackoverflow.com/questions/3820437/life-after-head-first-java/3820449#3820449
The Java landscape is quite wide as you probably have already figured out.
There are hundreds of frameworks and tools that can be used for basically doing the same thing. To get an idea, you can take a look at this presentation written by Matt Raible, where he compares a number of Java web frameworks.
As someone else suggested, you should definitively take a look at the Spring Framework. It is widely used in the enterprise world. There are several good books about Spring.
If you want to get the basics of Spring MVC in a "tutorialized" style, you can take a look at this book. It doesn't cover the latest Spring version (3.0) and it is not a "perfect" book, but it should allow you to get the basics while running some examples.
Also, there are literally thousand of Spring-MVC tutorials on the web.
For instance, you can take a look at:
http://www.adobocode.com/spring/a-spring-web-mvc-tutorial
RESTful services are also quite popular these days. I have been working with the Resteasy framework from JBoss and I found it very easy to setup and work with. This book explains the REST architecture and uses Resteasy as framework for the examples.
I also recommended "Head First Design Patterns" from O'Reilly. It covers the most important patterns using Java and it will help you to see how the language can be used for patterns you may be already familiar with.
One more suggestion: you may considering "tuning in" on Java TV. It's a great resource with hundreds of Java tutorial videos. It covers a wide spectrum of technologies so you should be able to find something for you.

Creating web service app for enterprise Java vs C++?

So we want to develop a service app (web Service with post/get API). What is language to go for secure, fast, enterprise app for about 2000 employers to use with about 20~40 services for interacting with DB server (which in my case will be Oracle) Dev time a year Dev team of 3. All capable of righting C++ code as well as Java (so they will now them equally bad at the beginning of process)
Definitely java! You might want to check the jee6 tutorial on JAX-WS to get an idea of how web services are created using enterprise java (http://download.oracle.com/javaee/6/tutorial/doc/bnayn.html)
This will also guide you on how to do it using the netbeans IDE (http://netbeans.org/kb/docs/websvc/jax-ws.html)
Cheers!
You'd be masochistic to try this with C++! Definitely Java, J2EE whatever (look at various technologies from groups such as JBoss). The development process will be significantly faster using these existing technologies than writing your own...
The question is not what language to choose but which "architecture" or paradigm.
If you want/need to use SOAP then C++ might be fine, go and google for "gsoap". However I would recomend Java and REST as architecture paradigm, well we would need to know more what you really want to do. Perhaps some RMI or CORBA would be much easier. If you want to play with Java, Groovy or Scala (all languages run on the Java JVM), then google for "restlet".
Best Regards
Angelo
I would suggest using the Java / Netbeans combination.
Netbeans has a number of tools which makes web service development easy.
Good overview here.
Netbeans allows full use of JAX WS and Metro and is integrated with Glassfish and Tomcat servers (part of Netbeans download) so you can get up to speed really quickly.
you can use either C++ or Java depending what you're implementing. To see an example on C++ check out this great post by IBM Engineers: http://www.ibm.com/developerworks/webservices/library/ws-xml-rpc/

Learning Trail for Java Web Development?

I've Inheritted a large Java Web project which I've got to make some modifications to, I'm a fairly competent Java Programmer when it comes the the basics but I've never done any JSP programming or EJB programming before. I remember vauguely doing some servlet programming 5 or so years ago in university, but I'm assuming that everything has changed since then.
I'd planned on getting myself up to speed this weekend, but I don't know where to start.
What would be a good learning trail to get me from Zero to proverbial Hero? or at least to a level of competency which will let me be able to read the JSP servlet and EJB code and understand how it works well enough to modify it and deploy it?
Ofcaurse it depends a lot on what project you inherited and when it was written.
Also what technologies are used?
The best resource on starting J2EE development I think it's the Java Passion site.
The online tutorial on netbeans.org are very good. I recommend to download the NetBeans 6.5 IDE (free) and walk through the J2EE tutorials.
The tutorials are very well written, and introduce the basic elements of enterprise and web development. They also require very little time to complete.
http://www.netbeans.org/kb/
Find out how complex it is. There is a vast difference between a web application without EJB's and one with.
Is it running in JBoss/Tomcat/Jetty/Resin/BEA/WebSphere?

Porting from PHP to Java - framework recommendations?

Im porting a project from php to java. The project is a web-app based on php and ajax techniques with a javascript front-end. What java-frameworks would you use for something like this?
Does the result have to be written in Java, or does it just have to run on the JVM? In the latter case, you might want to consider Grails, which uses Groovy, a Java-based dynamic language that compiles to Java byte code and has full access to the Java standard API.
How well do you know Java?
Why are you porting it?
I can't really tell based on your description, but there are lots of Java web frameworks out there. Pick one. I prefer Spring.
I fear that you're about to be very disappointed. I anticipate a lot of questions like "Why can't I do X in Java? It's easy in PHP!"
Apache Wicket is a possible java based web framework you might consider. The default would be the java servlet and jsp frameworks.
without seeing the source code - you will need a complete rewrite. just "porting" will probably not work.
out of all available frameworks i'd recommend two: wicket if you want clean lightweight technology. with ajax. jsf/seam if you are in a corporate environment where it it easy to get tons of experienced developers.
I really like Stripes.
There's a really good book out on it too. Stripes ... and Java Web Development is Fun Again.
This question seems to come up alot. Related:
What Web Application Framework for Java is Recommended?
Best java mvc framework implementation for web apps
Does it make sense to use a framework for a simple java web app?
What language/platform to choose for a new web application?
In my opinion you would still do the same but generate the html with JSP and javabeans instead of php. javascripts and ajax will still work without a problem if the outputed html is the same.
It depends by the size of your project, the features and your resources.
If the project have'nt a lot of particular needs you can use Struts. Thsi is a stable framework, not really advanced but simple and powerfull for the development.
Another frameworks more recent and advanced are Spring and Wicket.
Before you start, I recommend you to do a check-list of your need:
Do you must porting a O/R mapping too?
Have you a stable developer knowing Java/J2EE?
Do you think to add some feature during the porting or in short-run?
etc etc
good luck! :)
I would port it to GWT
Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including Google Wave and the new version of AdWords. It's open source, completely free, and used by thousands of developers around the world.

Webservices - Java or .NET?

I need to implement webservices in an upcoming project and wanted to know what are the main points to base the decision on whether to implement using java or .NET
I'm a C++er...
If you're a Java shop use Java. If you're a .NET shop use .NET.
There really is no difference that makes one of the two languages superior to the other in regards to web services.
Possible consideration - .NET pre 3.5 only provided support for SOAP based services, but I believe the 3.5 WCF offers REST and SOAP now.
There's no real difference from programmer's point of view (implementation).
For me, a reason to pick Java is that all tools and infrastructure are free/open source. OS, deployment web server, databases, IDEs and developer tools.
I have plenty of experience with both, and both will certainly do the job.
However I tend to prefer Java over .Net for things like web services for the following reasons:
It's cross-platform, which gives you much better options on the hosting side (e.g. running a big Linux cluster on Amazon EC2)
The library ecosystem is larger and more mature, especially on the server side.
I prefer the more flexible open source philosophy to "the only way is Microsoft". Vendor lock-in is always a bad idea for your enterprise architecture in the long run.
You can optionally use awesome languages like Clojure or Scala on the JVM
Ultimately though, I'd go with the one your team has the most skills with. This will determine what you are most productive with, which is usually most important if your main objective is to deliver value quickly.
It's a personal decision, usually determined by the technology already in place or the skill set of the developer(s) writing the services.
i've never really developed web services in java, but i have in .NET and if you're using Visual Studio they're an absolute cinch to whip up (i expect they're a little more difficult to do without the aid of VS).
if you're already working in java, and don't have any .NET stuff in place, stick with java - it'll save you a lot of money (if you were to get Visual Studio in, as i mentioned), and possibly some time involved in learning the specifics of .NET
In my experience, Web Services are a bit more tightly integrated into Visual Studio than they are into Java's editors.
The Eclipse IDE doesn't even have JAX-WS (Java standard web services stack) support built in, opting to use Apache Axis 1 instead.
Netbeans supports JAX-WS, though.
I personally prefer .NET to Java for many reasons I don't want to go through, since it doesn't really matter and is more a personal preference than a strict guideline I can recommend.
If you have Java infrastructure in place or using a platform other than Windows for your server applications, I strongly suggest Java. However, if you don't have anything in place and running on Windows platform, .NET is pretty cool in that area (WCF/ASMX/WSE/...).
As you say you're a C++ - er you'll probably find .NET easier as you can target it directly from C++.
I'm a Java guy, but I think Web Services are easier to code in .NET. Visual Studio takes care of everything, in Java it takes a bit to get started.
A bit of a problem in some projects with JAX-WS is, that SUN ships the "old" version 2.0 with Java 6. If you want to use the current version, it's some work to make it run with Java 5 and Java 6.
If your app must be portable, you should obviously choose Java. Otherwise I would say it's just a choice of your preferred language, since the above issues are really small (maybe you want to choose Axis or something else anyway, I haven't worked with something other than JAX-WS yet).
IMO if you want to do SOAP, then its a heck of a lot easier to use .NET and WCF. However, I've found REST to be a bit tricky with WCF, and had to implement a custom XML parser to do it instead of using their built-in one.
You probably want to consider your hosting environment too. If you are going to serve this from Windows hardware, you can drop .NET WCF web services into IIS. If you are going to run a Linux/Solaris server, then it isn't even a question...
I suggest implementation with JSP ,it provides a robust platform for development
I prefer JSP to ASP or any microsoft techonolgy!

Categories