Archives / 2011 / June
  • Teaching high school kids web programming (Part II)

    A few months ago, I thought of teaching high school kids programming. I let the idea sit for a few months. Now that summer has started, I think about this again. The following communication with Microsoft Scott Hunter by InfoQ caught my attention:

    Web Matrix is the tool for Web Pages, their lightweight IDE to compete directly with PHP.

    Three ways to create web pages using ASP.NET and Visual Studio:

    • Web Pages: Extremely light weight, easy to build pages. No infrastructure needed, very much like PHP or classic ASP. Full control over the HTML being generated.
    • MVC: Same light-weight view engine as Web Pages, but backed by the full MVC framework. Full control over the HTML being generated. Upgrade cycle is approximately 1 year.
    • Web Forms: Component-based web development. Use when time to delivery is essential. Especially suited for internal development where full control over the look and feel isn’t essential. Upgrade cycle is tied to the core .NET Framework.

    The Scott went further to mention that “the Razor view model was designed for Web Pages first, then adopted by MVC 3.”

    So ASP.NET Web Pages is exactly what I needed. Although I have heard WebMatrix and Razor for a while (I even attempted to convert webform to Razor), I have failed to take WebMatrix seriously. We already got Visual Studio and the free Express edition. I always though Razor is just another view syntax to save a few key strokes until I realized that the Web Pages could be used without MVC. I found several tutorials on Web Pages:

    The ASP.NET Web Pages site

    The ASP.NET WebMatrix Tutorial (You my download the same material as a PDF eBook)

    Web Development 101 using WebMatrix

    Web Camp WebMatrix training kit

    These tutorial has everything that I need in my original goal without any more work me:

    • Be able to teach for just a few hours and get kids productive.
    • Close to HTML without the complication of OOP and black box (e.g., the complicated life cycle of WebForm).
    • Simple data access with SQL statements.

    Just a side note. Although the tutorials use WebMatrix, I could do everything in Visual Studio as well (though I did not try the Express edition). Just need to install ASP.NET MVC3 with latest Visual Studio tools. This will get Razor tools installed. Then create an empty website as the Razor tools are current not in the template for an empty web application.