Hi Madv
Trust me when I say, it will be the
best move you ever make web programming wise.
Here's a quick overview.
If MVC was a body, then the {
M - standing for Model } would be the
bones. And As you know the whole body is wrapped around the bones, the bones represent your application Model.
I hear you ask " Well what does Application Model mean ? " ... it is basically the business logic of your application. for example, Products, Customers, Addresses, Orders, and the logic that goes with all of that, for example a Customer can have many Orders, and each Order can have many Products ..etc << The Database Logic is your Application Model.
The {
V - standing for Views } will be the
skin colour, your curly hair, and your blue eyes (
fancy HTML and CSS basically) of your Application.
Finally the {
C - standing for Controller } will be all the
organs and connective tissue keeping the whole body connected. A Controller is basically a C# class with Methods, except in MVC3 we call Methods >> Actions.
Obviously just like you have many types of Methods, you also have many types of Actions. >>
Controllers and their Actions are mapped to URLs via the URL Route Engine.
The other really important thing to remember is that the MVC Framework, functions in a manner often referred to as [ Convention over Configuration ].
I hear you ask .. "well what does that mean ? " .. this is best explained if we go through an example. Let's see what happens when I type the following:
http://www.madvsite.com/customer/info
The URL Route Engine would receive that URL, and start to dissect it. It will realize that the first bit after the domain name is the Controller name and it will take me to the CustomerController class (inside Nop.Web > Controllers) and inside that, it will pin-point the Info Action (AKA Method) .. and it will run whatever it is that the Info Action is suppose to do.
It could be that the Info Action returns a View (remember .. CSS/HTML). << If a View is returned, the URL Route Engine says " Right, let me go and get that then " and it sets off to the Views folder {Nop.Web >> Views >> [Controller Name] >> [Action Name]} and sends that to my browser.
Hmm I'm quite impressed with my analogy actually :D !! lol
Hope the above crash course into MVC helps. Here are
Awesome Video Tutorials that you should definitely watch.
Thanks