Introducing Microsoft’s Dynamically Typed Data Access Library
Back in 2007 we told you about Jasper, Microsoft’s ORM-like data access library based on dynamic typing. Unfortunately the timing wasn’t right. With C#’s complete lack of dynamic typing, it didn’t really stand a chance. But now that Microsoft backs four dynamic languages, VB, C#, IronPython, and IronRuby, there is a renewed interest in it.
In conjunction with WebMatrix, Microsoft’s new tool chain for amateur web developers, Jasper has been reincarnated as Microsoft.Data. This new library, built on top of ADO.NET, doesn’t really change how simple applications are written. Rather it just reduces the syntactical noise.
Some of the key points are:
- Connection strings are not required; all you need is the database name.
- Inline SQL is recommended.
- Mixing data-access inside the web page is recommended.
- Results are dynamically typed. So instead of “(int)dataRow["Age"]” one can just write “customer.Age”.
It cannot be stressed enough that this library isn’t meant for enterprise applications. This is being offered specifically for amateur web developers who would otherwise use PHP. It would also appropriate for programmers who need throw-away code that requires data access.
Documentation is not currently available, but you can see how it works from the WebMartrix tutorial.
Question about "Enterprise usage"...
Why do you say, "It cannot be stressed enough that this library isn’t meant for enterprise applications."?
Some people would argue that "customer.Age" is more object oriented and "correct" than a 3GL syntax of "(int)dataRow["Age"]". Allowing someone to focus on the readability and business case instead of worrying about datatypes is historically considered an improvement.
Just asking the question to get more detail, not really arguing that it should be used in an Enterprise context.
Shane Hastie on Distributed Agile Teams, Product Ownership and the Agile Manifesto Translation Program
Shane Hastie Apr 17, 2015