0

I have a simple CRUD website in development process, almost done. I was asked to refactor the code but this time use struts 2 and commons chain. I read a couple of sites like this but wasn't able to know exactly what will be the key roles done by these two (struts 2 and commons chain) in my project. I was also asked that don't worry about struts tags like in this tutorial as the code that i made earlier can be used.

Can anyone give me an insight. Thanks

Note: A day back I started to see about struts 2

AabinGunz
  • 12,109
  • 54
  • 146
  • 218

2 Answers2

2

Well any framework is designed (most of them) to provide some sort of ease of use. That should be the driver when you chose one.

In your case, I can comment on Struts2. Using Struts2 provides and enforces a better design in terms of separation of your code responsibilities (model view controller). This way the over all application design is well formed. On top of this, framework provides many interesting features like interceptors, out of box request parameter assignments, validation, ui tags etc etc which you can benefit from.

So if you are still in the starting phase, yes - go through various frameworks available and weigh them out in terms of what ease you are looking for.

Nrj
  • 6,723
  • 7
  • 46
  • 58
  • Can you suggest someplace to start, some link might be helpful, where I can get a basic struts2 app running in my system. In the mean time I am looking out too. Thanks – AabinGunz Jun 09 '11 at 05:05
  • @Abhishek: Use the official struts 2 site, Manning Struts 2 is also very good. Some interesting short tuts are also listed on http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-tutorial.html – Nrj Jun 14 '11 at 05:10
1

If the website is almost done, I don't see any compelling reason to adapt Struts 2. In fact, the person who asked you all this is the best person to contact, in this case.

Regarding commons chain, yes it can help you implement Chain of Responsibility pattern if it can solve the cases in hand.

Adeel Ansari
  • 39,541
  • 12
  • 93
  • 133
  • Thanks for your reply. I want to have a basic role idea about struts2 in a general CRUD application. Such that when i discuss it with my senior i have some basic idea about what he is saying and i am not totally lost :p – AabinGunz Jun 09 '11 at 05:03