Migration path for a JDBC / struts / tomcat application

妖精的绣舞 提交于 2021-01-28 19:25:02

问题


I am working with a kinda large enterprise application which currently uses Struts 1.3 / JDBC and deployed on Tomcat 5.5.

  • We predominantly use Struts Action only and do not use Action Forms or Struts tag libraries, only JSTL.
  • We have a very thin DynaBeans based homegrown framework to provide very minimal light-weight, just-right-for-me resultset to object mapping. No JPA, No Hibernate, No EJB- just JDBC.

This combination has served us well so far and we are quite happy the way we have been doing things, scaling to small, medium, large customers very well with a single code base.

Since both Struts 1.3 and Tomcat 5.5 are EOL, we will have to move to a new technology stack for the product. Some things that we cannot change are -

  • Tomcat MUST be the deployment platform. We can move to Tomcat7.0, but not GlassFish or another container
  • We would like to stick with JDBC. No JPA / EJB possible because of the amount of Business Logic involved.
  • We have many many JSP for our views and UI and we need to preserve that, cant afford to re-write it all.

So we are only planning to move to an alternative framework to Struts. We have considered the following:

  • Struts 2.0 - Do not see much activity and progress, so kinda discouraged to pick that.
  • Spring 3.0 - Think of it as too heavy for what we want. Not sure if it will force us to use JPA, Autowiring, Annotations and stuff like that which we may not want to use immediately. Think that it must be difficult and error prone to bypass some of these and do our own.
  • Java EE 6.0 - Very similar to Spring, additionally not sure of level and kind of support under Tomcat. TomEE web profile does not feel very "native".
  • Play Framework & Wicket - Looks like I will have to throw away my JSPs and re-write them all (I don't have hands on experience with either of them, so I could be wrong)

I have used Spring, EJB JPA et. al in my earlier products / projects, so kinda aware of their merits and de-merits in general. But in this case I am looking for some insights into what would be a good option OR pros and cons of one over other to move a struts application to a newer framework while

  • preserving the investment already made in developing this application
  • preserving the ability of the application to run on low end servers for a small organization and to scale to large organization with beefed up hardware + horizontal scaling without any code change what-so-ever (all in a single code-base)

回答1:


From the description you have written, is not much seen that you want to upgrade to new frameworks. You just want to stick with the current configuration and enjoy what it gives to you. Spring and other frameworks are absolutely different in concepts and features, so you have a lot of time working on rewriting the software to be available to use these technologies that you don't need. Struts 2 is more appropriate candidate for migration from Struts 1.

Make sure you've read Migration from Struts 1 to Struts 2 for steps towards this process.

You can find Pros and Cons comparing Struts 1 and Struts 2.

To add to these features I'd say that Struts 2 not only bigger but heavier than Struts 1. Struts 2 in the default configuration intercepts and runs a lot of stuff to easy the development process, write less code, use recent technologies, but the cost for it is a complexity. You will have more time to learn framework itself to be able to modify it to suit your needs.



来源:https://stackoverflow.com/questions/31902705/migration-path-for-a-jdbc-struts-tomcat-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!