Searching for a web framework practicable for my few critical requirements in a new Java EE 6 project, I read here the now many threads on this topic, and I finally could reduce the number of envisioned frameworks to JSF 2.0, Wicket 1.4 (among the component-based) and SpringMVC 3 (among the actions-based).
Concerning these frameworks, I'll need some advice if and maybe how the following requirements are realizable:
Preferably separated designer/coder workflow, so that designers -- optimally -- can independly elaborate their HTML, CSS, JS/jQuery files with their favored tools like Dreamweaver.
Easy integration of the many existing (fancy and animated) jQuery components, such as this Sliding Login Panel (a demo can be seen here). Thus, the requirement actually is easy integration of exiting HTML+CSS+jQuery code AND ALSO:
For an ui component tree, a sync mechanism to synchronize the view state dynamically changed on the client side (via JS/jQuery) with the corresponding view state on the server.
I guess I'll need that. E.g., think of the above "Sliding Login Panel" having an 'open' or 'closed' changeable on the client side via JS. Its initial state is programmed to be 'closed', and the user decides client-side to always maintain it open. Now, when the user navigates somewhere and comes back to this view again, the login panel state is unintented 'closed' instead of 'opened' (as this is its initial state and no dynamic state updates occurred server side).
Thus, a sync mechanism will be needed, right???
Optimally externalized (somewhere centralized) navigation rules for
(a) arbitrary inter-page navigation (static nav rules), and
(b) "wizard-like" navigation (dynamic nav rules dynamically determined from
current state/outcome).
A good performance (load time, server memory comsumption, experienced responsiveness, etc.).
The obvious questions are:
Which of these reqs are (well) supported by JSF2, Wicket and Spring MVC3 and which not?
Generally, with this reqs -- and as I'm still unsure with the technical aspects/consequences: Which framework type (component- vs. action-based) should be chosen in that case (i.e., which critical decision aspects or "rules of thumb" should be kept in mind)?
Thank you very much for your advice and help.
Martin
JSF:
navigation rules
. They are a powerful mechanism to define navigation in an external .xml file. A navigation rule can be defined based on logical outcomes and/or actions taking place on specific pages. They can be forward or redirect based, with or without extra parameters.view scope
, small amounts of data used by your backing logic can very easily be cached between requests. This saves you from hitting the DB after every request and can greatly improve performance.One of the areas where JSF really shines is its component model. It's very easy to compose components yourself via its composite component concept. You can also create components in Java, which is a bit more involved but still absolutely not difficult.
Because JSF's component model is standardized and very clearly documented, many, many third parties provide ready to use component libraries. E.g. RichFaces, Primefaces, OpenFaces, IceFaces, Trinidad... the list is nearly endless.
Some extra note about the performance. In comparing any of three web frameworks you mention the difference is negligible, and as a rule of thumb the web framework is not where the majority of time is spend when processing a request. This is almost always in the Database and in IO.
The web framework can help by making it easy to prevent going to the DB, but even if web framework A is 10x faster in synthetic tests that only hit the web layer than framework B, then in practice you would barely notice this if only 5% of a request's time is spend in that framework.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With