开发者

Silverlight bestpractices

My team is starting a new project in silverlight. We are all experienced developers. It should be out of browser application with usage of public API's. We read about MVVM pattern. Are there some other guidelines/best practices for silverlight?

ADDED: What we would like to know is:

  1. Is there some other patterns/guidelines for SL other than MVV开发者_如何学编程M
  2. Unit testing silverlight: your expirience with it.
  3. Out of browser behaviour, bugs, problems?
  4. Consuming web services, public API's, problems, pluses/minuses?


You might want to check out Prism (Composite WPF) by the Microsoft Patterns & Practices team. They have some "best practices" examples there, including MVVM. They also show you how to share code between Silverlight and WPF.

Also, check out the Silverlight Unit Testing framework, which allows you to unit test the UI.


We are working on a project with a 2 years timeout. our project is a Data-Driven application with Rich UX and entirely our manager predicts 200K code with 400+ use-case.hence we started a survey on different approach and a brief conclusion is :

  • MVVM Light Toolkit(the Messenger class have a power-full features)
  • WCF for interaction with Server and Database (debug features and we prefer work with DB through ADO.Net,actually hand-written code!)

and very details that overally we obtain from Pro Business Applications with Silverlight 4 and Microsoft Silverlight 4 Data and Services Cookbook


I'm using Silverlight by now and this is my first real/complete application using this techno. I've been using MVVM from the start first with the MVVM Light Toolkit. It is a really light and useful component that helps doing with mvvm and getting around with its constraints. Then I implemented Managed Extensibility Framework (MEF) wich helps you getting your application modular and it appears to complete/substitute to MVVM toolkit.

I didn't want to use PRISM at the beggining because my app is light. But when using MVVM pattern, you have to handle a bunch of pattern limitations. So it is sufficient alone only if you have a basic-data-application. Otherwise you're going to reinvent the wheel to finally discover that a great framework (PRISM-like) would have solved almost all your problems.


I've done one major project (technically it's still in progress). I find myself using Blend and Visual Studio at the same time when working on the Silverlight project. Blend is so much better at the visual work but pretty much sucks for the code, and vice versa for Visual Studio.

I used MVVM Light Toolkit. For my next project I'll try Prism. There are other frameworks but as I understand it both of these are good for Silverlight or WPF.

I started to use MEF for some stuff, but dropped it to simplify getting something done rather than trying to get everything done. If extensibility is essential to the idea of your app then MEF seems to be a must have.

I would suggest spending some time getting good and familiar with the VisualState element, which I found simplified things a lot. Things like enabling, disabling, animating, transitioning, and so on.

The Liquid Controls (http://www.vectorlight.net/demos/silverlight_controls_demo.aspx) are nice and you may benefit from using them.

WPF might be a better choice for your Twitter app. From what I understand the typography and text support is much better in WPF than what Silverlight 4 offers at this time. If you don't plan on getting exotic with any of that then SL 4 should be fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜