Why Silverlight? Do we really need Silverlight?
I want to start this series of posts and want to share why I started off with Silverlight. What made me to really invest time on learning silverlight. Hope this will be helpful for beginners who want to know about Why Silverlight?
So Let's start.
Before beginning to knowing more on silverlight, first we should know
* Why Silverlight?
* Importance of silverlight?
* Where to use?
* Underlying architecture
Before I begin with any new language I always want to know what language it is? How to use it? And what is the architecture behind it?
I will answer these questions with a case study in that way you all will understand it very clearly.
I got one project last years. Client need was to develop a website for some product which will have tree control, menu item, UI elements and business logic involved in it etc.Then I took the project and started working on it.
I wrote Java script to do few things. When we had a small demo with the client was very upset and said “Is it a way to write Java Script Code? What code you have written?? Where are the namespaces?" they started shouting at me. They very well knew Javascript and I never knew that there was anything called namespace in java script! I started searching on internet but couldn't find any related information on JavaScript. From before I always thought that java script is very simple language but I was 100% wrong. I always thought that very few people use JavaScript and never wanted to learn it because one of my college senior said JavaScript is very simple language and he showed me following program in JavaScript.
function load()
{
alert('Hello World..');
}
This used to show me Hello World when I used to open in browser. After that I never bothered to learn more on javascript. But you can't believe Java script is the most widely deployed application on Internet!!! . Can't believe me?? I will tell you how…
Before that please understand JavaScript is no where related to Java language.The person who was developing javascript at netscape got inspired by Java so he used few tags from java and then named it LiveScript but when they wanted to collaborated with Sun Microsystem then they named it as Java Script. I don't want to discuss more on this. But just remember one thing that Javascript and Java are totally different. If you want to know more here is the link… They say Javascript is The World's Most Misunderstood Programming Language.. J ..
http://www.crockford.com/javascript/javascript.html
http://www.htmlgoodies.com/beyond/javascript/article.php/3470971
Every machine Windows,Mac,Linux has web browser in it?? And every web browser has java script in it.. So java script is the most widely deployed application in internet. You can just code using html and java script and no need to worry about deploying on client's machine.
I will come back to my problem.. :-) .. After getting shouted from my client I started looking for more information on internet. I asked client to give me some time so that I can learn about javascript.I dint find any good article on internet about java script which will tells anything about namespaces.I took complete 30 days to learn about Javascript. I really got shocked when I got to know that we have inheritance, classes etc in javascript. At that time I found that on yahoo developers site Douglas Crockford was doing a hell lot of things on java script and I think he is real genius. If anyone interested in knowing more about JavaScipt here is the link
http://developer.yahoo.com/yui/theater/
There are some 4 videos by
Douglas Crockford — “The JavaScript Programming Language"
Here you won't find simple Hello World Stuff.. :-)
Again back to my problem. I learnt java script and started coding for my client. Each UI control used to take hell lot of time for me as I was a beginner. As they were paying well enough of money I thought I will buy controls from other company. There are some companies like infragistics
[http://www.infragistics.com] where you can buy controls. But on Yahoo developers you can find loads of free java script stuff. So make sure you will first look at it and then write your own or buy from others.
Somehow I managed to complete the project and delivered it. Same client again came to me and started asking me that he will be giving the demo of this application to his client and needs good UI and said he will pay me for that. Then I said ok, I will look into it then I got to know that in Adobe flash we can do lot of good UI stuff, animation etc. I had very less time to deliver this therefore started searching for a flash designer then I found one then he did his job well. He created a very nice UI with Menu Dropping from top and very good jazzy User interface. Then the biggest problem was waiting for me. How will I call events from Flash??? Damn…. There is something called action script in java which will do that work. I failed finding a action script programmer. People who say flash just know UI and animation they don't know about action script. I struggled a lot to find one developer and get it done. Finally I ended up learning
* ASP.NET
* Java Script
* Flash
* Action Script
All needs different expertise and I got really very much frustrated learning them. I know everything but I am not master in anyone of those. Take any above mentioned language they need more time and effort to expertise in them. All I was doing is wasting time and money in outsourcing each and everything to other company not giving a client very good product.
Then I found out that Microsoft is coming with a product called Silverlight. They were very well known about the problem what developers were facing. They bundled everything into silverlight. To make it simple for explanation, Silverlight is nothing but replacement for JavaScript,Flash(or any other UI dev kit),HTML. When I say replacement then I should also mention corresponding things which are replacing them so here is what I have listed them.
HTML replaced by Silverlight
JavaScript replaced by C#
Flash replaced by WPF
I am a good asp.net programmer and I know c# well. So I can program client side coding in C# instead of java script. Coooooool… That's good.. Then flash is replaced by WPF which is nothing but Windows Presentation Foundation which gives Drag and Drop like control in Visual Studio with Rich UI. And the code behind them is again C#. That's awesome. And HTML is replaced by XAML silverlight which is nothing but a markup language like XML but only difference is TAG's are pre-defined unlike XML where we can have anything as TAG name. So I need to just concentrate on C# and XAML. C# I already know now I am left with XAML which is exactly like XML. Let me show you one sample XAML syntaxt.
< TextBox Name="txtBox" Text="Hello Silverlight!" >
</TextBox >
The above XAML code will create a TextBox with “Hello Silverlight!" written in it's textbox. It's so simple. J .. Now I have a technology which is worth learning.
And that's Silverlight. Now you might have got enough idea on Why Silverlight? Hope you enjoyed this post.
Thanks,
Dhaneel
http://www.dhaneel.com
Reference: http://www.dhaneel.com
hi,
Definitely enjoyed reading this article.
Looking forward for next series of articles