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).

Map

Other nearby events

  • Nov 25

    Lean, Kanban and Theory of Constraints

    63km away in Dundee

    The TalkThe application of Lean principles, Kanban and pull-systems theory along with Goldratt's Theory of Constraints revolutionised the manufacturing world in the second half of the twentieth century. Belatedly, the software world is waking up to the transformative effects these tools can have. There are still no silver bullets in the software world, but that doesn't mean that we can't improve our aim.

  • Nov 25

    VBUG NEWCASTLE: SysInternals Tools

    120km away in Newcastle-upon-Tyne

    Following on from his very well received presentation on Windows performance monitoring and analysis at our September meeting, Richard Diver returns t

  • Dec 9

    VBUG NEWCASTLE: Windows AZURE - What's In The Cloud?

    120km away in Newcastle-upon-Tyne

    Microsoft are due to release the first version of Windows Azure at the Professional Developers Conference in November 2009, this session will look at

  • 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

  • Episode 29: Miguel de Icaza (part 2)

    This is the second half of our discussion with Miguel de Icaza about Mono, Moonlight, open source, and other fun stuff. Topics When re-implementing .NET, do you match re-implement known bugs? The test / regression system to maintain compatibility How do you support so many platforms What parts o...

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