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.
Related
I know this question might be repeated many times but would really appreciate any suggestions. I am working on developing a web application in java (server side). The client is developed in javascript and html5 (another guy) and i want to make the developement independent. I have been using java for quite long but have no experience in web development. After endlessly going thorugh many forums and articles i am so confused.
The web app is pretty simple one with options for user to login and upload some data and access those later.
I started with basic sevlets and JDBC APIs. The web application is not very complex one
Currently i have servlets for each resource to handle post and get call on them.
The suggestion i am looking for is do i need to use some framework to make it better. There are so many like springs, playframework, wicket etc.
Any link to sample web applications developed just usin servlets apis will also do a great deal to me
Thanks in advance for the suggestions
I don't think you need any framework. As you said your app was pretty simple one. A java Framework could make a complex app organized. But would make a simple app complex.
However, if in the future, you want to extend your app further more. you might need a framework. The most famous web frameworks in java are SSH(spring, struts, hibernate), you can find a lot of materials easily, so I won't dive into the detail here. SSH frameworks are not easy, avoid using them if you app is not complex enough.
I am a reasonably competent programmer, with about 11 years experience.
I particularly like Ruby/Rails and ActionScript.
And Java is easy enough, I've used it for ordinary applications, and mostly as ones that run on the server, just not web-based ones.
I'd like to develop a web application in Java in order to leverage things like BlazeDS and help tie front-ends together with my previously-written Java apps. i.e. use existing Java code but in a web context.
But I'm having trouble - and confused - looking for a smooth start. I don't want to use Grails, been there, thanks, I want to use Pure Java, with whatever Framework you can think of. Spring, Hibernate, etc.
Where do I start?
Play Framework lets you get started quickly. http://www.playframework.org/
Spring Roo is a RAD framework for web apps. It's similar to like Rails or Grails, but uses code generation instead of metaprogramming magic.
This thread contains useful pointers on starting Java web development
http://www.daniweb.com/forums/thread249070.html
Since your goal is "Pure Java," how about Wicket? Straight from their feature list:
Wicket does not mix markup with Java code and adds no special syntax to your markup files. The worlds of HTML and Java are parallel and associated only by Wicket ids, which are attributes in HTML and Component properties in Java. Since Wicket HTML is just HTML and Wicket Java is just Java, coders and designers can work independently to a large degree and without relying on any special tools.
If you want more info, there's a web page on why you should use Wicket.
I've really enjoyed working with Spring MVC. It took a while to ramp up with Spring, but the whole affair has just made since after investing the time.
I have found JavaServer Faces 2.0 using Facelets to be a good compromise between power and ease of use, plus it allows you to use a lot of extra libraries when you get more advanced.
For JBoss you need to include JSF in your web application. Download the 2.0.2 distribution and see the documentation in there.
I have been learning ASP.NET MVC in the last few months and I think it is a great improvement over ASP.NET. For me personally, it is a joy to use (as opposed to ASP.NET WebForms :)) I started wondering how the .NET world managed to live so long without any such framework (at least not wide spread and supported by Microsoft as there may be .NET ports of Java MVC frameworks, like Spring.NET).
I know Java folks had such frameworks for a long time and there are many Java MVC frameworks available.
If a web developer was thinking about switching from Java to .NET, which Java framework can be the easiest to switch from, and vice versa, if an ASP.NET MVC developer is thinking about broadening his skillset and learning some Java MVC (web) framework, which would be most similar to ASP.NET MVC architecture- and feature- wise?
Which Java MVC framework is most similar to ASP.NET MVC?
SpringMVC, VRaptor, Grails (Not Java, but somewhat relevant on the Java world)
Play Framework seems to me. It has controllers as classes, actions as methods, Razor-like view engine, object binders and almost everything looks the same.
Even routing seems almost the same.
If I were looking for the simplest framework, I'd dive into Struts. Struts 1.0 was written in a day, and is possibly the most valuable hour-per-hour effort ever spent by a programmer.
If I were looking to broaden my knowledge and/or skills, I might lean towards Spring MVC. If you need some functionality for Java web development, odds are other people wanted it too, and that Spring already has it. (Spring is larger than just Spring MVC; you can simply use Spring MVC, but it integrates nicely with much more, if you choose.)
Wikipedia has a list of a bunch of frameworks here:
http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
and of those based on Java technology, about half are component based (that's what you don't want) and the other half MVC. If interested, you could follow the links on some of those to get more information.
In general,
the more mature of them will have more detailed writeups - both in Wikipedia and in the wild. There will also be more documentation, sample code, tutorials,...
The younger ones may be simpler, more fun, more versatile, as they build on the older ones, eliminate known shortcomings and add new features. JSF and Struts, for instance, are "big" in the industry but are considered by many developers (citation needed, I know) to be dated, clumsy, bloated, etc.
You'll probably have trouble getting an answer from people with enough experience to directly compare products on the .Net and Java side; most developers tend to stay on one side of that fence.
While I'm not knowledgeable about similarities with ASP.Net, I submit that Struts and JSF are the workhorses of industry on the Java side, and would be the kind of thing to be useful to have in your CV, even though or perhaps because they're not modern or sexy. Of those two, I think Struts has more of an MVC feel to it.
Apache Struts :
Apache Struts is a free open-source framework for creating Java web applications.
Web applications differ from conventional websites in that web applications can create a dynamic response. Many websites deliver only static pages. A web application can interact with databases and business logic engines to customize a response.
Web applications based on JavaServer Pages sometimes commingle database code, page design code, and control flow code. In practice, we find that unless these concerns are separated, larger applications become difficult to maintain.
One way to separate concerns in a software application is to use a Model-View-Controller (MVC) architecture. The Model represents the business or database code, the View represents the page design code, and the Controller represents the navigational code. The Struts framework is designed to help developers create web applications that utilize a MVC architecture.
The framework provides three key components:
A "request" handler provided by the application developer that is mapped to a standard URI.
A "response" handler that transfers control to another resource which completes the response.
A tag library that helps developers create interactive form-based applications with server pages.
The framework's architecture and tags are buzzword compliant. Struts works well with conventional REST applications and with nouveau technologies like SOAP and AJAX.
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.
Im porting a project from php to java. The project is a web-app based on php and ajax techniques with a javascript front-end. What java-frameworks would you use for something like this?
Does the result have to be written in Java, or does it just have to run on the JVM? In the latter case, you might want to consider Grails, which uses Groovy, a Java-based dynamic language that compiles to Java byte code and has full access to the Java standard API.
How well do you know Java?
Why are you porting it?
I can't really tell based on your description, but there are lots of Java web frameworks out there. Pick one. I prefer Spring.
I fear that you're about to be very disappointed. I anticipate a lot of questions like "Why can't I do X in Java? It's easy in PHP!"
Apache Wicket is a possible java based web framework you might consider. The default would be the java servlet and jsp frameworks.
without seeing the source code - you will need a complete rewrite. just "porting" will probably not work.
out of all available frameworks i'd recommend two: wicket if you want clean lightweight technology. with ajax. jsf/seam if you are in a corporate environment where it it easy to get tons of experienced developers.
I really like Stripes.
There's a really good book out on it too. Stripes ... and Java Web Development is Fun Again.
This question seems to come up alot. Related:
What Web Application Framework for Java is Recommended?
Best java mvc framework implementation for web apps
Does it make sense to use a framework for a simple java web app?
What language/platform to choose for a new web application?
In my opinion you would still do the same but generate the html with JSP and javabeans instead of php. javascripts and ajax will still work without a problem if the outputed html is the same.
It depends by the size of your project, the features and your resources.
If the project have'nt a lot of particular needs you can use Struts. Thsi is a stable framework, not really advanced but simple and powerfull for the development.
Another frameworks more recent and advanced are Spring and Wicket.
Before you start, I recommend you to do a check-list of your need:
Do you must porting a O/R mapping too?
Have you a stable developer knowing Java/J2EE?
Do you think to add some feature during the porting or in short-run?
etc etc
good luck! :)
I would port it to GWT
Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including Google Wave and the new version of AdWords. It's open source, completely free, and used by thousands of developers around the world.