Why Struts 2, Introduction To Struts Framework
Let us see the quick and brief introduction to struts 2 framework, struts is an open source framework given by Apache software foundation under one of its projects called Jakarta. Struts is the frame work, used to develop web applications for java with mvc2 architecture.
Actually struts 1 was introduced in 2004 and this framework is failed to satisfy the needs of customers in today’s worlds, finally Apache joined with OpenSymphony and created struts2.x.
struts 2 = webwork2 + struts 1
webwork2 is the framework from OpenSymphony, java based mvc2.
You know what, struts 2 is not an extension of struts 1, its the combination of struts 1 and webwork2 some features taken from struts1 and some from webwork2 and finally released this struts2 frame work.
Types of frame works
Frameworks are divided into 2 types,
Invasive means, it will force the programmers to create their classes by extending or implementing from per-defined classes or interfaces provided by that frame work. Non-Invasive means it wont forces the programmer to extend or implement its own classes or interfaces.
Struts is the type of Invasive frame work.
Why struts so popular
- Struts supports extensive validations where other frame works doesn’t
- Having inbuilt support for I18N
- Struts 2 actions classes are spring friendly so we can easily integrate
- In build AJAX themes to make the applications more dynamic
- Finally good frame work for front end based applications, i will explain this point later hah
Struts 2 based on MVC 2 architecture
MVC : Model View Control, am giving real time definitions, i don’t want to confuse you by saying lines of definitions
Model: Will concentrates on business logic of an application, am going to take bean as model
View: will take cares the presentation, i mean visible part, we are going to use jsp as view for these struts 2 applications
Controller: is a component, which contains all primary logic’s required, like sessions and security and also it contains the entire flow of applications, we are going to use servlet as controller for these struts 2 applications.
Hope you are clear, don’t think much see the next tutorial am promising you that i will make you to understand this struts2 better than what you are expecting
You Might Also Like
♦ About Author ♦