Saturday, March 29, 2008

Yesterday was fun.  I had been invited to introduce Microsoft Silverlight 2 at the Flex User Group in Bangalore.  I met a whole bunch of cool people and was overall great fun talking to them.

I finally got to meet Mrinal Wadhwa, the champion of the Flex UG in Bangalore. We had been chatting away on email for a while and it was good to finally see more of the person than his Facebook profile!

Supreet Singh, my partner in crime began proceedings to a fully packed room talking a little about User Experience.  Just a little because the room was full with developers.  So after that it was all demos and geek talk.

As expected, the conversation very soon got into a comparison between Flex and Silverlight 2.  I did not want to really compare, but had wanted the audience to look at Silverlight 2 as a technology holistically.  But I guess that is hard for anybody who's working on Flex day in and out.  We had some interesting discussions about the evolution of Silverlight.

The DeepZoom demos were really well received.  I was a little surprised to get the entire audience applauding the Hard Rock Memorabilia gallery and a few other DeepZoom demos I had with me.  I had a question from Mrinal about uploading images to build a DeepZoom collection and I had said I would answer that later in the session - I intended to show the DeepZoom tool before doing that and never got the time in the end.  So if you still have the question, do check out MS Live Labs PhotoZoom and learn how to build your own DeepZoom collections here.

When I showed the designer-developer collaboration using Blend and Visual Studio, there was some discussion in the audience about the whole workflow.  We discussed about actual workflow of projects today which involved a lot of raster prototyping in Photoshop and then actual slicing/dicing to make the CSS/HTML that can be used in Flex (or regular web pages).  We were running out of time for a more elaborate discussion, but there was some good feedback that raster is still very important to have in the overall designer workflow.  I did mention that designers would use raster even in Silverlight projects.  I could be way off here, but I got the impression that regular Flash work still used a lot of raster and did not leverage the obvious benefits of vector.  Some people also argued that it was easier to get raster images than vector images and did not mind sacrificing the fidelity.  Maybe an offshoot of not having more designers in the room!

Another interesting discussion was around performance.  It obviously seemed that the biggest concern to Flash/Flex developers was performance and memory utilization of applications.  In the Silverlight world, the CLR probably makes a huge difference in terms of performance.  I did demonstrate some differences in the JavaScript and C# execution using the Silverlight 2 Chess application. I also think that though the underlying framework plays a huge role in determining performance of your applications, it is also a lot dependent on the quality of code.  For Silverlight applications, there are some tips and tricks on building high-performance apps and if you are exploring this, you should check out Seema Ramchandani's talk here.  Check out her blog and you'll learn a lot of what happens under the hoods.

There was some discussion around security and I had promised links detailing Silverlight security architecture in detail. The Silverlight security cheat sheet is the best way to get started.

We also talked a little about Expression Design and since we had the room for a limited time, we couldn't get to seeing more of the Expression toolset.  Remember that you need Expression Blend 2.5 March 2008 Preview for Silverlight 2 (there are 3 versions on the Expression web site that is bound to get a beginner confused).

Finally, I thank everyone, especially Mrinal for inviting us over and giving us a chance to introduce Silverlight.  I got some good pieces of feedback and will pass them on internally.  I think overall there was interest and given that many RIA development concepts were already well-known to the Flex folks, it should be easy for them to give Silverlight a shot.  Everything you need for getting started on Silverlight is available at www.silverlight.net

Remember, there will be judgements, criticisms, praises and reviews all over. The best way to make a judgement is to try the stuff yourself.  And if you did not like what you saw, give us feedback.  If you liked what you saw, spread the word! :)

posted on Saturday, March 29, 2008 6:09:41 PM (India Standard Time, UTC+05:30)  #    Comments [0] Trackback
 Thursday, February 21, 2008

I presented a webcast today as part of our ongoing series of precursor webcasts to the Windows Server 2008, Visual Studio 2008 and SQL Server 2008 Launch.  If you have not heard of the launch, you should head right away to www.heroeshappenhere.co.in and register yourself in one of the several hundred cities that we are taking this launch to in India.

I had a good audience and also felt that there was a lot of genuine interest in Smart Client Development.  That is not so much of a surprise given that more and more applications have a hybrid software+services approach to leverage best of both worlds - desktop and web.

My session focused on 4 different buckets of Smart Client Development:

image

Smart Client Applications do not have a single definition.  My view of these applications are that they are primarily desktop applications, that can have a few other "smart" features, such as:

  • Rich presentation providing users with a very good experience
  • Flexible UI that can be modified and keep improving over time (pretty much like web applications do)
  • Local data caching for master data, offline transactional data, etc.
  • Protection of some sort for the local data - both from security and from data corruption
  • Synchronization of data when "online" with conflict resolution, if necessary
  • Seamless deployment features such as auto-updates making it also easy for the software publisher to publish new versions

Most of the above are a breeze with components and frameworks that are available today - and with Visual Studio 2008, development of most of these becomes even more easier.

The webcast showed how you can leverage the following technologies.  I am not going deep into the demos here, because there were many, many steps involved and I am sure it will be tedious for you to read as well as have a high chance of missing something.   I will point you to resources, including the recording of my webcast, to watch these instead.

The technologies I talked about today are:

Windows Presentation Foundation / Windows Forms

WPF is a great way of creating rich applications with vector graphic elements, 2D, 3D, document-oriented applications, etc.  Windows Forms, a technology that has been around longer, continues to be a great technology to build desktop applications that forms-oriented, task-oriented (like a taskbar app, control panel, etc.) and do not require all the richness of WPF. 

A more detailed discussion on which technology to use when is something I posted in this post a while ago. The best part is that the interoperability between these two is fantastic - both provide a "control" that can host the other into one of their "windows" - you can put a WPF control into a Windows Form or vice-versa.  This means even existing Windows Forms Applications can start using some WPF richness for new features that require data visualization of high interactivity.

Microsoft Expression Blend and Visual Studio 2008 combine to provide a rich, seamless designer-developer process for creating these applications.  Blend provides all the designer tools whereas VS 2008 provides all the developer power.

There are also new enhancements to WPF with .NET Framework 3.5 and you can find the entire list here. A video describing the features can also be found here.

Scott Guthrie also blogged about an update to WPF that we are planning to release later this year which will add more flexibility in deployment options and also provide performance boosts.

If you are a beginner on WPF, the community website is www.windowsclient.net and the best place to start is the WPF Video Gallery. 

SQL Server Compact Edition

Another cool piece of technology I discussed today was SQL Server Compact Edition (or SQL Server CE). 

SQL Server CE is the compact edition of the SQL database and was used in a prior version in the Windows Embedded/Mobile world because of the necessity of small footprint there.  That technology has evolved now to provide a common base technology called SQL Server CE that you can still use in that world, but can also use in building PC applications.  In here, you can actually embed a full database within your application and query data using ADO.NET with the same ease as you would if you were using SQL Server Express or higher versions SQL Server itself.

The neat thing about using SQL Server CE is that you do not need to have SQL Server (of any kind) installed on the client system.  So it is a true database engine embed that doesn't need any administrative privileges or huge local services to be running.

You can learn more and download SQL Server Compact Edition 3.5 today from http://www.microsoft.com/sql/compact

A video tutorial of using SQL Server CE with a slightly older version (3.1) is available here and should get you introduced to the basic concepts.

Microsoft Sync Framework

Probably the coolest demo (at least according to the presenter :)) was showing off the Microsoft Sync Framework CTP Refresh 1.

Microsoft Sync Framework is one of those frameworks that you have to use to believe!  It is unbelievably simple for the enormously huge tasks it accomplishes.  It can do any kind of synchronization - between PCs, between PC/mobile/device, between client and local server, between client and Internet server, between databases - anything.  Ask it to sync and it obeys!

With Visual Studio 2008, the integration is unbelievable. I did a whole demo of local client/server sync between a SQL CE database and a SQL Server database running on my system with part data locally cached, part directly accessed - all of it with just ONE LINE of code and in well under 15 minutes.

You might want to give it a spin yourself by downloading it from www.msdn.com/sync - you will need both the Microsoft Sync Framework and Microsoft Sync Services for ADO.NET v2.

Excellent video tutorials (albeit a bit lengthy) are available here, here and here.   I used a large part of the third video for my demo today.  The videos also contain customizations you can make to the Sync APIs that I did not have time to cover today.

ClickOnce

Finally we talked about ClickOnce APIs in .NET Framework for easy publishing and auto-update.  I have uploaded the code I used today along with the presentation (link below).   The simple demo I used today was based on this video that can walk you through the steps all over again.  

 

Presentation and Demos

You can download today's presentation and all code samples I did today (finished samples) from here.  (The presentation is in PPTX format - you might want to download a viewer here if you don't have Office 2007). I do encourage you to go through the video links I mentioned above as well to get more information - I was talking too many technologies in the 1.5 hour session - many more details are available in the videos that are dedicated to these topics.

The entire webcast on-demand recording is available here.  You will need to register to download this, if you haven't already attended the webcast.

 

So there!  My part of the promise to post all the links and the pptx/code is done.  So now there's nothing stopping you from building awesome Smart Client Applications!! 

Happy coding!

posted on Thursday, February 21, 2008 11:45:16 PM (India Standard Time, UTC+05:30)  #    Comments [3] Trackback
 Saturday, February 09, 2008

Developers and designers I meet ask me one perennial question - "What's coming in 2?" 

Well, some clues popping out - specially this one by Jesse Liberty. 

I tend to give another piece of advice to developers/designers.  Expression Blend 2 December Preview is available (and has been for a while) and designers should download it today and start working on Silverlight 1.0 sites.  It gives you a good grasp of the tool and gets you setup for designing with more features when Silverlight 2 releases.  You also could try your hand at WPF projects and get a hang of some WPF data-binding features as well.

Developers on the other hand should look at the coding aspects of WPF and can also get familiarized with the XAML DOM using the Silverlight 1.0 SDK.  Most of the concepts of XAML and vector drawing, brushes, etc. are explained very well in the documentation and samples that come along with the SDK.   Get it today and learn it inside out.  If you've already done that, revisit it to see what topics you haven't familiarized yourselves with.

Other than the books Jesse Liberty put up on his post, I'd also recommend Laurence Moroney's excellent introductory book on Silverlight 1.0

If you are a new developer to Silverlight, this is one book you should get!    

posted on Saturday, February 09, 2008 8:56:21 PM (India Standard Time, UTC+05:30)  #    Comments [1] Trackback
 Monday, January 28, 2008

Exciting time for us here!!!!   Here are some things to get you started with MIX fever! :)  Loads of great prizes and goodies to win - so go ahead and do some stuff!

clip_image001

Hear ye, hear ye!  MIX08 to debut the first ever MIX UX Track which is 3 days of solid content dedicated to creatives / designers.  Lou Carbone, David Armano, Dan Roam, Kim Lenox and others will speak.  In conjunction with Adaptive Path, the User Experience track is just one of the many great reasons for all types of designers and creative professionals to attend MIX this year.  http://visitmix.com/2008/mixux.aspx

clip_image002 

The deadline for this year’s CSS contest, RESTYLE, has been extended.  Folks can still clip_image003restyle the MIX08 Homepage and win a pass to MIX08, 3 nights at the Venetian, $$ and more, more, more! http://visitmix.com/2008/restyle/

clip_image004

Have you been listening to The Signal?  Each week a new episode debuts featuring a speaker or MIX crew member talking about some of the upcoming coolness happening at MIX08.  Listen to their interviews with Molly Holzschlag, Kip Kniskern, Jonathan Snook and others as we countdown to Vegas.  Got a question for the show?  Email signalm@microsoft.com or leave a voice-mail message at (425) 703-4650. http://visitmix.com/blogs/TheSignal/

clip_image006 

Perhaps you remembered last year’s MIX, in which we featured Flotzam, a WPF screensaver mash-up that showed MIX07 feeds from Facebook, Flickr, Twitter and blogs. Well, we are doing it again this year with a twist: we are running a contest and will feature community created skins of the application on the big screen and on the screensavers of the computers available to attendees at the show.  The best skin will win an XBOX 360.  Entering the contest is easy: everything you need to know can be found here http://www.visitmix.com/blogs/News/403/ including links to screencasts and instructions that show how easy it is to do the restyle.  

posted on Monday, January 28, 2008 8:21:26 PM (India Standard Time, UTC+05:30)  #    Comments [1] Trackback
 Friday, January 18, 2008

If you are familiar with WPF development, you will know that one of the most useful features is the ability of WPF UI development is to use Styles and Resources.  Basically, it is a way of creating skins for your controls, like CSS would do for HTML, and then applying those skins.

What this basically means is, like in the CSS scenario, WPF controls can be skinned and re-skinned without having to change any of the code and functionality.  The entire look and feel is well-separated from the presentation layout.

Dax Pandhi and Nukeation have pulled off some fantastic stuff just leveraging that.  This was in the works for a while and I was always excited to know about this project.  Dax has been gracious to give me a full license of the product as well, and it looks wonderful. (Thanks Dax).

In return, I thought I should let everyone know that reuxables is really a smart way to jazz up your WPF applications by leveraging some of the fantastic design that Nukeation churns out.

Check it out at http://reuxables.nukeation.com

Way to go Dax!

posted on Friday, January 18, 2008 5:47:50 PM (India Standard Time, UTC+05:30)  #    Comments [0] Trackback
 Wednesday, January 02, 2008

When I first saw the iPod, what I really liked was the form factor and display that made tons of music and videos really portable.   I don't quite use the iPod - it now serves as an external hard disk for some old data that I once put into it - mostly because I am not really somebody who has a music-player plugged into his ears all the time.

When I saw the iPod, the first thing that struck me was that it would be cool to have this device wirelessly connect to the Internet.  Zune solved that by providing a Wi-Fi capable device.  (I do not own a Zune - at least not yet!). 

The other thing that really would have made it a killer device for me, was ability to browse Wikipedia-like information repositories.  After all, there was a fantastic display with crisp resolution.  I did realize that it would be akin to having something that can connect to the Internet - either through Wi-Fi or through GPRS.

When I started using a Windows Mobile phone (first a Pocket PC, now a SmartPhone) - this wish was granted as well. Pocket IE is really damn good and gives a real close feeling to browsing on the PC.   I browse using my phone a lot!  Real lot!  And more often than not, I am browsing Wikipedia.

Coming back to the original idea - I still thought a portable reading device would be a fantastic idea.  The ideal portable reading device would be able to do the following:

  • Connect to the Internet wirelessly - not necessarily to the whole wide Internet, but to an online service akin to the Zune or iTunes music store
  • Help search/browse through articles, periodicals, journals, books, blogs and the like - basically online reading material.  Again, note that this is reading material - not like a browser that can do a hundred other things.  The focus remains on reading.
  • Pick an article or book to read and download that to an offline cache (could be DRM'ed)
  • Provide a fantastic reading experience - with ability to hold and read like a book, a screen that's not harmful to hours of gazing at it, provide hours of battery power and easy recharging, etc.
  • Support images and maybe a few limited formats of audio/video

Today, I came across Amazon Kindle, something that is a step in this direction.  It still has miles to go, but I think it is a great step.  Obviously there is way too much thought (and maybe multiple market players) to go into this before this becomes mainstream.

posted on Wednesday, January 02, 2008 7:23:59 PM (India Standard Time, UTC+05:30)  #    Comments [3] Trackback
 Tuesday, December 25, 2007

I have often found that developers and designers who have not yet begun working with Silverlight, often confuse a few things.  I thought this post will help explain the typical Silverlight development environment - how the tools, the code and Silverlight itself are organized.

In simple words, Silverlight is a plug-in.  Many people who have not begun development on Silverlight, confuse it to be a tool of some sort with a UI.  I have observed that this notion usually comes from Flash developers/designers.  In the case of Flash, the tool used to build applications is called Adobe Flash and the plug-in required to run Flash applications is called the Flash Player. 

On the Microsoft end, Silverlight is the name of the plug-in - which contains all the runtime elements required to render the UI of your applications and execute the code of your applications.  The Silverlight runtime is installed one-time on your computer.  You could install this be going to www.microsoft.com/silverlight or by visiting any page that uses Silverlight and clicking on the "Get Microsoft Silverlight" icon when prompted.

Installing Silverlight has enabled your browsers to view Silverlight content.  For development of Silverlight content, you require a set of tools.  These can be categorized as designer and developer tools.

The designer tools you'll require is primarily Microsoft Expression Blend.  Expression Blend helps you create Silverlight projects and WPF projects.  WPF stands for Windows Presentation Foundation, which is part of .NET Framework and is a superset that is used to create rich desktop applications.   Silverlight projects created in Expression Blend follow the same project structure that developers working with Microsoft Visual Studio are familiar with.

Expression Blend is primarily used by designers to:

  • Create the front-end design for your application:  This is created using vector elements from the toolbox such as Rectangle, Ellipse, Line, Path, MediaElement, Canvas, etc. and using the properties pane to set various properties such as Fill color, Fill type (Solid, Linear Gradient, Radial Gradient, etc.), Stroke color, Width, Height, etc.  Each element has several properties that can be applied to it and most of these can be set from the property pane directly.
  • Organize elements:  Elements added to the application can be named to help in identifying them later on.  Multiple elements can also be grouped.  Grouping automatically creates a Canvas element (with the width and height of the boundary of elements) and groups the elements as child elements of the newly created Canvas element. (Remember: Canvas is the only container element in Silverlight 1.0).  You can also use Expression Blend to change the z-order of the elements.  This basically means which element resides on top of which other element - something that is done automatically based on the order of the elements - and can be changed by either changing the order itself or by changing the Canvas.ZIndex property.
  • Animation:  Animations are created using Storyboards.  It is helpful to switch to the Animation workspace (from the Window menu) to help in creating Storyboards.    Once a Storyboard is created, timelines are recorded using the Timeline Recording feature. 

Microsoft Expression Blend is currently available in two versions - Expression Blend v1 was released in May 2007 and only supports WPF development.  For Silverlight development, you will need Expression Blend v2 which is currently under development and preview releases are available from www.microsoft.com/expression.  Look for the latest preview release and be sure to download Blend 2!

All design created in Expression Blend is automatically translated (as you add elements) to XAML.  XAML is an XML-markup to describe the UI.  The Silverlight plug-in parses the XAML when a Silverlight project to render the UI in the browser.  Anything you do in Expression Blend creates the XAML in the background.  You can also switch to the XAML view in Expression Blend to view the markup.  This is akin to creating HTML pages using a tool when the tool is generating HTML markup in the background.  XAML is a common UI description language across WPF and Silverlight, though the number of XAML elements you can use in WPF is much larger than Silverlight 1.0.  Expression Blend automatically changes the available toolbox elements based on whether you are creating a WPF project or a Silverlight project.

Microsoft Expression Design is the other tool you can use in the Silverlight development environment.  Expression Design is used for much finer elements of design, with support for layers, various brushes, effects, path transformation tools, etc.  It is a vector design tool that can help you create design assets for use in Silverlight.  Say that really cool looking button with extra-fine detail.   Since many of the tools and shapes you use in Expression Design do not have a straight-forward mapping to XAML (which is what Silverlight can understand), you export your design to XAML once it is ready.  The export process looks at the design, rasterizes (converts to images) stuff that is incompatible with XAML, converts vector shapes to paths or other supported elements and provides XAML that is compatible.  Such XAML can then be included into Expression Blend to add further animation or interactivity.

Microsoft Visual Studio is what developers use to add event-handling code that can then call back web services or can trigger other actions based on user-input.  Every element has event handlers for mouse, keyboard or ink input and these are handled in code - JavaScript is used as the programming language for Silverlight 1.0.

As a developer, you can use notepad for authoring both the XAML and the JavaScript and for embedding the Silverlight object on to the HTML page.  However, Blend and Visual Studio provide a much richer development experience and most of the code for embedding the object is automatically generated.

To get Visual Studio to understand the XAML semantics, it is worthwhile to install the Silverlight SDK available on www.silverlight.net.  The Silverlight SDK also comes with some sample code and quickstart examples, as well as the all-important documentation.  The documentation contains a full reference for all objects, methods, properties and events and also several basic articles to get you started with the concepts.

So in summary, Silverlight is the plug-in that you or your end-users require to install to enable your browser to render Silverlight content.   Expression Blend and Expression Design are part of the Microsoft Expression Studio which enable designers to design Silverlight projects.  Visual Studio is the developer tool for developers to write the required code for the applications.  Silverlight SDK gets you started with required files, project templates, documentation and samples.

Really simple, right?  Happy coding!

posted on Tuesday, December 25, 2007 8:33:05 PM (India Standard Time, UTC+05:30)  #    Comments [1] Trackback
 Wednesday, November 14, 2007

I had been intending to blog about a bunch of changes in the Windows Live stack. Jani pointed me to this neat little application you can add to any website to have users of the website chat with anybody running Windows Live Messenger.  So you see a little app on my blog's sidebar (if you are reading this using a RSS reader, click here) and if you chatted from the control, my Windows Live Messenger pops up the chat and lets me do instant messaging. 

It took me 5 minutes to put this up on my blog - really that simple - go to http://settings.messenger.live.com/applications/CreateHtml.aspx to get one for yourself!

Among other updates, you can also get a @live.com ID for yourself (currently in certain geographies and very soon in most others including India) by going to http://www.windowslive.com/freshstart.html.  You can also use tools to migrate your existing Live ID to the new one.

posted on Wednesday, November 14, 2007 11:45:18 PM (India Standard Time, UTC+05:30)  #    Comments [0] Trackback