The Next Spring: Google Guice?

by Steve Anglin

Could the open source agile, lightweight Google Guice be the next Spring?

16 Comments

Alex
2007-03-13 06:56:05
Guice is only an IoC container while Spring provides many more.
Guice is annotation-driven and thus can only run in Java 5. So it's more a competitor to Seam, which is regarded as annotation hell...
Mark Menard
2007-03-13 07:04:16
I thinks it far too early to be saying, even thinking, "is Guice the next Spring." It's been out for what about two weeks, if even that long.


I'm not saying this to defend Spring, but Spring is well entrenched in a lot of organizations. It will take a long time for some other framework to displace it.


Also as Alex said, Guice requires Java 5. That will slow it down. Many people don't like annotations, that will slow it down. Spring also offers many services that Guice doesn't.


Maybe Guice will become an adjust to Spring. I could see that happening.


Mark

Alex
2007-03-13 07:09:15
By the way, Guice also works with Spring wherever possible.
Alex
2007-03-13 18:28:35
Actually, Spring's actually got a similar Java-based annotation-driven configuration solution that is currently in milestone.


Spring IoC is designed to be completely decoupled from the configuration language.


The problem of large volume of XML configuration in Spring is because of the lack of DSL in Java.


Please see the blog of the "A Java Configuration Option for Spring" by founder Rod Johnson.
http://blog.interface21.com/main/2006/11/28/a-java-configuration-option-for-spring/

Bob Lee
2007-03-13 21:29:13
Alex, Spring's new Java configuration and Guice's approach are very different. Spring pretty much just rewrites the XML in Java, while Guice does away with most of the external configuration.
Stefan Arentz
2007-03-14 04:53:32
No. It is comparing apples to oranges. Guice is a nice little IoC container while Spring is IoC plus a whole bunch of components on top of that.


Guice is nice if you are interested in just IoC and you want to use existing components or reinvent the wheel. Spring on the other hand is a complete solution for things like IoC, AOP, J2EE integration, remoting, etc. etc. etc.

Bob Lee
2007-03-14 09:32:22
Guice supports AOP, too, as much as I think you should support anyway. You can even use Spring's TX interceptor.
Conny Lundgren
2007-03-14 12:54:29
What it means for seam? I really can't tell, but since Bob Lee (one of the Guice project owner) serves on the JSR299 (WebBeans) EG, so perhaps some of the ideas will be merged into this JSR.
Steve
2007-04-06 11:30:19
Seam could integrate IoC and other Guice ideas.


It's interesting to note that Spring's project PitchFork allows for Java EE 5 standards integration, which seems to be a response to Seam.

Pubby
2007-06-06 01:43:55
Today I attended the session on Guice and i think google did a nice job of mock ups of seam and added tid bits here and there.


Its like adding cinnamon to Tazo chai that's all they have added a little more bits and pieces to seam.


The birth of software took place before i was born but what i noticed in the recent past is software is getting more complex and to maintain or code we are developing some "n" number of tools.


I remember every tom, dick and harry was running behind EJB in early 2000 but it got so heavy now some of them are getting rid of EJB's.


Many companies are developing many tools to show their supremacy in technology but I think the main thing is too keep things simple and easy to understand for other people.


Just because google is making some toilet bowl doesn't mean we need to replace the toilet bowls every where on the planet not every thing that comes from google is great.


Guice works good for people only in some specific areas of development, BMW is definitely a great car but its useless if you drive in sahara desert like wise google's guice.


By the way i am not from Microsoft or any other big company and i dont hate Google. I do love google and its products.

Govind
2007-08-13 13:46:44
All they(google) are trying to do is to provide architects one more column in their technology stack decision chart. Everyone would like to have best of the world but just for simplicity sake we hardly replace a part of large framework with a tiny piece from somewhere else. I would have talked in favour of guice if it was a framework like spring but at this stage they just don't compete against each other. Spring+Hibernate leadership is going to continue for few more years till seam or guice or someone else develop a complete framework with more agility than spring. Till then it could only raise a few blog topics here and there. Guice is perfect for high school project where you only want simple aop and nothing else.
Eelco Hillenius
2007-08-30 22:07:43
I love projects like Guice. Very focussed, very elegant. Could definitively use it for a next project.
lagarto
2007-11-20 09:20:20
"Guice is perfect for high school project where you only want simple aop and nothing else" that sounds like the comments peaople used to say with EJB 2.1 and Spring first versions.... ;)
LANDON
2007-12-01 03:40:18
Keep a wide berth
Sergio
2008-01-29 11:28:27

I like the programmatic approach used by Guice to configure modules. We have been using programmatic configuration since the start in Mentawai.


Check how you can do IoC and Auto-wiring with Mentawai very easily, with no need for an external IOC framework. You are always free to use a external framework, but check this first:


recipes.mentaframework.org/posts/list/8.page


recipes.mentaframework.org/posts/list/14.page


Sergio
2008-01-29 12:07:24

I like when Alex says that Seam is annotation-hell! People wanted to solve the xml-hell problem. So they created the annotation-hell. Why not use plain-good-old-java code like Guice does for its modules?


Mentawai uses just one annotation for everything: @Overrides.


Mentawai is a full-stack solution for java web development. Take a look and you may realize its simplicity and abstraction power:


http://book.mentaframework.org


http://recipes.mentaframework.org