160 likes | 318 Views
Using .NET Technologies in Agile Object-Oriented Enterprise Software Development. Yagiz Erkan Chief Technical Architect DeCare Systems Ireland. Agility. “The ability to create and respond to change” Processes Can Be Categorized As: Agile Plan Driven Not a Binary Attribute
E N D
Using .NET Technologies in Agile Object-Oriented Enterprise Software Development Yagiz Erkan Chief Technical Architect DeCare Systems Ireland
Agility “The ability to create and respond to change” • Processes Can Be Categorized As: • Agile • Plan Driven • Not a Binary Attribute • “To what degree are we agile?”
Better Agility With • Continuous Integration • Refactoring • Unit Testing
Continuous Integration • “Continuous Integration is a software development practice where members of a team integrate their work frequently…” – Martin Fowler • Significantly Reduces Integration Problems • Microsoft Team Foundation Server • Open Source: CruiseControl.NET
Refactoring • “Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.” – Martin Fowler • Visual Studio Has Some Support • ReSharper from JetBrains
Unit Testing • Validates that individual units of source code are working correctly. • Unit Test Frameworks: NUnit, VSTS Tests • Mock Object Frameworks: NMock • Test-Driven Development • Test-Centric Development • Behaviour-Driven Development
Spring.Net • Open-Source Enterprise Application Development Framework • Dependency Injection • AOP • ASP.NET Integration • Data Access Abstractions • Utilities (Collections, Threading, Pooling, etc.)
DSI Contributes to the Spring.Net • DSI is Committed to Open Source • DSI is going to Contribute to the Spring.Net Framework Development. • A Selection of Experienced .Net Developers are going to Be the First Contributors. • Bug Fixes at the Start. • Integration Modules in the Future.
AOP • “AOP is a programming technique where concerns that cut across a software system can be described in clear statements so that the underlying design intent remains clear in the source code.” • Different Approach to Program Structure • OOP: Hierarchy of objects • AOP: Aspects (or Concerns)
AOP Example publicclass SecurityInterceptor:IMethodInterceptor { #region IMethodInterceptor Members public object Invoke(IMethodInvocation invocation) { securityManager.CheckIfMethodAvailable(invocation.Method.ReflectedType.Name, invocation.Method.Name, true); return invocation.Proceed(); } #endregion }
DI Example:Communication Between Layers BasePage.cs public class BasePage: Page { private IMembershipServiceProxy _membershipService; public IMembershipServiceProxy MembershipService { get { _membershipService.UseDefaultCredentials = true; return _membershipService; } set { _membershipService = value; } } ... }
DI Example:Communication Between Layers IProxy.cs public interface IProxy { string Url { get; set; } bool UseDefaultCredentials { get; set; } }
DI Example:Communication Between Layers ProxyObjects.xml <objectid="MyMembershipService“type="Spring.Web.Services.WebServiceProxyFactory, Spring.Services"> <propertyname="ProxyClass"> <value>...MembershipService, DSI.Apps.Web.Proxy</value> </property> <propertyname="ServiceInterface"> <value>...IMembershipServiceProxy, DQV.Apps.Membership.Interface</value> </property> </object>
DI Example:Communication Between Layers WebObjects.xml <objectid=“basePage“abstract=“true"> <propertyname=“MembershipServices” ref=“MyMembershipService“ /> ... </object>
Various Technologies • ASP.NET AJAX (formerly known as Atlas) • NHibernate • Enterprise Library • Software Factories (Web Client SF, WCF SF) • WCF • WF • LINQ
Summary • We have an evolving process and we are becoming more agile • Right company mindset/culture and right techniques/tools are important • Unit Testing, Refactoring and Continuous Integration form the basis of an agile environment • Code testability is crucial. • Spring.Net allows us to have an elegant design and testable code.