Just Got Back from ASP.NET Connections

It was a busy last 24 hours at ASP.NET Connections -- 5 breakout talks, 1 night-time panel, and the keynote this morning.  I just flew back to Seattle a few hours ago and am totally beat.

The keynote was a lot of fun though -- and a great chance to show off some of the new ASP.NET Whidbey features to a public audience.  I did a cool demo as part of my talk.  The outline of the demo went like this:

1) Create a blank file-system based website using Visual Studio Whidbey (no Frontpage Server Extensions required)

2) Create an ASP.NET Page for data editing.  Drag and drop the new datagrid onto the page and databind it against a database (no code required).  Configure it todo sorting and paging (no code required either)

3) Add a drop-down list and use it to filter the DataGrid dynamically

4) Add editing support to the DataGrid (enabling updates of the data, in addition to filtering, sorting and paging)

5) Create a new ASP.NET Page.  Build another datagrid against the database, and enable output caching for the page.

6) Enable the new SQL Cache Invalidation - so that the page's output cache is automatically invalidated when the data in the database changes.

7) Update the data and show that the page is immediately updated.

8) Create a new ASP.NET Master Page template for the website.  Define some html tables in it to create a consistent page header (with logo), and layout tables for the content (with space on the left side for a navigation menu).  Add a contentplaceholder control on the master template to enable pages on the site to inherit its UI, but override the content where appropriate.

9) Build a home page based on the Master template (using the WYSIWYG VS Whidbey editing support)

10) Go back and update the data editing page to also be based on the master template (showing how easy it is to covert against asp.net pages to be based on master templates).

11) Edit the master page again and add the new treeview control on the left hand side of the page, and databind it against the new site navigation system (no code required).  Run the site and show how all the pages now have a consistent look and feel, and the navigation system+treeview makes moving around the site in a hierarchical way easy (as well as updates to the site structure simple).

12) Build a forms authentication system for the website.  Use the new membership system, and the rich new login controls on top of it to enable forms based login and password recovery.  Have the login.aspx page also be based on the master template so that there is a consistent UI for the entire site.  Add a loginstatus toggle control to the top right hand section of the master template to enable users to automatically be prompted to login (in which case they are directed to the login.aspx page we built) or logout of the site (in which case the control logs them out of the membership system).

13) Use the new loginview control to customize the UI of the homepage, and generate custom UI based on whether the user is logged in or not.  In the of the control configure a “Welcome to my Site!“ message.  In the of the control configure a “Welcome [UserName]“ message.  Use the new loginname server control to even eliminate the need to write code to set the username in the template.  Talk about how I could have also defined custom roles for the application (using the new role storage engine) and varied the output based on rolegroup templates in the LoginView control as well.

14) Run the application end-to-end for everyone.  From scratch we've built a completely new site, that does data editing and reporting (using database invalidated output caching) against a database; is protected with a secure forms-based authentication system backed against a secure membership store with optional user lockout, password recovery, and site usage statistics; uses a site navigation system to encapsulate and control all link/navigation relationships from a site navigation XML file (allowing easy updates); and whose pages are all driven off of a common master template -- changes to which will automatically update all pages on the site.

15) Lastly, show dragging a new master page template into the project directory, overwriting the one we built on stage.  It has the same rough structure as the one I built from scratch -- except that a designer has gone in and prettied up the HTML.  No code changes are required in my site -- I can just his refresh to see the new look and feel (and it looks very, very good).  Talk about the nice code/content separation enabled, and how Whidbey makes it even easier to have coders and designers work together.

I did all of the steps above on stage in front of the 400 person keynote audience.  No copy/paste of code (except for the final step of copying a new master template over the one I built -- although it contained no code, just html markup and server controls).  Instead I built the entire end-to-end application from scratch. 

The whole demo took about 25 minutes from “new blank project“ to the final version.  Based on the feedback from people, I think the audience was impressed.  It was a lot of fun seeing and hearing the reactions....  :-)

- Scott

P.S. The only thing I think I'll change for next time, is to show how we could have done the databinding and editing via an business object layer as opposed to working directly against the database (still requiring no code in the page itself -- all of the bindings can now be done declaratively to the business object layer with no page code required).  I was worried about time in this morning's demo which was why I cut this part out -- I'm going to make sure I include it for the version I show at the PDC.

 

12 Comments

Comments have been disabled for this content.