I'm coming to Java from C# & ASP.NET MVC, I'd love to find an equivalent in the Java world that I could use on the Google App Engine. I've already started to have a play with FreeMarker and even made the first steps towards writing a very simple framework. Ideally I wouldn't have to do all the hard work though, someone must have done this already! So my question is - what frameworks are there out there that would be familiar for me coming from ASP.NET MVC and I could use them on Google App Engine for Java.
The key things I'd want are:
Simple Routing - /products/view/1 gets mapped to the view action of the products controller with the productid of 1
Template Engine - some way of easily passing 'ViewData' to the view, and from the view easily accessing it, ideally I'd love to avoid anything that is too XMLy (thus why I like FreeMarker).
I am currently working on a Google App Engine app using Spring MVC. It is a lot more mature than ASP.NET MVC so you shouldn't be disappointed. As an added bonus you have the whole IoC power of Spring.
For the view layer I am trying out Velocity. It is pretty simple but I have yet to decide if I will prefer it over JSPs. I had a brief look at FreeMaker but didn't like what I saw. If you want to stay away from XML'y JSP templates than I recommend you give Velocity a spin.
The only problem I have had with Spring on GAE is file uploading. The MultipartResolver implementations both rely on a temporary file directory. After writing my own implementation I'm back to seamless uploading of files in my models.
There are a couple of MVC frameworks that you should consider (that's what I'm doing now). Initially, I went with Spring MVC (3.0) and the cold start on GAE is horrendous! It takes about 10 seconds to start (and I'm not even using anything complex, like spring security, etc), so I need to use a cron job to keep it alive. So I don't recommend that you use Spring at all on GAE.
Take a look at the following frameworks:
VRaptor
Slim3
Google Sitebricks
As for the templating, I use Sitemesh -- used it for quite a while now, so don't see a need to switch.
Hope this helps!
Play Framework would fit the bill. It's a modern MVC framework for Java and has a Google App Engine module to provide compatibility. See http://www.playframework.org/modules/gae.
Another benefit to using Play would be portability. You can deploy Play using its built-in webserver (optionally behind apache for caching, load-balancing, etc) or you can bundle as a .war file for deployment to the many Java application servers (Glassfish, Tomcat, ...).
I also have a strong preference for Freemarker. I suggest that you look at the Induction framework, its template engine is pluggable but the default support is for Freemarker. Induction is a light-weight and fast MVC framework (7.7K lines) but has many features absent in the major MVC frameworks, such as:
dynamic reloading during development when you change the controllers, views or models
file uploads so simple (not much different that a string input)
no configuration required for controllers
capability to analyze dependencies between your Models, Views and Controllers using your IDE
regular expression based URL mappings
best support for managing redirects of any MVC framework
As for the file upload issue raised by #pjesi, Induction allows you to set the size threshold at which files getting written to disk. If this is set large enough it should not try to write any files to disk.
Check out the getting started tutorial here: http://www.inductionframework.org/getting-started-tutorial.html
JavaServer Faces (JSF) I've heard is similar to the microsoft MVC framework. (I use JSF but have never used .NET MVC). And I believe JSF 1.1 works fine on Google App Engine, and I suspect that the newer versions of JSF will work if you stick to using XHTML instead of JSPs as the templates. There are also some nice libraries which let you leverage an AJAX interface on the JSF framework, RichFaces is a popular one.
Check out
JavaServer Faces on sun.com
and also
JBoss RichFaces
Related
Ok, I know this is a vague question, and I expect a vague/basic answer.
I am well versed with PHP driven MVC frameworks and how the process of serving pages works. I'm very interested in learning Java, and I figure the only way to learn it is to do it. However, after reading page after page after page, it gets more confusing as I read.
I'm running into GWT (front end), Hibernate (ORM connection?), Spring Architecture, Spring Roo (what is this?), JBoss (servelet), JPA (ORM), POJO (a style of using regular java objects with orm?), Maven?
My basic question is how do all of these fit together? I like the idea of using a framework, because it's worked well in the past with PHP. How do I use this functionality with java? Suppose I wanted to build a web application with a relational data store. How does java authenticate, initate a session, and serve pages with dynamic content? What is the process?
When responding, please don't say "stick with what you know," (as I've seen on other pages) because I'm very interested about java and I'm trying to learn.
I totally hear you - too many acronymns have propped up as Java EE has evolved.
I will try to put an explanation
Java is the language
Java EE (Java Enterprise Edition) is the general term used to encapsulate all Java technologies that help create an enterprise/web application with Java
So a typical web application with Java looks like follows:
Front End
Use JSP or JSF for server side processing and rendering (JSP and JSF
offer ability to define your UI using HTML and server side tags that
bind easily with your Java Beans) However they do tend to mix UI with
backend if not implemented correctly
you can also use plain HTML and any client side toolkits for rendering (such as jquery, dojo, extjs or flex) and fetch your data
from the Java EE server.
you can even mix the two (use a client side framework in a JSP to achieve best of both) or use a toolkit like GWT that offers client side richness with javascript with Java APIs and ease of accessing your java beans
Middle tier
Java Servlets offer the base for all server side processing with Java EE (Servlets offer session persistence, HTTP request processing, response processing) and typically offload the business processing to a model bean - which could be a POJO or spring bean.
Servlets are Java programs you write and are executed in what is called a Java EE container. Popular containers are tomcat, IBM websphere, BEA Weblogic
To help implement a good MVC architecture, there are several frameworks and tools provided on top of Servlets:
Struts2 and Spring MVC are examples of such frameworks
To make it easy to implement web services, Restlet/Jersey help with REST based web services, JAX-WS/APache Axis help with SOAP based web services
Integration with backend database/persistent store
You could use JDBC in your POJO or other model bean to access the DB using Java.
Or alternately use one of the frameworks such as Hibernate to make it easy to interface with the DB backend
Sun's petstore application is a good place to start to learn how the pieces fit together
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-eedocs-419425.html#7522-petstore-1.1.2-oth-JPR
Build and Deployment
Ant and Maven are tools used to build your app and manage dependencies
the application gets packaged as a WAR or EAR file and can be dropped into any Java EE container to deploy it. Once it is deployed, it can be accessed using a URL
Tools like Eclipse, Netbeans, Oracle JDeveloper offer integrated IDEs to help with local deployment and testing
The good part with Java EE is that you can pick and choose the components you want to use to build your webapp.
The problem Java has is that it's fairly old and there are TONS of frameworks and packages that do similar things as other packages. At the very core, however, is the Servlet, that specifies how Java behaves as a server over the HTTP protocol.
With that basic building block, there are lots of web frameworks like Struts, and Spring MVC that build up layers of functionality by using lots of good OO development patterns, like Fiters, Delegates, Factories, MVC, etc., to allow the developer to put together an application that takes web requests as input and returns a web response as output.
Those frameworks often build on other frameworks or packages to give application developers more capabilities at different layers of the application. This includes things like ORMs (like Hibernate) to talk to relational databases, or view compositing frameworks like Tiles or Velocity to help put together an HTML page as part of the response.
There are lots of other acronyms and tools and layers that get built up around web frameworks, but essentially they are all just programming tools that have useful functionality pre-built and just need to be used.
If you are looking for a more packaged web application development framework that is more cohesive and doesn't make you feel quite as lost, you may want to take a look at Grails. It is in Groovy, but it is very close to Java in terms of the language and actually builds on top of lots of the other tools you have heard of.
Grails itself builds on the Spring and Spring MVC frameworks, as well as Hibernate, so it's using the same technologies as other more pure Java frameworks, but it abstracts the ugly details away so you don't have to worry about them unless you want to. You can then bundle in additional functionality, like authentication / security, through plugins. If you are well versed in PHP-based MVC frameworks and how they work from an architecture standpoint, you will feel right at home in a similar MVC environment like Grails or Spring MVC. The Grails User Guide is a great place to start, and the rest of the documentation is good too.
If you are new to the Java language, I would strongly suggest doing a few small applications (not web apps, just simple ones) to learn the language and get familiar with how things work. Java is very different from PHP, since PHP bundles in a lot of the base functionality into the language whereas Java has a fairly sparse language with much of the commonly used functionality coming from libraries.
Once you have a good grasp of the Java language, I would jump right to the Grails framework and I would skip all of the nitty-gritty details of servlets and ORMs and Hibernate, etc. at first because you don't need to know it all and there is so much there that it can get in the way of actually understanding things.
Then, once as you start to build out an application with Grails, you will gradually get a deeper understanding of the technology Grails is built on in order to do more complex and powerful things. Slowly, you will work your way into Spring and Hibernate and build up an understanding of how things are put together under the covers, but you can be doing real things faster since you don't have to know all of that from the beginning and can quickly make web applications in Grails the just work, especially with an understanding of the MVC architecture pattern with respect to an application responding to a web request.
Wow, not only is this an open ended question, but it could have pages and pages of answers. I worked in php ~ 7 years ago without a framework so I'll try to point you in some starting directions and compare my experience (which is outdated and sans framework!)
You need an application server just like your Apache server for your Java web app, such as Tomcat, Jboss or Glassfish. These servers handle serving dynamic content.
On top of the server you have your web frameworks which you've mentioned GWT, Spring, and Spring Roo. Spring Roo is like Rails, but in Java. GWT goes all out and and will write your html/javascript code based on your Java code.
In Spring You can define objects to be used in your forms and then when they are submitted the entire object is passed back so there is less work. I remember the days of getting a lot of $_POST[] stuff and I'm thankful not to have to do that when using spring. There is Spring Security that you can use for auth.
The web frameworks are configured to connect to the database and then there is the database abstraction ORM, Hibernate. In PHP I used EZSQL for abstraction which didn't contain nearly the amount of features Hibernate does. Hibernate has a steep learning curve, but is worth learning.
For dynamic GUI's you'll probably want to research JSP, but may be interested in learning JSF.
If I were you, I'd pick an application server, maybe tomcat, then a web framework to play around with, personally I'd go with Spring. The framework will probably have dynamic GUI examples so you'll pick up jsp/jsf. Then possibly add the ORM and a build tool to build externally from your IDE, such as Maven, Ant, or Gradle.
There are some very mature java libraries that each target a very small need in a web application. This means that many tutorials on the subject will have to pick and choose the libraries for each need. For someone just starting out from your position, this probably sucks.
Naively, then, I searched for "java full stack framework" and found: Full stack framework for Java
The benefit of a full stack framework is that you don't have to choose each component. The framework has strong (perhaps rigid) opinions on how ORM is done, how templating is done, how mapping URLs to functions or actions is done, etc.
As for your list of technologies and acronyms:
GWT - a framework from google that focuses on the front end. Poorly stated, write your front end functionality in Java and have it magically transform into javascript.
Hibernate (ORM connection?) - yep, store and load objects in your app.
Spring Architecture - Spring is pretty close to a full-stack framework, but it doesn't have as many rigid opinions on things. You can swap out templating engines, swap out ORM, etc. Not a bad framework, though. You might want to simply follow a tutorial on Spring (see below on Roo), and use the components suggested by the tutorial. Just know that you might find something else later that fills a particular niche.
Spring Roo (what is this?) - Spring Roo takes Spring and becomes opinionated (use what we say). This allows for less code on your part because it provides the code that integrates the various components. It still allows quite a bit of flexibility when you want to change something. Bonus, it comes with a nice tutorial.
JBoss (servelet) - Usually I think of JBoss as an application container. Since the Java EE spec is a bit more complicated than simple CGI--there's a lot of things that need to be set up by the web server (loading classes, loading configuration files, connecting crap together)--JBoss does that stuff. Alternatives are Tomcat or Jetty.
JPA (ORM) - Yeah, it's a common set of interfaces that the various serialization providers might implement. It might be a database, it might be something else. But the idea is that your code for storing and retrieving objects would look the same.
POJO (a style of using regular java objects with orm?) - In context, probably. "Plain Old Java Objects" are nice for any library. Sometimes a framework might require that you inherit your classes from some special class, like Model or Controller to work properly (also, HTTPServlet). This isn't good, because it restricts your own class hierarchy design and makes your own code less flexible. Consequently, things that work with POJOs are considered better.
Maven - Maven is a tool that helps manage dependencies. Without it, java has its own form of DLL hell. Library A depends on version 1.1 of Library B, but Library C depends on version 1.5 of Library B. Ohhh crap, time to read through a tutorial on classloaders. Don't worry too much, though, any tutorial on java web apps is likely to tell you exactly what you need to download and use.
The first thing I would suggest you to start with, given a knowledge of http protocol, is the JSP technology. Although you would probably use some framework like JSF2 for instance, it is important to start with JSP in order to well understand the technology and how to use it to deal with request/responses (that's my humble opinion of course).
Once you are familiar with JSP and, let's say, JSF 2.0 (you can find loads of documents on that topic) the next step is to try to connect with a data source. In Java EE technology there is a specification called JPA (Java Persistence API). JPA is just a specification for ORM (which is, roughly speaking, mapping an object java model with a set of DB tables)
Once you have your web application working with some basic pages and some operations on a DB you could enforce the security of your app introducing some security mechanisms.
this is a very good reference and start point for all of these topics and much more. It's a long path and it will take you some time. But, believe me, it's worth it!
Good luck!
I suggest you google those keywords and look for some books and tutorials.
Maven
is a tool for managing your Java projects and artifacts (JARs, WARs, etc.). I'd start learning Maven first, so that you have a foundation to create your Java projects on. It also handles your dependency management: you just specify what JARs you need in your application and Maven will download them for you.
JPA (Java Persistence API) handles the Object-Relational-Mapping of your entities. You can write POJOs (plain old Java objects) and map them to your database tables.
Hibernate is a JPA provider (i.e. implementation of JPA). Usually you don't have to deal with Hibernate that much, most of the time you can use JPA directly. You just configure the JPA provider in the persistence.xml config file.
CDI (Context and Dependency Injection) see description. CDI "wires" the components of your application together.
Springframework started as a framework to offer Dependency Injection capabilities, but today it's much more than that. The WebMVC module of spring might be interesting to you. You can write Controllers and Views (using JSP for example).
Servlet API A servlet acts like a little server, handling a HTTP request and generating the response. You can write your own servlets or use a web framework to do it's job, for example Spring's DispatcherServlet or Java Server Faces, or whatever framework.
JSP is a technology to write templates for your HTML files. JSP files are being compiled into Java classes and can contain HTML code, JSP-specific XML code and Java code.
Example:
<ul>
<c:forEach items="${countries}" var="country">
<li>${country}</li>
</c:forEach>
</ul>
renders a list of countries, where ${countries} might be a collection of country objects (or strings in this case).
JSF (Java Server Faces) is another framework for building web applications, utilizing JSP and/or XHTML for defining the views and backing beans for the backend part. I would start learning with JSP instead of JSF, it's easier to learn.
Most of the frameworks are part of the JavaEE standards portfolio. For stuff like CDI to work you need either an application server (like JBoss AS) or at least a server with a servlet container (like Apache Tomcat or Jetty) in combination with Spring.
Spring and Hibernate are not standard, but they implement many of the standard APIs nowadays.
**EDIT: ** you might also want to learn about Annotations in Java code. They are around since Java 5 and are widely used as an alternative to XML based configuration.
So my suggestion is that you start learning Maven (not necessary tho, you can also manage your project manually), then Spring and JSP to be able to create a simple web application and then JPA/Hibernate to make your data persistent.
In my opinion learning Spring is much easier than learning the whole JavaEE APIs, since Spring is quite good documented.
One of the nice things about GWT is that you'll right your client code in Java, with all of its benefits and if you have server code, that could also be in Java as well, and you could share some of the source code, even if the front-end ends up running as JavaScript.
TO build a basic Java web application, go through this tutorial as it will explain the core foundational technologies with the standard Java EE platform and how to develop something real with them.
http://netbeans.org/kb/docs/javaee/ecommerce/intro.html
It will demonstrate the standard Java web technologies such as EJBs, Servlets, JSP, JPA, and how to use Netbeans for your IDE.
Most beginner's are very overwhelmed by the thousands of different technologies and platforms out there with the Java EE framework. Java caters to a very 'open source' type of community and that means that you have ALOT of different choices and road maps on how you can build applications. This is very different from say the .NET world where everything is pretty straightforward and there's a very clean cookie cutter path.
Once you have learned these foundational basics by going through the tutorial, you will have a grasp on what the Java EE framework. Once you understand these basics, you can then start to learn about Maven or Spring and how those type of technologies can help you build better applications and you can make better and more educated decisions.
GWT - Web interface tools. Some competing technologies: Spring, JSF, Wicket
Hibernate - ORM mapping for databases. Competing technology: JPA
Spring Architecture - Web Framework. Competing technology: JSF, Wicket, GWT
Spring Roo - An MVC style flavor of Spring.
JBoss - Application hosting. Competing technologies: Glassfish, Tomcat
JPA - ORM mapping for databases. Competing technology: Hibernate
POJO - Plain old java object. Just a simple object.
Maven - Maven is a way to manage libraries or dependencies that your project uses. There's a central server that hosts many of these libraries and if you ever need to import a new one to use in your project, it's as simple as searching through the server and then copy and paste the configuration settings that they provide you into an XML document called the POM file or pom.xml
Vijay's answer above is pretty much spot on. I'll elaborate on a few points.
Most of the "fameworks" that you mention, spring, roo (which is just a way to work with spring), gwt, struts, etc. all work on top of "Java EE". Java EE is Sun (now oracle's) term for the "standard" way to work with web applications. Java EE also includes a lot of more enterprise stuff like EJBs, JMS, JMX which you won't really need to concern yourself with unless you're doing very high end stuff.
JSP is the part that will be most familiar to you coming from PHP, it's a way of embedding code inside of an HTML page.
Servlets are the middle tier, that's where database connections are created and application logic happens. As it turns out, JSPs are converted into Servlets at compile time.
All Java EE stuff runs inside of a "servlet container" or an "application server". That's the big difference between java and php. Your choices here are usually Tomcat, JBoss or Jetty.
Maven is a build system that helps you to manage 3rd party jar files (libraries) and compiles and runs your test codes. It has plugins to deploy your code to tomcat/jboss/jetty.
POJO stands for "Plain old java object". Most modern frameworks try to shield you from the complexities of what happens under the hood and let you work with "POJOS". This comes into play when working with something like spring or hibernate. You may also see the term "java bean" tossed around, that's a standard way of defining "pojos" that just sets up a convention about how to name getter/setter methods and constructors.
I would recommend getting a book on getting started with JSPs/Servlets and starting there.
I am planning to write a medium scale web application. The server side technologies will include Java, Hibernate, MySQL and the client technologies will include Html, CSS, Javascript and Jquery.
I am looking for the best suitable Java framework for developing web (Struts, Spring, Wicket and so on).
I consider myself heavy Jquery user and I really prefer to do client side stuff.
Wicket for example has modules like the date picker and other modules (AJAX) that should make life easIer with javascript and acts like a replacement to it. But I really prefer javascript.
I thought of writing an application with client side and Java Web Services.
What do you think?
Do you know a framework that isn't afraid of Javascript or don't
suggest replacement to it but tools to use it?
Component-based frameworks generally provide ready-to-use components, that come with their own JavaScript code. If you don't like this, I would stick with action-based MVC frameworks, which generally don't care about what you use at client-side.
My preferences go to Stripes and Spring MVC, but YMMV.
I'd recommend the Play! Framework.
It is a MVC based framework and you can use hibernate, work with a MySQL database and it offers templating for easy HTML generation as well as working well with CSS and Javascript (even includes latest JQuery in download). There are also tons of modules you can add to your project to make development faster and easier.
Play 2.0 should be released fairly soon (currently available in beta) which provides support for CoffeeScript and Less CSS (see here) amongst many other new features.
Edit
StackOverflow answer showing how easy it is to create webservices in Play: https://stackoverflow.com/a/4513047/681807
Well all the framework you have mentioned (struts, spring, wicket) , none of them afraid of javascript.
Like in Struts2 and Spring they have provided build in ajax support for developer like me who is more comfortable with serverside development than client side work (ajax/jquery fancy stuff).
Its on individual how he/she is using JS with any existing framework and you are even free to use simple HTML at you client side with whatever JS way you want to apply to your UI.
Framework support to UI is always intended to provide a close integration to the server-side so as to speedup the overall development time.
In Short i can not recommend any framework as that will dependent upon you project requirements which fits perfectly as per your need, but none of the framework will stop you to use JS in the way you want to use.
I'm in the "technologies selection" phase of a small, single-page web application that will be heavily-based in AJAX, and which will report to a Java backend.
In a previous question I posted several weeks ago, the SO community at large felt strongly that I would be better off going with a Spring MVC-based web app than with something in JSF. Since Spring is request-oriented, and JSF is component-oriented, it would only make sense to use Spring for something that is going to be getting a lot of asynchronous requests.
If I were going the JSF route, then my next set of decisions would be whether or not to use so-called UI component libraries for the view technology, such as PrimeFaces, IceFaces or MyFaces.
So, I'm wondering: Does Spring MVC have anything similar to, say, PrimeFaces (or its likes) for creating the view component for my page(s)? I know its not component-based, but I'm not all that familiar with Spring MVC's web platform and was wondering what are some de facto standards (if any) or typical technology stacks that Spring web developers use for constructing nice web pages.
And, if Spring just uses run-o-the-mill template engines, would something like Freemarker suffice?
I guess this is a "best practices"-type question for a budding Spring web developer.
Thanks in advance!
Typically, the value so-called UI components lies in how they keep track of user interactions on the server side by integrating with a stateful framework.
Since you have decided to go for a request oriented framework, it would make more sense to use some well-known client-side JavaScript libraries instead. Popular choices include:
Backbone.js – an MVC foundation for user interfaces
jQuery UI for some premade widgets (calendars, etc.)
If you want to go down a more complex route, but with a more desktop-like feel, Sproutcore
Finally, if you wish to avoid JavaScript, you can useGoogle Web Toolkit, which compiles Java to JavaScript and is supposed to have good integration with Spring.
Personally, if I don't need a lot of standard prebuilt widgets, I like Backbone.js + underscore.js + jQuery. I don't like Google Web Toolkit since it feels like writing a pidgin JavaScript, and at that point I prefer to write JavaScript directly.
Yes, JSF is component oriented and Spring MVC is request oriented.
I recommend you to have a look at Thymeleaf Template engine, which is a complete replacement for JSP Engine
....
Thymeleaf Features are:
It allows natural templating.
HTML5 support
Higher performance by utilizing in memory caching
Click here for more
Additionally apart from the things mentioned by Ludovico Fischer, if we consider the same question in now a days tech world than you can use one of the most power full thing of recent world : Angular. There are 2 sample scenario's.
If your architecture is full client side: The integration is very natural for it. Spring MVC expose your service as a REST (JSON / XMl ... ) and your client application with Angular JS consume your JSON. Here the war application (Spring mvc ) must be deployed in a Servlet Container (Tomcat) and your client application can be deployed in the same server or in another server Nginx , Apache etc..
If you want to keep page generation in the server side and only use AngularJS for some nice DOM manipulation so your code must be deployed in the same war (WEB-INF). Mixing the two approachs is not always a good idea. You can try thymeleaf to stay in server side page generation.
Thus in this way you can have simultaneously the cool featuresof angular like templating, testability and clean view code.
Here is another approach (Not JSF) to let Spring MVC to work with ZK UI components - Rich Web Application with Spring MVC CRUD Demo
In that article, it used Spring MVC controller to communicate with ZK UI components. (all in Java code)
What are the different ways to create a web-application in Java? Are there tools available other than straight-up servlets?
Open source web frameworks in Java and related view technologies:
Tapestry
Apache Cocoon
Apache MyFaces
Spring MVC
Google Web Toolkit (GWT)
Java Server Faces (JSF)
Apache Struts
Turbine
Seam
Makumba
Java Server Pages (JSP)
Stripes
OpenXava
JPublish
wingS
Strecks
AribaWeb
Echo
RIFE
Anvil
WebOnSwing
Click
ThinWire
Facelets
Wicket
Check http://java-source.net/open-source/web-frameworks for more options and to read a brief overview of each one.
There are many many web frameworks for Java that allow you to build Web Applications. The vast majority are built on top of the Servlet API, but provide a layer of abstraction that you interact with instead of dealing with servlets directly
My favourite (for what its worth) is Wicket
An quite old and simple standard is CGI, and java can do that: http://www.apl.jhu.edu/~hall/java/CGI-with-Java.html
A more recommended today would be to use a web-framework. These usually abstract from the Servlet API and provide a ground for common patterns in web development.
Here is a quite long list of available choices: http://java-source.net/open-source/web-frameworks
In java there's also Facelets, JSF and many other frameworks, like Spring MVC.
JuanZe gives a good answer with the list of frameworks. Here's some more detail.
I'd say take a look at Struts, as it's one of the oldest and simplest frameworks. Struts v1 and v2 are two different beasts; Struts v1.0 was written mostly in a day, and you can learn it in an hour, and might be a very good introduction to web frameworks.
I currently use Spring, and wouldn't go back to Struts from there. The nice part of Spring is that it comes with the framework (Spring MVC), but there are dozens of other "nice to have" components that really help you out as you continue to learn 'em.
Other developers I work with complain regularly that Seam is the way to go. They've said some pretty intelligent things in the past, but I really like Spring, and our project is married to it.
Wicket also looks interesting; Spring is very heavy on XML, and Wicket gets rid of that, which is a very happy thought. That said, there's a pretty huge gain with some of the XML in Spring, so I'd worry about losing that.
As an addition, I'd take a look at Apache Commons, formerly called Jakarta Commons. It's a collection of useful libraries of stuff that probably should be included in the core Java API. Discursive has a wonderful book that walks you through it.
if you are asking about tools interface to develop a web application.i suggest eclipse coz its too convenient to use,flexible and can run on pcs with low configurations.i have just 512 mb ram and i m using it easily
As a quickstart you could download Netbeans http://netbeans.org/ , you can try almost all kinds of J2EE technologies with a preconfigured app-server and database using included sample projects. It tooks only seconds to build and run and if you like analyze the code.
and here there is another one, a very young one this time: (µ)Micro. It is open source, Apache 2 license, and available on Github. I built this framework for fun and I was trying to port and simulate as much functionality as I could from my experience as a Sinatra/Rails developer. Cheers!
I want to develop a web application, like an online scheduler. (Yes I know it's been done a million times.)
Most of my experience is in Java, so I want to leverage that when considering technologies.
I've primarily been a systems developer with little exposure to UI programming, so I think this is where I will need to do most of my learning.
Do you have any suggestions on the technologies I should focus on? I want to focus on technologies that are marketable and easy to learn.
So far this is what I think I need for a 3-tier architecture (from the ground up):
Database (likely MySQL or PostgreSQL) - SQL, JDBC
Back end server - Java
Web server (Tomcat) - JSP, Servlets
Web Framework - Tapestry (weak on this, any better alternatives?)
Browser technologies - HTML, Javascript, CSS (need to learn)
I've heard about "Rich internet application" development tools such as Flex and Silverlight, but I'm not sure about the market for such technologies.
Edit: Seems like there's a lot of mention of Spring/Hibernate, so I'll look into that. I appreciate the feedback.
I think you've got your bases covered pretty well.
You'll probably want to look into some frameworks / libraries to make it easier on you.
Web Framework - Wicket / Stripes / JSF / Tapestry (component vs request based frameworks)
Javascript Library - JQuery / YUI / Dojo
As for your template language you could use JSP / Velocity / Freemarker.
Just study up on the frameworks and tools maybe try a few out and see which ones work best for you.
Just FYI I'm currently using.
Apache - web server
Tomcat - servlet container
MySQL - database
Stripes - request based web framework
YUI - for ajax
Spring - dependency injection
Hibernate - Object Relational Mapping
jsp - to dynamically generate html
I'd personally add Spring to this list. Dependency injection is definitely a great technology to learn, and Spring lets you use it as much or as little as you like, in my experience.
You haven't explicitly mentioned unit testing, but that should certainly be part of the mix - I don't have much experience outside JUnit as an actual testing framework, but there's also EasyMock and JMock (amongst others) for mocking of dependencies.
None of that's web-specific, but still important stuff IMO :)
I would have to disagree that there isn't a market for Rich Internet Application. There is actually a growing trend in enterprise size applications being made as RIAs. The advantage with RIA over normal web applications is usability. You get all the advantages of web application but still are able to keep the desktop-like user interface.
You say you come from a Java background and haven't had much experience with web technologies. Well, I have to say that you really sound like an ideal user candidate for either GWT or IT Mill Toolkit (based on GWT). Both are frameworks which allow you to create rich internet applications purely in Java! No HTML or JavaScript skills required. You will have to learn CSS to make your own theme for the application.
Both the frameworks are open source and suite very well for commercial use. What separates IT Mill Toolkit from GWT, is that it is server driven, meaning business logic is implemented and ran on the server rather than as JavaScript in the client browser (which is the case with GWT). This server-driven architecture makes the application much safer from a software security point of view. The advantage of GWT over IT Mill Toolkit is the larger user community.
What comes to the ORM frameworks, Hibernate is quite popular. However, I'm not very fond of it, because even though it technically implements Java Persistence API, it doesn't always behave as expected and you'll have to use a lot of hibernate specific annotations, which ties your application pretty hard to hibernate (bad thing!) and you cannot just easily swich to another JPA provider if you'd like to. Antoher ORM framework implementing the JPA is EclipseLink. I haven't personally used EclipseLink in enterprise size applications (because I still haven't had the chance to), but I'm using it for a smaller project and it seems to be quite nice. EclipseLink is open source and its lisencing is friendly for commercial use. EclipseLink is continually developed by Oracle, so its backgrounds are solid. It is actually based on TopLink, which is Oracle's closed source JPA implementation.
Hope this helps :)
Asked basically the same question some time ago, with some pretty useful answers:
Tools for website development
If you are going the with a Java back-end, I would recommend Hibernate for your JPA, JSF with RichFaces (AJAX/skinning) and Facelets (view rendering/templating) for your front-end, and Seam to put it all together. It's a wonderful combination.
If you go with Spring, then you may just use Hibernate going to mysql, and you can have everything you need there.
After you write it, and you want to start improving on it, then perhaps start looking at doing more on the browser side, but, initially, you may want to just have it be without ajax calls.
The Spring Framework documentation may be helpful, as there are many parts to Spring that you can use, optionally, such as Spring MVC, Spring Framework, Spring Webflow and Spring Security, if needed.