Wednesday, November 19, 2008

DevConnections 08 Day 2

1. Introduction to the ASP.NET MVC Framework – Markus Egger, EPS Software Corporation

Not a very high level talk but good enough to reinforce the basics about the MVC framework. Along with Hanselman’s talk, they emphasized a lot about ASP.NET being greater than WebForms and not synonymous, as many people thought in the past. So ASP.NET contains WebForms and MVC and they can even be mixed together. Egger presented a few examples of when you should use MVC, and that WebForms isn’t going anyware and that it’s going to keep growing. He also implemented a couple of code samples and showed how the calls where routed to the controllers and how to modify them.

2. Language Integrated Query (LINQ) – Dave Sussman, IPONA LTD

I was expecting this presentation to have a higher level and learn some deep stuff about LINQ, but it was pretty much covering the basics behind how LINQ works and how to take advantage of its features. Sussman talked about how to use SQL not only for SQL, but for objects and XML. He covered a little about query expressions, lambda expressions, type inference, anonymous types and object initializers. He also talked about extension methods with LINQ and its benefits.

3. User Controls and Custom Controls in WPF – Dino Esposito, IDESIGN, INC.

Very basic talk about WPF controls and how user controls differentiate from custom controls. Again, disappointing because after having WPF around for a couple of years and having many development being done already, I was hoping to see advanced stuff about it, but instead it was the most basic overview about the different types of controls (containers, lists, text controls) and how to modify themes and templates to create custom controls. Honestly, I was hoping this was way over, and that people were already more familiar with WPF. I guess that since the conference was more focused on enterprise business solutions, the crowd was less familiar with “new” technologies. Dino also talked about the XAML and controls differences between Silverlight and WPF.

Anyway, here are some of my notes about what he presented:
Content Controls: constrained to contain a single item, although that item can be a full hierarchy of controls (Tab Control).
Item Controls: contain a collection of arbitrary controls.
Range Controls: numeric value in a range that doesn’t support arbitrary content (slider, progress bar).
Text Controls: interactive controls for text (like the SpeelCheckEnabled property of text controls)

Regarding styles and templates he talked about the two types of templates: Control Templates and Data Templates. About the last ones he remarked that they change the rendering of non UI elements. They are defined in the resources and also to use content presenter to bind properties. (Nothing we didn’t knew already).

Regarding User Controls he said that the need for a custom control should be based on the API you want and not on the appearance, because you already have styles and templates for that. You should also have present that they will have limited need for reuse, styling and theming.

4. Data Access with Silverlight 2 – John Papa, ASPSOFT

This presentation was one of the best ones in the conference. Papa is a really smart guy with a lot of experience with ASP.NET, WPF and Silverlight, so his presentation was on a good level, organized and well oriented. He talked about the different ways to retrieve data in Silverlight using bindings and presented a lot of running examples about it. At the end of the presentation I went to meet him (very cool guy) and he talked about having several silverlight controls on the same ASP.NET vs having a single control in ASP.NET. He was more inclined for the second option. Make sure to check out his site.

He started talking a little about when to use LINQ: To objects, to JSon, to XML, to SQL and to entities, and then talked about manual binding vs. declarative binding and how the latest can save you lots of work and be less prone to error.

He defined two rules for XAML binding:

• #1: the target of data binding must be a framework element (most of the cases)

• #2: the target property of the data binding must be a dependency property (dependency properties keep popping out everywhere).

On the demos he was showing he was demonstrating how to set the data context at the container control level and then how easy it was to just specify the properties in the child control bindings and how this helps on the designer-developer workflow since a Blend designer can receive the list of properties from the developer, bind them to the controls without having the actual object in place.

He talked about the different binding types: OneTime, OneWay and TwoWay binding depending on the functionality you want for your application. He remarked that objects must implement the INotificable interface in order to be able to receive notifications when the property changes. I know this is now new, but the way he explained with code samples was simple and concrete. He also mentioned the INotifyCollectionChanged which notifies when a list of content information changes. He also said that ObservableCollection generic can be used.

We now jumped on how to consume data services. You know have REST, SOAP/WS, RSS/ATOM JSON and POX. He remarked how easy and robust was to build data services with WCF using the Silverlight Enabled WCF template. He explained the two types of cross domain files that you can find: ClientAccessPolicy.xml which is the one for Silverlight, and the CrossDomain.xml which is the one that you will find in most cases. If the SL app cannot find the first one, it will look for the second one.

No comments:

Post a Comment