Developing Extensible Software
This course will teach you patterns that allow you to build your software out of swappable building blocks, as well as allow future developers to extend it easily. You'll learn how to make your applications easier to maintain even while constantly changing and evolving, all while maintaining complete testability.
What you'll learn
In today's competitive world of software development, using methodologies such as Agile lets us get products to market quicker and in a controlled fashion, but that's not enough. Applications need to be able to grow without being totally rewritten. Sure, there eventually comes a time when every app needs a major overhaul, but if applications are written to be extensible in the first place, the overhaul can be performed in pieces; and in the meantime, new features can be added or existing features changed without bringing the app down. This "extensibility" in our design is becoming more and more important every day as software shops compete with each other for work and even with other countries. There have been many articles and design documents written on things like inversion of control in the UI tiers. Many books have dedicated chapters to injecting objects into MVC controllers or WPF ViewModels, but not many have focused on the meat of a system, the business tiers. These are the tiers that are accessible to the UI of a system, more than one in many cases. And these are the tiers that can be most volatile and subject to change and enhancement. In this course, I'll show you some of my favorite extensibility designs and techniques which will let you write software in building blocks that can be connected and interconnected in different ways. I'll keep most of my focus on the business tiers, which despite the lack of user-centric visual glamour, is where you get to exercise the most creativity. You'll be able to roll out applications and continuously add or change things without affecting the core infrastructure in place. To me, this not only makes the software better, but more fun to write!
Table of contents
- What Are Providers? 2m
- Envisioning the Configuration 3m
- Modifying the Provider Classes 2m
- Refactoring Out to New Projects 3m
- Setting Up the Configuration Classes 3m
- Finishing and Installing Configuration Classes 4m
- Fix Up Dependencies in the CommerceManager Class 2m
- Plug Providers Into the CommerceManager Class 5m
- Fixing the Client and Running Test 4m
- How Am I Going to Reachieve Testability 1m
- Writing the Configuration Factory 3m
- Injecting the Configuration Factory 1m
- Summary 1m
- What Are Modules? 2m
- Allowing Engine Users to Add Functionality 2m
- How the Module Pattern Works 2m
- Where I Want to Place an Extensibility Point in the Engine 2m
- Setting Up the Commerce Events and Associated Code 4m
- Writing the Module Interface Type 1m
- Adding Definition to the Configuration Factory 2m
- Adding More Config Classes 4m
- Read In Module Information and Initialize 3m
- Calling Module Event From CommerceManager 5m
- Writing and Installing the Item Promotion Module 3m
- Writing and Installing the Sku Miner Module 1m
- Modules More or Less Tied to the Hosting App 2m
- Giving a Module Access to Hosting App Resources 2m
- Modifying the Module to Use Its Own Standalone Resources 5m
- Writing a Unit Test for the Sku Miner Module 5m
- Writing a Second Unit Test for the More Coupled Sku Miner Module 2m
- Unit Testing the CommerceManager Class 7m
- Adding Arguments for Modules 3m
- What I Want the Config to Look Like 2m
- Using the Provider Settings Collection Instead 2m
- Using the Provider Settings Parameters 1m
- Accepting the Parameter List into the Modules 1m
- Modifying the Module to use Paramters 2m
- Checking for Unknown Parameters 2m
- Variation of the Module Pattern 2m
- Removing All Config Stuff 2m
- Adding the Custom Attribute and App Setting 2m
- Modifying the Configuration Factory 1m
- Finishing Up the Configuration Factory and Running 2m
- Use Modules to Break Out Every Engine Step 1m
- What is a Pipeline? 1m
- The ASP.NET Pipeline 2m
- The WCF Pipeline 1m
- The Commerce Engine Pipeline 1m
- Discuss How to Break out the Steps 2m
- Starting the Validate-Customer Event 2m
- Calling the Validate-Customer Event 2m
- Writing the Validate-Customer Module 3m
- Installing the Module and Running 1m
- The Rest of the Event-Args Classes 2m
- Updating the CommerceEvents Class 1m
- Include the Rest of the Modules 2m
- Adjusting the CommerceManager class 2m
- Installing the Rest of the Modules and Running 1m
- Setting the Scene for the Pipeline Framework 2m
- Creating the CommerceContext Class 3m
- Creating the CommercePipelineEvents Class 3m
- Writing the Validate Customer Pipeline Module 3m
- Setting Up the Pipeline Config and Add Module 2m
- Adding and Installing the Other Modules 1m
- Modifying the CommerceManager to Kick Off the Pipeline 4m
- Mashing the Two Patterns Together 5m
- What is Procedural Overriding? 1m
- Walk Through the Current Engine 1m
- Creating the Default Functionality Class 2m
- Setting Up the CommerceManager Properties 1m
- Using the Default Classes From CommerceManager 1m
- Fixing the Client and Running 1m
- Writing the Replacement Classes Into Client 2m
- Injecting the Replacement Classes Into Client 1m
- Describing a Real-World Problem Space For This Pattern 2m
- Writing the Contructor Resolver Class 1m
- Replacing the Hardcoded Behavior With the Resolver 1m
- Writing a New Constructor Resolver 2m
- Using the New Constructor Resolver 1m
- Why and When to Use MEF 2m
- Adding MEF and Removing Unity 2m
- Removing Instantiation From ConfigurationFactory Class 2m
- Building the MEF Catalogs 4m
- Creating the MEF Container 1m
- Registering the Store Repository 2m
- Marking All Other Exports 1m
- Resolving the CommerceManager 2m
- Resolving Into the ConfigurationFactory Class 2m
- Testing Without Modules 1m
- Initializing Modules and Running 3m