Copyright 2004-2007, Interface21. Copying, publishing, or distributing without expressed written permission is prohibited. Introduction to Spring.NET Mark.

Slides:



Advertisements
Similar presentations
Apache Struts Technology
Advertisements

INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
Spring, Hibernate and Web Services 13 th September 2014.
Copyright © 2008 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. Andrew Stone Common Security.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Integrating SOA and the Application Development Framework Shaun O’Brien Principal Product Manager – Oracle JDeveloper / ADF.
Leveraging Enterprise Library in Your Applications Keith Elder Quicken Loans Manager, Sr. Software Engineer Microsoft MVP Keith a t keithelder dot net.
Spring.Net Steinar Dragsnes steinar.dragsnes at viz.no.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
The Spring Framework: A brief introduction to Inversion of Control James Brundege
Intro to Spring CJUG - January What is Spring? “The Spring framework provides central transaction control of various objects.” This means that any.
UNIT-V The MVC architecture and Struts Framework.
Dependency Injection and Model-View-Controller. Overview Inversion of Control Model-View-Controller.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Introduction to the Spring Framework By: Nigusse A. Duguma Kansas State university Department of Computer Science Nov 20, 2007.
Spring Overview, Application demo -Midhila Paineni 09/23/2011 Spring Overview, Application demo9/8/20151.
Christopher Jeffers August 2012
Doing Something Useful with Enterprise Library 3.0 Benjamin Day Level: Intermediate.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
Spring core v3.x Prepared by: Nhan Le. History v3.0 Spring Expression Language Java based bean metadata v3.1 Cache Abstraction Bean Definition Profile.
PicoContainer Presented by: Jim O’Hara Ed Kausmeyer Jingming Zhang.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Copyright © 2005 Finetix LLC All Rights Reserved 0 SpringFramework.Net Developer Session Chris Donnan The Peer Frameworks Series -.Net and Java.
Spring Framework. Spring Overview Spring is an open source layered Java/J2EE application framework Created by Rod Johnson Based on book “Expert one-on-one.
Introduction to Spring Matt Wheeler. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack – Basic.
Module 3: Working with Components. Overview An Introduction to Key.NET Framework Development Technologies Creating a Simple.NET Framework Component Creating.
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Architecture.
A Presentation By V AIBHAV S AHARAN Web-enHanced Information Management COMS E6125.
Tuscany: a SOA framework Jeffrey Guo Accelrys, Inc.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Forms with Spring MVC Handling Form.
Unit 4 Object-Oriented Design Patterns NameStudent Number CAI XIANGHT082182A KYAW THU LINHT082238Y LI PENGFEIHT082220L NAUNG NAUNG LATTHT082195L PLATHOTTAM.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring Remoting Simplifying.
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Alternative Architectures: Inversion of Control Mike Hadlow mikehadlow.blogspot.com.
آرمان حسين‌زاده آذر  Access to data varies depending on the source of the data.  Access to persistent storage, such as to a database, varies greatly.
Introducing Allors Applications, Tools & Platform.
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Testing Spring Applications Unit Testing.
February 8, 2006copyright Thomas Pole , all rights reserved 1 Lecture 3: Reusable Software Packaging: Source Code and Text Chapter 2: Dealing.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Data Access with Spring.
Kansas City Java User’s Group Jason W. Bedell July 12, 2006
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Overview of the Spring Framework Introducing.
Introduction – ORM, Helloworld Application
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring JDBC Simplifying.
Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Developing Rich Web Applications with.
Virtual techdays INDIA │ 9-11 February 2011 SESSION TITLE Kamala Rajan S │ Technical Manager, Marlabs.
Singleton Academy, Pune. Course syllabus Singleton Academy Pune – Course Syllabus1.
Jean-Claude Trachsel Senior Consultant, Trivadis AG The good news.
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
Apache Struts Technology A MVC Framework for Java Web Applications.
Understanding Dependency Injection… and those pesky containers Miguel A. Castro Architect -
Enterprise Library 3.0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division.
Leveraging ColdSpring to build a robust Flex applications Chris Scott, Cynergy Systems.
J2EE Lecture 6: Spring – IoC and Dependency Injection
Magento Technical Guidelines Eugene Shakhsuvarov, Software Magento
Intro to Spring CJUG - January 2013.
JavaServer Faces: The Fundamentals
Developing and testing enterprise Java applications
Leveraging ColdSpring To Make Better Applications
Presentation transcript:

Copyright , Interface21. Copying, publishing, or distributing without expressed written permission is prohibited. Introduction to Spring.NET Mark Pollack, Interface21 Founder & Co-Lead Spring.NET

2 Agenda The who, what, why of Spring.NET Feature overview Dependency Injection ASP.NET Framework Data Access and Declarative Transaction Management Aspect-Oriented programming Summary

3 Spring for.NET Spring.NET provide comprehensive infrastructural support for developing enterprise.NET™ applications –Apache License - Commercial-friendly –Created, supported and sustained by Interface21 –Integrates with other frameworks and solutions –.NET 1.0/1.1/2.0 Spring Framework for Java has shown real-world benefits –Architectural concepts and patterns applicable to.NET –9 out of the world’s 10 largest banks use Spring Java

4 Spring.NET Benefits Enables the creation of loosely coupled systems Increase application testability Apply enterprise services to objects in a declarative, non-invasive way. Increase developer productivity when using ‘low level’ APIs

5 Spring’s “Nature” Inversion of Control (IoC) container to perform Dependency Injection (DI) Aspect Oriented Programming (AOP) Portable Service Abstractions –‘Export’ object to specific middleware technology Support libraries to tame complex APIs for common scenarios –Transaction Management, ADO.NET, ASP.NET Spring deals with the plumbing –Address end-to-end requirements rather than one tier –Can be one stop shop or just use certain sub-systems.

6 Spring.NET Assemblies Core IoC Container + base functionality AOP Services Portable Service Abstractions Web ASP.NET Framework Data DAO / TX Mgmt Web Extensions AJAX NHibernate Testing NUnit

7 Where to use in your application? Dependency Injection to wire together –Architectural layers –Interface with implementation –Configure application for a given deployment environment AOP adds functionality across well defined locations in code –Error handing in controllers –Transactional service layer Support libraries to implement application logic within each layer Integration testing

8 Sample Application Architecture Data Repository Domainobjects DAO implementations Service implementations Web interface Otherinterfaces PresentationLayer ServiceLayer Data Access Layer DAO interfaces Service interfaces

9 Spring’s Role Spring- managed Domainobjects DAO implementations Service implementations Web interface Otherinterfaces DAO interfaces Service interfaces Data Repository

10 The road to Dependency Injection How do objects find their collaborators and why does it matter? –Important to build in accommodation for points of variation Architectural Layers Strategy Pattern –Less re-engineering over time, increase testability Traditional approach –Object ‘pulls in’ collaborators Inversion of Control approach –Framework calls into object to set collaborators –Dependency Injection calls into standard object signatures

11 Traditional approach (1) public class SimpleBankService : IBankService { private IAccountDao accountDao; public SimpleBankService() { accountDao = new AccountDao(); } // business methods follow … }

12 Traditional Approach (2) public class SimpleBankService : IBankService { private IAccountDao accountDao; public SimpleBankService() { accountDao = AcctDaoFactory.Create(); } public void Initialize() { // read-in property values } // business methods follow … }

13 Pain Points with Traditional Approaches Difficult to accommodate change –Tight coupling –Rolling your own factory leads to busy work, i.e. need to code a factory per product Limited testability –Testing imposes accommodating alternate implementations Code noise –Poor separation of concerns Lack of consistency –Can introduce extraneous compile time dependencies –Team members code factory differently

14 Spring’s IoC Container Heart of Spring.NET Facilitates full stack plain object-based development Within any environment –ASP.NET, WinForms/WPF, Web Services/WCF, COM+, Console, Unit Tests. By providing –A powerful object factory that manages the instantiation, configuration, decoration, and assembly of your business objects

15 Dependency Injection –Uses standard.NET properties and/or constructors to “inject dependencies” –Dependencies are explicit and resolved at runtime –In majority of cases, no container API is required –Works with existing classes Benefits –Changing implementations is easy –Loosely coupled –Productivity - facilitates agile practices (TDD) –Consistency - use common approach to configuration

16 Constructor Injection public class SimpleBankService : IBankService { private IAccountDao accountDao; public SimpleBankService(IAccountDao accountDao) { this.accountDao = accountDao; } // business methods follow … }...

17 Property Injection public class SimpleBankService : IBankService { private IAccountDao accountDao; public IAccountDao AccountDao { get { return accountDao; } set { accountDao = value; } } // business methods follow … } <object id="bankService" type=“SimpleBankService, MyAssembly“ lazy-init=“true”>...

18 Spring.NET Container in action Spring.NET Lightweight Container Configuration Instructions (Metadata) Your Application Classes Fully configured system Ready for Use produces

19 Creating and configuring container IObjectFactory –Implementations such as XmlObjectFactory IApplicationContext –Superset of IObjectFactory Create using ‘new’ or configure via App.config IApplicationContext context = new XmlApplicationContext("assembly://MyAssembly/MyProject/objects.xml"); IBankService bankService = (IBankService) context.GetObject("bankService");

20 Configuration <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/> IApplicationContext context = ContextRegistry.GetContext(); IBankService bankService = (IBankService) context.GetObject("bankService");

21 Spring IoC Summary 1 st order as feature rich as Spring Java Container implementation similar enough to allow easy migration of features –Annotation based configuration –Scripted objects (IronPython/IronRuby) –Will sync some new features in future releases If nothing else, use DI to push your application in the direction of following best practices! –Loose coupling -> easier to test -> resiliency to change

22 Agenda The who, what, why of Spring.NET Feature overview Dependency Injection ASP.NET Framework Data Access and Declarative Transaction Management Aspect-Oriented programming Summary

23 Spring ASP.NET Framework Goals “Embrace and extend” ASP.NET Pain points with ASP.NET are addressed –Pages depend on middle-tier services, how to obtain? –Data binding is only in one direction and supported only by some controls –Need to manage data model supporting the page –Lifecycle methods should be at higher level of abstraction –Data validation is tied to the UI and is simplistic Simplify ASP.NET development as much as possible by filling in the gaps

24 Dependency Injection for ASP.NET Enables DI for –Pages, Controls –Custom HTTP Modules –Standard ASP.NET Providers <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/> <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>

25 Example <property name="Authenticator" ref="authenticationService"/> DI features work with standard ASP.NET page and controls

26 Data Model Management: Without Spring.NET public partial class MyPage : Page { private MyModel myModel; public void Page_Load(object sender, EventArgs args) { if (IsPostBack) { myModel = (MyModel) Session["mySavedModel"]; } else { myModel = new MyModel(…); // or more often, use DAO to load } public void Page_PreRender(object sender, EventArgs args) { Session["mySavedModel"] = myModel; }

27 Data Model Management: With Spring.NET public partial class MyPage : Spring.Web.UI.Page { private MyModel myModel; protected override void InitializeModel() { myModel = new MyModel(…); // or more often, use DAO to load } protected override void LoadModel(object savedModel) { myModel = (MyModel) savedModel; } protected override object SaveModel() { return myModel; }

28 Copyright 2006 Solutions for Human Capital Inc. and Interface21 Ltd. Copying, publishing, or distributing without expressed written permission is prohibited. Handling form submission: Without Spring.NET public class MyPage : Page { public void ProcessBuyOrder(object sender, EventArgs args) { try { string stockSymbol = txtStockSymbol.Text; int numberOfShares = int.Parse(txtNumberOfShares.Text); BuyOrder order = new BuyOrder(stockSymbol, numberOfShares); ITradingService tradingService = ServiceLocator.GetService(...); OrderConfirmation confirmation = tradingService.ProcessOrder(order); Context.Items["confirmation"] = confirmation; Server.Transfer("BuyConfirmation.aspx"); } catch (ParseException e) { // handle exception (sometimes this is difficult as well) }

29 Handling form submission: With Spring.NET public class MyPage : Spring.Web.UI.Page { private BuyOrder order; private OrderConfirmation confirmation; private ITradingService tradingService; // properties omitted protected override InitializeDataBindings() { BindingManager.AddBinding(“txtStockSymbol.Text”, “Order.StockSymbol”); BindingManager.AddBinding(“txtNumberOfShares.Text”, “Order.NumberOfShares”).SetErrorMessage(“error.number.of.shares.not.int”, “errNumberOfShares”); } public void ProcessBuyOrder(object sender, EventArgs args) { if (ValidationErrors.IsEmpty && Validate(order, orderValidator)) { confirmation = tradingService.ProcessOrder(order); SetResult(“buyConfirmation”); }

30 Spring ASP.NET Framework Summary DI enable ASP.NET Bi-directional data binding Object scopes –application, session, request Code becomes more business and less infrastructure focused Tight integration with Data Validation Framework

31 System.Web.Mvc Next generation web framework MVC Based –url maps to controller method invocation Design Goals –Testable : IHttpRequest, IHttpResponse –Extensible : View engine, IoC container In Java MVC was the norm –Moving to event based web model - JSF –Spring for Java is popular MVC framework Spring.NET Roadmap –Integration in standard extensibility locations… –Validation, bindings, localization, exception handling, tag libs….

32 Agenda The who, what, why of Spring.NET Feature overview Dependency Injection ASP.NET Framework Data Access and Declarative Transaction Management Aspect-Oriented programming Summary

33 Spring Data Access Goals Wide range of data access strategies and technologies to choose from –APIs tend to be complex and verbose –Accounts for much of code in an application –Multiple APIs for transaction management and quirks Provide simple and consistent approach to data access across persistence technologies –Remove incidental complexity –Simplify use of ADO.NET –Technology neutral exception hierarchy –Transaction management abstraction

34 Problems with traditional ADO.NET Results in redundant, error prone code Hard to write provider independent code Code is coupled to transaction API Verbose parameter management

35 Redundant Code public IList FindAllPeople() { IList personList = new ArrayList(); try { using (SqlConnection connection = new SqlConnection(connectionString)) { string sql = "select Name, Age from..."; using (SqlCommand command = new SqlCommand(sql, connection)) { connection.Open(); using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { string name = reader.IsDBNull(0) ? string.Empty : reader.GetString(0); int age = reader.IsDBNull(1) ? 0 : reader.GetInt32(1); Person person = new Person(name, age); personList.Add(person); } catch (Exception e) { //throw application exception } return personList; } public IList FindAllPeople() { IList personList = new ArrayList(); try { using (SqlConnection connection = new SqlConnection(connectionString)) { string sql = "select Name, Age from..."; using (SqlCommand command = new SqlCommand(sql, connection)) { connection.Open(); using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { string name = reader.IsDBNull(0) ? string.Empty : reader.GetString(0); int age = reader.IsDBNull(1) ? 0 : reader.GetInt32(1); Person person = new Person(name, age); personList.Add(person); } catch (Exception e) { //throw application exception } return personList; }

36 Redundant Code public IList FindAllPeople() { IList personList = new ArrayList(); try { using (SqlConnection connection = new SqlConnection(connectionString)) { string sql = "select Name, Age from..."; using (SqlCommand command = new SqlCommand(sql, connection)) { connection.Open(); using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { string name = reader.IsDBNull(0) ? string.Empty : reader.GetString(0); int age = reader.IsDBNull(1) ? 0 : reader.GetInt32(1); Person person = new Person(name, age); personList.Add(person); } catch (Exception e) { //throw application exception } return personList; } public IList FindAllPeople() { IList personList = new ArrayList(); try { using (SqlConnection connection = new SqlConnection(connectionString)) { string sql = "select Name, Age from..."; using (SqlCommand command = new SqlCommand(sql, connection)) { connection.Open(); using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { string name = reader.IsDBNull(0) ? string.Empty : reader.GetString(0); int age = reader.IsDBNull(1) ? 0 : reader.GetInt32(1); Person person = new Person(name, age); personList.Add(person); } catch (Exception e) { //throw application exception } return personList; } The bold matters - the rest is boilerplate Null values could be handled better

37 AdoTemplate in a Nutshell int userCount = (int) adoTemplate.ExecuteScalar( CommandType.Text, "SELECT COUNT(0) FROM USER"); int userCount = (int) adoTemplate.ExecuteScalar( CommandType.Text, "SELECT COUNT(0) FROM USER"); Acquisition of the connection Creation of the command Participation in the transaction Execution of the statement Processing of the result set Handling of any exception Display or rollback on warnings Dispose of the reader, command Dispose of the connection All handled by the template

38 DAO implementation - AdoTemplate Encapsulates boiler-plate ADO.NET code Centralizes management of resource and tx private string cmdText = "select count(*) from Customers where PostalCode public virtual int FindCountWithPostalCode(string postalCode) { return AdoTemplate.Execute (delegate(DbCommand command) { command.CommandText = cmdText; DbParameter p = command.CreateParameter(); p.ParameterName = p.Value = postalCode; command.Parameters.Add(p); return (int) command.ExecuteScalar(); }); }

39 AdoTemplate: Lightweight Mapping public class AccountDao : AdoDaoSupport { private string cmdText = "select AccountID, ContactName from Account"; public virtual IList GetAccounts() { return AdoTemplate.QueryWithRowMapperDelegate (CommandType.Text, cmdText, delegate(IDataReader dataReader, int rowNum) { Account account = new Account(); account.ID = dataReader.GetString(0); account.ContactName = dataReader.GetString(1); return account; }); } Specify the command Do the work for each iteration

40 Stored Procedures public class CallCreateAccount : StoredProcedure { public CallCreateAccount(IDbProvider dbProvider) : base(dbProvider, "CreateAccount") { DeriveParameters(); Compile(); } public void Create(string name, int id) { ExecuteNonQuery(name, id); } variable length argument

41 Transaction Management How to satisfy the requirement –“The service layer must be transactional” Adding boilerplate code in the service layer (programmatic transaction management) –Is prone to errors; of omission, cut-n-paste –Ties implementation to transaction implementation The solution –Declarative transaction management

42 * Promotion to distributed transaction for common designs ** Only for WCF services However, what we want to do most often is: –Declarative with local transactions LocalDistributedDeclarative ADO.NET  EnterpriseServices  System.Transactions *  WCF** *.NET Transaction Management

43 Spring.NET Transaction Management Consistent model for different transaction APIs IPlatformTransactionManager –AdoTransactionManager –ServiceDomainPlatformTransactionManager –TxScopePlatformTransactionManager –HibernateTransactionManager Declarative transaction demarcation strategies –XML or Attributes Using a different transaction manager is a change of configuration, not code

44 PlatformTransactionManager creation <db:provider id="DbProvider" provider="SqlServer-2.0" connectionString=“DataSource=${dataSource} …"/> <object id="adoTransactionManager" type="Spring.Data.Core.AdoPlatformTransactionManager, Spring.Data"> Or programmatically…

45 Declarative Transactions using Attributes public class SimpleBankService : IBankService { [Transaction()] public Account Create(string name){ Account account = accountDao.Create(name) if (RequiresSecurity(account)) { securityDao.CreateCredentials(account); } return account; }... } <object id=“bankService" type=“MyServices.SimpleBankService, MyAssembly“>

46 Declarative Transactions using XML <object id="bankService” type=“MyServices.SimpleBankService, MyAssembly">... <tx:method name="Get*" timeout="1000" isolation="RepeatableRead" no-rollback-for="SillyException"/> <aop:advisor pointcut-ref="serviceOperation” advice-ref="txAdvice"/> What to do… Where to do it… Tie them together

47 Under the hood One use of Aspect Oriented Programming Transaction aspect encapsulates –Start/stop/rolling back of transaction around method invocation –Application to service layer objects ADO.NET implementation binds current connection/tx pair to thread local storage ConnectionTxPair connectionTxPairToUse = ConnectionUtils.GetConnectionTxPair(DbProvider);

48 Agenda The who, what, why of Spring.NET Feature overview Dependency Injection ASP.NET Framework Data Access and Declarative Transaction Management Aspect-Oriented programming Summary

49 Aspect Oriented Programming Modularizes general functionality needed in many places in your application Examples –Logging –Transaction Management –Caching –Exception Translation –Performance Monitoring –Custom Business Rules –Security

50 Aspect Library Configure pre-built aspects Example: Exception Translation –Configuration using DSL –Leverage Spring Expression Language for fine level control on exception name ArithmeticException wrap MyServices.ServiceOperationException on exception ( #e is T(SqlException) && #e.Errors[0].Number in { 154, 165, 178 } ) translate new DataAccessException(‘Error in #method.Name’, #e)

51 Retry Aspect Remote calls are unreliable If remote operation is idempotent, can retry until achieve success –Can apply advice based on attribute [Idempotent] Similar approach as exception advice on exception name ArithmeticException retry 3x delay 1s

52 Retry Advice Configuration Leverage SpEL –Specify formula for retry interval –Specify exception to act upon <property name="retryExpression" value="on exception name ArithmeticException retry 3x delay 1s"/> <property name="retryExpression" value="on exception name ArithmeticException retry 3x delay 1s"/> on exception name ArithmeticException retry 3x rate (1*#n + 0.5) on exception name ArithmeticException retry 3x rate (1*#n + 0.5) on exception (#e is T(System.ArithmeticException)) retry 3x delay 1s on exception (#e is T(System.ArithmeticException)) retry 3x delay 1s

53 Chaining advice on exception name ArithmeticException wrap MyServices.ServiceOperationException... <aop:advisor pointcut-ref="serviceOperation" advice-ref=“exHandlingAdvice“ order=“1"/> <aop:advisor pointcut-ref="serviceOperation" advice-ref="txAdvice“ order="2"/>

54 Who is using Spring.NET Mercado Eletrônico: Leading Latin American B2B –See case study in.NET Developers Journal Siemens Banking Oracle Consulting (Israel) diamond:dogs Web Consulting (Austria) –Knorr –sportnet –Panorama Tours –ATV –Libro A global leader in the online travel booking space

55 Summary Spring.NET lets you view your application as a set of components Each component is –Focused on solving your domain problem –Testable in isolation The container –Manages the ‘glue code” required for component creation, configuration, and assembly –Decorates your components with additional behavior Tame complex APIs and solve generic problems

56 Where to get it Download from –Many samples and extensive reference manual Contact:

57 Q&A