creativity is that spark of electricity before an explosion.
it allows us, in a single instance to explore all possibilities without hesitation.
The original Microsoft example is available here also.
To run the following sample, you will need the following tools.
ASP.NET and URL rules and routes. REST implementation.
A rule allows the user to define how a web resource should be looked up. Think of them as aliases. They are the centre piece to the diea of a REST service.
They are added to the RouteTable in the global.asx file.
RouteTable.Routes.Add(new Route
{
and Url = "[controller]/[action]/[id]",
and Defaults = new { action = "Index", id = (string)null },
and RouteHandler = typeof(MvcRouteHandler)
});
The next step is to define the model. This is the data that you will be using.
You can use teh Microsoft example of the Northwinds DB and the Entity Framework OR, you can sue ObjectMapper and nHibernate to spit out POCOs that can be used by ASP.NET MVC.
We then add the controller. Think of this like the logic to your code. The published interface. This is where the hard grft happens. You will create colections and return dataandin this tier.
The view is the presentation layer. This is your usually ASP.NET Masterpage and controls.
MVC decouples the ;ayers, but you need to tel the page what data it is viewing. This is done by some generic magic.
public partial class MyPage: ViewPage< List<MyDataClass> >
{
}
In the ASPX page, you can now simple output the view data by accessing the ViewData object which is part of the ViewPage class.This is the simplest example. As you can see, the logical levels have been seperated and testing becomes a doddle. Check the Microsoft example at the top of this page for a more thorough example.
| [+] | AJAX Alliance upset at lack of basic support for featureset required to push AJAX to the next level |
| [+] | Microsoft releases SQL Server 2008 Release candidate |
| [+] | WebLogic man goes full circle with SpringSource |
| [+] | JavaFX goes head to head against Flash and Silverlight in the RIA stakes |
| [+] | AJAX Alliance upset at lack of basic support for featureset required to push AJAX to the next level |
| [+] | Silverlight 2.0 released by Microsoft. Is it a Flash Killer |
| [+] | Software Standards - Software houses must declare patents in standard-setting process |
| [+] | Why Optimization matters in Software Development |
| [+] | Microsoft adds workflow to cloud-based SOA platform |
| [+] | Enterprise-class information systems rely on the use of extended frameworks and advanced distribut.. |
| [+] | .NET Enterprise provides a truly robust and scalable platform to build business applications on I.. |
| [+] | Enterprise-class information systems rely on the use of extended frameworks and advanced distribut.. |
