Java EE for a .NET developer - java

I have always been a .NET developer. I have created some Swing apps in the past and I handle the java language pretty well but I don't have much knowledge of Java EE or any other relevant technologies for entreprise application development.
1) What are the relevant technologies for entreprise development in java?
2) What are the best places online to learn them?
3) Is there any online repository of information for java like the MSDN Library?
4) Which development tools are recommended for this technologies?
Thanx

What are the relevant technologies for
entreprise development in java?
Servlets/JSP are the most important I'd say. It's part of the Java EE spec and the basis for 99% o the Java Web frameworks. The other is the Spring framework, which is almost a "must-have".
What are the best places online to
learn them?
Writing code, of course.
Is there any online repository of
information for java like the MSDN
Library?
There's the JDK 6 documentaiton and others.
Which development tools are
recommended for this technologies?
An IDE is the most important thing. There are basically three to choose from: Eclipse (free; most popular), IntelliJ IDEA (commercial; my personal favourite) and Netbeans (free).

I'm surprised no one mentioned this year, but the J2EE 5 API docs are separate from the JDK 6 API docs.
Your First Cup: An Introduction to the Java EE Platform may also be useful.

In addition to Cletus' answer, you'll want to take a look at Apache Commons, which is where to find the classes and methods you'll often want that were more or less left out of the core Java libraries.
For what it's worth, I'd start with Eclipse as my IDE, and change later. It's free, and by far the most common IDE for Java out there.

Related

Why are some Java EE APIs implemented in Java SE?

I've noticed recently about some APIs that are supposed to be part of Java EE, but seem to be implemented in Java SE. For example, there's JAX-WS, which is a Java EE API, but can be used completely in a Java SE project.
Is there anything I'm getting wrong? There are some APIs from Java EE implemented in Java SE out of the box? Where can I find information about what JEE APIs are available in JSE as well?
Java SE APIs are basically the Java Standard Library. There's a nice diagram on the Java Platform Docs
And here is a list of the "Base Libraries": https://docs.oracle.com/javase/8/docs/technotes/guides/index.html#langutil
which includes java.lang, math, collections, reflection, concurrency, logging, preferences, io, net .... (notice that many of these are not even widely used by the Java community, like logging - where slf4j-api is the de-factor standard).
Then, there's also the "Integration Libraries" that include things like JDBC (Database Access) and JNDI (things like LDAP), and "User Interface Libraries" (used to be Swing and JavaFX, but now it's back to only Swing).
The Java EE APIs include many other things, like email and JAX-RS as you mention, which extend the Java libraries and in theory, should interact and work on top of the SE APIs, providing a comprehensive whole suited for enterprisey development.
They are not implemented by the JavaSE runtime!
However, each JavaEE API can be implemented independently by independent organisations (or anyone that has enough spare time to spend on the effort) and be used from a mostly Java SE application on their own. This is why there's lots of Servlet containers (Tomcat, Jetty, GlassFish and many others) available which implement the Servlet API and not much else!
It should be noted that quite recently, JavaEE has become officially the JakartaEE project. There's a searchable list of projects here.
I'd also like to mention there's another big set of APIs that were developed in parallel with JavaEE in the OSGi world, by the OSGi Alliance, that focussed on modularity of dynamic Java applications.
Finally, a competing framework, Spring is quite dominant in the Java world (and has actually influenced a lot the development of JavaEE itself), and even today, with beginner-friendly projects like Spring Boot is probably more popular than JavaEE itself!
Myself, I like to stick with only Java SE, a few EE APIs like Servlets and JDBC (EDIT: jdbc is in the standard lib!) for essentials, and community driven projects (see for example Micronaut and Vert.x) which are really cool stuff and are not based on any standards at all!
In summary, the Java world is big and there's a lot of variety! JavaEE is but a small part of it.

Example non-trivial Java EE web service implementation?

My organization is considering switching from an in-house proprietary
application server (and adhoc protocols) to a Java EE 5 / Java EE 6 framework +
web services for new development, and we're trying to get our heads
around how we'd do that.
We're experiencing something of a culture shock; we're comfortable
with emacs/vi, command-line tools, shell scripts and calling libraries;
all the documentation we encounter seems to assume we're using Eclipse,
IDE plugins, ant and/or maven and some huge framework which makes it
hard to even understand what code is executing. I think an example
would help enormously, so my question is:
Is there a modern, non-trivial example Java EE application (or real-world open source application) out there that provides a WS-I style web service interface and ideally also demonstrates using a relational database?
I've found various "hello world" applications and tutorials that
create some sort of web service using a Java EE framework, but never
anything more complicated than a temperature conversion service!
I was in a similar situation a few years ago. I was a C programmer using vi and pico on Linux, and I got hired onto a J2EE project. They may be slightly dated references and there are some differences in the newer versions, but I used the books Developing Web Services with Apache Axis and J2EE 1.4: The Big Picture as great jumping off points for me and the team I was working with. I highly recommend each book. Also check out Sun/Oracle's J2EE tutorial online. Your first iteration won't be production quality code, and should be considered a throwaway from the start, but it will get you off the ground with an IDE and the J2EE framework.

study roadmap for newcomer into java ee

I'm the newcomer into java ee,I have studied about core java,servlet,jsp.
Could anyone give me some suggestion(some books,forums,etc) on how to promote my skills into java ee?
Thanks a lot in advance.
One good place to start is Sun's Java 6 EE Tutorial on the Sun web site.
I would recommend Server-Based Java Programming. This isn't a Java EE book per se, but it explains what a Java based server needs to do and how to do it with good example code. It will give you the foundation to understand to understand what Java EE is trying to accomplish and why things are the way they are.
In the same vein, I would recommend Expert One-on-One J2EE Development without EJB. This book is written by the founder of the Spring project and provides insight to the problems with Java EE that Spring is trying to solve. Note this was written before Spring was open sourced, so it's more a 'this is how a server framework that's not Java EE could work' book, not a 'how to use Spring' book. Even if you are using straight Java EE, it helps to know what issues you could run into (with J2EE) or what the motivations were for Java EE 5 (based on Spring & Hibernate philosophies).
I would not recommend the actual specifications from Sun. They are dense, technical and better used as a reference.
To be an effective J2EE developer, you'll have to have a few frameworks under your belt. Start boning up on Spring, JSF, Hibernate, etc.
For more details, see my answer to this question.
Spring is an excellent first choice of framework, for reasons that may not become apparent until you've used it on a large project. But the best tutorial I know for learning it is Manning's Spring In Action.

Why Java is still used in web development?

Why Java is still used in web development? I'm just curious..
There are a number of reasons:
1. It is by no means a dead language. There are thousands of Java developers out there.
2. Many available Java developers means that it relatively easy to find maintenance programmers if necessary.
3. The Java / J2EE architecture is robust and reasonably elegant. It makes it possible to architect well built applications.
4. The free tools available for it are enterprise ready. For example, Apache / Tomcat / JBoss are a solid foundation to build a web-app from.
5. Excellent support for developers. Eclipse is one of the best developer platforms available. Ant and Maven support for Java is excellent.
6. There is a good availability of third-party (and open-source) libraries and Eclipse plug-ins for most of the additional functionality that might be needed but does not come in the core libraries.
7. There is also great support tools from commercial vendors: ORacle; IBM / Rational; etc.
8. Updated versions with newer language constructs are constantly being developed.
In short, it is a good tool for the job. It is compares favourably to other development platforms (.Net, Ruby, etc), and perhaps is better than some.
Simple. It's a cross platform environment, that is clearly defined, and controlled. Sure, Sun has a big deal of say in what is available in the Java environment, but there is plenty of 3rd party support and development in the Java environment.
Yes, Java applications start up slightly slower than Native applications, but take a look at VUZE... Once it's started, it's nearly native speed (or at least it was when I was using it). With the JIT (Just in Time) compilers, code caching, and other features, there isn't much of a reason that there would be a major speed penalty...
One big reason I think is because it's platform independent meaning they can easily run on all operating systems as long as you have the Java Runtime Environment installed. This could allow you to, for example, compile code in Windows and deploy on Unix.
I would also add that while this is only a con against .Net, your application server doesn't have to be Windows so it is cheaper to throw more hardware at it.
For the same reason as why COBOL and FORTRAN still exist. Because the language has proven itself to be robust and reliable.
Compare it with cars. Some people want the latest models because it has more power, better speed, improved features and whatever more. Others will just use a reliable car that's made to last for many years without much need for additional maintenance. Some buy a new car every 3 years, others will use their cars for half a century or more.
When talking about Java & the web, people seem to happily mix things by concentrating on Java applications deployed with Web Start (or even Applets), and forgetting that Java is a common language for implementing plain old dynamic web sites (or web applications). The latter is especially true for larger, more "enterprisey" systems. Even if on the desktop Java never really took off, on the server side it certainly did.
Without going into much detail, a couple of reasons why Java is used for creating web sites / applications:
It's a tried and true approach for building large-scale web apps. Either using just the basic (Java EE) technologies of Servlets and JSP, or newer frameworks built on top of those, such as JSF, Wicket or Google Web Toolkit. (Just one example of high scalability: Gmail is implemented in Java, using Google Web Toolkit.)
A mind-boggling amount of Java libraries exist, for all kinds of tasks — both open-source and commercial ones. If you need some in the backend of your app it may make a lot of sense to do the whole app using the same technology.
There are a lot of skilled Java developers out there — something that may affect tech desicions when launching (larger) projects
When creating a web interface for, or integrating into, an existing Java enterprise system (which are common) it may be beneficial to use the same language
Edit: I also agree with Doug about the tools and developer support. For example, IntelliJ IDEA may well be the most advanced IDE for any language (and I've heard this also from people who've used Eclipse and Visual Studio extensively... ;-) )
It's ubiquitous. The tools are great across the board. It's powerful. The community is huge. There is an amazing amount of available libraries / products / toolkits / frameworks. The JVM is great.
You can build cathedrals with this language. Those tend to stand for centuries.
Since Java doesn't run on the iPad, doesn't that hurt Java web development? Developing a web application that supports desktop and mobile is a possible path, but if your site uses Java or Flash, you have eliminated that opportunity.
We have a web application that is for both desktop and mobile (supports swiping, zooming, and such using jQuery). We decided against Java, Flash, and Silverlight because they do not work with iPad. The iPad is a growing base and web applications will have to keep up to support it.
It will be interesting to see how this affects web development with Java... time will tell.

Java for intermediate .NET Developer

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.

Categories