Microsoft realized it was unfair that children and wives were unable to experience the joy of creating web applications. So last week they introduced a brand new shinny toy in the market – WebMatrix. Sadly, they forgot about toy-safety which any toy manufacturer will tell you is a cardinal sin.
If you want to know what WebMatrix is, you can check Scott Guthrie’s blog post here that explains it in detail. To sum it up, in Scott Gu’s very own words…
In 2003 when ASP.NET joined web development, it was great. There was nothing like it in the market that let you create web applications so easily. You didn’t exactly have to understand how the internet worked, you didn’t have to worry about POST or GET verbs, because when ViewState, Event Handlers and Page_Load got together all you had to do was party! Unfortunately, because the entry constraints were so low, some not-so-good developers joined the scene creating some not-so-good applications that resulted in not-so-good user experiences. But the party still went on, as there was a community of very good ASP.NET developers always ready to help. Not only did they provide answers to problems, but they also developed long term solutions and methodologies like TDD, SoC that would help you create beautiful and maintainable applications.
In Scott Gu’s post on WebMatrix, he lists an example where database, business logic and user interface code all sit hand in hand on the same page. Click here for a snapshot. A decade of web development has taught us one thing – not to write such code. Numerous tools and technologies, Microsoft’s very own ASP.NET MVC prevent us from doing so. Why then would we want to teach a failing technique to a bunch of fresh minds?
Just because a child cannot fully grasp the idea behind gravity does not mean we teach children the earth is flat.
I like the idea, to be able to create web applications without knowing everything there is to know. Visual Studio can be daunting and overwhelming and a simpler tool for the beginner is a great idea. However, since the users is naive, the onus lies on the product manufacturer (in this case Microsoft) to help you create a good product.
There should be no way to write the example code shown. A tool like WebMatrix should force constraints and restrict users from creating such a mess. Maybe a user might not understand why he is forced to write database code in one file and user interface code in another. He might even find it an inconvenience. But you the manufacturer know what is good for this child-developer. It is for the developers of WebMatrix and not its users to identify pitfalls and force constrains around them. This might reduce flexibility, but wan’t this tool meant for simple applications in the first place?
I’m still not sure who WebMatrix is for. Microsoft says it is not for professional web developers. So is it then for people who can write SQL queries, learn Razor (MS’s new MVC view engine), understand open source projects like BlogEngine.Net, purchase web domains and hosting, but simply cannot take the effort to create good applications, even if it was for their own good? The word that comes to mind is Lazy.