Reputation: 4224
I have just started developing a web application where server side code will be in java.
For front end, I have in mind the way of showing content in the old/usual way. Like this, 1) I will have some static HTML pages at the beginning. 2) There will be some links on these static pages that requires server side interaction. Ex: A Registration Form. When user clicks on submit button, the servlet/jsp specified in action attribute of tag will get called. Thereafter, the servlet is used to do the backend processing required and finally the same servlet will be used to generate the response html (Ex. The page saying that the registration is successful.). I hope I will do this by using out.println("...... my dynamic content .... ") in servlet.
My Question is, Is this the ideal way of generating a dynamic response in todays world of RIA ?
Is there any way to replace the old style of writing static html pages with something cool stuffs ?
Upvotes: 0
Views: 110
Reputation: 3763
Modern Web Application interfaces should have a MVC Pattern. MVC is separates pages to 3 parts which a web page involves, model, view and controller.
Briefly, model is the underlying data model of the page. view is the visual site of the page and the controller is a handler of user actions.
Some of MVC libraries
JSF is a component based MVC library and it is a Java EE standart. There is very good component suites for building UI for java web applications. PrimeFaces, IceFaces and RichFaces are some of them.
Spring MVC is a spring project for java web applications. There are a lot of functionality and features inside it.
Struts is another MVC library.
See Also
Upvotes: 0
Reputation: 5003
Most modern frameworks are all about dynamically generating the view.
I haven't used Play! as commented, but I'm sure that too can provide everything you need to dynamically create pages as well as provide statically defined pages if needs be. I'm sure there are others that I haven't named as well.
Upvotes: 1