Future of Java Web development-servlet 3.0, Comet, rest...

Source: Internet
Author: User

Original article address: Workshop. -- Jiangnan Baiyi

Java EE 5.0 specifications on ejb3.0 and Web Service, with the long-awaited struts2.0 unveiled, Java becomes dull in Web application development.

In javaone2007, the future of the Java technology Web Tier presented Sun's servlet 3.0, rest, and comet plans. When everyone was getting disappointed, they hung a carrot in front.

Servlet 3.0

Infoq Chinese site: Sun submitted the servlet3.0 specification to JCP

Infoq English site: Sun submits Servlet 3.0 specification to JCP

  • The servlets labeled by annotation, Web. XML that can be accessed and dynamically changed, makes web application configurations that often need to be restarted have dynamic features, and Web framework has the hot swapping capability.
  • Async and comet support.
  • Restul service.
  • A bunch of nice features, such as file upload.

Sun, IBM, Bea, Oracle, Apache, RedHat, interface21 plus Hani Suleiman and Jason Hunter were the initial expert groups, and Greg Wilkins of jetty was a support member.

Grizzly, Tomcat and jetty will review the comet API review. Struts shale, DWR, spring web flow, and Wicket on the pluggable Web framework, which looks quite democratic.

Comet

Another new word: when an event occurs, the server actively pushes messages to the client, such as the stock price and chat room information, which is much higher than the regular polling server of the client. However, this HTTP push method actually has many difficulties, such as the resource consumption of persistent connections. Otherwise, it will be implemented on a large scale.
Cometed with jetty, advanced Io and tomcat 6.0, glassfish's grimace Sub-Project. The three projects are supported by their own methods on the basis of NiO, while non-blocking input/output, delay Request Handling/response close, blocking-non-blocking notification is the uniform requirement of servlet 3.0.

New Choice for Comet implementation(Dlee)
Real-world comet-based applications (javaone2007)

Rest

Rest is the most lightweight service solution (Lightweight, all users will write the service solution-rest and JSON), There are not many things that require framework assistance. If it is hard to say yes, It is URL Mapping, splitting the parameters in the URL and converting the result set. Cetia4 is similar, but before a bunch of rest frameworks emerge, servlet3.0's first specification is undoubtedly good, and it is really scared by countless MVC frameworks.

@ Uritemplate ("/images/{imageid }")
Public class myrestservice {
@ Httpmethod
@ Producemime ("Application/JPEG ")
Public inputstream getimage (@ uriparam ("imageid") string imageid ){
...
}
}

Other directions

  • Ajax continues to develop: dojo, Yahoo, Spry, scriptaculous, and GWT.
  • Mashup: the development of Web2.0 and portal has entered the mashup era. Blueprints for mashups: practical strategies, tips, and code for designing and building (javaone2007)
  • Feeds (RSS/atom) continues to develop: Yahoo pipes, Google data, especially atom, IETF's feed format and publishing Protocol, not only for blog. Projects include Rome, Rome-propono, and Abdera.
  • Scripting: programming on the server using scripts such as JavaScript. Sun's Phobos project, project Phobos: server-side scripting for the Java platform (javaone2007)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.