Wednesday 1 October 2014

What is Framework?

Framework is a collection of JAR Files. We can download the JAR files from the Internet. And we can place all the JAR files in the Class path location.

Installation of the Framework:

Placing the all the JAR files in the class path location is nothing but Installation of the Framework.

Example for Framework:

1. JUnit
2. Spring
3. Strut
4. Hibernate
5. JSF....

Total about 64 frameworks are available in Java.

There are two types of Frameworks are available as of now:

1. Invasive Framework.
    Ex: Struts
2. Non Invasive Framework
    Ex: Spring

Difference between Technology (Software ) and Frame work?

Technology means it contains some set-up files, just we can install those files in our system then automatically that technology is installed in our system.
Example if you take TomCat Server, it contains set-up file , Java. That means where ever we find set-up files it is called Software.

Where as Frame work means it contains collection of JAR files we can download those JAR files from the Internet and we can  place all the JAR files in the Class path location , placing the all the JAR files are nothing but a Installation of the Frame work.

Similarities:
By using Technology / Framework we can develop the application

Contrasts:
While we are using the Technology it will take the lot of time to implement the Application (project) where as takes less time to implement the project with Framework.
Framework is nothing but a ready made tailor made shirt.


What is Invasive Framework.?

For example I would like to create "form bean" , now client entered username and password at browser side that means opening one browser we can enter username and password.  Once is submitted this form, these values will be stored in Server side.
In Server side, One class , it will have one object so these data (username and password) is saved in side the object.  This object is called Form bean object in struts.
imports org.apache.structs.action.ActionFrom;
public class LoginForm extends ActionForm
{

1. properties
2. settersMethods and GettersMethods
3. reset()
4. validate()

}

This is the way to implement the FormBean class.  The main purpus of this LoginBean (AtionForm) class is client entered input value has to be stored.

This ActionForm is provided by the reset() and validate(). You can see above LoginForm. Even it is Framework, ActionForm has to be extended. So this component comes under heavy weight. So this kind of Framework is called Invasive Frameworks. So Struts is "Heavy Weight" Component.

Non - Invasive Frame Work?

 That frame work does not force the developers for extending predefined API's .
Ex:
Spring, Hibernate,




You may like the following articles:
What is class path?

Form bean


No comments:

Post a Comment