Struts 1.x vs Struts 2.x

后端 未结 7 1802
隐瞒了意图╮
隐瞒了意图╮ 2021-01-12 05:30

I have reviewed a few Struts 1 vs 2 questions on SO but none seem to answer the question in the perspective that I am looking at it with.

I am about to start work ar

相关标签:
7条回答
  • 2021-01-12 05:36

    If you are building a system from scratch I would definitely move onto version 2.x of Struts. The learning curve will not be great for a Struts 1.x team, but you will be able to take advantage of an up-to-date MVC framework.

    For me the two main features of Struts 2.x which will enhance productivity are:

    • Built in AJAX support
    • No more ActionForms - you can bind directly into Domain Objects if you want, so this intermediate step has gone.

    If it's a big project you're working on, you might want to look at a component framework e.g. JSF 2 or Wicket. If you're determined to stay on an Action based framework then I personally find Stripes a more productive framework.

    0 讨论(0)
  • 2021-01-12 05:36

    Well the main reason is moving to struts 2.x in place of struts 1.x is struts 1.x is in maintenance phase now not in much active development.

    now when it starts with a team who have good understanding of struts 1.x is that they will get the underlying system quickly.but before let me to put one point in a clear manner. struts1.x has no similarity with struts 2.x the only similarity is the name inherited from the parents. struts2 has following advantages.

    1. Action based framework
    2. A strong Ajax support
    3. Interceptors approach (core of framework) 4 Decoupled from the Serve let API which means plain POJO so unit testing will be much much easier

    but my point is simple struts2 and struts1 only similar in terms of name but in terms of underlying architecture they are quite different.

    0 讨论(0)
  • 2021-01-12 05:37

    Given that your have a team with good experience in Struts 1.x and your product is stable as well, I don't see a great reason to migrate to Struts 2. Apache too seem to agree that http://struts.apache.org/roadmap.html#migrate_s1.

    0 讨论(0)
  • 2021-01-12 05:46

    More Generally, Struts 2.x layered framework compare to Struts 1.x. For example in data layer , Struts 2.x has DO layer between VO and DAO.. Similarly other features are mentioned in the below link..

    http://struts.fromdev.com/2008/08/struts-1-vs-struts-2.html ..

    Since your team has more experienced with struts 1.x , i don't think it will take more time to migrate your code in to struts 2.x.

    Please be specific what kind of difference u are expecting..

    0 讨论(0)
  • 2021-01-12 05:51

    in struts2.0 there are more feature and advantage , in struts2.0 there is no form beam, a good and power full validation framework and most imported in struts2.0 for every request there is one instance of action but in sturts1.x only one instance of action for hole application.

    so choice is yours . :)

    0 讨论(0)
  • 2021-01-12 05:54

    Struts 1.x is 2000 vintage technology. Why on earth would you even consider sticking with it on a brand-new app?

    The biggest drawback that I can see is that Struts locks you into a JSP-based, browser UI. Struts Actions are reusable only within the framework. You'll have a hard time seamlessly integrating a mobile device into that system if you need to.

    I'd start thinking about web services, preferrably REST-based, and AJAX. The world has changed. I'd look into alternatives to Struts, like Spring or Play. Picking up a new web framework wouldn't be that big a deal, but the benefits could be worth it.

    Those employees that have done nothing but work with an outdated framework for the last five years will thank you, too. Time for new skills.

    UPDATE: If you've tried, and can't be late, and too many constraints, then I'd say you already know your answer. What are you hoping to get by coming here? I don't see an argument that you've failed to think through.

    0 讨论(0)
提交回复
热议问题