How does Silverlight fit into a ‘proper’ UI architecture such as MVC?

With Microsoft releasing a whole caboodle of new tools as part of VS2008 and .net 3.5 I thought it would be fun sensible to spend some time trying to figure them out and having a play. I also thought that I would spend some time playing about with some UI tools/best practices that I had heard about but never used (such as MVC and Monorail).

My grand idea is to create a system to act as a Video File Organiser, I have some initial thoughts about what I want it to do, but the main reason to do it is to play with the tools.

I want to create a Silverlight UI, working in a proper MVC architecture that uses an Astoria web data service to query the library. At some point I’ll also think about how I would like to populate the library with video files on the server.

Problem 1 – Silverlight with MVC

Granted, Silverlight looks fantastic, but I haven’t been able to find much about how to combine it with proper architectural best practice. What I would like to do is figure out MVC and Silverlight at the same time, and see if it makes sense to use Silverlight as the View.  This is all just guesswork at the moment, and my first task is to try and familiarise myself with the basics of these technologies before I start trying to combine them in weird and wonderful ways.

I assume I could ‘do’ MVC from scratch, but I wonder if it would be possible to use a framework such as Monorail? Monorail doesn’t seem to have any mentions of Silverlight, so might have to figure this one out by myself. It seems that Silverlight would make sense in one of two places –

  1. Create a new Monorail view engine for silverlight – this would somehow create the silverlight markup…
  2. Use an existing view engine – not sure what view engines really are, but could NVelocity create Silverlight already if you specify the appropriate template?

Either way, how do you connect the controller to the silverlight generated…. hmmm

Dear reader, I will report back once I have investigated.

Advertisements

About Alex McMahon

I am a software developer, interested in .net, agile, alt.net. I've previously specialised with .net 3.0 technologies like WCF, whereas now I am trying to specialise in agile development and best practice and patterns. I am obsessed with looking at the latest technologies, tools, and methods, and trying them out. I am currently employed by Rockwell Collins in the UK.
This entry was posted in .net, methodology, Monorail, MVC, Silverlight, techniques. Bookmark the permalink.

4 Responses to How does Silverlight fit into a ‘proper’ UI architecture such as MVC?

  1. cautionsign says:

    hi author, how is your investigation? 🙂

  2. Alex McMahon says:

    @cautionsign: Unfortunately I got pulled away from this endeavour onto ‘real work’ I’m sure I heard somewhere recently that the Patterns and Practices guys at Microsoft were doing some sort of Prism with Silverlight guidance or similar.

  3. interested says:

    try and finish your investigation. I know that Adobe Flex can implemented with a methodology such as MVC.
    Keep it real.

  4. Braulio says:

    Hi !

    Maybe there’s no standard implementation, but implementing your own shouldn’t be a big deal,at the end what you have is a pure .net language on your client side.

    I know… custom made implementations can be a bit chunky and not so pure but in my case it worked out ( I used MVC but taking the idea of MVP and having in the controller interfaces to the views that are shown, so I can gran control from there in order to update them).

    Everybody is talking now about flashy patterns like MVVM, but I think MVC still has a quite relevant position.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s