Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs
Showing posts with label Design Patterns. Show all posts
Showing posts with label Design Patterns. Show all posts

Friday, July 15, 2011

Why CRUD might be what they want, but may not be what they need | Ian Cooper

Why CRUD might be what they want, but may not be what they need | Ian Cooper
The Rolling Stones once sung:
“You can’t always get what you want, But if you try sometimes, well you just might find, You get what you need”
I think the same is true of CRUD. Our users seem to ask for it and we blindly agree to their wishes and build it; however, its regularly not what they need.

Monday, June 13, 2011

Role Object Pattern

Role Object Pattern
Adapt an object to different client's needs through transparently attached role objects, each one representing a role the object has to play in that client's context. The object manages its role set dynamically. By representing roles as individual objects, different contexts are kept separate and system configuration is simplified.

Monday, April 18, 2011

Using the Builder Pattern to Create Data Access Layer Integration Tests | Falconer Development LLC

Using the Builder Pattern to Create Data Access Layer Integration Tests | Falconer Development LLC
Automated testing is a good software engineering principle regardless of which development management process being used, Scrum, TDD, XP, etc. You know all about the benefits of unit-testing. It will reduce the number of defects, catch bugs earlier, unicorns will manifest themselves and bring you a beer. Great! But how do you start?

There are various opinions on how to test your Data Access Layer (DAL). Some would argue that it makes sense to write tests that run against an actual database. Others will argue that DAL tests should be mocked. While, I’ve talked previously about techniques for unit-testing, advocating, pleading, begging for the usage of mocked dependencies (using a mocking framework). When it comes to testing the DAL, this is where I make an exception to that guidance.

Architecting in the pit of doom: The evils of the repository abstraction layer

Architecting in the pit of doom: The evils of the repository abstraction layer
The whole purpose of a repository is to provide an in memory collection interface to a data source, but that pattern was established at a time where the newest thing on the block was raw SQL calls. Consider what NHibernate is doing, and you can see that here, one implementation of an in memory collection interface on top of a data store is wrapped in another, and it does nothing for us except add additional code and complexity.