InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Mark Pollack on Spring and Spring.NET

Posted by Jonathan Allen on Feb 05, 2008

Sections
Development,
Architecture & Design
Topics
.NET ,
AOP ,
Web Frameworks
Tags
Dependency Injection ,
Spring.NET ,
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.

Very nice introduction! by Laurent Kempé Posted
Re: Very nice introduction! by Laurent Kempé Posted
  1. Back to top

    Very nice introduction!

    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!

    by Laurent Kempé

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

Educational Content

Jesper Boeg on Priming Kanban

In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.