Comparison and experience of the latest Java Web application technologies
Author:Bwwlpnn
With regard to the latest technology for implementing Web applications using Java, I would like to consider implementing the jetspeed (http://jakarta.apache.org/jetspeed/site/index.html) from the open source portal as a starting point.
* The core technologies of jetspeed are turbine and velocity.
* Jetspeed is not a Web application server and cannot be run independently. Instead, it can only run on a Web application server in the form of a. War file. Tomcat is a jetspeed development platform. In theory, jetspeed can run on any Web application server that supports servlet 2.2/2.3. I have been able to run jetspeed on WebLogic 6.1 SP2. Of course, I need to make some necessary configurations.
* Jetspeed is only a front-end framework for developing Web applications. It is built on servlet. EJB is the framework for developing the back-end of N-tier applications. The two can be well combined for application.
* Turbine vs. Struts: both implement the view and controller requirements in MVC. However, turbine mainly uses velocity in view implementation. Turbine supports JSP, but does not support it well and does not recommend JSP (see below ); struts only uses JSP in view implementation. To implement controller, the two cannot be used at the same time. That is, in a web application, only turbine or struts can be used to implement controller. Of course, for view implementation, both can be used at the same time.
* Velocity vs. jsp: Both templates that implement the same function. jsp is Sun standard, and velocity is a system developed by open source. There are several detailed articles (http://jakarta.apache.org/velocity/ymtd/ymtd.html) on the Internet to compare the similarities and differences between the two, because it is written by open source, of course, prefer velocity hello. I have read this article in detail, but it is well-founded. It is all about developer experience, and it is not the case that velocity is promoted. Every post has a sentence: you make the demo-. in open source's view, JSP is a "bad" product developed by Sun. "Not easy to use" is mainly reflected in: difficult to debug; there is no need to complicate simple problems, such as JSP First compilation before running; cannot prevent users from embedding Java code into JSP, this damages the MVC design. in addition, Sun named JSP as "standard", with the suspicion of "threatening tianzi to make princes. Of course, Struts and tag lib remove Java code from JSP and save JSP. In order to keep the "Sun proprietary product" of JSP, Sun had to turn to struts, the "life saving ".
* If it is not used for jetspeed Portlet development, turbine is also a good framework for developing web applications. over 30 developers around the world, after three years of development, have raised and solved common problems in Web application development. From this perspective, turbine is much wider than struts. For details about what turbine can do, refer to: http://jakarta.apache.org/turbine/turbine-2/services.html, this URL lists turbine 27 services, where Castor service can do object to relational mapping (OR Mapping ). Among these services, the relationship between turbine and web application is loosely coupled and can be conveniently used. From a big perspective, turbine can do the following:
As a servlet framework with Turbine as the controller.
As a framework of useful code in your application.
As a object-relational tool.
* It takes some time to master turbine/velocity, but from the long term perspective of developing Java based Web applications, it is worth some time. After all, I learned from more than 30 developers around the world and gained 3 years of development experience, which is better than re-invite the wheel.
Write this article first. I will continue to share it with you in the future.