- John Backus, leader of the team that developed the first high-level programming language, died yesterday. It’s been a hard year so far for IT industry luminaries. (via Good Math, Bad Math)
- Yesterday, I followed on Martin Fowler’s post on going transactionless. As I said yesterday, I didn’t agree with the idea of no transactions inside a service, but I agree 100% with no transactions between services. Via Paul Brown, we learn that EBay does allow forbids the use of client-side or distributed transactions, but doesn’t outlaw the use of transactions in general. That makes much more sense to me since transactions between services would have to be are distributed.
- Wired just launched a new blog called GeekDad with the mission statement “Cool toys and fun projects you and your kids do together”. Subscribed (via The Long Tail)
- DevHawk made Todd Bishop’s Microsoft Blog Directory. It’s in the “Software Development and Design” section. Not sure why I’m listed above Raymond Chen, John Montgomery, Chris Sells and Don Box in that section, but that’s nice company to be included with.
VSTDB, Where Have You Been All My Life?
Honestly, this post started off as a rant entitled “Is it Me, or is DB Development a Pain in the Ass?” about the sorry state of database development tools in Visual Studio. But in searching around on MSDN for information about the built-in “Database Project” type (which could more accurately be called “just a bunch of SQL scripts”), I stumbled across information about the Database Professionals edition of Visual Studio Team System. That’s right, I had forgotten that we shipped this late last year.
I short, VSTDB (or whatever the “official” acronym is) is 90% of what I was looking for in a DB dev tool. Sure, it’s not perfect, but it’s a massive improvement over the previous state of the art.
The primary feature of VSTDB is the ability to “build” your database the same way you build your code. You use lots of small scripts that get compiled together into a model (for lack of a better term) of the database as you’ve defined it. That model can be deployed to a new database instance or used to update an existing instance. You can also compare that model against an existing database in order to determine what’s changed and automatically build update SQL scripts for the DBA’s to run in the production environment (since you don’t want your developers doing that).
It takes a little getting used to, but the “lots of small scripts” approach has a lot of upside. If you have a table with a primary key, you’re supposed to define the primary key, indexes, constraints, triggers, etc. in separate scripts from table creation script. This makes things much easier when you’re trying to figure out what’s changed in your source control system.
VSTDB has a variety of other cool looking features like data generation and unit testing, but I haven’t really dug into them much yet. One thing that VSTDB supports that I wasn’t expecting was Service Broker! SQL Management Studio has limited SSB support – if you want to create new SSB objects you have to write the DDL directly. VSTDB requires you to write the SSB DDL also (it makes you write DDL for everything, see below) but it at least has templates for all the SSB object types. Very Cool!
Of course, there are always things that could be improved. The T-SQL editor does syntax highlighting but not IntelliSense. It doesn’t support the existing visual database tools like the Table Designer. And while you can build T-SQL stored procs, functions, types, etc, VSTDB doesn’t support the development of managed SQLCLR stored procs, et.al. Things to work on for v2, I suppose.
If you’re using VS Team Suite, you can download an add-on that adds VSTDB functionality to your existing VSTS installation. It’s only 8MB, so it’s definitely the way to go for Team Suite users.
Morning Coffee 47
- USC is in the Sweet 16. Not sure when that’s ever happened before.
- Politics 2.0 Watch: The rise of political blogs in main stream media reporting. Check out what the LA Times has to say about Talking Points Memo. 2008 is going to be interesting and ugly.
- Jeffrey Palermo wrote that Scott Guthrie showed him a prototype web MVC framework for ASP.NET. Looking forward to seeing that. I thought it was interesting that Jeff described web MVC as “like Rails and MonoRail”. Didn’t Web MVC initially gain popularity on Java with toolkits like Struts and Spring? (via Larkware News)
- For reasons that can’t be explained, I haven’t read Eric.Weblog() in quite a while. My loss. His post on Boundaries was both thought provoking and hilarious, a hard combo to achieve in practice.
- New versions of Expression Design (Beta 2) and Expression Blend (Release Candidate) are available.
- Martin Fowler writes about being Transactionless. I like to see people thinking this way, because I don’t believe transactions across services is feasible or loosely coupled. However, I still think you should use transactions inside the service. Also, I gotta wonder how much time all that error checking logic you have to write takes if you’re not using transactions. What’s the tradeoff?
Morning Coffee 46
Sort of late this morning due to back to back meetings…
- I seem to have stirred up a bit of a hornet’s nest with my “kinda surprising that no other mainstream language has done this before” comment. Dennis Hamilton and Mike Parsons both asked about other dynamic languages like Javascript and Python in my comments. To be clear, the ability to add a new method to a specific object instance is fairly common in dynamic languages. Extension methods in C#3/VB9 is a different capability – it only supports adding new methods to a class, not to specific object instances. I’m not sure what dynamic languages other than Ruby supports adding new methods to both object instances and classes, but I’m sure they’re out there.
- Some anonymous commenter asked “why invent another language for PowerShell if there are so many great popular languages already in existance [sic]?” I can’t speak for the PowerShell team, but I think they were better off inventing a new language specificly designed for their scenario than they would have been shoe-horning in existing lanugage. To their credit, it looks like the PS team took great care to make the PS lanugage accessable by leveraging common syntax and idioms from other shell programming environments. I’m not a shell programming expert, but isn’t PS more a variant of shell languages that have come before than a brand new language?
- I want a “Works on My Machine” T-Shirt.
I’m Wrong Because Ruby and Powershell Are Mainstream
Brad Wilson and Scott Hanselman took me to task for my comment the other day that no “mainstream” language had implemented extension methods:
How mainstream is Ruby on Rails for you? Ruby is a full fledged dynamic language. No hacks for “extension methods” (Brad)
Ya, I kind of blanched at that statement too…method_missing is pretty mainstream… (Scott)
They’re right, Ruby does support the addition (and redefinition I think) of methods on a class at any time. There’s a sample of this in the Classes and Objects chapter of Programming Ruby (aka the pick-axe book) where they add a basic documentation facility “available to any module or class” in Ruby by adding a doc instance method to the Module class.
class Module
@@docs = Hash.new(nil)
def doc(str)
@@docs[self.name] = str
end
def Module::doc(aClass)
# If we’re passed a class or module, convert to string
# (‘<=’ for classes checks for same class or subtype)
aClass = aClass.name if aClass.type <= Module
@@docs[aClass] || “No documentation for #{aClass}”
end
end
Given how Ruby classes are defined, I think the newly added methods have access to the private data of the class. Extension methods in C#3/VB9 only have access the public interface of the object. But that’s a fairly minor difference.
FYI, Powershell can do this as well, though not as succinctly as Ruby. Scott has an example how you can add a DatePhotoTaken property to System.IO.FileInfo using Omar Shahine’sPhotoLibrary project.
Chalk this up to my continuing ignorance of dynamic languages. I’m working on it, albeit slowly.