In this episode I dive into implementing the Shopping Cart in a basic way so I can run a spike to make sure my pattern can push data nicely back into the DB without problems.
Previously, On The MVC Storefront
- Part 1: Architectural Discussion and Overview. I cover the initial architecture here, in part 1, where I discuss the Repository Pattern with Ayende Rahien and Steve Harman. I also ask Phil Haack what's first: The Test Chicken or the Model Egg.
- Part 2: The Repository Pattern. I walk through our Repository implementation and write out the first main set of unit tests. I also structure up the initial service layer methods and interfaces.
- Part 3: Pipes and Filters: I discuss the feedback from Parts 1 and 2, and then dive into the Pipes and Filters implementation on the IQueryable repository.
- Part 4: Linq To Sql Spike. I create a "spike" - a bit of functionality to test a thought or inspiration - to make sure that Linq To Sql will work for my data access pattern.
- Part 5: Globalization. I work with Damien Guard to refactor the database to deal with test data and globalization issues.
- Part 6: Finishing The Repository, and Initial UI Work. I talk with Jon Galloway about CSS strategies and begin working in the Front end of the application
- Part 7: Routing and UI Work. I talk with Scott Hanselman about how to setup Routing, and then I implement the user interface.
- Part 8: Testing Controllers, Iteration 1 Complete. I finish up the initial iteration of the site and work on Controller Tests as well.
You can watch Part 9 Here (27 Minutes, 32M)
I Ramble
Stuff's getting complicated here and as such it's getting harder to keep "a story" going. It's even harder to tell that story without rambling! You'll notice some rough cuts here - I have to keep the time on these down so I chop things up a lot.
Spike Time
Many people have been asking about CRUD and specifically mentioning that everything will likely fail when I write back to the DB. I will admit I'm not used to seeing mapping code in my project (it gets buried by the tool of choice) but I have to say I don't mind it one bit.
I have complete control over what gets mapped and how, and it's not in my way - so I like it. I still have not addressed concurrency yet - but I will in the future episodes when I tackle inventory.