Update
Microsoft has kindly decided to remove the download and fix the issues before re-releasing it. Additionally, there's a good dialog going on, mostly on twitter, but also on Phil Haack's blog. Ayende also posted 7 or so posts about Kobe and related topics, which are worth a read.
Roughly 4 months ago I nerd-raged all over the efforts of a small team at Microsoft who put together a sample MVC application. Despite some pretty loud outcry, the response at Microsoft was pretty slow and definitely felt like "We'll just wait them out" (which they did). Today Microsoft released the 2nd official MVC sample application - the Kobe Web 2.0 Resource Kit. Sadly, Kobe is on equal footing as far as craftsmanship and quality (on a related note, I'm will no longer be travelling to any NW parts of the US for fear of getting beaten up).
Now, before I go into details about some of the specifics, there's a couple things we should probably get out in the open. Its been said that we should just face it and accept that 90% of ASP.NET applications are written like Kobe. It's also been said that this Resource Kit doesn't claim to be the "best" way to build applications. All I have to say to that is that I hold myself, my team, and Microsoft to far higher standards than that. I think it's a complete travesty to release a sample applications that focuses on "architecture and implementation" with poorly thought-out architecture and horribly executed implementation. Imagine if the sample applications that shipped with the IPhone SDK looked like a Windows Mobile application. ASP.NET is pretty far behind when it comes to frameworks for Web 2.0 enabled sites, and if Kobe represents the way to build Web 2.0 applications with ASP.NET, then its a lost cause.
So is it really that bad? Lets go through a list of issues I have with Kobe, in no particular order:
Two JS frameworks (just like Oxite). To me this is like using NHibernate AND DataSets, or WebForms AND MVC. Call me crazy, but jQuery does everything I've needed from a JS library either directly or via plugins. This is a net loss in productivity and maintainability. Its possible ASP.NET AJax isn't used anywhere and simply included in the scripts folder (something I can easily forgive).
Stupid CSS. I'm not an HTML or CSS expert, but I'm pretty sure what they've done with their CSS would make a Web 2.0 guru vomit. Here's one of hundreds (maybe thousands) of examples:
<div class="wp100 bdr02 bgc03">
with the relevant CSS being:
.wp95{width:95%}
.bdr02{border:#ffffff 1px solid}
.bgc03{background-color:#e8edf6}
As I myself was recently told: "by defining class names specifically tied to their design element, you are merely moving the design out of the style sheet and back into the content. This is defeating the entire purpose of stylesheets. You might as well just use <B> and <center> tags." - and I completely agree.
Stupid HTML. Along with the really impossible to read and tightly coupled CSS, there's some pretty bad HTML. *Most* pages start off with 6-8 nested divs, here's a random look:
<div class="pdl13 pdr15">
<div class="fll w744">
<div class="wp100 bdr02 bgc03">
<div class="pd08 mostDownload01_l vat">
<div class="bgc02 vat">
<div class="mostDownload_m bgc02 vat">
<div class="wp100">
<div class="fll bgc05 pdr03 h20">
Many pages look like a mountain range...easily reaching 10 levels of nested divs , then back to 8, then 12, then 7...
By far, my biggest complaint is the sloppiness of the code, far exceeding what we saw in Oxite. There are major architectural and implementations problems with Kobe, but the lack of crafstmanship is so extreme that I have a problem seeing anything past it. Why do I keep ranting about poor code writing? Because it speaks volumes about the professionalism of the person writing the code. Also, Microsoft has internal and external guidelines for how code should be written. It should be a requirement for developers working at or for Microsoft to follow these guidelines (I'm guessing that it actually is). Some examples:
Architecturally, the same flaws that were present in Oxite exist here:
I recently commented on twitter that the awesomeness of FluentNhibernate made it possible for 'our' way to become mainstream. I said that realizing that it never would become mainstream (I mean, it already is in most other communities, just not for .NET developers). Kobe and what it says about Microsoft's ability (or willingness) to lead is the reason why.
I'm more than happy to accept that YOUR view of Kobe might not be the same as mine. Maybe you won't be as upset about the programming style as me. Maybe you like LINQ to SQL and feel more comfortable with a 2-tiered system. Maybe you think unit tests are something only fake-developers talk about. I can accept all of those points of view. What I can't understand is someone who thinks this even comes close to an acceptable sample/reference application from Microsoft (or anyone really). However its being promoted, it will be taken as the recommended way to build ASP.NET MVC applications.
Check out Kazi's thoughts on Kobe as well
Posted
Thu, Apr 16 2009 5:44 PM
by
karl