Tutorial :Is silverlight the right choice for what i need?



Question:

I am looking at the best approach to add rich functionality to an existing ASP.NET 3.5 application. I have not developed anything in Silverlight but as i was thinking about what functionality i needed i started wondering if Silverlight might be the answer.

Here is what i need: The ability to move/select objects, select each object and be able to apply properties such as color from a color picker. The objects should all implement a common Interface and/or base class.

I was thinking of how easy this would be to do with a Windows Forms app, but this MUST be a web app that can run on Windows and Mac.

I was wondering if Silverlight is more just for fancy graphics or has the ability for me to fullfill this business need and function more like an ASP.NET/AJAX app (but with better access to the objects).

Here are some considerations:

  • I have done nothing with WPF
  • The user base for this is somewhat small but i cannot dictate O/S
  • I need to be able to load/save the data back to the server (np im sure)
  • I have much experience with nTier, .NET, etc... but the xaml/SL learning curve..?

Thank you very much for taking the time to look at this :-)

Update
Thank you all for your comments, very helpful.

  • Having the users install silverlight will not be an issue, it is a small subset of the overall application and will be a requirement if they want that functionality.


Solution:1

Since installing the plugin is not a problem for your clients then I highly recommend going for Silverlight. Version 3.0 is really good for line of business apps and as someone else mentioned...silverlight is fast approaching the point where interactive HTML can be fully done away with.

With your .net experience using Silverlight is a no-brainer. XAML is a piece of cake and if for some reason you are not comfortable defining your UI with XAML (despite excellent tools like Blend) then you can add and invoke them via code behind.

  • I have done nothing with WPF For simple forms this wont be an issue. There are a ton of tutorials out there covering normal form based interaction with silverlight.

  • The user base for this is somewhat small but i cannot dictate O/S As long as they are using OS X or Windows they have full silverlight capability. Linux users are lacking a bit behind with Moonlight...

  • I need to be able to load/save the data back to the server (np im sure) Silverlight allows you to interact with server via Sockets, WCF / WCF Duplex Services, .Net RIA Services.

  • I have much experience with nTier, .NET, etc... but the xaml/SL learning curve..? I dont think there is much of a learning curve involved with XAML / SL specially if you are experienced with .Net and nTier apps.

Here are some good resources

http://www.silverlight.net/learn http://www.silverlight.net/getstarted

Good luck!


Solution:2

You will find that almost everything you have learned about the .NET Framework and Visual Studio is directly applicable to Silverlight. You will also find the programming model for ASP.Net similar in that there is the declarative markup and then the code behind. Silverlight very cleanly separates the code from the design - that may take a bit of getting used to - especially the data binding - but once you learn it, you'll find it very powerful.

Start here (on StackOverflow) and http://silverlight.net and these two sites will be your guide.


Solution:3

Hate to nitpick, but Mac is not an acronym.

With that out of the way, Silverlight is a pretty good choice here because HTML + JavaScript is really not designed for client interactivity. Everything is an afterthought whereas Silverlight was designed for it. Things like jQuery really help in the HTML case but it's still just a bolt-on.

I would highly recommend looking at Silverlight 2/3. Version 3 (in beta, release is coming soon) is really gunning for line of business apps which are my domain. I've only recently started using Silverlight and I honestly think it's to the point where it's a viable replacement for interactive HTML.

The learning curve is a bit steep if you have no WPF background. But Expression Blend 3 and Visual Studio 2010 add some much needed designer support.


Solution:4

Just to be devils advocate... Flex could also be another option. By the sounds of it, it would also do everthing you need. Personally i think coming from a .Net background you'd be better off looking at silverlight but it might be worth weighing up the pro's and cons of both.

One of the biggest plus points of Flex will be that the plugin is installed on the majority of machines where the Silverlight plugin isn't (yet). Also, if you say this is a business application, consider coorporate policies of installing plugins on employees machines. A lot of compaines may have have some version of Flash installed but may not allow the user to upgrade or install anything that has not been vetted by the IT department. If that is the case your app may struggle to be accepted if built in Silverlight.


Solution:5

I have built a business app and currently have around 500 users on it. It is a Real Estate Agents MLS app. It works great. The biggest downfall is tha tis has a fairly large xap file size. This will be fixed in SL3. I think it is a great choice for a business app and will only get better with SL3.


Solution:6

About the type of application your are talking about a canvas / diagram based app (create elements, drag & drop, change properties...)?

In my free time (started when SL 2 was on alfa), I implemented this DBSchema Diagramming tool (SL Based):

http://www.dbschemaeditor.com/

The main limitations that I have are:

  • Printing (I need to go to the server side and using GDI+ draw a bitmap then go back to the client side returning a JPEG). In theory in SL3 now you can directly save a canvas as a bitmap.

  • Saving files to local: I used Isolated Storage, but on SL3 you have available a save as dialog.

Good stuff that I found:

  • Pretty powerful, I have a diagram that has more than 80 tables (and a big bungh of relations) and performs quite well.

  • Instead of javascript use .net on the client side... wow that's great ! :).

    HTH Braulio


Solution:7

Silverlight should be ok for what you are doing. Remember, that you need to have silverlight runtime installed on the client machine for a silverlight app to work (much like a flash plugin).

Learning curve for XAML, well, I dont think you need to worry a lot about it. Download Microsoft Expression Blend and design your silverlight control in it. It will automatically generate XAML to be used with the code. Silverlight learning isn't difficult as well for an experienced .NET programmer.


Solution:8

Silverlight is an evil and inferior technology and should be avoided as if it was cancer...!


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »