We are discussing whether it's a good idea to switch from plain portlet development on a liferay installation to spring webmvc portlet based development.
We're starting the development of some portlets soon, so now is the time. But the problem I see is that we'd like to use some of the portlet 2.0 features, which won't work with versions older than spring 3.0. (Right?)
Has anyone insight, if it's worth the waiting? (When is 3.0 scheduled anyway?)
Is the current milestone stable enough?
Our first real release will be in the last quarter of the year, so the springsource guys have some time left to get a final out of the door... ;-)
Any ideas?
UPDATE
So, Spring 3 has been released and it supports all JSR286 features we need. (I think it's a pretty complete support for the JSR286 features)
The only drawback I am seeing is the documentation which is not up to speed in regard to the annotations.
We use Spring Portlet MVC 2.5 on Liferay and we have excellent results. Most of JSR-286 functionality(like events) can be reached be extending DispatcherPortlet class.
There is still a lot of bugs open for upcoming 3.0 release, so I would be rather conservative and stay with stable&mature version 2
The spring framework has an excellent track record of code quality. In the past their M releases were of high quality, so I would not be afraid to use it.
Juergen Hoeller gave Jul 2008 as the estimated release date for Spring 3.0:
http://www.springify.com/archives/15
I think they're late. 8)
Matt Raible lamented the fact in Oct 2008, almost six months ago:
http://raibledesigns.com/rd/entry/the_colorado_software_summit_and
I wonder if the new professional versus open source model has affected availability.
They also have the Spring DM, Spring Blaze, and Spring Integration work going on now.
Given their past history of quality releases, I'd bet that they're resisting the urge to release early in order to make certain the code is up to their standards.
I am just getting to know Portlet MVC with Spring 3.0 M4 and came across a modified PetPortlet sample making use of Spring3 (JSR-286) features and annotations. While it is Mavenized and probably not directly deployable on Liferay, it still provides good examples.
Please comment should you happen to come across any others.
Related
I'm trying to fully master and fully grasp Java's Spring 2.5 and Hibernate framework for a limited amount of time (maybe in in less than 2 days?) and would like to ask this community if you can point out where I can start in mastering both frameworks. I kind of understand that it takes time to fully master both frameworks but would it be alright if you can point out tutorials where annotations, the xml mapping, and many of the basic things I need to grasp Spring and Hibernate are explained to a beginner who only tried to understand within the past couple of days?
I've tried googling bunch of times and wasted 3 days already trying to figure out and understand the concepts but it seems I understood nothing yet.
One of the major problems is that I could only use the following: Eclipse, Maven, Jetty, MySQL and can't use others like Tomcat or Ant, etc.
I'm using Linux Mint 10 / Ubuntu 10.10 in learning this in short time (yeah, I am in a limited amount of time #_#).
I thank you in advance.
The Spring Reference Documentation (for 2.5.x) is a very good place to get an overview and examples on how to use the framework's features. I would recommend using a recent version of Spring, though (3.0.5 is the current stable release, 3.1 will be out soon).
The same goes for the Hibernate docs (choose your version there).
I know that reference docs are not that popular, but especially the Spring guys do great work putting together speaking examples. They also have a blog post series called "Green Beans" which introduces Spring features one by one. Maybe this should be your starting point, together with their sample projects SVN repository - the "Petclinic" project uses Spring and Hibernate together.
I'd recommend POJOs in Action, by Chris Richardson. It's a few years old but it still covers what you need.
After reading a ton of blogs and getting frustrated by all the different ways people suggest configuring these projects, I finally just created a very basic example project which integrates Spring 3.0.5, Hibernate and Ehcache. It also enables JMX easily. Take a look...
https://github.com/lookfirst/fallback
I would recommend spring Frame work reference docs. secondly, download the Spring Source Code, set up the project, go thru the internals, try sample given with spring download, google help for spring samples or tutorials.
You Will be the Master!
Guice 3.0 Beta is currently (nov. 2010) in Beta. And as a Guice 2.0 user I’m especially interested in the new Hibernate persistence integration (As I believe this is the replacement of the Guice Warp project). I have some questions and I really like to hear from people who already work with Guice 3.0:
How stable is the Beta version? Can it be used for production purposes?
Is the API stabilized? Or is it still under development?
Is there any target date for the final release?
I believe everything's quite stable as far as production-readiness. I believe Google's been using the latest code all along, and I know Maven 3.0 and Nexus are using a slightly modified Guice 3.0.
I don't think they've frozen things to the point of saying "there will absolutely be no further API changes before release", but I think anything more than extremely minor changes is unlikely.
Sam Berlin, one of the guys working on Guice, said that he'd like to have 3.0 out by the end of the year... but the more testing of the snapshot and feedback on it on the mailing list they get, the better.
Why not ask this on their mailing list? Anyhow from what I can tell they're pretty close, I know that the JClouds guys have been using it heavily and seem pretty happy with it. I'm using it for the chapter I'm writing on DI for my book and it's passed all of my use cases and tests so far, but I'm not running a production system here :-)
As a general rule you should be wary of using Beta software in production. I think when the Guice team say Beta they really do mean Beta (unlike a Web 2.0 Beta site).
There are possibly still some minor API changes possible, but I think they're pretty much done. If you're using it purely for JSR-330 DI annotation support then you're probably safe here
Not that I've seen on their lists, but I could be blind :-)
Currently working on a Spring 2.5 web application, looks as if the business has at least a 5+ year plan for it's usage.
There isn't anything in terms of a technology roadmap in place for the app.
Spring 2.5.6 is stable, and working smoothly. Staying with it won't be a mistake.
Spring 3 gives additional features and support for newer JavaEE specifications. I wouldn't say it gives something extraordinary.
I agree with #Bozho's answer. One significant new Spring core feature that isn't mentioned in the page linked is the Expression Language feature, which allows you to do a variety of things in XML wiring files that previously had to be implemented as custom code.
SpringSecurity in 3.0 is a mixed bag. On the one hand, there are new features and improvements to existing ones. On the other hand, they have broken source code compatibility in a lot of areas. People who cannot do everything with the SpringSecurity namespaces and the standard classes may be in for some head scratching, recoding, and in some cases pain.
Spring Roo generates spring 3 based applications. Not immediately applicable to existing apps, but it's great to be able to compare roo's best-practice output, and if you were 3.x based then you could copy roo config / code output into your existing application to get functionality for free.
Given an application using Spring 2.5, when migrating to Spring 3.0 what are the likely areas that will be pain points, i.e. things that the development team will have to spend time on to get things working. Assume the team would not try to take advantage of new Spring features as part of the upgrade, but just get the application to the state where it works as it did on 2.5. Taking advantage of 3.0 features would be the next steps to consider.
Edit: I have revised the question to focus on the pain points of the upgrade, which is what I'm really after.
Probably the biggest change in Spring 3.0 is that it now requires J2SE 5.0.
One of the Spring developers reply for a compatibility question in this blog entry.
Spring 3.0 aims to be 99% backwards
compatible with Spring 2.5. The core
APIs and SPIs will remain stable in
order to keep existing extensions (and
of course also existing application
code) working. Introducing generics
and varargs, as we've done in M1 and
M2, should still preserve binary
compatibility. That said, we generally
recommend rebuilding your applications
for Spring 3.0, in order to catch
potential API issues early. This will
also allow you to get the maximum
benefit from Spring 3.0's Java 5 API
refinements.
If you're lucky, then nothing will need changing, it should all just work. The Spring guys are very careful to retain backwards compatibility.
The biggest reason I can think of for it not working is if you're using code that was deprecated in 2.5, and marked for removal in 3.0 You can find that list here.
Do you still use session or entity EJBs in your project? Why?
EJB3 is a vast improvement over previous versions. It's still technically the standard server-side implementation toolset for JavaEE and since it now has none of the previous baggage (thanks to annotations and Java Persistence), is quite usable and being deployed as we speak. As one commenter noted, JBoss SEAM is based upon it.
EJB 3 is a viable alternative to Spring, and the two technologies may become more tightly related. this article details that Spring 3.0 will be compatible with EJB Lite (which I'm not sure what that is, exactly) and possibly be part of Java EE 6.
EJB is not going anywhere.
We're working with EJB here and it works quite well with JBoss Seam and JSF, Faclets and MyFaces Trinidad. Good UI, Templating, AJAX and stable production 24/7 running on JBoss 4.2.
It's a good stack for business processes, workflows, messageing, webservices and ui control. Fast delivery of features, easy programming and stable ground based on entitybeans with mysql persistance.
I don't want to miss the featureset of EJB 3 for the tasks our product demands.
See the overview of new features in Java EE 6. EJB 3.1 and WebBeans 1.0 help make a Java EE 6 container environment become easier to use, similar to frameworks like Seam on Java EE 5 or Spring. If you're familiar with Spring 3, this article illustrates how Java EE has evolved to become a comparable framework.
EJB is still there and growing up. There are many new features (SOAP/RESTful webservice, JPA entities, JAXB...) depend on it or at least reuse the philosophy of developing.
Yes, but EJB were stupidly complex for most use cases. Very clever, but real overkill in most cases. Hence the lightweight approach taken now-a-days.
Justin
I've just started back to work on an EJB project. I didn't remember how heavy and hard was to work with this technology. It was luck when Spring, Hibernate and Maven came. Since then everything was different and much easier.
I always could see this technology was never used properly and was taken as a pattern that I never understood.
It was supposed you needed two containers and if it was possible one server for each container. One for Business(EJBs) and another one for Views(MVC). I never saw that.
Well, it's good to know that EBJ is upgrading.