views:

205

answers:

4

Possible Duplicate:
Choosing a Java Web Framework now?

I am a final year student doing my Bachelor in Enginering(Computers) course from Mumbai University. We are supposed to do a project for the final year and my group has decided to build a webapp for geographicaly separated developers to work collaboratively on projects online. In other words, we wish to implement a small subset of something of the sort of github.com. The final implementation of the project is to be submitted until February-2011.

I have some basic knowledge of Java and have done web-development using plain PHP. Some research on the Web and this has helped me realize that I should no longer write pages in PHP. I was suggested to go for RoR or since I know the basics of Java, I was also suggested to learn Scala/Lift. But my other group members suggest that we stick with Java.

But, I don't know what options I have for web-development using Java. Some study sugested that writing JSP pages or using frameworks like Struts, Spring, Hibernate, or the GWT are possible options for working with Java. Which of these should I go with? What is preferable for this kind of project topic - Standalone app or a Web App ? Any other solution to working with Java or any other easy to learn language apart from the frameworks mentioned above?

+1  A: 

Github is web-based; your app should be, too.

So that means the following for Java:

  1. Servlets (HTTP listeners)
  2. JSPs (dynamic HTML templates), written only with JSTL (templates that are compiled to servlets)
  3. JDBC for database access
  4. HTML and CSS for pages
  5. JavaScript
  6. A great JavaScript library like jQuery.

That would be enough.

I wouldn't recommend Struts until you've done some of this on your own. I would recommend their Front Controller Servlet pattern.

I love Spring, and I highly recommend it. Spring MVC is a better design than Struts, IMO. But it's not necessary to start.

Hibernate is not necessary. If you write your persistence tier using interfaces, you can always change the implementation from straight JDBC to Hibernate without affecting clients.

Think about web services: SOAP or REST? The former has better tool support, but the latter will be simpler.

Start with a good object model for your problem, without regard for UI or persistence. If you get that right, you'll be in good shape. If not, the UI and persistence will be a struggle.

Think about security sooner rather than later.

duffymo
Wow - why the downvote? I'd love to hear the explanation.
duffymo
I'm the illiterate here, but, I too would like an explanation.
Ramrao Rodrigues
Maybe a struts fanboy.
BalusC
A: 

I would try to build a web-based application using Grails. It is based on Groovy, which runs on the JVM. It builds on Spring and Hibernate, allows you to access any Java library, has good support online (especially here at stackoverflow), and can help you get something up and running very quickly.

Javid Jamae
Grails is a fine recommendation, but it could be dangerous for someone who knows nothing about how the stuff underneath works (Spring, Hibernate, Groovy, Java web apps). What does the team do if it breaks on them? Where do they go?
duffymo
Dangerous? Its just as "dangerous" as using Hibernate and Spring directly. What do they do if those technologies break on them? They come to sites like this, ask questions, RTFM, etc. As an analogy, I don't recommend that new developers stick with the command line because the IDE might "break on them". Yes, Grails is an abstraction, but I feel that its solid enough to recommend to beginners.
Javid Jamae
+1  A: 

Spring is probably the most used framework.

If you are new to java web applications, check these sample projects. It will guide you on the basic concepts and configs.

h3xStream
A: 

Considering that this is a final-year project, and that you are honing your skills towards the job market, I would not go the gwt route - I like GWT, it is nice, but it won't advance your career.

GWT is not comparable to the other frameworks that you mentioned - Spring is the solid rock that everything else integrates with, and it is a smart move to learn it. It have a very adaptive learning curve as well - you can take just what you want from it and leave the rest if you don't have time.

Use hibernate if your DAO layer is expected to become too complicated during the project.

Use jsps, ajax, jquery or other variations for the web application itself. Spring-mvc or struts are great choices too.

It sounds to me like you are in the right path anyway - I wish I'd known all these frameworks myself when I was an undergrad.

EDIT: some people have mentioned grails. I wouldn't recommend it for an undergrad project. I think you are better off learning some basics first, and I don't mean Java's elementary basics, I mean Spring itself as a basis, Hibernate too, and some client side layer (e.g. jquery, ajax, etc.)

Yoni