balaji hambeere
balaji hambeere

Reputation: 21

Silverlight website

I am looking for develop a website in silverlight 4. I am confused about which silver light template in VS 2010 is best for creating silver light website[internet application]? Which is best design pattern[mvc or mvvm] to implement the same silver light website. please give your valuable suggestion . so i can move further.

Thanks in advance!!

Upvotes: 1

Views: 254

Answers (3)

iCollect.it Ltd
iCollect.it Ltd

Reputation: 93551

If you want to develop a large Silverlight website I would suggest the following (based on experience of very large Silverlight websites):

Use ASP.NET MVC 3 (aka RAZOR) for your hosting site:

  • This will allow you to more easily create a parallel HTML site for your Silverlight content (for Search Engines to find your content)

Use RIA Services:

Use PRISM:

  • Use the PRISM pattern to allow for large very loosely coupled modules (this also gives you IOC with Unity and some other cool stuff).

Use MVVM with controllers:

We call this MVCVM, but it is not an official pattern anywhere :)

  • Controllers are the place to hook event responses, load data into viewmodels, create and show (manually injected) views etc. They are very lightweight and are the only objects that need to exist for the life of the application.
  • ViewModels do not have any knowledge of how they are displayed or where the data comes from
  • Views know they can display a certain shape of data, but have no idea where the data/viewmodel comes from.

Use a navigation system

Use the built-in navigation (uses bookmarks to stay on the Silverlight page while providing structured information).

  • This can be easily translated to an APS.NET MVC 3 equivalent for Search Engine use on your HTML only hosting MVC site.
  • We wound up using a custom navigation provider so that we could store simple state information for modules in the URL as well.

Upvotes: 2

Marko
Marko

Reputation: 10992

I would go for the Silverlight Navigation Application template if you want more than one page!

Upvotes: 1

slugster
slugster

Reputation: 49974

If you have everything installed correctly, you should have a project template called Silverlight Application available:

enter image description here

The other application project templates are also valid, the only difference is they automatically reference specific libraries for you, and have certain directory structures and initial files, all aimed at getting you underway faster.

As for whether to use MVC or MVVM - you can use either approach, they are simply patterns for abstracting and decoupling the UI from the code and business logic. MVVM may be a good choice - it was designed by Microsoft specifically with WPF and Silverlight in mind, and there are many MVVM frameworks you can pick up and use to make the job a little easier.

Upvotes: -1

Related Questions