InfoQ

News

Mark Pollack on Spring and Spring.NET

Posted by Jonathan Allen on Feb 05, 2008 11:49 PM

Community
.NET
Topics
AOP,
Web Frameworks
Tags
Spring.NET,
Dependency Injection,
Spring

Mark Pollack, founder of Spring.NET, talks about shares ideas between the Java and .NET communities and the history of Spring.NET. Topics include how to use dependency injection and AOP for more than just logging and where Spring.NET overlaps with WCF.

In addition to the JAOO Interview, we did a short Q&A on the recent release of Spring.NET 1.1

A lot of .NET developers are not familiar with Spring.NET. Can you start by introducing it and explaining some of the back-story behind it?

Spring.NET is an open source application framework that makes building enterprise .NET applications easier. While this is a goal that all application frameworks strive to fulfill, Spring.NET is based on the patterns and programming model used in the Spring framework for Java which has shown many real-world benefits. I saw firsthand the benefits of using Spring in 2003 when I was doing Java development on several projects within the financial services industry. One of the first benefits I saw as that it was very easy to create loosely coupled applications and as a result my applications became easier to test both at the unit test level and integration test level. The second immediate benefit was that my code became more focused on business concerns. Many infrastructure issues, such as configuration and transaction management, were handled elegantly by Spring instead of having to write that code myself in business classes. Lastly, dealing with low level database APIs was royal pain, and Spring provided a nice helper library that made it much easier to writing data access code.

There are a lot of new features in this release. Which would you consider to the most compelling for new users in terms of quickly paying for themselves?

I started doing .NET development in earnest in 2004 and soon confirmed my hunch that what Spring was offing in Java had value in .NET. Spring was essentially packaging up best practices and making them easy to apply. Generally speaking, best practices and their associated patterns are quite portable across technologies. The singleton pattern in the classic Gang of Four book was developed in C++, but that didn't make it less valuable or less applicable in Java or .NET. As a result, I started Spring.NET to bring those benefits to the .NET community. In a large part, Spring delivers these benefits letting you apply dependency injection to configure your application and use aspect oriented programming (AOP) to help address infrastructure issues, such as declarative transaction management. Using these two techniques together give you a lot of bang for the buck. As such, dependency injection and an AOP framework were the first features to be developed and were in the Spring.NET 1.0 release. Other features, that focus on specific pain points encountered in the web and middle tier were introduced in the 1.1 release.

Turning to developers already using Spring.NET, what does this version have to offer them?

One of the most popular features in the 1.1 release is the web framework for ASP.NET development. The base functionality is to let you configure your pages, user controls, providers, etc. via dependency injection. However, it also offers powerful bi-directional databinding and validation functionality that surpass what you get out of the box with ASP.NET. These features address common needs and is often something that developers end up writing themselves as part of an 'in-house' framework. Another major new feature is declarative transaction management and other aspects provided in an aspect library. There is a hole in the .NET landscape now for performing declarative transaction management, in particular if you only have one database and do not want to involve MS-DTC. The aspect library provides several aspects that can be configured out of the box. Another particularly useful one is the retry aspect. This can be applied across all WCF client side proxy classes, or other client side remoting proxies, so that a remote method invocation can be retried several time if an exception was thrown when invoking the remote method.

2 comments

Reply

Very nice introduction! by Laurent Kempé Posted Mar 3, 2008 2:26 AM
Re: Very nice introduction! by Laurent Kempé Posted Mar 3, 2008 2:06 PM
  1. Back to top

    Very nice introduction!

    Mar 3, 2008 2:26 AM by Laurent Kempé

    I look forward to use the spring and spring .net framework, and that video was of great help to get a first view on it. Thanks Laurent

  2. Back to top

    Re: Very nice introduction!

    Mar 3, 2008 2:06 PM by Laurent Kempé

    Btw: in the transcript there is a type. I think Mark is talking about logging not login!

Exclusive Content

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.

Architectures of extraordinarily large, self-sustaining systems

Can a system that is so large it cannot be comprehended be "designed" in a conventional sense? The foundations of computing are about to change. In this talk, Richard P. Gabriel explores why and how.

Using Ruby Fibers for Async I/O: NeverBlock and Revactor

Ruby 1.9's Fibers and non-blocking I/O are getting more attention - we talked to Mohammad A. Ali of the NeverBlock project and Tony Arcieri of the Revactor project.

Agile and Beyond - The Power of Aspirational Teams

Tim Mackinnon talks about the aspirations behind the Agile principles and practices, the desire to become efficient, to write quality code which does not end up being thrown away.

Concurrency: Past and Present

Brian Goetz discusses the difficulties of creating multithreaded programs correctly, incorrect synchronization, race conditions, deadlock, STM, concurrency, alternatives to threads, Erlang, Scala.

ActionScript 3 for Java Programmers

Often the hardest part of changing technologies is language syntax differences. This new article provides Java developers with a transition guide to Actionscript which forms the foundation of Flex.

Neal Ford On Programming Languages and Platforms

Neal Ford talks about having multiple languages running on one of the two major platforms: Java and .NET. He also presents the advantages offered by Ruby compared to static languages like Java or C#.

Future Directions for Agile

David Anderson talks about the history of Agile, the current status of it and his vision for the future. The role of Agile consists in finding ways to implement its principles.