Client-side Model-View-Presenter
- Posted: Sep 28, 2007 at 9:14 AM
- 12,708 Views
- 5 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- Mid Quality WMV (Lo-band, Mobile)
The model-view-presenter pattern is a very powerful way to manage user interaction. It seems popular to use it on the server-side when creating HTML, but why not use it client-side instead?
Our computers are powerful enough to run fairly complex JavaScript. Why burden the server with having to render the page contents?
In this screencast I use
Script# to compile a C# project into JavaScript. This project contains the Model, View and Presenter logic.
The HTML page then uses the generated JavaScript.
There is a simple REST service on the server that returns data which is called by the Model. No HTML generation occurs on the server.
Download the source code. You must have
Script# installed as well.
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Have you had a look at ProMesh.Net?
I realise ProMesh is a server side MVC framework but still thought you might be interested in it...
Thanks for the link to ProMesh.NET, I like the use of attributes making the whole process much more declarative. I'll certainly be considering similar approachs when expanding my client-side MVP framework.
So I reckon phase two is to use my tier-splitting macro to enable certain model methods to be decorated with [RunAtServer] attributes.
The macro would do all the plumbing to call the server and execute the model there. This would allow a totally seemless Model class to be written. With the client part ending up in JavaScript and the server part being C#.
The last post is from September.... just wanted to know how did you do with this design?
You mentioned you was doing a project, how did it go?
Is there an updated version of the framework?
Thanks
Remove this comment
Remove this thread
close