Pro Business Applications with Silverlight 5 Now Available

February 20, 2012

I’m happy to announce that my book Pro Business Applications with Silverlight 5 has now been released.  Preparation of this edition has been an enormous task, and I’m so glad to see it finally make it out into the wild.  What I had planned to be a short task of simply updating the Silverlight 4 edition of the book with the new features available in Silverlight 5 blew out to become a huge endeavour. Not only did I update the book for Silverlight 5, but I also rewrote much of the existing content to make it easier to read, and expanded upon the concepts I had covered in the previous edition (the chapter on MVVM got a huge update, as did discussion of collection views, along with many other topics). In addition, I also covered many new concepts too (such as MEF, and modularising your application).  All this new content has added another 200 pages or so to the book from the previous edition.

Most importantly, I have peppered the book with workshops, that walk you through the steps involved in implementing the topics covered in the book.  All the steps you need to follow are listed right there in the book, saving you the need to read a mass of text and interpret it in order to apply it to your project.  This makes it easy for you to apply the principles being covered without fumbling about and having to rely on any prerequisite knowledge.

If you’re not familiar with the Silverlight 4 edition, I took what I believe to be a rather unique approach, in that I attacked the subject of how you build business applications in Silverlight in a somewhat linear fashion.  Many (most?) technology books tend to be focused on the technology itself, with the topics not organised in order of how you would use them.  As a reader of these sorts of books, you’re required to apply the technology to your problem.  With my book, I took a problem-centric approach.  The problem being that you’re building a business application, and the book showing you how the technology can help you reach a solution, from beginning to end.  Ideally you’ll read  and follow this book from start to finish.  That said, it is still usable as a reference book if you so wish.

To demonstrate the process that the book follows, here’s the table of contents:

  1. Getting Started with Silverlight
  2. An Introduction to XAML
  3. The Navigation Framework
  4. Exposing Data from the Server
  5. Consuming Data from the Server
  6. Implementing Summary Lists
  7. Building Data Entry Forms
  8. Securing Your Application
  9. Styling Your Application
  10. Advanced XAML
  11. Advanced Data Binding
  12. Creating Custom Controls
  13. The Model-View-View Model (MVVM) Design Pattern
  14. The Managed Extensibility Framework
  15. Printing and Reporting
  16. Out of Browser Mode and Interacting with the Operating System
  17. Application Deployment

The benefit of this linear approach is that the workshops actually guide through the process of building a business application in Silverlight step-by-step.  You can follow through the workshops in order, and have a fully functional application at the end.

All in all, I’m actually really proud of this edition of the book.  I put a lot of work into it, and it’s become the book that if I were building business applications in Silverlight, I would want to have it by my side.

It saddens me greatly that Microsoft have let the “Silverlight is dead” rumour get out of hand, and depresses me that many people have been turned away from using Silverlight, and will not buy my book because of it.  I strongly believe that Silverlight is one of the best technologies available for building line of business applications, and I see it being so for quite some time yet.  It’s a mature platform, with a strong community around it.  Sure, Silverlight can’t beat HTML5′s reach, but you’ll no doubt find it quicker and easier to develop applications in Silverlight when there’s no need for your application to run on an tablet or phone.

If you are planning to buy the book from Amazon, please consider clicking on the cover of the book above, which will use my affiliate link to take you there.  And once you do have it and have been reading it, it’d be great if you could leave a review!

Now that the book is done, I’ll be doing some more blogging now.  Not everything I wanted to write about made it to the book, so I’ll be covering some of those topics.  Feel free, however, to suggest a topic in the comments below, and I’ll see what I can do!


What’s New in Silverlight 5

April 19, 2011

I presented “What’s New in Silverlight 5″ at the Sydney Silverlight Designer and Developers Network meeting (which I run), focusing on the new business application related features in Silverlight 5 (Jose Fajardo covered the new 3D features). You can download the source code for the application I wrote demonstrating the new features here (also includes my PowerPoint slides):

Download

The sample currently demonstrates the following new features in Silverlight 5:

New XAML Features

- Custom markup extensions
- Implicit data templates
- Binding in style setters

New Debugging Features

- Setting a breakpoint in XAML to debug a binding

New Control Features

- RichTextBox overflow
- ClickCount
- ListBox/ComboBox type ahead searching

New Elevated Trust Features

- Elevated Trust inside the browser
- Create/display new OS windows
- WebBrowser and toast notifications whilst inside the browser
- Unrestricted access to the file system (without user involvement)
- Default file name in SaveFileDialog


TechEd Australia 2010 (+ Upcoming SilverlightShow.net Webcast) Sample Application

August 29, 2010

This is the sample application for my TechEd Australia 2010 session on Taking Silverlight Applications Outside the Browser, and my webcast for the SilverlightShow.net website of the same name. This sample implements a schedule builder for the TechEd Australia 2010 conference, which it does so by displaying the sessions using the PivotViewer control (http://www.microsoft.com/silverlight/pivotviewer/), like so:

The details of the corresponding session are displayed when you zoom in on a speaker’s photo. You can then hover the mouse over the photo, and an add/remove icon will appear that you can use to add or remove the session from your schedule.

You can then export your schedule to Outlook (when running outside the browser with elevated trust permissions), or to an iCal file. The conference ran between 24-27 of August, 2010, so you will find the data in your Outlook calendar then.

This application demonstrates the following Silverlight OOB features:

- Checking the whether the application is running outside the browser
- Checking the whether the application is installed
- Checking the whether the application has elevated trust permissions
- Detecting when the install state changes
- Toast notifications
- COM Interop to create appointments in Outlook
- Checking for updates to the application
- Custom chrome
- Writing directly to file

This application is also a good example of how the PivotViewer control can be used to create impressive applications.

Note that the toast notification ideally would be used to display a notification to the user 10 minutes before their next session. However, since the conference is over, and implementing it like so would be hard to demonstrate, the notification will simply be displayed when the application is running outside the browser, and the user adds a session to their schedule.

I’ve split the application into two downloads – one for the source code, and one for the data. This means you don’t need to download all the data if you only want to look at the code (although you will need the data to run the application). If you wish to run the application, you will need to unzip the data into your Web project’s folder. Don’t worry about adding the data to your Web project. There are *a lot* of files, and it will take a long time. Simply unzip the data into the Web project’s folder, such that the .cxml file is in the same folder as the HTML/ASPX page that hosts the Silverlight application.

You can download the source code here:

http://www.box.net/shared/s133o7ge6g

And the data here:

http://www.box.net/shared/b3mt73kor4

Note that to run this project, you will need the PivotViewer control, which you
can download from here: http://www.silverlight.net/learn/pivotviewer/.

My thanks go to Rob Farley of LobsterPot Solutions who collated and processed the TechEd data, and kindly gave me his permission to use it in this demo.

If you missed my presentation, or didn’t make it to TechEd, you can catch me doing it again for the SilverlightShow.net website as a webcast next week.  The details of this webcast are here: http://www.silverlightshow.net/news/Free-SilverlightShow-Webinar-Running-Silverlight-Outside-the-Browser-and-with-Elevated-Trust.aspx.  It’s scheduled for September 7, and will go from 8am – 9am PDT.  This is 1am Sydney time, and you can get your local time here.  Miss that, well it will be posted online for you to view at your leisure.

Everything I cover is discussed in further detail in chapter 14 of my book Pro Business Applications with Silverlight 4, which has just been released! :)


REMIX10 (Melbourne) Demo

June 2, 2010

It’s been a while since I last posted, as I’ve been flat out writing books (Professional Visual Studio 2010 as a co-author, and Pro Business Applications With Silverlight 4 on my own).  So I haven’t had much in the way of free time to post anything here.  However, I’m at REMIX10 in Melbourne at the moment, and am speaking on what’s new in Silverlight 4.  I’ve put together a demo of some of the new features which I’ll be presenting, and you can download the code for the demo here:

http://www.box.net/shared/yt5v7sqoue

You can also spin it up and give it a go here:

http://www.peerplacements.com/Demos/REMIX10/SL4NewFeaturesDemo.html


PDC09 News

November 19, 2009

Unfortunately I’m not at PDC09, but luckily the keynote today was being streamed (I will be on a bandwidth diet for the remainder of the month now) and came with some brilliant news for Silverlight business application developers.

After a laptop giveaway that was very Oprah (everyone gets free multitouch laptops!), the Gu came out (aka Scott Guthrie) for an epic keynote that even included an appearance by Scott Hanselman.  The announcement of Silverlight 4 was pretty much expected, but the breadth of new features it will contain pretty much takes away most reasons people will find to use WPF over Silverlight.  There was announcement after announcement after announcement – with major new features just receiving a single bullet point on the slides.  What has been included in the (expected) 5mb runtime is phenomenal.  I’m not going to go into all these features as Tim Heuer has done a fantasic job (as usual) of writing those up, but I will skim over what (in a business sense) I see as being important to business application developers.  Obviously the UserVoice site demonstrated its value, with people being able to vote on their most requested features.  Apparently 9 of the top 10 voted feature requests have been implemented in Silverlight 4 (although I’m not so sure of that regarding mobile incl. iPhone support).  Certainly the ones I voted for and really wanted are now included!

  • Printing + Print Preview – everyone wanted that.  Will stop the “Silverlight’s not ready for business because it can’t print” crowd (although I wrote up ways around that).
  • Commanding!  So important for MVVM.  MVVM will finally not need (as many?) nasty hacks.
  • MEF support!  I’m yet to discover this fully though as it was not covered in the keynote.
  • Rich text box – great news for displaying and editing documents.  I’m yet to find out if/how XPS documents get supported.
  • Drop target support – Scott Gu demonstrated dragging a Word document onto a Silverlight application which opened in the Rich text box!  Still need to see details of this example as to how it was achieved.
  • Web browser control – host any web page (including Flash even!) in your app.  So cool for integration and migration possiblities.
  • Clipboard support!  Demo included copying the contents of an entire datagrid into Excel – very cool.
  • IDataErrorInfo for validation.  Is this the end of nasty exceptions being raised for validation – I’m still to find out.
  • RIA Services – released version to work with the VS2010 beta 2.  I still need to investigate the other new features – I’m not sure what they are yet.  At least I can now write the RIA Services chapter of my VS2010 book!
  • WCF bindings – I believe I heard something about a wider range of bindings now available in WCF?  Hopefully wsHttpBinding.  I need to investigate.
  • Scroll wheel support in all of the controls out of the box (I don’t know why this wasn’t in V3 actually).
  • More data bindings (I believe – still to investigate if it’s on par with WPF now).
  • Implicit Styling – now themes can be developed without needing the (not so bad) hack that was the ImplicitStyleManager.
  • Out of sandbox, including accessing files on the client machine (user profile folders only) which is a big boon for a more streamlined user experience.  Also allows apps to be run with elevated trust.
  • COM object access, enabling integration with Office applications!  Not much good for cross platform support though.
  • Right-click / context menu support
  • Mention of keyboard support in full screen mode.  Security was a big concern for why this wasn’t permitted previously, now available to trusted applications (only).
  • Cross-domain calls (for trusted applications only).
  • Somebody mentioned custom chrome on Twitter – I think that was a mix up with Google Chrome (the browser) support, as Tim’s blog entry doesn’t mention it and I don’t recall hearing it in the keynote.

As you can see (and this isn’t all the new features – just the ones I’m most interested in!) there are a ton of new features for business application developers in Silverlight 4 – really almost everything we really wanted.  I think while there will still be a use for WPF, Silverlight 4 is going to seriously reduce the requirement to use WPF and the full .NET Framework – great for developers that have to/ want to support multiple platforms too.  Now we just need the long awaited mobile support – but not mention of that :(.  I’m very excited about this release and look forward to having a good play with it so I can report on it in an informed manner.  Note that you need VS2010 beta 2 to play with this.  Looks like Silverlight 4 development won’t be supported in VS2008.  But for Silverlight development VS2010 is much much much better!  You can get the beta here.

Disclaimer – this is a preliminary summary – I can’t guaranteee just yet until I’ve played with it all that all the above is correct.  Please forgive me if I misreported something…!

Interesting stat that Scott Gu mentioned – apparently 45% of internet connected devices now have Silverlight installed.  The reach of Silverlight is rapidly expanding – and I’m guessing will even more with the Winter Olympics site in Silverlight (I believe – unfortunately the streaming viewers were not allowed to view that demo) :(.

Silverlight 3 Released + RIA Services Installer Issue

July 10, 2009

As you probably know already, Silverlight 3 RTW has been released.  Download the tools for Visual Studio here:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=9442b0f2-7465-417a-88f3-5e7b5409e9dd

I made the mistake of uninstalling RIA Services before installing the Silverlight 3 RTW Tools thinking it would be a part of the installer (which it wasn’t).  Silverlight 3 RTW has a new project template called Silverlight Business Application that relies on RIA Services, and doesn’t appear in Visual Studio as a project template unless RIA Services is installed.  When I found it wasn’t installed I tried to install it again the installer told me it needed the Silverlight 3 Beta SDK to be installed in order to continue!  Brad Abrams from Microsoft let me know that there would be an update to the RIA Services installer soon, but in the meantime I came up with a hack to the installer to get it to install.  Download Orca, a .msi editor from here:

http://www.technipages.com/download-orca-msi-editor.html

After installing it, right click on the RiaServices.msi file and select Edit with Orca.  Select the InstallExecuteSequence table, and change the DependencyCheck action to Installed (instead of NOT Installed).  Then select the InstallUISequence table and make the same change to its DependencyCheck action.  Save the file, and try to install it again and it should install!  It’s a hack, and should be fixed soon, but in the meantime if you’ve uninstalled RIA Services like I did or you’re just getting started with Silverlight this should get you going.

Update: No sooner than I blog this then I’m told that the July Preview of RIA Services has been released.  So much for my impatience :).  Get it here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=76bb3a07-3846-4564-b0c3-27972bcaabce&displaylang=en#filelist

One more note, unfortunately the ComboBox control still doesn’t have the SelectedValuePath and SelectedValue properties for databinding in foreign key scenarios – a pet peeve of mine.  Tim Heuer from Microsoft said when I asked him that they have it down on their list but it didn’t make it this time unfortunately.


SDDN Sydney Meeting

April 30, 2009

As Miguel has posted, there is a new Silverlight Designers and Developers Network (SDDN) group starting in Sydney, and meeting for the first time this coming Tuesday, May 5th.  I will be speaking about styling in Silverlight, based upon my current article series hosted over at the SilverlightShow.net website.  I’ll be covering styling from introductory concepts through to advanced topics.  Here’s the invitation if you’d like to come along…

This meeting we will see Chris Anderson (blog), from Peer Placements will be discussing advanced styling in Silverlight for both developers and designers. Topics will cover styling strategies, tools, advanced xaml techniques, fashions, and a discussion on designing user experiences.    

Jordan Knight (Blog) from Readify will run through the exciting new features in Silverlight 3, and demonstrate how you might use them in a real working reference application. This in depth session will cover perspective 3D, pixel shaders, navigation features, out of browser and much more. Other concepts like Model-View-ViewModel, dependency injection, unit testing and designing template friendly (read designer friendly) applications will also be touched upon.  

WIN!  

Attendees will have the opportunity to win a copy of the full Expression 2 suite, worth $1000!  

When and Where?  

The date and time: Tuesday May 5 at 6:00 PM for a 6:30 PM start.  

The venue is the Pyrmont Bridge Hotel, Level 2, Pyrmont, NSW. See map for details.  

Attendance is FREE, but please RSVP by entering your details in the registration in the registration tool on the site (http://www.sddn.org.au) or send an email to info@sddn.org.au.  

Who will this group interest?  

The focus of the group is not just on developers. Traditionally developers have had great community support, whereas designers not so much… now that Silverlight 2 is out we plan to change this.  

Silverlight is as interesting for developers as it is for designers. Due in part to Silverlight’s excellent separation of design and development concerns we have new problems to solve around finding the best ways to work together.  

To this end the SDDN will facilitate an ongoing discussion and promote the development of ideas and best practices for anyone who works with Silverlight.  

To register interest head over to http://www.sddn.org.au. Use the registration tool in the header of the site.


Building a Silverlight Line-Of-Business Application – Part 7.2

April 16, 2009

After a slight delay due to preparing for my Code Camp and SDNUG presentations, here’s part 2 of my styling series.  In this article I cover fashions in UI design, choosing fonts and colours, and using animations and icons and themes.  I then take a look at some good examples of design in Silverlight.  Based on feedback from my first article I threw in some additional discussion about designing user experiences vs designing user interfaces.  You can read the article here:

http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Styling-Part-7.2.aspx


Building a Silverlight Line-Of-Business Application – Part 7.1

March 28, 2009

Part 7.1 (yes, .1) of my series on building a line-of-business application with Silverlight is now available on the SilverlightShow.net website here:

http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Styling-Part-1.aspx

This is the start of a 7 part mini-series on styling the application within my main series of building line of business applications.  As I expected (and hoped) this article (being predominantly opinion based) is generating some controversy so join in and add your own comments – the designer-developer interaction needs to be argued and discussed widely and I thought I’d get some going by prodding it with a big stick.  This is the only opinion article in this mini-series – don’t worry I’ll be getting to the real stuff soon.  The articles in this series will be released on a weekly basis so expect  part 2 in a week or so.  For these articles I’m still working in Silverlight 2 as Silverlight 3 doesn’t have a go-live license yet (and we have no idea when it will) and many people have been working with my existing framework so I want to keep helping them.  I will be noting new Silverlight 3 features throughout the articles where appropriate though that would allow you to do whatever it is in a better way.


Mix09 News

March 22, 2009

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.


Follow

Get every new post delivered to your Inbox.

Join 325 other followers