web applications -- where to start? - java

I'm fairly new at webapp development in Java and have been looking around for a decent tutorial on this subject. I've found a whole bunch of frameworks from struts to seam. Which framework should I look at considering my level of expertise in this area is fairly low?
Also is there a global tutorial on web application fundamentals?

Java EE tutorial covers the basics of web applications.
As far as frameworks go, take a look at this question

I would suggest to learn Seam as it builds further on JSF, an industry standard.
It is also one of the newer and better web application frameworks available in the Java landscape today.
Furthermore, it has great support for both EJB3 and simple pojo development.
You should also do some background reading about servlets.

I cannot help you with Java, but here is a link to an excellent SO post that will help you with the second question.

If you want something easy for web applications development I would highly recommend grails. Other frameworks are good but learning curve and configuration complexity is high. Most of the time you will find against them.
With Grails you will have application up and running in few minutes.

I'd focus on learning HTTP/HTML first - you need to know the basics of static web development before building dynamic web applications.
Then just do some basic Servlets and JSPs - all other Java web frameworks are built on this - and if you jump right into higher level frameworks, sooner or later you're going to run into an issue you need to debug / develop that's going to require knowledge of how the underlying servlet / JSP APIs work.
After you learn the basics start looking at other frameworks built on top of this to see what they offer.

Related

What Web FrameWork will be good for java developers?

i'm very new to the word Framework. I need to design some websites, i want to learn any Web framework for java. And hence this is the first framework i'm learning in my life, what framework i have to select?
GWT
JSF 2.0
Apache Wicket
Apache Tapestry
Struts
This is most popular frameworks as i know.
I like GWT, but you may choose what you want, it depends on your goals. To familiarize you can work with each
Although this is a fairly subjective question, learn Struts 2! (the 2 is important!) It is fairly simple, uses plain Java objects, the design is clear. You can start with a small project and expand as you learn.
This depends on what exactly you are trying to accomplish. Are you trying to write the backend server logic? Are you trying to implement a web-based UI that presents / communicates with that logic?
For creating a web-based UI in Java, you might want to try Google Web Toolkit (GWT). For the backend logic, there is Google App Engine. I'm sure there are lots of other frameworks that others will list.

Route to study Java EE and associated technology?

I am an undergraduate student with knowledge of core Java. I want to learn Java EE and related technology for my final year major project and career prospect. what are the Prerequisites for Java EE?
I and my friend have done some research on this matter. We found that we need to know about Servlets, JSP, Javabeans, RMI, etc. We have basic knowledge about these topics. Can we start learning Java EE?
We also found that using framework like Struts or Spring etc will have additional advantage to our software. As per my opinion I should use lightweight framework instead of enterprise framework like spring. can we use these framework in small projects? If no, then what is a better approach/framework?
Our project is a collaboration software for managing code development for open source software development.Project is of Distributed nature.
what are the Prerequisites for java EE??
Strong knowledge of Java SE, especially JDBC. Good object-oriented design and programming skills.
can we start learning java ee ?
Of course.
As per my opinion i should use
lightweight framework instead of
ENTERPRISE framework like spring.
I don't know what "lightweight" means to you, but Spring was created as a lightweight alternative to EJB 2.0. You can certainly start learning Spring, but perhaps you'll appreciate it more after you've done at least one web project without it.
I don't recommend Struts. I think it's an older technology - the first web MVC framework - that's been bypassed by others. I'd recommend Spring MVC or Wicket over Struts. If you want to stick with the Java EE standard, try Java Server Faces.
can we use these framework in small projects?
You can use Spring in any sized project. You don't even have to write the entire project using Spring to gain advantage from it.
if no then what is a better
approach/framework?
Start without any framework. Servlets, JSPs using JSTL (no scriptlets) and JDBC are sufficient to start.
our project is a collaboration
software for managing code development
for open source software
development.Project is of Distributed
nature.
Collaboration and management of projects have nothing at all to do with your choice of language or framework.
Is the application distributed, the developers, or both? Choice of language or framework have almost nothing to do with it.
Yes. The official Oracle tutorial is at http://download.oracle.com/javaee/6/tutorial/doc/
I would suggest that you initially keep it as simple as you can. Java EE is big enough that doing a project just with core technologies will keep you quite busy.
I would suggest you learn Ruby + RubyOnRails. It's far more easier and productive than any Java framework you can get. The advantage of this approach would be: you'll have one more powerful mainstream language in your arsenal, and you'd also learn a very powerful web framework which is considered a state-of-the-art framework in the web world.
If you are interested in following this approach, retag your question with ruby-on-rails to receive valuable inputs from other Rubyists.
Hope that helps,
Aai Zhavli.

From Java GUI to Java Web

I've been doing quite large application recently with Java - Swing. Now I'd like to move to web. Basically - I am not Microsoft guy, Java is fine with me. I've checked some basics of Java EE framework and decided that my choice will be Spring. I already am familiar with JDBC. Learning Spring is one thing, but working just with GUIs (C++ and Java) means that I have very poor knowledge of web development.
Before I start reading tutorials of Spring MVC, what should I know to develop web solutions? I am mainly interested "how to" with graphics ... start from scratch or some nice IDE RAD-like development ? I kind of like f.e. Silverlight and integrating to web or asp.net win forms - allows us 'GUI' people develop faster. So can you please give me some useful advices?
Thanx
You might want to check http://code.google.com/webtoolkit/ for some client-side GUI javascript code compilationn from Java language. The code might even look like Swing in a way :)
Another thing of note is, perhaps you might want to use something like Hibernate with Spring instead of using JDBC.
In web, the GUI is mainly done by CSS. You can find here a quick CSS tutorial/reference. You get here some ideas of the capabilities of CSS. The "raw" UI part is done by plain HTML, which are in case of a Java EE webapplication usually served up from good old JSP files or in case of JSF, Sun's own MVC framework, also from XHTML files, powered by Facelets.
Talking about JSF, there exist several rich UI component libraries which can be used on top of JSF, such as RichFaces (showcase here) and IceFaces (showcase here). With those libraries you don't need to pull the hairs out to do the CSS based look'n'feel work.
Spring MVC doesn't offer any rich UI component libraries like that. Spring is in my honest opinion also obsolete in the improved Java EE 6 API which (finally) offers many Spring-like facilities out of the box.
Before you start learning Spring, consider Grails. It is built on top of Spring and Hibernate and it is much easier to learn and use. Grails use Groovy, but if you know java, learning groovy is very fast. Developing Java EE or Spring apps is just too painful and boring. And you can use grails with NetBeans or Eclipse.

Tools for java web applications?

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!

Java for intermediate .NET Developer

I am a .NET Developer with about 5 years of web development experience using Microsoft technologies starting with classic ASP to ASP .NET 3.5.
I do have a little background in Java as well and can write/understand Java code very easily. I am looking for resources (online, books) that are compatible with my .NET experience. I am only interested in web development in Java and want to start at intermediate level even if it may require me to look up some details.
What path or resources would you recommend for intermediate .NET web developers to gain equivalent proficiency in Java web development tools?
Get an IDE: IntelliJ (my preference), Eclipse, Netbeans;
Get an application server: Glassfish (my preference; either v2 or v3 Prelude), JBoss or, if you're feeling adventurous, SpringSource dm server;
Get a JDK eg 6u11;
Get a copy of Spring 2.5.6 (or 3.0M2 if you're feeling adventurous);
Get a copy of the Spring reference documentation;
Put the pieces together.
Get yourself a copy of eclipse, and just start reading other people's code, and reading some java docs. The Java website has all the docs online, and they're one of the best language specs I've seen.
Really, if you know C# pretty well, Java should be a cake walk. The languages are pretty similar, so you just need to get to know the different frameworks.
Probably the most helpful book in regards to learning Java's web development framework, Java Server Faces:
Core JSF
- Great examples and explainations throughout on the whole process of using the JSF Framework.
And of course for anyone new to Java I would recommend:
Effective Java
- Covers various design patterns and practices.
In my experience that official Java exams are better than the .Net equivalents, so it may be worth starting there?
Search for a servlet/JSP tutorial (Good, albeit a little old, example here).
You'll get basic knowledge of Java web application development.
Whatever your level is, JSF for Nonbelievers is the best introduction to JSP/JSF.
I'd check out Bitter Java.
It's a book that shows you the wrong way to do things, why it's wrong, and then it shows you the right way.
It pretty much falls in line with the evolution of the j2ee framework. Started with servlets, then moved into jsps, then command pattern, etc.

Categories