Community developer events

Inversion of Control and Testability

Date
Thu, 19 Mar 2009, 18:30 - 20:30 (Add to calendar) GMT
Venue
Glasgow Caledonian University , Glasgow, GB
Cost
Free

Talk Description

The architectural design pattern, Inversion of control (IOC) at last appears to be gaining some momentum in the .NET mainstream. Frameworks such as Castle Windsor, Autofac, Structuremap and Spring have given rise to the .NET IOC (inversion of control) container.

Robert C. Martin says in his article on the topic of dependency inversion, "High-level modules should not depend on low-level modules. Both should depend on abstractions." An abstraction in this context implies that dependency should be abstract class or an interface.

When dependencies are abstractions, it is easy to 'mock', 'fake' or 'stub' specific dependencies thus allowing you to simulate the output that a dependency may yield. Such an example of mocking or stubbing a dependency would allow you to mock-up the result of a data access layer (DAL) call. Such a fake allows you to unit test against guaranteed output without ever having to configure or read from a real database.

One way to manage your dependencies is to store them in an IOC (inversion of control) container. You can think of an IOC container in simple terms as a fancy dictionary of interfaces versus implementing types. Full blown IOC containers offer many other benefits including lifetime management and auto-wiring.

This talk aims to convince that side effects of both designing for testability and the use of an inversion of control container can lead to more maintainable software, cleaner code and push architects towards good design principles such as 'separation of concerns' (SOC).

Speaker Biography

Colin Gemmel is a Web/Application Developer working in the Medical Faculty of Glasgow University for the past 3 years. An avid follower of agile principles and practices he is always happy to pass on his views of software development to anyone that will listen. Colin is also a regular participant of the Scottish ALT.NET Community.

Agenda

  • 18:00 Doors Open
  • 18:30 Welcome
  • 18:40 IoC
  • 19:30 Break
  • 19:40 IoC
  • 20:20 Feedback and Prizes
  • 20:30 Pub (back bar at Waxy O'Connor's on West George Street)

Venue

Room M127 of the George Moore Building at Glasgow Caledonian University, Cowcaddens Road, Glasgow G4 0BA

Comments

Leave a comment

Sign in or Join us (it's free).

AddThis

Map

Other nearby events

  • Nov 10

    Web Application Testing With Selenium

    0km away in Glasgow

    The TalkTesting is a fundamental part of the development process regardless of how you approach it however GUI's have always been trickier to test and web based UI's are some of the hardest. JavaScript, AJAX and browser compatibility are all things that make web UI functionality quite difficult and time consuming to test. Enter Selenium, a web application testing framework which makes the creation and automation of complex web user interface tests a joy.

  • Dec 17

    SuperChristmas in Newcastle

    123km away in Newcastle-upon-Tyne

    In partnership with SuperMondays, Thursday Fizz, Girl Geeks, and Refresh Teesside, VBUG are proud to announce: SuperChristmas is the Christmas par

Related podcasts

  • Talking Domain-Driven Design with David Laribee – Part 2

    Domain-driven design (DDD) is an approach to the design of software, based on two premises. For most software projects, the primary focus should be on the domain and domain logic (as opposed to being the particular technology used to implement the system) and complex domain designs should be base...

We'd love to hear what you think! Submit ideas or give us feedback