Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I've been doing some work with the JAX-RS reference implementation (Jersey).
I know of at least two other frameworks (Restlet & Apache CXF).
My question is: Has anyone done some comparison between those frameworks and if so, which framework would you recommend and why?
FWIW we're using Jersey as its packed full of features (e.g. WADL, implicit views, XML/JSON/Atom support) has a large and vibrant developer community behind it and has great spring integration.
If you use JBoss/SEAM you might find RESTeasy integrates a little better - but if you use Spring for Dependency Injection then Jersey seems the easiest, most popular, active and functional implementation.
Restlet has an extensive list of extensions for Spring, WADL, XML, JSON as well and many more, including an extension for JAX-RS API.
It is also the sole framework available in six consistent editions:
Java SE
Java EE
Google Web Toolkit
Google AppEngine
Android
OSGi environments
Its main benefits are:
fully symmetric client and server API when JAX-RS was designed for server-side processing
connectors for other protocols than HTTP (mapping to HTTP semantics) when JAX-RS is HTTP only
much broader feature scope including full URI routing control via the Restlet API (but can integrate with Servlet if needed)
full provision for NIO support
The JAX-RS API can be a good choice if you are restricted to JCP approved APIs (then don't use Spring or any extension of the JAX-RS projects like Jersey and RESTeasy!), but otherwise Restlet is the most mature framework (initially released in 2005) and will give you, in its 2.0 version, all the benefits of annotations combined with a powerful and extensible class-oriented framework.
For a longer list of features, please check this page.
Best regards,
Jerome Louvel
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
My team and I use Restlet extensively, but not its JAX-RS features. I can tell you that I've been very impressed with the Restlet developers and community; they're very active, engaged, responsive, and committed to a stable, efficient, reliable, and effective framework. I'm sorry I can't directly address your primary interest but I thought you might find my experience with Restlet valuable.
My colleague mentions why we are using RESTeasy for our current project in RESTful web services in Java EE with RESTeasy (JAX-RS):
Its reference implementation, Jersey, was not chosen because we had trouble integrating it well with EJB3 and Seam 2.0.
We are using the RESTeasy implementation of JAX-RS, because we had no trouble integrating it with our EJBs and Seam. It also has sufficient documentation.
There is another implementation from Apache, but I haven’t tried it because it uses an older version of JAX-RS.
Finally there is yet another framework for RESTful web services for Java called Restlet but we did not favour it because at the time of this writing, it is using a custom architecture, even though proper JAX-RS support is in the works.
It seems like there are 4 decent JAX-RS implementations, so you are probably ok with any of them.
For what it's worth, I have found Jersey (1.0.2) really nice so far. My needs are quite modest, simple back-end service, take care of plumbing and so on. And that Jersey does quite nicely.
Found out that Apache Wink is very easy to work with, supports JAX-RS and has many features beyond the standard.
I would use no framework. Just the one that comes with your applications server. If you use specifics of one framwork you'll lose portability and you'll be in the hell of what if the vendor of the app server includes a different version of your favourite framework. I'll stick to jax-ws.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I've got a really simple question but I find nothing interesting on Google.
Is there a Java equivalent of SignalR (.NET) ?
SignalR is a .NET framework that implements Websockets with a fallback for old browsers.
Really thx to you.
It seems that Atmosphere can be this what you are looking for.
From github description:
The Atmosphere Framework contains client and server side components
for building Asynchronous Web Application.
I didn't tried it yet, but this says that it supports major JEE-Servers (JBoss, Tomcat, Glassfish, Jetty) and all major browsers and transports (WebSockets, SSE, Long-Polling etc).
UPDATE 6/4/2014:
There is another notable alternative for "Java equivalent of SignalR". As of version 4.0, Spring Framework comes with support for WebSockets and server-side support for the SockJS. It means that it supports also WebSocket-Fallback, used together with a browser side sockjs-client library.
As Spring Documentation says:
WebSocket is not supported in all browsers yet and may be precluded by restrictive network proxies. This is why Spring provides fallback options that emulate the WebSocket API as close as possible based on the SockJS protocol [...] On the browser side, applications can use the sockjs-client that emulates the W3C WebSocket API and communicates with the server to select the best transport option depending on the browser it’s running in.
Still I'm not aware if there is support for something like SignalR Hubs (which involves JavaScript-code generation)in the Java Framework as of today, but on the other side I think you can easily imitate a SignalR-like PersistentConnection with full fallback support for older browsers.
Furthermore, because of JSR 356 aka Java API for WebSocket, I think it is only a question of time when the so to say "mainstream" Java Web-frameworks will be shipped with out-of-the-box support for Websockets+Fallback, especially considering the fact that all main servlet conteiners (like Tomcat and Jetty) and JEE 7 Servers (Glassfish, Wildfly) have support for JSR 356 already.
There is a Play framework module SignalJ
Update: SignalJ looks dead, look Scala Web Sockets
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I need to expose some services of the web application to remote clients via XML interfaces over http.
A number of provided services is limited (3-7), both request and response should be kept simple and do not require any special data types or cross-entity relations.
My goal is to keep the code clean and clear and have robust and performant application.
I would really appreciate your advices regarding the proper XML binding\processing tool to be used for that task.
UPD: My bad, haven't mentioned that restlet is required for implementation, however, as far as I am concerned, it does not impose any restrictions on the xml tool to be used.
Thanks in advance.
The JAX-RS specification (JSR-311) provides a standard means of creating RESTful services over HTTP. There are several JAX-RS implementations: Jersey, RESTEasy, Wink. JAXB (JSR-222) is the standard binding layer (objects to/from XML) for JAX-RS, and there are several implementations: MOXy, Metro, JaxMe, etc.
These implementations are also come pre-bundled with Java EE application servers (i.e. GlassFish and WebLogic contain Jersey).
Here is an example I put together using Jersey & MOXy in GlassFish:
Part 1 - The Database
Part 2 - Mapping the Database to JPA Entities
Part 3 - Mapping JPA entities to XML (using JAXB)
Part 4 - The RESTful Service
Part 5 - The Client
We've done some work recently using Apache CXF, and found its JAX-RS support to be simple and allow us to write very DRY friendly code.
There is a reasonable amount of flexibility, e.g. several different data binding layers to choose from.
How about XStream? http://x-stream.github.io/
XStream is a simple library to serialize objects to XML and back again.
I like http://www.restlet.org/
My advice would be to not use a binding tool at all. Just deal with the fact that what you are sending over the wire is in fact XML. The Spring Web Services reference manual describes the rationale behind this, which is called 'contract first', right here
I understand that what you are looking to write is not a SOAP service, but a REST service. That doesn't matter for the point I am making against using a binding tool, the principle of 'contract first' still applies.
Good luck!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am new to Java framework.
I am looking for a good Java framework to help me build a JSP web site.
I googled for Java framework and it returned a few related terms for me:
struts, Cocoon, WebWork.
I have no clue which of them is for beginning learner.
Do I need to download netBean or eclipse to work along with any of these Java Framework? I need an auto-complete tool that helps when typing hundreds of lines of code.
Please advise and help.
Thanks
Edited reason,
I have just found out that netBean has got Struts Java framework, what do you think of it? Is it good for beginning learner?
The Play framework makes it easier to build Web applications with Java. I havn't tried it though, but I feel it's "with" the present day web-dev framework ecosystem. It seems inspired by Rails.
Very much depends on your concrete needs but I'd invest some time into looking at Spring. It is a really great and flexible framework that promotes best practices.
I admit it will be a bit difficult to understand initially, especially if you're a beginner. But if you're willing to learn it's real fun. For using Spring framework you can use any arbitrary IDE, it really doesn't matter, although personally I prefer the Eclipse IDE, in this special case the Edition for Java EE developers.
As Juri said, Spring is worth looking at. For the specifics of web development, take a look at the Spring MVC tutorial.
Spring is pretty good. Struts is another framework with a pretty easier learning curve IMO.
#kwokwai: I have seen your comment on #Juri post.
Spring IDE would be helpful if you plan to choose Spring for your application.
Grails is my favorite.
While it's not Java the language, it's Java the platform. It compiles to Java bytecode and runs on any appserver / servlet engine. And integrates well with existing Java code.
Grails is more than just a web framework, it's a complete web application stack. But you can use only the web part if you like.
Grails really brings speed of development known to e.g. Rails to the Java platform.
During development, you can edit your controllers and services, and just hit reload in the browser, no redeploy needed (as you also can in The Play framework).
Tag libraries are really easy to create. And being able to write Groovy code rather than EL in the views (GSP, Grails' variant of JSP) is really powerful.
I would recommend Apache Wicket, its very easy, no XML-Configuration-OVerhead. Just have a look a the examples on the website.
Play! Framework. This is by far the easiest one to use. Been a user of Apache Turbine (since 2002), Apache Struts, CakePHP, I finally landed on Play!. You can watch a 10 mins video on http://www.playframework.org/ but here I would like to mention some of my gotchas:
Easy, actually too easy to use. Many people's first impression on Play is it makes web dev become fun again on Java
Scalable. Because of the stateless model, the only thing you need to do to scale your 5 page hello world web app into a million vists per day busy site is to increase your box and running more instance of your app. You don't need to change one line of code to reach there.
Performance. Check this to see how Play! outperforms it's competitors when you use it as a standalone http server
Very active community and very good contributors. The questions you post on Play's google group get answered promptly. And you can find many interesting stuff contributed by community at here
You can also take a look at Spring Roo. It allows you work with Spring in a very lightweight fashion. In terms of ease of use this seems on par with Play framework or even better (due to tools support). Spring itself is a very established application framework and you are very likely to work with it during your professional career.
Although I'm spring user, I would encourage you to look at JBoss Seam. This framework is built on top of other powerful technologies, such as JPA, EJB3 and JSF. You will spent some time learning it of course. And keep in mind, that in order to run its applications, you will need java EE server such as JBoss, not an ordinary servlet container like Tomcat (actually you can run Seam on Tomcat, but you will get into some problems). And java EE hosting costs usually ~two times as much as Tomcat hosting.
Here is the comparison of Spring and Seam:
http://www.andygibson.net/articles/seam_spring_comparison
Just google seam vs spring if you want more details.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Can someone suggest some good tutorials for getting started with JAX-WS?
Using various tools like wsgen etc...
You can start here:
Introducing JAX-WS 2.0 With the Java SE 6 Platform, Part 1
Introducing JAX-WS 2.0 With the Java SE 6 Platform, Part 2
NetBeans has really good support for JAX-WS and plenty of tutorials are available, e.g.:
Getting Started with JAX-WS Web Services
Glen Mazza's has written plenty of interesting articles on JAX-WS RI / Metro:
Web Services on Glen Mazza's Weblog
The JAX-WS web site references good resources:
JAX-WS Articles
Finally, the JAX-WS RI includes many sample for lots of use cases that you can checkout from:
samples sources
Or just download and unpack the JAX-WS RI.
This was a good starter tutorial, all the source code was provided and the steps were well documented.
Hello World JAX-WS at DZone
Then I found this one and as the author: Paul Taylor states, he couldn't find anything decent for a web services tutorial either that wasn't Netbeans based. He didn't want to learn how to use an IDE, he wanted to focus on the tutorial! I totally agree. I like tutorials, but not when the companies that put them out are promoting their products as the main emphasis, not the tutorial itself.
Jax-WS for Eclipse by Paul Taylor
This is another simple one that I found Hello World Jax-WS RPC Style: At this site they also have some interesting examples that follow this, including a TCP/IP monitor that I may try to watch the soap messages going back and forth.
Hello World Jax-WS with Eclipse & Glassfish Step by Step
This was a reference I used: Java API for XML Web Services (JAX-WS) Users Guide
Web Service with Jax-WS in Eclipse
Web Service Client Tutorial with WS
Jax-WS in 5 Minutes
This last one was a big help as I have to do something very similar at work
I really like the Netbeans tutorial: Netbeans: Jax-WS
I used the jaxws maven plugin.
http://java.sun.com/mailers/techtips/enterprise/2008/TechTips_Jan08.html seems like a good article to read.
Sample (HelloWorld) jax-ws web service using Maven and Java EE 6: http://seniorjavadeveloper.blogspot.com/2011/11/simple-jax-ws-web-service-using-jee-6.html
This is the best and easiest way to create a JAXWS
http://www.ibm.com/developerworks/webservices/tutorials/ws-eclipse-javase1/index.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to start web developing with java. I don't know how to start, what to learn,
or what is the best web framework to learn and use. Help me out?
I assume, that you're only new to web apps and not to Java itself.
For a starter, I can recommend the Apache Wicket framework for the front end. Their web site is full of examples, the mailing lists are a great place to get started, and Wicket in Action was an enjoyable read.
If you want to work with Java Server Pages (JSP), then you should definitely also include Java Server Faces (JSF) which make working with JSPs a lot easier. I can't advocate any good books to you as I went for web tutorials mainly. You might want to have a look at Apache MyFaces.
For the business logik, I guess the standard is Enterprise JavaBeans (EJB). I liked Mastering Enterprise JavaBeans 3.0. An older version of the book is available for free at TheServerSide.com. You should avoid EJB versions older than 3.0, because they are a PITA!
A separate part of the EJB 3.0 specification is the Java Persistence API 1.0 (see, e.g., Apache OpenJPA though the documentation is patchy). Other frameworks that support JPA are, e.g., Spring or JPOX (now being called DataNucleus).
Finally, if you want an application server for testing, there are JBoss by RedHat, SUN's Glassfish and Apache Geronimo (I preferred the last one, but you may have noticed my preference for Apache projects already ;-))
Good luck!
Well if you do not know much about Java, then first I suggest going back and getting your foundation in Java strong first (cause after all JSPs are java code embedded inside HTML), then proceed to learning about servlets and then move on to JSPs.
As far as learning JSPs is concerned, I would suggest buy a book, Head First Servlets and JSP is pretty good book.
Head First Servlets and JSP
JSP Tutorial
Getting Started with Web application - JSP/Servlet
I think Grails is a great way to get started. You can use the scaffolding to get started quickly, which allows you to dip down into the more complex aspects of Java web development at your own pace. I recommend you watch this screencast to see what you think.
This is a big subject and you will need to learn a lot.
I can recommend first learning Java very well.
Head First Java - http://books.google.dk/books?id=5VTBuvfZDyoC
The Java Tutorial - http://java.sun.com/docs/books/tutorial/
You will need to be very proficient in Java, as most framework documentation expect this of you.
When you have those under your belt, you are much better equipped to determine which framework is best for you, as that very much depends on which facilities you actually need, and which you do not have any use for.
The WEB4J tool is likely worth a look.
It has a much smaller number of classes in comparison with other tools. It is "full stack", so it helps you build all parts of your web app. Thus, you don't have to learn several different tools - just one.
A college instructor related to me that he felt it was "almost perfect" for his students, since it was at just the right level, and didn't hide things behind complicated abstractions - it was plain to see how all the parts worked together.
If you know java you can always start reading this book, https://secure.manning.com/books/deshmukh It will give you the basic foundation for java web development.