Recommendations ... JavaServer Faces (JSF), Struts, model2, others

We are looking at a redesign of the java business management web service that has been in use for over 4 years. The internal architecture of the software was custom built with poor separation between the presentation layer and the business logic. In addition, the general level of the model has proven that it cannot effectively keep up with changing business logic and needs refactoring. As I am planning this task, I am considering available frameworks that I could use to make the application more friendly to new developers hired and changing business logic. I've never used spacers or JSF before, but read them in a somewhat concise and overview method and at first glance I'm not too impressed with them, but I find JSF more intriguing.

The first both structures seem to focus on the Controller and View parts of the MVC pattern. Leaving you to do something at the model / business level. (I'm right?)

With rework, we want to be able to use external contractors to expedite rework, so finding a consistent development methodology is essential to ensure code quality and reduce inconsistencies and build-up times.

So, what's your recommendation for basics, techniques, etc. that might help these efforts. I really don't want to reinvent the wheel with a custom structure and find us in a similar situation later.

+2


source to share


3 answers


There are a few things you should think about when taking this approach:

  • Your specific needs versus the focus of a specific structure
  • Availability of coders who know (both internally and to the market)
  • The learning curve for the framework and its level of acceptance and support in the wider developer community.

Many people speak highly of Spring MVC, although if you are new to IOC (or not buying a concept), this may be a little more than you want to bite off "all at once."

Another well-established option is Struts (although I would strongly suggest Struts 2 for new development).

One thing to be wary of is the size and scale of the scaffold transplant. If your application is in dire need of a major structural reorganization, it is likely that you can end up starting from scratch and hanging chunks of your existing business logic out of a skeleton built on top of. Time / money / resources (and opportunity cost!) Should not be underestimated, and you need to make sure management is really buying back so you don't get traffic jams imposed on you halfway through. It's very important to "measure three times and cut once" here, and make sure you bite off a piece of work you can chew on - going from "legacy app" to "brand new modern app using all new technology" is frankly best done in stages ,but not immediately.

It would be helpful to understand the size and relative complexity of the application, as well as its underlying nature (is it a very intensive web UI application, or a back office system that does a lot of work?) In order to make better suggestions about specific frameworks: although you could would create most webapps on any given framework, some tilt more strongly in one direction than others (e.g. Struts and Wicket have quite different focus)

Also, there is nothing wrong with trying to create a pair of candidate platforms alongside an existing application. While I don't know anything about your current app backplane, unless you did something really weird, it's probably perfectly possible to install one or more frameworks and experiment with them alongside your existing app (e.g. write new features against them or rewrite parts of the existing code using them, then connect that code to the server). This will allow you to experiment and “try before you buy”. I suggest that your team give this twist to one or more shortlisted candidates to see how this will work in practice. This, by the way, is not a terrible way to approach refactoring:gradually replace old features with your new infrastructure.

Final (I think) one piece of advice: look long and hard at your DataModel and the interfaces to them. This will usually be where the real gremlins are, and no matter the structure, you want to get it right. I would strongly consider doing your refactoring instead of # 1 rather than accepting a specific structure. A strong datamodel is going to make implementing ANY structure (and handling updates) much easier ... and if your management changes direction and ultimately delays updating the infrastructure for any reason, the time spent reorganizing the data model will pay off.



EDIT:

Given your comments on the shape of the product, I would skip the "be very careful" advice. The place you are currently in is very common (and notorious) and has eaten a lot of teams (and careers) alive. You need deep understanding and support from stakeholders in the chain and on the business side as this will be a hugh event that will by its nature take longer and cost more than you imagine. The technical ability of the team to be clear and realistic about cost + scope here is CRUCIAL for success - if you underestimate significance, you risk your budget, your career, and possibly the business itself. If you overestimate, you may never start :)

One approach, when you have strong buying and management support, is to really view it as a brand new product - put old stuff in maintenance, roll up your sleeves and start developing a replacement system with all the knowledge you have acquired. in the previous implementation. In this case, I have developed a sans component structure for the components and data, and then I will consider how this set of candidate frameworks would support this implementation. Starting with a frame can lead you to unnatural places and can drop you back at the same place along the way.

Some well-known popular frameworks:

Struts2 - MVC / w AJAX support

Wicket - AJAX heavy

Struts1 - the Granddaddy of almost all Java frameworks worth seeing

Spring MVC - Spring IOC web framework

+2


source


If you like JSF and want to use it, I would recommend using JBoss Seam. You can also use Spring, but I think using JBoss Seam makes JSF much easier to use. I have been using it for almost 1 year with good results. And if you want to model your process as a business process, you can try JBPM (along with Seam).

If you want to learn more about Agile methodologies so that you can improve your methodologies and techniques, take a look at the Agilemanifesto at http://agilemanifesto.org/ first . Then start trying established methodologies like XP or Scrum.



But do not rush, start trying one change and the other do not confuse yourself

0


source


JSF allows you to focus on components, while JSP-based solutions are not that good or that much. You will still be coding a lot of jsp'ized html, while with JSF solutions, you really don't need to. Look at RichFaces or IceFaces as libs. RichFaces makes it easy to create AJAX files. Just add the tag <a4j:support event="onkeyup" reRender="output"/>

to your standard JSF control. In the example above, on the keyup event for the control, it will relay the scope <a4j:region

or other JSF Richfaces tag. Nothing easier.

0


source







All Articles