St. Louis Day of .NET 2011 – LightSwitch and MVC

This is part of a series of posts containing my notes from the sessions I attended at the 2011 St. Louis Day of .NET conference. 

This series does not attempt to give complete accounts of the information presented in each session; it is just a way to capture the bullet points, notes, and opinions that I recorded while attending the conference.  I have previously posted a list of all of the session materials and sample code that I have been able to find online, so if you are looking for a more precise account of a session, try looking there.

The Keynote session of this year’s conference focused on Visual Studio LightSwitch.

  • LightSwitch SKUs:

    Visual Studio LightSwitch: $299
    MSDN Customers can add LightSwitch to existing versions of Visual Studio at no additional cost

  • LightSwitch creates out-of-browser Silverlight applications.
  • .NET 4.0 is required
  • LightSwitch creates a "model" of an application, which is compiled to a working assembly.  Code doesn’t really exist, at least in the form that it does in traditional .NET applications.  (Unanswered question:  How can a LightSwitch application be extended?  It sounds as if it can only be done within the LIghtSwitch environment.  If the code does really exist, then there’s nothing to pick up and move to a traditional Visual Studio project.)
  • LightSwitch comparisons to Access are very valid, IMO.
  • LightSwitch can present the user with interfaces to build a UI based on the tables in an existing database.  I remember watching non-database-savvy end users attempting to build reports on dBase twenty years ago; those attempts were failures because of the users’ lack of relational database knowledge.   The LightSwitch UIs look like yet another failed attempt to build reports/UIs on top of databases.  End users still need to understand relational databases.  This is still not a solved problem, IMO.
  • To allow for greater extensibility, MVVM applications are created by LightSwitch.  (Unanswerd question: How does this statement make sense if no code really exists?)
  • LightSwitch applications can be deployed to IIS/SQL/Azure.

I attended several sessions focusing entirely or in part on ASP.NET MVC.  I’ve previously written about my disappointment in these sessions, so I won’t  identify the specific sessions or speakers (I’m not trying to call anyone out).

  • jQuery and Microsoft AJAX libraries are available by default in MVC applications.
  • When building a MVC application, you can create an "empty" or "Internet" application.
  • No viewstate or server-side controls.
  • Can create view/controller without a model (use this for About pages, ect)
  • Can customize the view engine; Razor is the default engine.
  • Naming of controllers (and other entities) is important… routing (and other things) expects entities to be named a certain way.
  • Simplest example of a model class is a class with properties for each field.
  • You must create controller to access views.
  • Visual Studio allows creation of views based on an existing model.
  • For simple applications, consider putting logic into the model class(es).
  • ViewBag is used for passing information between controller and view.
  • Because there are no server-side controls, you WILL write lots of Javascript when using MVC.
  • Use Javascript/jQuery to enhance/improve the build-in validation features.
  • Entity Framework 4.1, and Modernizr packages are installed by default.  (Presumably Modernizr is added if you select the checkbox to include HTML5 support.)
  • Another example of how naming of objects is important… RedirectToAction(<name>) method redirects to view named <name>.
  • View templates allow quick builds of pages based on models.  Examples of templates are List and Edit.
  • PluralSource videos on ASP.NET web site are great MVC training material.
  • Controllers contain logic and pass information between model and view.
  • Controller templates help to generate the appropriate controller classes for views and models.
  • In order for WebForms and MVC to work together, you need to be on the more recent ASP.NET engines (for example, the routing engine is important to MVC, so it needs to be available).
  • Back button issues remain; MVC by itself doesn’t mitigate those.
  • Unanswered question:  How do session variables work with MVC?
Advertisements

One Response to St. Louis Day of .NET 2011 – LightSwitch and MVC

  1. adefwebserver says:

    For information on LightSwitch and MVVM, see: http://lightswitchhelpwebsite.com/Blog/tabid/61/tagid/12/MVVM.aspx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: