Mix09 News

Well there’s no doubt about it, Microsoft provided masses of news for the blogosphere over the last few days from Mix09.  While (as I tried to prove through my article series) Silverlight 2 was mostly ready for building business applications, Silverlight 3 is practically designed for building business applications (assuming running in a sandboxed environment is practical for your application).  Up until now I was more or less the only person writing about building business applications in Silverlight in depth, but things will be changing – mere hours after the Silverlight 3 news announced there are numerous (and reasonably extensive) articles on implementing the new features.  I am not a believer in reinventing the wheel and writing on topics that have been covered elsewhere unless I have something different to add, so instead I’ll list what I particularly like and link to articles on each:

RIA Data Services – while not Silverlight specific per se, though it does have a tight integration with Silverlight it also has a lot of potential for all other types of applications.  Previously Microsoft has predominantly released technologies which promote a very tight linkage between the presentation layer and the database with 1:1 links between entities / business objects and database tables in a simple 2 tier/layer fashion (I’m guessing partly because it was easy and partly in order to show how easily an application can be developed in their demos), though that has absolutely no place in real-world applications for obvious reasons.  RIA Data Services finally acknowledges this is not an acceptable strategy and provides a path between database and presentation layer which is customisable at each layer, so we can finally have well structured but flexible application designs in a method that is easy to implement.  Despite my initial scepticism, I am incredibly impressed with RIA Data Services – it’s exactly what I have wanted as a business application developer forever, and I believe it is going to be absolutely revolutionary in enabling developers to build scalable, robust solutions in a standard way.  I was afraid it was going to be another “look how easily we can do this” technology we often see which has absolutely no value in major development projects but looks good from a sales/demonstration perspective, but from my first impressions it’s actually fundamentally very well designed.  I’m sure I will have feedback when I have finished incorporating it into my project, but from my initial play I am really happy where it is going and very impressed with it.  Nikhil Kothari has a good overview of the topic here.

DataGrid Update – the DataGrid control now supports grouping! I’ll now be able to swap back to using it instead of the open source DevExpress grid. In addition there is a new DataPager enabling data to be paged in the DataGrid without retrieving the entire set of data at once. With these features the Silverlight DataGrid overtakes all other platforms (WinForms, ASP.NET, and WPF) in functionality required for business applications.

DataForm – this is a means to view and edit details (such as we did in article 5 in my series), I’m guessing similar to the FormView/DetailsView control in ASP.NET. I still need to play with this more to form a full opinion but it’s looking good.

Validation – my field validation control becomes obsolete now with built in validation using per property metadata (attributes on each property in your business objects). I’m yet to see how this goes with more complicated rules other than hard coded data formatting and value ranges so I’ll reserve my opinion right now, but it does look good. Brad Abrams discusses this (and a lot of the other business related improvements) based upon his Mix09 talk here.

Out of Browser / Run on Desktop – this is pretty major – you can now right click on your Silverlight application (if enabled) and select to run the application out of the browser. The application will then be “installed” on your machine with a shortcut in the Start menu, and for all intents and purposes appear like a desktop application. As a part of the application launch it will check to see if the application has been updated and download it if so, and if not simply use the cached version. Very nice. Tim Heuer has blogged about this here.

ComboBox Nightmare – the infamous “ComboBox Nightmare” that I documented in this article with Silverlight 2 has been half fixed in Silverlight 3. Now when you have cascading dropdown lists the dropdown height will be recalculated properly each time. Unfortunately no SelectedValue support as yet which it will need to be ready for business applications. I will be lobbying for this in the final version!

Another thing worth mentioning is that the new version handles a lot of the async issues when making web service calls behind the scenes. I’m also looking forward to the ClearType font rendering promised in the final version. There are numerous other new features worthwhile checking out in addition to the ones listed above. Tim Heuer lists all the new features here.

The only problem with it all is that I have two talks in 2 weeks time (SDNUG on April 2 and Code Camp in Wagga Wagga on April 4) on building Line of Business Applications in Silverlight and this news changes everything!  I am working on new versions of the presentations now, as the vast majority of my subject matter (summary lists, server communication, edit details forms, validation, etc) is now obsolete with better solutions now available in Silverlight 3.  In fact, I think the only major topic they didn’t infringe on was my reporting solution (which Silverlight 4 will do away with if it has printing support)!  Though Silverlight 3 is in beta and doesn’t have a go-live license as yet I see little point presenting my solutions to building business applications in Silverlight 2 and the workarounds I used, as these new features change the entire landscape for developers, and though we don’t know how long it will be until go-live I see little benefit in starting developing new business applications in Silverlight 2. With these updates Silverlight is really heading in the right direction. I might even go so far to say these updates make Silverlight the best platform in their suite for building business applications upon.

Expect a new release of my business application framework for Silverlight coming sometime in the near future!  The next release will have major styling improvements (along with a 7 part article series on styling), including a drop-in DLL that will provide much of the structural framework for your application (note I am still investigating the new navigation framework in Silverlight 3 and maybe working in with that instead).  It will specifically cater for Silverlight 3 projects, providing an additional layer to what has been announced from Mix09.

Advertisements

16 thoughts on “Mix09 News

  1. Chris, thanks for this useful summary. With regards to the new navigation pages if you decide to not include them will you offer an alternative way of getting directly to a record/product from a bookmark or external link (for instance if you were to have a search summary/results page external to the Silverlight LOB)? Many thanks, Sarah.

  2. Hi Sarah

    I’ll definitely be using the new navigation pages and am working to convert the framework to those now. This structure is better than my previous means for managing pages so there won’t be a need for alternatives :).

    Chris

  3. Chris,

    Nice summary for LOB people.

    SL3 looks good although I have to say its really only just catching up with those of us that have already built full blown LOB applications on SL2 already.

    Its a pity I’m under a NDA or I would be able to show you some of the SL LOB framework my team has built.
    I can say its built on top of CSLA for Silverlight – which as a framework is miles ahead of RIA Data Services imo.

    I’m sure there are plenty of other business developers out there that have already built much of SL3’s feature set on SL2 themselves but just can’t talk about it…

  4. HiChris!
    Thanks for this good article.
    I was reading all your previous articles about silverlight 2 LOB.
    I hope you will continue to do the same thing with the silverlight 3.
    Thanks again,
    Rachida

  5. Hi Paul

    It is a pity you’re under NDA – I would have been very interested to see how other people have developed business applications in Silverlight. It’s interesting to see that you have used CSLA.NET for your project – I’d be really interested in hearing about what benefits it brought to your project as I felt when I investigated it that it didn’t bring enough to warrant its overheads (I’ve used the framework once on a non-Silverlight based project and liked it) – though if you wanted n-level undo or features like that then definitely it would be the best choice. If that’s something you can talk about I’d love to hear about it. Like you say I’m sure there have been many people that have built business applications in Silverlight 2 but haven’t shared their experiences and knowledge for whatever reason, which doesn’t help make the world a better place. If there’s ever a screenshot you can share drop me an email via the contact form and I’ll give you my email address :).

    Thanks for your comment Rachida. While I will be sticking with Silverlight 2 for my articles at the moment (since there is no go-live license) rest assured I will continue documenting what I have learnt.

  6. Very interesting…

    We have had many issues with using Microsoft’s DataGrid. The biggest problem we have is that it selects the first row every time you set the ItemSource! Why would you want the first row selected? At least give use a way (property) to not select the first row. I guess they did give a way when they released the code as MS-PL.

    Do you know if this is still the same way in SL3?

    Thanks.

    Mike

  7. Hi Michael

    By the looks of it the first row is selected by default still in Silverlight 3. I guess the main reason they select the first cell in the first row automatically is for data entry scenarios where you would want a cell to automatically have focus so the user could start typing. But I agree, in scenarios like I use the DataGrid (for lists to drill down on data) it’s not ideal to automatically select a row when the data grid is populated. What particular issues is this causing you?

    Chris

  8. Thanks much for this. Will Silverlight 3 incorporate any MVVM-type framework capabilities or will those type frameworks most likely have to be updated to accommodate changes in Silverlight 3?

    ken

  9. A simple example…

    Picture a screen with a list of existing items (DataGrid) on the left and a bunch of input boxes (text, combo, check) on the right with “Save”, “Cancel”, “Close” buttons below. When a screen loads we load the existing items into the DataGrid and place focus to the first input box on the right. We are in “AddNew” mode. The user can just start typing new values (State goes to “AddNewDirty”) and click save. We refresh the existing items and are back in “AddNew” mode. If you would like to edit an existing item, you can click it and we will load that data into the input boxes and you goto “Edit” mode and “EditDirty” on change. The “Cancel” button that will take you back to “AddNew” mode as well.

    The way the DataGrid currently works, the first row is selected and we immediately goto “Edit” mode on the first row. The user then has to click “Cancel” to get to “AddNew” mode. We have modified the DataGrid code to not select the first row, so things work the way we would like…

    And as I said, this is a simple case. Why would the default behavior be to select the first row/first cell? Why not select nothing and give the developer a way to select what they want… What if I want to select the second row? There isn’t even an event “BindingComplete” that I can handle to select the row I want.

    I would be happy with a property something like…
    SelectFirstRowAndColumnOnBind = False
    I’m sure you can come up with a better name 🙂

    Or more events around binding (Start, Complete) so I can know when it starts and completes so I can clean up.

    Thanks
    Mike

  10. Hi Ken – with regards to additional MVVM support, I guess the main thing that has been missing is support for commanding, which still isn’t available in the Silverlight 3 Beta. While I haven’t played around with Prism 2 as yet, I believe it has support for commanding. I haven’t implemented the MVVM pattern in my sample project as yet as I plan to dedicate an entire article to the topic sometime in the future. There are a ton of examples around on using the MVVM pattern in Silverlight (also including methods of implementing commanding behaviour) – Jonas Follesoe has a good post on implementing MVVM using some concepts devised by Nikhil Kothari to implement commanding, and also using the commanding implementation found in the Silverlight Extensions CodePlex project:

    http://jonas.follesoe.no/YouCardRevisitedImplementingTheViewModelPattern.aspx

    Hope this helps

    Chris

  11. Hi Mike – I see what you mean with that sort of scenario that it can be a pain. The only thing I can think of is to create an empty object, add it to the end of your collection, and select it as the object in edit mode. Of course that comes with its own problems (removing it if the user cancels the add). Have you lodged it as a change request with Microsoft? Unlikely to be changed – personally I’d prefer it that way too, or with a property to set the behaviour…

    Chris

  12. I have not logged it with Microsoft as I can’t find where to do this… I looked at the connect site and can’t seem to find the best place for it… We did open a pss ticket and were told the behavior is “By Design”. Do you have a suggestion on where I could post my request?

  13. Hi Mike

    I’ve been told by Scott Barnes from Microsoft that the best way to report bugs and feature requests is to leave a message in this forum:

    http://silverlight.net/forums/28.aspx

    You could possibly discuss it with some of the team members via Twitter (Tim Heuer tends to respond) or on their blogs. No official means that I’m aware of however…

    Chris

  14. Hi Cris, I Implement your LOB in my App, But i have a problem with the CascadingDropDown.

    The Problem is when populate DictionaryCache (in my app is Type) raided a error.

    is this: Cannot implicity convert type ‘MyFirstApp.P2PServiceReference.TipoDictionaries’ to ‘MyFirstApp.Dictionaries.TipoDictionaries’

    in this line:
    DictionaryCache.TipoDictionaries = e.Result;

    i need your help please and Thanks.

    Excellent Job..!!!!

    Regards

    • Hi Jesus

      Unfortunately I’m not sure exactly what the issue is (the change in names is a bit confusing), but my guess it is the problem that occurs due to converting the application from Silverlight 2 to 3 (the process regenerates the service reference incorrectly). If you have a look at the comments in article 4 of the series I’ve listed how to fix this problem (remove and add the service reference again, selecting the reuse objects from an assembly option when adding it).

      Hope this helps…

      Chris

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