Showing posts with label Other. Show all posts
Showing posts with label Other. Show all posts

Tuesday, January 22, 2008

Silverlight doesn't require .NET to run

In my previous post I have discussed about why Silverlight development in not traditional, and I talked about the biggest issue user and developers have with Mouse Button, I have made a list and I am trying to point and clarify all the misconceptions about Silverlight that are associate with traditional web development, where developers just expect thing to be like they were in ASP.NET or HTML.

When I first started with Silverlight I was a bit frustrated because nothing seem to work as it was meant to be I was expecting .NET libraries, resources and just about anything that I knew about traditional web development, the first day I started with Silverlight 1.1, I saw "Hello World" example and then decided to replace that text with a random number, I have used Cryptography quite a lot earlier and I like to use PRNG random number instead of Random, and so I wanted to import/include System.Security.Cryptography and I failed, I tried again and failed I tried System.Data failed, I tried System.Speech failed, this was too much for me and frustrated I gave up. Silverlight altogether.

And had it not been for a boring weekend few months later and that moment of curiosity of why I can't import those libraries in my Silverlight application, I would never have bothered with Silverlight. I think there are many developers out there who try what I did and who gave up the way I did, and the only reason is Silverlight is untraditional.

So what exactly am I bragging about? And what is so untraditional about Silverlight that I got wrong ? Why Microsoft restricted access to them libraries? Why was my misconception? Or did Microsoft really restricted libraries? The answer is simple and the impact is big.

Silverlight doesn't require .NET framework at Client/Server.

Huh? What? But Silverlight require .NET 3.5 isn't? Yes, of course it does! Is it confusing? Ok lets first talk about Silverlight Plug-in, do you know that "Silverlight is cross-platform"? And Silverlight plugin (1.0, 1.1, 2.0) is/will be in few MBs, So do you expect to installed all the framework in that few MBs? Or do you propose to install .NET framework on Mac/Linux? And do you also know that you can host Silverlight application on Linux servers (without .NET framework), just by setting MIME types for XAML?

So we don't need .NET framework on Client or Server?

That's what I said, didn't I?

But we need .NET framework 3.5 for Silverlight!

Yes, you need .NET framework 3.5 for Silverlight applications but not to host or render them in browsers, you need the framework to compile the Silverlight application. You need .NET Framework at compile time and not runtime.

So what does it mean to Silverlight applications? And what actually happen?

Silverlight when complied creates a DLL (Dynamic Link Library) which includes all embedded resources (if any) along with the complied managed code, Silverlight compiler uses .NET Framework 3.5  to compile this library, when a Silverlight application is initiated with Silverlight plug-in installed, the plug-in tell the browser to go and download the DLL or the downloader object and interprets the DLL to the browser to render or perform tasks.

So it means Silverlight can only include that libraries that Silverlight plug-in (running at the client) can interpret?

Yes and it is the reason you can't include any library reference in Silverlight.

Coming back to the examples for libraries that I have given earlier System.Security.Cryptography, System.Data and System.Speech. Since database is always present on the server, there is no point in using System.Data in Silverlight ever, Silverlight works in a browser sandbox and can't access generic hardware so System.Speech is out of question, but System.Security, well there is something that we can expect to use in Silverlight but can't because of choice, again System.Security uses .NET framework so the plug-in should be able to interpret it by itself, and if it is implemented then the plug-in size might increase by another 1MB, so the plug-in size will increase with every library they include, and while Microsoft is struggling with adoption of Silverlight, consider to include these libraries.

So what libraries will be included in Silverlight 2.0? And how big the plug-in will get?

That is Microsoft to answer, not me. And I am glad I don't have to make that decision to balance plugin size.

Microsoft pushes Silverlight Plug-in

From today, IT Administrators can bunch install Silverlight plug-in (1.0 of course), on all Windows machines on the network using Windows Server Update Services (WSUS). The plug-in is available from Microsoft Update, for more info check the Microsoft Update Team Blog.

The plug-in however is Optional (perhaps for  the legal battles with other browsers) and is available as "feature pack", and will require accepting EULA.

But within two weeks, February 12 to be precise, Microsoft will push the plug-in with automatic updates program, from the Microsoft Download Centre, and the install will be again Optional but Windows Genuine Advantage (WGA) free. This is made available with the Internet Explorer 7.0 update as WGA free, for more information check knowledge base

Thursday, December 27, 2007

Microsoft's New Year Resolution for Silverlight

This is my list of what what Microsoft's new years resolutions for Silverlight should be, they are however very unlikely but I think its about time Microsoft take initiative and this about this.

Silverlight 2.0 Alpha in January 2008: Now wouldn't that be cool? Developers/Designers could get their hands dirty with new features in Silverlight 2.0 (grid, controls) and start building meaningful applications that would have compatibility with Silverlight 2.0 plug-in.

Microsoft openly sharing Silverlight information: Am I really asking too much with this? I really don't understand why Microsoft have to be so secretive of their projects, weather it be Silverlight (compared to Adobe) or IE8 (compared to Mozilla). Why can't Microsoft be open and share information or be supportive of early adopters or developers?

Microsoft Expression Exchange: In reality this could only exist in my wish list, Microsoft has never been supportive of its developers, but that was thing of the past Microsoft are not dealing with developers alone anymore, after .NET 3.0 /WPF and Silverlight they are dealing with designers community, Okay, I agree there is not much you can share or exchange as a developer but a designer could share almost anything from simple assets to complex codes, they can share vector graphics for Expression Design, video skins for Expression Encoder, and XAML for Expression Blend. Since announcement of grids/controls in Silverlight applications the need for this kind of exchange program could only result in high productivity

Viewing XAML at Runtime: To me and many other like me this is one feature we would really love to see in the next version of Silverlight , it is easy to create dynamic content in Silverlight but its a real problem to check that XAML for any errors or tweaking. As far as implementation is concerned I don't think its really a problem for Microsoft to allow this but the problem is the shortcut to view XAML as there is no right click available in Silverlight due to compatibility issues with other platforms, and view source will show the HTML file holding XAML.

Microsoft accepting OpenGL and implementing it in Silverlight and the only reason they wouldn't is DirectX, they are simply not going to desert their most prized windows feature they are working on for years on end. I have only one suggestion just in case Microsoft is listening, being stubborn when you are developing next generation cross-platform applications would only restrict progress, there is a first time for everything and Silverlight could be the first time you adopt OpenGL because clearly other platforms are never going to adopt DirectX.

Rich Text Box / integrated HTML object: Probabily the only item in my wish list that is most important and something that can actually come true. This is  very important for RIA web page development, Please check my previous post on Rich Text Box makes rich RIA