Shailesh Pratapwar
Shailesh Pratapwar

Reputation: 4224

How to start with a Java based web application?

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

Answers (2)

erencan
erencan

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

About jsf

Upvotes: 0

EdH
EdH

Reputation: 5003

Most modern frameworks are all about dynamically generating the view.

  • JSF for the JavaEE umbrella (and extensions like ICEfaces and Primefaces do provide some rich features)
  • Spring MVC can provide a lot of the same functionality for the Spring umbrella
  • Google Web Toolkit works all in Java, where the bulk of the client application is converted to JavaScript which runs in the browser... you can still have services on the Web Server which would be in Java

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

Related Questions