Friday, December 30, 2005

Spring is HOT - An Introduction

This time I come up with an interesting framework and it's popularity is increasing in the Java development community. The so called framework is Spring. I insisted to learn spring becuase many of the requirements i have seen in the companies mention Spring framework. So, i decided to learn Spring.

I have decided to write series of blogs on spring. In this "Spring is HOT - An Introduction" , i will give an introduction to the spring frmework. Future blogs i will explain how to use Spring in the web developement. In this blog i am not going to teach you how to program in spring rather i will explain you what is spring and how it is richer than EJB.

If you think Spring is an framework in the place of Struts, you have wrong conception about the Spring . Spring is not only a framework, also it is an container to develope high end enterprise applications. Unlike EJB, it doesn't come up with more complex architecture rather it is a simple framewok to use in our application with all other services(Transaction,Security,etc.) wrapped up your code. All the services are bundled in the different jar files and you just add the required files into your project.

Spring uses Plain Old Java Object(POJO) paradigm to implement the services needed for your application. This facilitate the use of Spring framework out of the container. Easy to Unit Test the Spring enabled applications. Another salient feature of Spring is, it allows us to easily integrate with other frameworks like Struts, WebWorks, Hibernate, etc.

Spring is built using two programming techniques : Inversion of Control(IoC) and Aspect Oriented Programming(AOP). In my next blog i will write about IoC in detail. Spring is extensively implemented in the Banking solutions. I can see the prosperous year ahead for Spring in 2006.

Spring HomePage

Spring Downloads

Thursday, December 29, 2005

List of Web frameworks in Java

We have lot of opensource frameworks available for Java developement. If we are closely looking at the each one, they have specific feature to highlight from the other frameworks. In this blog i just write the list of frameworks available and give the brief on it. I am not going to write about all the frameworks in the market. I will look into few, which is more familiar with us. Also i may miss some frameworks. I will write those frameworks in my future blogs.

Struts

Struts is the best implementation for Model View Controller(MVC) pattern and widely accepted by the developers. This framework is originated by the Apache Foundation, a famous open source commuinty in Java. Recent days the Struts framework lossing its popularity to other frameworks in the market Java Server Faces(JSF),Spring,etc. But still its mostly used in all the web applications. Currently this project developement is stopped and started a sub project called Shale. Which is more like Java Server Faces(JSF).

Spring

Spring is a lightweight container and framework to develope and deploy the enterprise application. It is an alternative for Enterprise Java Beans(EJB). It reduce the complexity behind developing EJB's, and it uses only Plain Old Java Objects(POJOs) as the componenets. It uses two types of programming techniques : Inversion of control (also called as Dependency Injection) and Aspect Oriented Programming(AOP).

This framework become more popular amoung the J2EE developers becuse of its simplicity and its more flexible to add the persistance layer which ever you want for your application(ie,Hibernate, DAO,etc). Unlike EJBs it need not force you to add all the service to the container, you have the control of adding services to your application. The main pitfall of EJB is for an simple EJB also you have to bare the cost of container servies. But in spring this overhead is reduced. Every service has been modulrized and you have the option to add into your application. For your convenience, spring framework gives all the services in the different jar files. You can download it from here.

Also Spring gives you the MVC pattern to build your web application. This feature makes spring stand out from the other frameworks. Spring contains both container and framework. It gives the better way to integrate with EJBs and Struts framework. Those who feel EJB is more complicated, Spring will be the answer.

This framework is developer by Interface21 and home page is SpringFramework.


Java Server Faces(JSF)

Java Server Faces(JSF) is a java based web framework to develope web applications. Its is used inside an Java Server Pages(JSP) and gives more flexibility to design User Interfaces. This framework is designed and maintained by Sun Micro Systems. Craig McClanahan is the co-specification lead for this framework. Also he is the creator of Struts framework. You can read his blog to find more information about him. From his blog:

"It should come as no surprise that the most frequent questions I get asked center around the issue of which of these two web tier technologies an organization or individual developer should consider using. It makes sense to ask me, because I was the original creator of the Struts Framework, and was the co-specification lead for JavaServer Faces 1.0 (JSF).

Usually, the question is framed as an or issue, based on an understanding that the two technologies are mutually exclusive. That turns out not to be the case, but it can still be difficult to determine what to do. This blog entry provides my current advice on the subject -- but, to understand it better, it's worth briefly reviewing the development and focus of the two technologies.

The story is a little long compared to typical blog entries; if you want to cut to the chase and see my advice, scroll down to the section entitled The Bottom Line, below."


Web Work

WebWork is a Java web-application development framework. It is built specifically with developer productivity and code simplicity in mind. WebWork is built on top of XWork, which provides a generic command pattern framework as well as an Inversion of Control container. In addition to these features, WebWork provides robust support for building reusable UI templates, such as form controls, UI themes, internationalization, dynamic form parameter mapping to JavaBeans, robust client and server side validation, and much more.

WebWork's homepage is http://www.opensymphony.com/webwork.

Tapestry


Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server.

Tapestry divides a web application into a set of pages, each constructed from components. This provides a consistent structure, allowing the Tapestry framework to assume responsibility for key concerns such as URL construction and dispatch, persistent state storage on the client or on the server, user input validation, localization/internationalization, and exception reporting. Developing Tapestry applications involves creating HTML templates using plain HTML, and combining the templates with small amounts of Java code using (optional) XML descriptor files. In Tapestry, you create your application in terms of objects, and the methods and properties of those objects -- and specifically not in terms of URLs and query parameters. Tapestry brings true object oriented development to Java web applications.

This framework is developed by Apache foundation. You can access the documentation at the following URL Tapestry .

Tuesday, December 27, 2005

The Java SE 6 (Mustang) Holiday Quiz

Those who are still reading about Tiger(Java 5.0), this could make a little surprise. Sun has decided to release it's next version of Java by 2006. The new version Java 6.0 is code named as "Mustang". Also they made a small quiz on this new version and published in their site. If you are the person watching the activities of Mustang project, this quiz would be more interesting.Mustang is targeted for final release in summer of 2006.

Here is the link to take up the quiz:

Mustang Quiz

Monday, December 26, 2005

AJAX - a puzzword from Web 2.0

Hello Friends,

I am here to talk about a new puzzword from internet, its called AJAX. AJAX stands for Asychronous Javascript and XML.I did few samples on AJAX to know how it works. Realy its amazing, the way its reloading the part of a page. I can say it will make a major change in the web development. To develope interent applications, AJAX gives the rich user interfaces and fast loading of pages.

Before writing about AJAX, i want to spell out few words on Web 2.0. When you talk about AJAX, you also have the reason to hear the term Web 2.0. The internet experts says that, we are in the second phase of internet era, so called Web 2.0. The first phase of the internet era is headed by Netscape and its outplayed by Microsoft with its InternetExplorer(IE). But this time Google tossed the coin in right side to take the control of internet users from Microsoft and Yahoo.

Lets move into the AJAX, its founded by Microsoft in the late nineties(1998) and they call it as ActiveX objects. Introduced in the Internet Explorer 5.0. Later this object is included in the modern web browsers Mozila,FireFox,Opera,etc. As it become more popular amoung web developers, Mr. Jesse James Garrett from www.adaptivepath.com is named it as AJAX. He is also called as the Father of AJAX.

The truth is AJAX is not an technology or framework. Its is all about a simple XMLHttpRequest object which is used for communicating to the server asychronously. Moreover, we can say it as Socket for communicating to the server. Learning AJAX is quite easy compare to other technologies. AJAX is combination of technologies : XML,Document Object Model(DOM),JavaScript,HTML,XHTML,DHTML.

Cool links to learn AJAX :
http://www.ajaxgoals.com/forums/
http://www.ajaxgoals.com/
http://ajaxtags.no-ip.info/
http://www-128.ibm.com/developerworks/library/j-ajax1/?ca=dgr-lnxw01Ajax
http://en.wikipedia.org/wiki/AJAX
http://developer.apple.com/internet/webcontent/xmlhttpreq.html