Spring-JSF integration

Spring is a powerful framework for building enterprise Java applications. JSF is a standards-based technology that can simplify Web development. It is possible to combine the two with surprisingly little effort, allowing developers to take advantage of the best that both Spring and JSF have to offer. Check this useful article By Michael Klaene which demonstrates how to utilize JSF and Spring to build an application. Which also contains a very brief overview of both JSF and Spring .

Spring to Java Server Faces By Michael Klaene

Technorati tags: Spring Framework, JSF 


Eclipse Dominates Grassroots IDE : An eWeek Report

The Eclipse platform dominated a straw poll on integrated development environments, more than doubling the ranking of the next closest IDE in the survey, Microsoft’s Visual Studio.

About 58 percent of developers polled said Eclipse is their favorite IDE. Visual Studio came in second with just over 18 percent of developers claiming it as their favorite.

The third place position was “text editor all the way,” meaning more than 14 percent of developers polled said they prefer to use text editors as their main development environment. Sun’s NetBeans came in fourth with nearly 8 percent. The fifth spot was taken by developers who simply responded: “IDE?” That accounted for 3 percent. Adobe Systems’ Dreamweaver was sixth with 1 percent, and Zend Technologies’ Zend Studio came in last with 0.67 percent.

Reference: http://www.eweek.com/article2/0,1759,2017113,00.asp?kc=EWRSS03119TX1K0000594

The seven modules of the Spring framework

Spring is an open source framework created to address the complexity of enterprise application development. One of the chief advantages of the Spring framework is its layered architecture, which allows you to be selective about which of its components you use while also providing a cohesive framework for J2EE application development.

The Spring framework is a layered architecture consisting of seven well-defined modules. The Spring modules are built on top of the core container, which defines how beans are created, configured, and managed, as shown in the following figure.


Each of the modules (or components) that comprise the Spring framework can stand on its own or be implemented jointly with one or more of the others. The functionality of each component is as follows:

* The core container: The core container provides the essential functionality of the Spring framework. A primary component of the core container is the BeanFactory, an implementation of the Factory pattern. The BeanFactory applies the Inversion of Control (IOC) pattern to separate an application’s configuration and dependency specification from the actual application code.

* Spring context: The Spring context is a configuration file that provides context information to the Spring framework. The Spring context includes enterprise services such as JNDI, EJB, e-mail, internalization, validation, and scheduling functionality.

* Spring AOP: The Spring AOP module integrates aspect-oriented programming functionality directly into the Spring framework, through its configuration management feature. As a result you can easily AOP-enable any object managed by the Spring framework. The Spring AOP module provides transaction management services for objects in any Spring-based application. With Spring AOP you can incorporate declarative transaction management into your applications without relying on EJB components.

* Spring DAO: The Spring JDBC DAO abstraction layer offers a meaningful exception hierarchy for managing the exception handling and error messages thrown by different database vendors. The exception hierarchy simplifies error handling and greatly reduces the amount of exception code you need to write, such as opening and closing connections. Spring DAO’s JDBC-oriented exceptions comply to its generic DAO exception hierarchy.

* Spring ORM: The Spring framework plugs into several ORM frameworks to provide its Object Relational tool, including JDO, Hibernate, and iBatis SQL Maps. All of these comply to Spring’s generic transaction and DAO exception hierarchies.

* Spring Web module: The Web context module builds on top of the application context module, providing contexts for Web-based applications. As a result, the Spring framework supports integration with Jakarta Struts. The Web module also eases the tasks of handling multi-part requests and binding request parameters to domain objects.

* Spring MVC framework: The Model-View-Controller (MVC) framework is a full-featured MVC implementation for building Web applications. The MVC framework is highly configurable via strategy interfaces and accommodates numerous view technologies including JSP, Velocity, Tiles, iText, and POI.

Spring framework functionality can be used in any J2EE server and most of it also is adaptable to non-managed environments. A central focus of Spring is to allow for reusable business and data-access objects that are not tied to specific J2EE services. Such objects can be reused across J2EE environments (Web or EJB), standalone applications, test environments, and so on, without any hassle.

Reference: http://www-128.ibm.com/developerworks/library/wa-spring1/

Technorati tags: Spring Framework

Sun to shine on AJAX

Sun Microsystems will shine more light on accommodations for AJAX in their future projects. They will also provide an update to Java Server Faces(JSF) component for Web application development. Through this sun focusing on making the Javascript more available to the developers. Through this accomodation with javascript will make AJAX much much simpler.

One of their future project “jMaki” enables Java developers to use JavaScript in Java applications as either a JSP (Java Server Pages) tag library or a JSF component.Basically, jMaki will generate all the JavaScript, everything necessary to put that in the page for the developer. Sun is planning to release a beta version of jMaki in this November itself.
Another upcoming openspurce project, “Phobos” is a way to script server-side code in JavaScript, rather than write a JSP page or a servlet. The technology is planned for release early next year.
Sun anticipates making jMaki and Phobos add-ons to the Java Enterprise Edition 5 platform.

The future of JSF, meanwhile, involves an upgrade being called Project Dynamic Faces or JSF 2.0. This version will extend the component model for server-side components to better support AJAX. This release is driven by feedback from users who seek AJAX functionality, but want a strict programming model for the server, which JSF provides.

Reference: http://www.javaworld.com/javaworld/jw-10-2006/jw-1003-ajax.html?lsrc=jwrss

Technorati tags: Sun, java, Ajax