Øredev 2008 - Java - Spring == XML, XML == sucks, therefore Spring == sucks??
Uploaded on Jan 13, 2009 / 1405 views / 3499 impressions / 1 comment
Description
Spring == XML, XML == sucks, therefore Spring == sucks??
Alef Arendsen, SpringSource, the Netherlands
Last November, Spring 2.5 was released. This version of Spring, the de-facto Java EE application platform marks the beginning of the...
Spring == XML, XML == sucks, therefore Spring == sucks??
Alef Arendsen, SpringSource, the Netherlands
Last November, Spring 2.5 was released. This version of Spring, the de-facto Java EE application platform marks the beginning of the introduction of alternative ways to configure components. In the, we've mainly focused on provided XML as the main language to perform Dependency Injection on object. Since 2.5, Spring has introduced several new ways to doing this.
This session focuses on the various ways of using the Spring container to Dependency Inject objects such as the traditional XML language, the extensible namespaces, the @Autowired and @Component annotations, but also the innovative JavaConfig project that is capable of configuring Java objects using @Bean annotations.
Each has drawbacks and advantages and this session will discuss which one you should choose in what scenario. After this code-intensive session, you will walk away with a clear understanding of when XML is a good choice for configuration and when to opt for one of the annotation-based options.
Special knowledge required:
- a bit of Spring knowledge (but not much)
- a bit of data access knowledge (JDBC) is nice to have
1. pedrogonzalezma
Alef Arendsen explains some more ways to configure a spring application instead of using only XML, by using Annotations.