|
I have been wanting to write about J2EE 5 Java EE 5 for a while now. This version has a cool collection of technologies. Look at it yourself at http://java.sun.com/javaee/technologies/. The most notable ones (at least to me) are EJB 3.0, Java Persistence API and JSF 1.2. These new standards blended with cool new technology like AJAX will make application development a lot of fun. My blood is boiling already. Over the course of the next few days, I plan to develop a Java EE 5 application and share it here on my website. We will get all the tools necessary to develop the application (of course we will pick the tools that are freely available), we will start with the database design, we will design and develop domain entities (classes that represent the business domain) using Java Persistence API, we will design and develop stateless session bean(s) to manipulate the entities, we will develop the user interface using JSF (we might throw in some AJAX too). All the development will be done using Java SE 5. There will be some stuff and some fluff (necessary evil to understand the stuff!). Hopefully, I will be able to organize my links in such a way that you can go through the fluff and gain conceptual understanding, or go through the stuff and learn to code in Java EE 5 quickly, or better yet, go through stuff and fluff in iterative manner and do both. Let's get started! Any developer wanting to learn about new technologies, thinks about the tools he/she will need to write code. Since we want to write a Java EE application, we need to look for a container that implements Java EE 5 specifications. On a side note, I can see why Sun wanted to get rid of the "2" in J2EE and hence the new name Java EE. And since this versions comes after 1.4, the name becomes Java EE 5, it's too long and difficult to say (and write) it correctly every time. I am simply going to write Java EE to mean Java EE 5 - the latest specification in enterprise edition of Java. Similarly, I am going to use Java SE (or even JDK) to mean Java SE 5. Back to the tools. I have selected Glassfish - an open source, free application server that implements Java EE specifications and Netbeans - an open source IDE to develop applications in Java EE. You can use other servers such as Jboss, Sun Java System Application Server (Glassfish's commercial brother) and Oracle Application Server and weblogic. As of this writing, IBM WebSphere and Apache Geronimo don't seem to be having a Java EE implementation yet. I chose glassfish because it's pretty quick in implementing the new features and there are quite a bit of learning resources on https://glassfish.dev.java.net/. Similarly Netbeans has everything you need to develop Java EE applications. Please note that I am not a proponent or opponent of these or any other tools, I just picked the ones that I thought would make it easier to develop Java EE applications. Besides Java EE, we will need a database server. I chose Oracle eXpress Edition. Again, I could have used Derby, Cloudscape, mysql or something else. I just like to use the tools that I might end up using in the real world. After all, most of my clients use Oracle, DB2 or SQL Server. See if you can download and install glassfish, Netbeans and Oracle XE. Next time, I will post the installation instructions. Hint: You will have a port conflict between glassfish and Oracle XE. Fix it if you can or wait for the next installment. |