Tuesday, 24 March 2009

Silverlight 3 Released

Silverlight 3 Beta was announced at the MIX 09 event in Las Vegas. The new version pushes the envelope in providing richer online applications through its various new features, controls, and methods of development. Some of the great Silverlight 3 features include the Out-Of-Browser experience, Search Engine Optimization, and improved graphic support. In this article, I will show you some of the cool features from Silverlight 3.

Developer Version

The current version of Silverlight 3 Beta is intended for developer use only. This means that you will need the Developer runtime to view Silverlight 3 applications. There is no “Go Live” support and not intended for public viewing. The end user runtime will be available later this year. Developers will need to ensure that they define the install experience in an appropriate manner to inform the end user that the application is in the beta stage. Tim Heuer wrote a great blog article about the Silverlight 3 Install Experience.

Let’s Get Started

Before you start developing in Silverlight 3, you will need to be aware that this is a Beta version and must treated as such. Silverlight 2 applications can be viewed, but not developed, with the new runtime. If you plan on developing Silverlight 3 applications, it is recommended to install Silverlight 3 on its own machine or virtual machine. Once you have installed Silverlight 3, you won’t be able to deploy Silverlight 2 applications on the same machine.

The following tools are the bare minimum needed to develop Silverlight 3 applications:

For more information on getting started with Silverlight, check out the Microsoft Silverlight 3 Site. The site includes the necessary tools, tutorials, and information to rapidly get you started.

Silverlight Toolkit

During MIX 09, the Silverlight Toolkit March 2009 was released with additional controls. One of the major change in the new Toolkit is the move from Microsoft.Windows.Controls to System.Windows.Controls namespace. The Toolkit includes two new themes: BubbleCreme & TwilightBlue. Some of the great new controls in the Toolkit include the Accordion and DomainUpDown. The Accordion control stores a list of collapsed and expanded AccordionItem controls. This concept is similar to a grouped collection of Expander controls, which allows you to organize data or XAML elements in a clean manner. The DomainUpDown control allows the user to cycle through a list of values using the TextBox and Spinner controls.

To learn more about the new features, check out the Silverlight Toolkit Breaking Changes.

New Controls

Silverlight 3 is shipped with new controls, along with a mature set of controls from Silverlight Toolkit. Some of the mature controls from Silverlight Toolkit include DockPanel, WrapPanel, Label, TreeView, Expander, and DataGrid. If you have used any of these controls in older applications, they will still work with Silverlight 3. Silverlight 3 also utilizes new controls for data, search engine optimization, and overall development.

Two new Data controls, DataForm and DataPager, can be used to render data in Silverlight applications. The DataForm control displays data for a single entity and allows for traditional data manipulation, including edit and update. The DataPager control allows the navigation through a data set.

Silverlight 3 introduces the navigation framework (System.Windows.Control.Navigation), which is composed of the Page and Frame controls. The Frame control hosts a single Page control utilizes the Navigation APIs to allow the user to navigate between the pages. The Page control resembles the commonly used UserControl control to hold the contents of the respected page. This feature allows you to create applications that resemble a web page using a single xap file. The primary benefit of the framework is the ability to communicate with the browser in regards to the Address Bar and Browser History. The currently loaded XAML file is stored in the Address Bar, which allows for deep linking in Silverlight applications and providing SEO. The framework also maintains the history of navigated pages, which can be access using the browser’s back and forward functionality.

The ChildWindow control makes its way to Silverlight 3. Child Windows, also known as modal windows, are used to draw attention to important information or to halt the application flow for user input. The child window blocks the workflow until the window is closed. The window stores the result in DialogResult to inform the application of its status upon closing. Unlike the traditional modal window, Silverlight renders the child window with an animation sequence and renders an overlay background to ensure the user focuses on the window.

Graphic Enhancements

Silverlight 3 sports significant graphical enhancements including 3D perspective transforms, pixel shaders, GPU acceleration, and animation easing. The new version also has a Bitmap API for manipulating bitmap pixels.

Perspective Transforms in Silverlight 3 is the next step towards developing 3D Silverlight applications. In previous versions of Silverlight, transforms were processed in the X and Y axis using the UIElement’s RenderTransform property. Silverlight 3 uses the PlaneProjection class to render 3D-like effects by applying content to a 3D plane. All elements, that derive from UIElement, have the Projection property that allows the element to simulate translation and rotation transformations in a 3D space. This feature allows for 3D-like user interfaces, flipping animations, and transition effects.

Silverlight 3 has two built-in effects, Blur and DropShadow, and supports the development of custom effects. Pixel Shaders are a compiled set of software instructions that calculate the color of the pixels and executed on the GPU. The instructions are written in HLSL (High Level Shader Language). All elements, that derive from UIElement, have the Effect property that allows the element to render with the connected pixel shader. This feature allows for more rich and beautiful user interfaces and transition effects.

GPU hardware acceleration reduces the CPU processing workload by performing the tasks directly on GPU hardware. This allows for full screen HD renderings of video to run on your computer without taking up a large load of CPU. GPU rendering can also be used to cache XAML and image elements.

The animation system has been upgraded with Easing functions to provide more natural and advanced animation. Developers can create their own custom easing functions by modifying the built-in function or deriving from the EasingFunctionBase. Silverlight 3 comes with several built-in easing functions, including the following:

  • BackEase
  • BounceEase
  • CircleEase
  • CubicEase
  • ElasticEase
  • ExponentialEase
  • PowerEase
  • QuadraticEase
  • QuarticEase
  • QuinticEase
  • SineEase

The Bitmap API allows rendering XAML elements and data to bitmaps using the WriteableBitmap class. This can be used to modify images, capture a frame from a MediaElement control, and render the current state of a control.

Media Support

Silverlight 3 adds support for additional standard media types, including H.264 and AAC, and supports third party codecs to decode outside the runtime and render in the Silverlight application. This allows for a wide variety of video and audio files to be played in Silverlight. Using GPU hardware acceleration, applications can now deliver full-screen HD content.

Themes and Styles

Silverlight 3 improves the themes and styles system to allow designers and developers to customize the look and feel of their applications. Unlike previous versions of Silverlight, Silverlight 3 supports changing styles during runtime. Styles can be stored externally in resource dictionary to allow for organized and shareable code. This allows developers to easily share and merge their styles among different projects. Styles now support an inherited system to reduce necessary code for redundant styles.

Out of Browser Experience

Silverlight applications can run outside of the browser with simple modifications by the developer. The end user can choose whether to install the application on the user’ Start menu and Desktop. One major benefit is that the end user can run the application at home, at work, and on the go without the need of a web browser and online access. Installed applications can be automatically updated to ensure that the end user has the latest version. The new Network APIs allows the application to know whether the application is connected or not.

Element to Element Binding

Element to element data binding allows you to bind element properties to each other. In previous versions of Silverlight, this would require more work on the code side because the element would fire its changed method and have that update the necessary elements. Silverlight 3 simplifies this process by performing the task directly in XAML.

Conclusion

Silverlight 3 has a lot of fantastic features to create the next generation of interactive applications. This article has only scratched the surface on the Silverlight 3 features. For more information on Silverlight 3, check out http://silverlight.net/getstarted/silverlight3/default.aspx. Additional information on Silverlight 3 can be found on the many MIX 09, which can be viewed at http://sessions.visitmix.com/MIX09/.

Sunday, 22 March 2009

Mix 09 Day 1


Welcome to the second post in Mix 09 set, Here is what happened on the first official day of the event.

Keynote

After breakfast, we headed into the main hall at the Venetian for the day one keynote. While we were waiting for the session to start, we were entertained by DJ Riz (who is a famous DJ in Seattle so I am told) while some impressive visuals were being shown on the big screens. One of these was a really cool idea – a game of Tetris with each of the falling blocks being a recent tweet that was tagged with #mix09. I tried to take some photos of people who I recognised, so check out the flickr feed – it has to be seen to be believed.

At 9am, out came the legendary Bill Buxton who delivered a very energised talk on industrial design and how companies are now not just selling software, but also the user experience that goes along with them.

Scott Guthrie was then introduced (using a very funny video available here) and delivered the more specific information on the new versions of the upcoming products.

Expression Web 3 is getting an exiting new feature called SuperPreview. This allows you to compare your sites in other browser rendering engines using them as an overlay. This gets cooler still as there is even a cloud service that will download preview data for browsers that you don't have installed locally. You can even use this service to see what your site will look like in IE 6,7, 8 etc.

If you’re an ASP developer, you may already know that MVC V1.0 was shipped recently. This was talked about briefly before a talk on ASP.NET 4 and VS 2010. Here, a feature termed  “Velocity” (distributed caching) will be included in the platform and it will also get the dynamic routing engine built originally for MVC.

The Web Platform installer is getting an update to keep you up to date with all the latest stuff going on in the web world. This installer will also keep you updated with bits that ship separately from a main product as well as all the latest beta versions that happen to be available. Support for the Web Application Gallery has also been added to enable you to keep updated with other applications such as Wordpress.

The Azure Services Platform is also getting PHP support and the ability to run full trust applications. SQL Data Services is also exposing a Relational data model and .NET Services is supporting additional web standards. 

Some additional (really cool) Silverlight controls are coming up for the Virtual Earth service and the WorldWide Telescope. No dates were given but the demos looked awesome.

Kevin McEntee, VP of Web Engineering for Netflix talked about his experiences of using Silverlight to deliver movie content in the browser using adaptive streaming. This enables a users stream to change dynamically to give them a better user experience.

Silverlight 3.0

Silverlight 3 is introducing some cool new graphical features to the core platform. These include GPU acceleration and hardware compositing (on both PC and Mac), perspective 3D support, bitmap and pixel APIs, HLSL-based pixel shader effects and some DeepZoom improvements including the ability to use a hardware-accelerated, larger collection of images

Deep linking is also coming for ease of navigation and search engine optimisation. This enables you to directly link to and bookmark a place within an application.

David Anthony from Bondi Digital Publishing and Scott Stanfield from Vertigo introduced a new Silverlight 3 masterpiece. This is in the form of a magazine viewer that enables you to search through and read the thousands of Rolling Stone back issues. This is due to go live in the summer but a preview edition with some back issues of Playboy is online now.

Tom Mara, Executive Director of KEXP came on stage to show the stations Silverlight application and how it interacts with users. More importantly, this demonstration shows the new “Out Of Browser” feature that allows you to install a Silverlight app locally. This is all done from the right-click context menu without the need to Add/Remove the application like a standard piece of software. Installing works a lot like ClickOnce if you are familiar with that. 

Tools

Expression Blend 3 was then announced which adds a plethora of really cool and useful features to the product.

SketchFlow is the largest of these and this make it possible for designers to concentrate on the flow of the application. This uses a mind map type control to create rough states and link them together. The interface can then be drawn out using silverlight controls with a special “sketch” template added to them to draw attention away from the way it looks and concentrate more on how it works. Support for importing image assets from Adobe Photoshop and Adobe Illustrator, behaviours, dummy data, source code control, and IntelliSense all make an appearance in this version.

The Sessions

The sessions i attended on Day 1 were “What's new in Silverlight 3", “Microsoft Silverlight Media” and “Mesh Enabled Web Applications”. Needless to say they were all very informative and the sessions are all online now here 

The Party at TAO

The TAO night club is Las Vegas was a very nice place – Microsoft always know how to throw a good party and this one was no exception. I was even lucky enough to meet and have a conversation with Bill Buxton about Design, Expression and the UK of all things

Wednesday, 18 March 2009

Mix 09 Day 0


Today was “Day 0” of the Microsoft Mix conference that is being held at the Venation in Las Vegas this week.

If you aren’t familiar with the event, Mix is the Microsoft conference that is aimed at the web development community. Announcements at previous events include the release of Silverlight 2 at Mix 08.

While Day 0 offers no huge technology announcements, the workshop style offers advanced training sessions that really take a deep dive into the current technologies and offer tips and tricks from the experts.

After the quick registration process and breakfast (plus receiving a bag of attendee only swag that included a t-shirt, notebook and a copy of Bill Buxton’s “Sketching User Interfaces”) I hit the first session which was “Design Fundamentals for Developers”.

This session was really cool, well thought out and well delivered. The speaker was Robby Ingebretsen who was formally on the WPF Avalon team before leaving Microsoft to form his own company – pixelalb.

During this three hour session, Robby explored the techniques used by designers to help develop better looking user interfaces. But this was delivered with a coding audience in mind so it wasn’t a total “back to basics” session.

Topics covered included the design process, some design basics such as relationship management, good continuation and harmony, before rounding off with an in-depth look at the visual design process with a discussion on the use of colour, styles and layout.

One of the main takeaways I got from this session was a realisation of just how hard good design really is – that a really nicely application doesn’t just fall out of thin air, it takes a lot of design iterations before arriving at the finished product.

After lunch, it was time for the second session – Hiking Mt. Avalon

This workshop was delivered in a panel format with 5 top speakers from the WPF world taking it in turns to talk about some really advanced WPF features with some tips and tricks on how to overcome them. The panel included Jaime Rodriquez, Robby Ingebretsen and Jonathan Russ

Topics covered here ran across a wide range of areas including a M-V-VM demo and some tips on when to and when not to use it, a description of the WPF “team member roles” used at Microsoft and other companies with information on what recruiters should look out for when building a WPF team. Some tips and tricks on how to workaround problems with current versions of the tools and an in depth look at the inner workings of the framework to understand why some common problems can occur.

This session was extremely informative and I know at least 5-6 of my usual “why is my application doing that?” questions were answered. There was a lot of content, and the session event went over by a whole hour but the audience just wanted more and more. This was a really great session.

Day 1 looks to offer some other really cool sessions focused around some of the newer technologies so keep your eye out for the next update covering the first official day of this truly spectacular event

Friday, 6 March 2009

IIS 7 and Shared Hosting -- II

In this post, I'm going to dive into Feature Delegation by walking through its use in IIS Manager, and why I'm using it to set up my shared hosting environment.

I'll lay out my scenario first. I have two new customer who want me to host their Web sites. The first customer created an ASP.NET site, while the second customer created a static HTML site. I've created a site for each customer, Site 1 and Site 2, and now I'm going to configure Feature Delegation for each site.

You'll see in the image below that I'm at the server level in IIS Manager. This is the only place where I can access Feature Delegation.




After I'm into the Feature Delegation page in IIS Manager, I have a choice to make. I can choose to delegate monolithically, meaning that all features that I delegate are available to all sites on my server, or I can customize feature delegation for each site. Since I have customers with two distinct sites—one required ASP.NET support, the other only static files--I'm going to customize delegation for each site.

(I could, of course, do a combination of the two, but my choice is for illustrative purposes only at this point.)




I'll now choose the site I want to set up delegation for. Site 1 is that static site, so I'll do that first.



Since this site doesn't need to support ASP.NET, I can lock all of the .NET features by setting their delegation to Not Delegated. You'll see below that I've only done this for the .NET Compilation feature. Otherwise the defaults for all of these settings are Read/Write, which allows sites to configure these features.



Now I've changed over to Site 2, the site that supports ASP.NET. My customer said he wasn't going to use SMTP E-mail, so I've set delegation for that feature to Not Delegated.





I can also copy either of my customized sets of delegation settings to other Web sites as necessary. I simply click the Copy Delegation button, and then I choose which sites I want to have the same delegation settings.



This can save a lot of time. In this way you can create delegation setting templates, as I've come to call them, and apply these templates to new sites that have similar requirements as existing ones on your server.
For any site you plan to provision, you should review the list of features available for delegation with your customer and decide which features the customer needs to be able to configure. For my money, you only want to delegate a feature to a customer if you need to.
A couple of points to remember:

  • As the server administrator, I can still configure all of the installed features on the IIS server for each Web site. The remote administrators for my sites can only configure the features that I delegate to them.

  • If you perform feature delegation then want to change delegation settings at a later date, you need to review how any changes you make will affect your customers' sites and applications. Always use a test server to determine the effect delegation changes will have before you make changes to your production servers.

Finally, with IIS 7.5 coming out with Windows Server 2008 R2 and Windows 7, Microsoft has made the custom errors feature safe for delegation. Delegating custom errors securely in IIS 7 was an involved process, but IIS 7.5 addresses this issue to allow hosters to delegate custom errors as easily as any other IIS feature. For more information, see Kanwaljeet Singla's blog entry.
Next post, I'll be setting up remote administration for my two sites and seeing the effects of my delegation settings.