views:

229

answers:

8

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.
+2  A: 

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.

Josh Einstein
-1 for nitpicking +1 for everything else:)
Oorang
" is really gunning for line of business apps which are my domain" - mine too, thank you so much - im going straight to v3 for proof of concept since i have a pretty long window for the public release of this functionality.
schmoopy
A: 

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.

Aamir
+3  A: 

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.

Michael S. Scherotter
+2  A: 

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.

James Hay
Flex may not be the right option for me due to the learning curve - i have used AS3 and have it in this current app, but my strength is .NET tho i will still look into it just in case :-)
schmoopy
+1  A: 

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.

Bill
Very good to know and i assume the xap file is only downloaded initially, when it has been updated or user clears thier cache?
schmoopy
Yea that is true for the most part. But if the user browses to a lot of other pages it will re download the xap again. In SL3 they allow you to cache dll's in the users computer. That will help me a great deal. We still have some users with dial up and this app is painful to use in that environment. Looking forward to the release of SL3.
Bill
Hey Bill, About big size XAP, you can chop them into several XAP's and load them async. I know this gets a bit complex, but for instance if you have your views defined by an interface you only need to load the main ones, and then the other group them in a separate XAP and load them using WebClient.
Braulio
Yes you can. it is fairly easy to do that. The only reason I have nto done that yets is that SL 3 will allow you to cache the dll's on the users computer and only download dll's that have changed. That seems to be a much better solution for what I am doing. My app has almost 80 different Usercontrols(dll's). Most of them do not change very often so that will be a lot better than having to download sections of the app when needed. Just do it once and be done with it.
Bill
+2  A: 

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!

Abdullah Ahmed
I am getting happier the more comments i get and the more i dig up info on Silverlight - it really seems to be an answer for RIA and for my specific needs :-)
schmoopy
+1  A: 

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

Braulio
A: 

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

Thomas Hansen
What are you basing this comment on? What experience do you have and with what versions? Are you a flash developer? This is the first ive heard such a negative comment on the subject.
schmoopy
I am not a flash developer. I am basing it on the fact that Silverlight is proprietary, patented, EEE ActiveX based technology. Made to replace an existing beautifully working platform also known as the "W3C platform". Kind of like ActiveX 1.0...BTW, I feel the same about Flash...
Thomas Hansen