Posts Tagged Massive; Data Access; Unit Tests
Today I got introduced to Massive. Massive is a data access library written by @robconery. My co workers @jaymed and @mgroves introduced me to it, and I’ll admit I was somewhat reluctant to give it a shot. I’m normally of the opinion that the simplest DAL is just pure simple SqlCommands, SqlConnections and a stored procedure call. However after using Massive for a few hours, I’m really excited about this new tool in my tool chest. Of course massive has been out for a while, I’m quite slow to the party sometimes.
Massive is great though, I love how in a single line of code I can have data back. Alternatively I can update the table, or run any other query that I want. This library if it did nothing else makes integration testing a breeze. Usually for my tests I prefer to stub out a DAL repository via the interface/repository pattern. The tests get a FakeSomethingRepository to use that uses List<TheObject> as its in memory store. What I love about massive is that my unit tests which are really simple because they can test DataRepository.SomeList can quickly become Integration tests with almost no additional complexity. For me that’s Huge. I’m trying a new thing, and that’s not to check in any code that doesn’t have full unit test coverage and Massive is making that happen in a Massive way. (couldn’t resist)
I’m still learning about these Dynamic things, but a bit of learning never hurt anyone and I know @mgroves will help me out when I get confused.
@robconery If we ever meet, I owe you a beer! Massive is awesome!
If you’re not familiar with Massive, I urge you to check it out here.