Alyssa_C
2 days left: SpringOne2GX Early Bird Pricing Ends Friday! Learn from Spring, Groovy, Grails experts http://bit.ly/9d2vtK #springone2gxSep 1, 2010 11:37 AM
A common complaint about Spring is the vast amount of XML required to configure an application. In this presentation, I'll show you ways to reduce much of the XML required to configure Spring.
A typical Spring configuration file will contain dozens, hundreds, or possibly thousands of lines of XML. Because of all of the XML clutter, some have started looking for alternatives to Spring that don't require so much configuration, even if it means forfeiting all of the other benefits afforded by Spring.
But before you throw the baby out with the bathwater, you should know that there are several ways to simplify Spring configuration so that it isn't so XML-heavy.
In this presentation, I'll show you ways to cut back on Spring configuration while still achieving the same results.
In this session, we'll explore ways of configuring Spring without involving XML. We'll start with an examination of JRuby and Groovy configuration mechanisms and then dig into Spring JavaConfig and see how to wire an entire Spring application together using annotations instead of XML.
One of the most prevalent myths about Spring is that Spring requires heavy use of XML. While it is true that XML is the conventional option for configuring a Spring application context, it is not the only option. Non-XML alternatives exist, including scripting configuration with JRuby or Groovy and annotation-based configuration with Spring JavaConfig.
What's especially interesting about these non-XML alternatives is that aside from freeing developers from the "tyranny" of angle-brackets, they also open up opportunities for dynamically configured Spring contexts that take advantage of language constructs not available in XML, such as looping and conditional execution. Moreover, concerns about XML's static identifiers and lack of refactorability are non-issues when configuring Spring in a richer language such as Java.
The secret weapon for attacking complexity in any project is to break it down into smaller, cohesive, and more easily digestible pieces. With Modular Java, you can easily develop applications that are more flexible, testable, maintainable, and comprehensible.
Modular Java is a pragmatic guide to developing modular applications using OSGi, the framework for dynamic modularity in Java, and Spring Dynamic Modules, an OSGi extension to the Spring Framework. You'll start with the basics but quickly ramp up, creating loosely coupled modules that publish and consume services, and you'll see how to compose them into larger applications. Along the way, you'll apply what you learn as you build a complete web application that is made up of several OSGi modules, using Spring-DM to wire those modules together.
Modular Java is filled with tips and tricks that will make you a more proficient OSGi and Spring-DM developer. Equipped with the know-how gained from this book, you'll be able to develop applications that are more robust and agile.
Spring in Action 2E is an expanded, completely updated second edition of the best selling Spring in Action. Written by Craig Walls, one of Manning's best writers, this book covers the exciting new features of Spring 2.0, which was released in October 2006.
Spring is a lightweight container framework that represents an exciting way to build enterprise components with simple Java objects. By employing dependency injection and AOP, Spring encourages loosely coupled code and enables plain-old Java objects with capabilities that were previously reserved for EJBs. This book is a hands-on, example-driven exploration of the Spring Framework. Combining short code snippets and an ongoing example developed throughout the book, it shows readers how to build simple and efficient J2EE applications, how to solve persistence problems, handle asynchronous messaging, create and consume remote services, build web applications, and integrate with most popular web frameworks. Readers will learn how to use Spring to write simpler, easier to maintain code so they can focus on what really matters-- critical business needs.
Spring in Action, 2E is for Java developers who are looking for ways to build enterprise-grade applications based on simple Java objects, without resorting to more complex and invasive EJBs. Even hard-core EJB users will find this book valuable as Spring in Action, 2E will describe ways to use EJB components alongside Spring. Software architects will also find Spring in Action, 2E useful as they assess and apply lightweight techniques prescribed by Spring. and learn how Spring can be applied at the various layers of enterprise applications.