user529429
user529429

Reputation:

Give me an Example with reason for why we are use Struts?

I want to start learning Apache Struts 2. Please explain the benefits of using a web framework such as Struts 2. Also what are the differences between Struts 1 and Struts 2?

Upvotes: 2

Views: 4658

Answers (2)

Costis Aivalis
Costis Aivalis

Reputation: 13728

In a nutshell: you will need to use a framework in order to add order and standards to the structure of your applications. Frameworks allow rapid development. They enforce architectural styles which you inherit. They offer modularity, abstraction, low coupling, and high cohesion.

Struts2 is a very stable and simple framework that is fun to use.

Struts2 is a lot easier to use than Struts. Threads are safer because actions are POJOs and not singletons. Here is a long list of differences between the two.

Upvotes: 2

Umesh Awasthi
Umesh Awasthi

Reputation: 23587

Well Suresh first of all there is no one who can tell you or make your mind set to learn what and what not... regarding using struts in java..we are not using struts in java but we are using java in struts. if i got your question right that here goes some hints why we are using struts..struts/spring/wicket or any other well known names are framework in the software domain these are just a platform which provides you ease of work and help you to concentrate on your logic rather than other usual stuff. lets take an example of struts,this framework help you to develop web-application in much faster and productive way as you need not to thik in very deep how request is being handled and being forwarded to your core action class which actually will do the main work, you need not to extract every paramers from the request/response rather they are being handled by struts and with some easy to use methods you can easily get these things. another example like hibernate in that case you need not to write each and every sql query for CRUD infact we are using plain java like methods and hibernate under the hood taking care of generating SQL syntax for us as well handling conection and other stuff.

regarding struts1 and struts2 difference i thik you first need to know what exactly are the framework and what they doing for us,only than you can see the differences between both.

hope this will clear something for you

Upvotes: 0

Related Questions