Discussions

News: The Essential Introduction to the Spring Framework Updated

  1. Rod Johnson has updated the "Introduction to the Spring Framework" that has been the essential first article to read about Spring, originally posted here on TSS in 2003. The new article re-introduces Spring based on all the recent framework and community evoltion in the last couple of years. A must read for beginners and experts alike.

    Read Introduction to the Spring Framework

    Threaded Messages (26)

  2. Nice one Rod, well written.

    -John-
  3. Nice one Rod, well written.-John-

    +1.

    Great intro to the control and flexibility that spring gives you.

    Can I also just point out that the forums on the SpringFramework site are an excellent place to pick stuff up too.

    Currently using spring on a number of server side java apps and finding it reducing development time and complexity in many ways.
  4. Can I also just point out that the forums on the SpringFramework site are an excellent place to pick stuff up too.

    Yes -- I'd recommend the forums also, the involvement and contribution of the community there is tremendous. http://forum.springframework.org is one of the few places you can go to get information on just about any application development issue with Spring (from web, to persistence) in almost any environment (from ejb to swing app).

    In addition to the forums, the core Spring developers are now offering hands-on training on Spring 1.2 as well. Rod and Rob Harrop are leading a 4-day advanced course in London. Colin and I are leading the course in Atlanta. Information on both events is available at http://www.springframework.com.

    Keith
  5. Great intro, but printer friendly version does not work (link to october 2003 version).
  6. Philippe, perhaps you had a cache of the old version? I just checked the printer friendly works fine. It is impossible for it to link to the old version since we over-wrote that file with the new one.

    Floyd
  7. When you click on the Printer Friendly option and the article STILL doesn't print well (usually because the right side is chopped off), click on File and then Edit Page in your browser and then print. That <almost always> fixes the problem.

    - Dan
  8. Great article!
  9. I had been hearing of spring or the past few months and always wanted to check out what its about. I read the older version of this article yesterday and today i read the new version also. I also got to read Martin Flowlers article on Dependency Injection. Can i get pointers to other material like articles or books which give me a better understanding of Spring? Is there any work that may be called "The Bible of Spring" like Hibernate in action for Hibernate?
  10. Spring[ Go to top ]

    Spring live or Spring in Action can be recommended.
  11. Pro Spring[ Go to top ]

    Pro Spring is better than Spring live or Spring in Action, it's more detailed.
  12. Pro Spring[ Go to top ]

    I've not read Spring Live or Spring in Action (they are on the todo list), but I can thoroughly recommend Pro Spring.
  13. Spring books[ Go to top ]

    I firmly believe that having a strong understanding of concepts and foundation is more valuable than having encyclopedic knowledge of details (if one knows where to look up the details when needed). "J2EE without EJB" is a book that's very good at explaining J2EE architecture and what Spring contributes to improving the architectures of the J2EE systems we build, and thus builds a strong case for Spring and the ideas behind it.

    "J2EE without EJB" does not go into detail on every aspect of Spring there is. For this, I've found the free user guide and javadoc (at the spring web-site) sufficient.

      cheers,
      gerald

    http://www.gerald-loeffler.net
  14. I've read all books except "Spring Live" and would recommend "Pro Spring" for a detailed introduction and "Spring A Developer's Notebooks" by Tate and Gehtland for a quick jump into Spring. Or you wait for Rod's new book, coming out soon (I hope). Maybe it can be considered as "the bible" :)
  15. I'm glad so many of you like Pro Spring. Jan and I spent an awful lot of time working on that with help from various members of the Spring team.

    I am going to start working on the 2nd edition very soon, so any suggestions for new content or improvements will be welcome. Send any comments to rob dot harrop at interface21 dot com.

    Regards,

    Rob Harrop
    Interface21 - Spring from the Source
    http://www.springframework.com
  16. That's good news[ Go to top ]

    I am going to start working on the 2nd edition very soon, so any suggestions for new content or improvements will be welcome. Send any comments to rob dot harrop at interface21 dot com.Regards,Rob HarropInterface21 - Spring from the Sourcehttp://www.springframework.com

    What?!! :) I just received my copy about 2 weeks ago. It's a good book and looking forward to the 2nd edition. I'll definitely send you my comments/suggestions for the upcoming edition.
  17. Can anyone who has used Spring for a non-trivial production system disabuse me of:

    - it looks like systems can become a config file(s) nightmare

    - poor performance is a problem with all the reflection, factories, etc.
  18. Can anyone who has used Spring for a non-trivial production system disabuse me of:- it looks like systems can become a config file(s) nightmare- poor performance is a problem with all the reflection, factories, etc.

    Okay, so all these people use Spring. Oracle dedicated resources to providing Toplink support. Books on Spring are appearing because of Spring's increasing popularity. The originator, Rod Johnson, has been using the core components for years BEFORE Spring.

    All of this effort, many releases since version 1, to use a framework that is a configuration nightmare that performs slowly.

    Ask yourself...Does it make sense?
  19. Okay, so all these people use Spring
    All what people?
    Oracle dedicated resources to providing Toplink support. Books on Spring are appearing because of Spring's increasing popularity. The originator, Rod Johnson, has been using the core components for years BEFORE Spring.

    Blah, blah, blah. So all technologies that had dedicated Oracle rsources and had books written about them and was "used" for years by the originator are good/performant, etc?

    If you don't want to answer my original question then don't.
  20. Some of the people[ Go to top ]

    Okay, so all these people use Spring
    All what people?
    Oracle dedicated resources to providing Toplink support. Books on Spring are appearing because of Spring's increasing popularity. The originator, Rod Johnson, has been using the core components for years BEFORE Spring.
    Blah, blah, blah. So all technologies that had dedicated Oracle rsources and had books written about them and was "used" for years by the originator are good/performant, etc?If you don't want to answer my original question then don't.

    http://www.springframework.com/users.html
  21. Okay, so all these people use Spring
    All what people?
    Oracle dedicated resources to providing Toplink support. Books on Spring are appearing because of Spring's increasing popularity. The originator, Rod Johnson, has been using the core components for years BEFORE Spring.
    Blah, blah, blah. So all technologies that had dedicated Oracle rsources and had books written about them and was "used" for years by the originator are good/performant, etc?If you don't want to answer my original question then don't.

    Sure. It's a dog. The config files are atrocious, but the price is irresistible, so we all ignore that.

    After all free pain is still free, right?
  22. Can anyone who has used Spring for a non-trivial production system disabuse me of:- it looks like systems can become a config file(s) nightmare- poor performance is a problem with all the reflection, factories, etc.

    I've been using Spring on the last several projects and I have been very happy with it. One of those projects was a large web app to support genomics research for a major US pharma. We used Struts for the MVC, but we used Spring for configuration, Hibernate session / transaction management, and DAO suport base classes. In our case, most of the "work" that Spring performed was when the ApplicationContext was created during container startup. The lookups to get objects from an initialized context in a running application are trival for singletons (they're cached) and inconsequential for prototypes (meaningless when compared to the overhead of dragging a graph of objects out of the database) Of course, YMMV depending on the initialization requirements of the objects in your ApplicationContext or the complexity of your DB accesses.

    I've never used the MVC in production. (though I have built toy apps with it) Struts is still the security blanket of the manager-types. (and now *everyone* has it on their resume)

    I must admit that the config files can start to get rather large or numerous, so we started using one of Spring's lesser advertised features-- you don't have to use the config files for everything. Remember, these classes are just java classes that can be constructed, wired up and initialized in Java code. So, for things that we don't expect to change without a formal release, or don't need to get from the context, we sometimes just coded with the classes like you would any other library. That helps keep the size of the config files down, and you always have to option to parameterize the Java code with values from a properties file for things that could change after deployment. We've used this technique to expose POJO services using the Spring remoting support classes to a rich client The rich client (Thinlet provisioned with Java Webstart) also used Spring remoting to talk to the server. This all worked b/c we didn't need to grab an RMI endpoint on the server side from the context-- it just needed to exist before the server application startup concluded.

    I think the main thing I like about Spring is that it's just a well thoughtout library that works very well as glue in many different situations. It also seems to be gaining wide acceptance, and everyone seems to be adding "Spring Integration" support to their libraries. So, Spring is starting to look like "a Java USB hub" connected to your application -- just plug in your library of choice and watch it go.

    -Ravi
  23. It is all been interesting the reading for both articles but I think noone has noticed that a port for this framework is being made to the .NET platform by Mark Pollack. The resources for this port can be found at www.springframework.net.

    Although it is in its infancy it can deliver magic to the .NET, and by the way, Rod Johnson advises this project.

    I am both interested in J2EE and .NET platforms and I think this gives value to both and to all of us trying to develop the applications of the future.

    Thanks
  24. Question about the example[ Go to top ]

    Hello,

    I found this article very interesting but I was a bit confused about the XmlBeanFactory example. The goal of the Ioc is to externalize relationships between beans. But in the java class, the first attribute is an "ExampleDataAccessObject". It would have been even more apparent with a bean from a different package: "ExampleDataAccessObject" would have been imported. So, the type is hard-coded and the xml configuration file doesn't help a lot. We can just use an "ExampleDataAccessObject" or a sub-class. I think it would have been better to use in the java class an interface.

    To resume :
    1) relations between interfaces in the code
    2) implementation done by IoC

    I didn't make a lot of java so perhaps there's something wrong with my reasoning.
  25. Errata[ Go to top ]

    It´s not true that Pico does not have xml configuation. It has xml, groovy, java and your own configuration possibility.
  26. With this usage, Spring will work out that the dataSource property of exampleBusinessObject should be set to the implementation of DataSource it finds in the present BeanFactory.

    Shouldn´t this say: "With this usage, Spring will work out that the dataAccessObject property of exampleBusinessObject should be set to the implementation of exampleDataAccessObject it finds in the present BeanFactory."

    In the example the exampleBusinessObject does not have a dataSource property, it has a dataAccessObject property
  27. Singleton and Object Orientation[ Go to top ]

    Hi Rod, You said 2 things about the pattern - 1) Many singletons lead to broblem. 2) The pattern (or use of it many times) does not speak of OO'tion. It would be nice of you or (in case of lasck of time) someone to elaborate on these points. Regards, Ammar