Friday, April 23, 2010

DevConnections in Las Vegas - my take

I went to Las Vegas last week for the DevConnections event.  The event marked the release of Visual Studio 2010 and Silverlight 4.

A little short notice but I believe you still have until the end of the month to purchase Visual Studio 2010 and get 1 SKU higher for the same price.  That means if you bought Standard you'll get Professional.  If you get Professional then you'll get Ultimate.  That is a great deal if you're looking to go to VS2010.

My take

1. Data Binding and Templates

There were several courses that were almost exclusively about data binding and templates.  Obviously, data binding is binding of an object to a control.  The most common binding in a business application is 2-way binding where the UI and the object are updated as changes are made; traditionally through the use of the INotifyPropertyChanged interface. (Side note:  There is an alternative to INotifyProperty changed that I may address in another post).

With WPF and Silverlight 4 you get the same data binding functionality/experience that you're used to seeing if you've done any WinForms development.   There is also the IValueConverter interface that is very useful in data binding.  This interface provides a Convert and ConvertBack method where you can transform a data item as needed.

How is this useful?  Well, say you have a boolean Active that you want to bind to.  And instead of a check box, you want to bind to a radio button group which will act as a 'Yes'/'No' (or Active/Inactive).  So as you imagine, in the Convert method you would return a 'Yes' or 'No' string while in the ConvertBack you will set your object's True or False value.  A a bonus example, what if you wanted Active to turn the screen one color and Inactive to turn the screen another?  Same thing.  You bind your Active flag to say the background color property of a control and then use the Convert to set the correct brush color, etc.

More on IValueConverter

Lastly on templates is the ability you have in WPF and Silverlight to customize the look of your controls.  You can dramatically change the way a dropdown list or listbox looks by changing its item template.  A great example of this is an application called StaffLynx.

Billy Hollis, a speaker at DevConnections, worked on this application and shows it in many of his talks.  As one example, I've attached a screen shot of the application.  You'll notice on the left hand side are some sticky notes.  Those sticky notes are merely a list control that's item template has been tweaked to give the appearance of a sticky note. The buttons are also button controls that have been edited (probably using Blend) to rounded edges and some focus/lost focus animations.

It blew my mind a little and hopefully some of yours as well the power of templates.  For those of us doing web-based development we can stop making plain old forms and create rich robust responsive applications!  This is powerful stuff, and really not that hard to do.

FYI, you can find Billy Hollis at slmasters.net.


2. Silverlight 4

It is much more than Microsoft Flash or HTML5!

Silverlight had been off my radar for a while but this recent release is changing that.  This is a mature product now and is very feature rich.  If you used previous releases of Silverlight and hated having to edit XAML (pronounced Zam-el)  by hand... good news!  SL4 have a friendly IDE to help you out.

Also keep in mind that many people are using Expression Blend to do the visual tweaking of the UI controls.  You can do it in Visual Studio directly but Blend offers a design tool to compliment the VS IDE.

Keep in mind- Silverlight 4 doesn't have any ADO.NET capabilities.  So if you're doing things with data then you'll need to use WCF, RIA Services, etc... in order to handle data access.

3.  EntityFramework is still here. 

Personally, I thought the ORM concept would die out, but there is still support for it in VS2010 and if anything even MORE support for it.  If that is your cup of tea.   One of the presenters did do a simple performance test and a DataReader is about twice as fast as doing EntityFramework.  A DataSet, as you would expect, is also slower than a DataReader but faster than EntityFramework.  This is a general thing, in some select cases this may not hold true.  I will say the difference was 0.2ms vs 0.4ms in the example (about 1000 records) but for larger sets of data or high performance apps that might be a big deal.  Also keep in mind the first call is always slower time wise vs subsequent calls.  So, if you're doing your own benchmarking, be sure to do multiple runs and average the time and/or drop the first time.

4.  Azure

This is Microsoft's entry into cloud computing.  Most if not all the VS2010 products will come with some amount of free cloud computing time on Azure.

I really didn't see much on Azure so my information is limited.  It did look like you had some XML attributes and some other hoops to jump through on the code side to get your stuff to work in the Azure environment.  BUT... everything else in terms of using the IDE to develop your pages and using SQL Server over the cloud looked to be similar to doing "local" development.  During one of the key note talks I did hear you can run your Azure and Windows mobile applications locally for testing which is handy. Oh, and you can run SharePoint locally if that's your thing.  (Sorry, I'm not really into SharePoint but my exposure has been poorly implemented SharePoint solutions at several companies.)

5.  Oracle deprecation

The data access space for Oracle has been depcreated.  That means you can still use it but that method of data access will go away in a future release.

Microsoft recommends looking at a 3rd party data access object provider.
6. What's new in C# 4.0?

Not much different in 3.5 vs 4 in terms of the languages, but a lot in terms of the framework.  The "big" news is C# now supports dynamic (if you don't know what this means, read up on F# and dynamic languages).

If requested, I may go into all the difference and new features in a later post.  In terms of VB, the big news was you don't have to do the &_ to continue a string to another line.

7.  Better integration with 3rd party

Design time interpretation of scripting (JavaScript, jQuery, etc).  This allows for design time intellisense.  That's a very cool thing.

8.  Misc

Not a lot of talk about WinForms.  Probably safe to say WPF is going to replace WinForms entirely.  However, it seems that Silverlight and ASP.NET will coexist.

VS2010 is offering a lot of templates for popular design patterns.  MVC and MVVM being two of the main examples.

On a minor note, Passport is no longer supported.  It seemed like an intereting idea but I guess it didn't get the traction Microsoft was hoping for.

No comments:

Post a Comment