Home > .NET 3.5, C# 3.0, IIS 7.0, Visual Studio > Live Blogging VSLive! Austin – Day 3

Live Blogging VSLive! Austin – Day 3

November 14, 2007

10:10am – Keynote:

The keynote this morning was “Take on your toughest challenges with Visual Studio 2008” by Sam Gavitt of Microsoft. The presentation was a practically oriented tour of Visual Studio 2008 ad its new features and capabilities. Some stuff we’ve already heard and seen, but this presentation was very solid. As usual, here are some highlight bullets:

  • VS is focused on three areas: User Experience, Collaboration, and Productivity.
  • Should be shipping via MSDN any day now – not to self: subscribe to MSDN!

Sam’s “Top Ten Reasons to Switch to Visual Studio 2008″ (with apologies to David Letterman):

  • WPF Integration and Interoperability
  • C# and VB language improvements
  • New HTML Designer
  • JavaScript Debugging
  • WCF/WF Integration
  • AJAX Integration
  • Unit Testing
  • Integrated Office Development
  • LINQ
  • Multi-Platform Targeting

These are definitely cool features, but I disagree on the last one. Multi-platform targeting (the ability to target code for any version of 2.0, 30, or 3.5) is a great feature, but it is not a reason to switch to VS: it the solution to a reason not to switch. LINQ is absolutely king: the absolutely best new language feature I’ve ever seen, period. Along with WPF and the promise of the Entity Data Model, LINQ represents a shift to Declarative programming. It will improve code readability, increase productivity, and result in significantly less code. If you really want to (and are stubborn) you can use LINQ in VS2005, but you get no real help from VS for using it. Switch to VS2008 and you get cool stuff like Intellisense and LINQ object creation. LINQ alone is worth the price of admission.

Web Application Stuff:

  • CSS Editing is greatly enhanced
  • CSS now has Intellisense
  • CSS Intellisense is also available in ASP.NET code
  • Tons of new file templates
  • JavaScript syntax highlighting
  • JavaScript Intellisense
  • JavaScript debugging
  • AJAX is SUPER easy in VS2008 – the demo blew me away

Windows Application Stuff:

Most of the stuff he talked about I’ve already posted a bunch on, namely WPF, VS, and Blend Coolness (but remember that Blend is not part of VS). He did briefly touch on WCF and WF integration, which I think is going to be valuable.

Office Integration Stuff:

OK, this is very very cool: Office development tools are now part of VS. You can add toolstrip buttons and features in Office products from your application. You can generate Office docs from your app. You can even create and embed your own Forms, including WPF stuff, in other Office apps. This sort of extension capabilities used to be a specialty in its own right and required specific training and tools: now anyone can do it, and it is slick.

11:37am update:

Just attended a session entitled “C#3.0 and LINQ Under-the-Hood” by Richard Hale Shaw. Richard has such a depth of knowledge that he is sometimes hard to follow, just because of the sheer amount of information he is capable of imparting. Truthfully, he didn’t talk much about LINQ at all, but rather he really got into the nitty gritty of the C# components that go into making LINQ possible.

Extension Methods:

A great technology that is going to be very useful, primarily for readability and productivity.

  • Add helper methods to classes you can’t extend
  • Operate on variables as thought he methods belonged to the actual class
  • The class name of the defining class is irrelevant, but it must be static and must be within appropriate scope
  • Extension methods must be defined as static
  • Obviously, a reference to the Extension method dll must be included in the consuming code
  • Intellisense indicates whether or not a method is an extension by prefacing it with (Extension)

Custom Iterators:

  • Lie at the heart of LINQ
  • Can be created by any method that returns IEnumerable, IEnumerable<T>, IEnumerator, or IEnumerator<T>
  • IEnumerator and IEnumerator<T> are preferred because IEnumerable is reserved for the primary Iterator of any given Collection
  • LINQ uses Deferred Execution based on Custom Iterators
  • Query does not hold data, but rather the mechanism for acquiring the data
  • Sequence methods (emplyed by LINQ) are built on Custom Iterators

Generic Delegates, Anonymous Methods, and Lambda Expressions:

  • Generic Delegates allow you to abstract and postpone the Action delegates until runtime
  • Anonymous delegates (a 2.0 technology) allow you to create and return methods on the fly: the compiler then generates the necessary code
  • Lambda expressions map to Generic Delegates to execute Anonymous Delegates in a more coder-friendly manner

12:45pm update:

“Using Visual Studio and the Expression Suite to Build Great User Experiences” by Denny Boynton.

A little bit of a misnomer: we really didn’t use Expression Studio, just Blend, but he did show something that was built using Expression video manipulation software (the name escapes me). He also did everything in a SilverLight application, which was good because it was the first one we’ve seen implemented in SilverLight.

I don’t have a lot of notes, basically we got to watch him work and start to get a feel for how the tools might be used in development. He never once edited XAML and only showed it to prove that you could get to it. He really segregated the Design work from the Development work, and the vision is starting to gel: this could really work. One of the other attendees pointed out that with these tools, you realistically could have separate designers. Maybe Microsoft is ahead of the game, predicting how it’s going to be rather than reacting to how it really is.

  • We really need a Rich User Experience (UX)
  • SilverLight is based on the RIA model (Rich Internet Application)
  • A lightweight plug in for IE, Firefox, Safari, and Opera (almost)
  • Runs on Windows, Mac OS X, and Linux (through “moonlight”)
  • Blend is really moving into the Designer Space
  • Designers are only limited by their imaginations: developers have always been limited by implementation capabilities
  • With XAML, those limitations are removed by completely separating the UI definition from the Code behind it
  • Expression Studio includes tools for Web design, Interactive design, Graphics Design, and Asset Management

3:10pm update:

Attended “IIS 7.0 for Web Developers” by Robert Boedigheimer. I need to preface all this with the statement that I am not an IIS person. I have limited experience with it, a few minor configs here and there on IIS 5.0 and 6.0, but nothing serious or production in nature. All that being said, based on the presentation and the reactions of those around me, IIS 7.0 is a great improvement over previous versions.

  • Broken up into a modular architecture
  • Uses pluggable components
  • Reduces attack surface and memory footprint
  • Configuration is all in XML
  • Installed modules are chosen in the configuration, so can be easily turned on and off without restarting IIS
  • Can be controlled from site to site (I think)
  • Modules are similar to ISAPI Extensions
  • Handlers are similar to ISAPI Filters
  • Custom Dialogs can be integrated into IIS Manager
  • Custom configurations are permissible
  • Configuration is independent for each website
  • You can write and apply .NET code to alter/extend IIS
  • Any request can fire .NET code (that you can develop!)
  • Modules are safer than filters because they are managed code BUT you still have to be wary of a performance impact (based on what you are asking the requests to do)
  • Header Details can be removed before a Response is sent – good for removing Server Identification information

.NET Integration:

It definitely appears that one of the big enhancements is the integration of custom .NET code. I can definitely see the power in being able to write my own methods to “do stuff” at any step in the process. Runs in one of two app pools: “Integrated” means that the .NET is in the Pipeline which “Classic” executes as ISAPI.

Forms Authentication:

In IIS 6.0, only ASP.NET files are protected. In IIS 7.0 all files can be protected using ASP.NET 2.0 Membership Providers for security. The authenticated user ID has been added to the log files. This non-ASP.NET file inclusion is disabled by default and must be enabled in the web.config file.

IIS Management:

  • appcmd.exe – Command line control
  • IIS Manager provides a GUI method
  • WMI Scripting is available
  • Can be done in custom .NET code by emplying the System.Web.Administration namespace

Built in Diagnostic Tools:

  • Traps and stores errors
  • Logs everything that happens
  • Failed requests are stored in an XML file
  • Can be configured to store all requests (or specific ones)

Run-time Status and Control:

You now have access to Internal Status information such as pools, processes, requests, etc. Accessible via all the above mentioned Management methods.

4:20pm update:

Just sat through a class on ASP.NET Architure by Paul Sheriff. A good overview of smart ideas for ASP developers. Not really an architecture, but lots of good common sense suggestions. Basically they boil down to these few suggestions:

  • Use CSS, Skins, Themes, and MasterPages
  • Wrap MS code that can cause you problems such as Sessions, Cache, Exceptions, ConfigurationManager, etc.
  • Create your own Base Page class and inherit all your pages from that base

CSS, Skins, Themes, and MasterPages:

  • CSS allows good separation of presentation and information
  • CSS promotes good structure (my note: this includes adding Syntactical value)
  • CSS is very flexible and is a well published web standard
  • CSS is cached on the client side and usually should be included as external files
  • SKins are like server-side CSS for ASP.NET controls
  • Themes group Skins and CSS together
  • Sites can have multiple skins and themes
  • Skins can be either Global (default) or Named (ID based)
  • Skins can be applied at runtime via the PreInit event
  • Themes are not set at runtime and cannot be established at the MasterPage level
  • There can be more than one MasterPage, but only one specified per page
  • MasterPages allow a consistent look and feel across an application
  • MasterPages can contain code
  • Subsequent pages use the Content are to deliver their information

Wrapping ASP.NET Constructs:

Wrappers are a powerful tool in many coding scenarios. In ASP.NET, wrapping such things as the Session variable array has many benefits:

  • Insulates code form future MicroSoft “enhancements”
  • Places code management in a single location
  • Allows variable initialization and implements default behaviors
  • Use this approach to wrap Exception management, Caching, ConfigurationManager, etc.

The last bit of advice is great: create a BasePage class that inherits from System.Web.UI.Page. Then have all of your Pages inherit from that class. This gives you global control over behaviors, can be used to implement security, provides consistency, etc. This is a rgeat idea and easy to implement, even after the fact.

The Last Session:

I went to a session on Distributed Data Application Design and Architecture, but I have to tell you I was pretty brain fried by then. The content was a little over my head, the presenter was very fast, and I really struggled to follow along, let along take notes for you guys. It’s probably for the best anyway as I doubt I would have made much sense.

See you tomorrow for the last day, I’m going to get some rest. And have some Tex-Mex food: benefits of visiting Texas!

%d bloggers like this: