Posted By: SaraJoRedux | Jul 14th, 2008 @ 5:37 AM
page 1 of 1
Comments: 11 | Views: 870
SaraJoRedux
SaraJoRedux
GirlDeveloper.com


Ok, so, the reason I am using MVC (aside from the fact that the fine folks at Microsoft made it) is because of the mega snazzy url rewriting. I need to be able to have customers type in mydomain.com/clientname and be taken to their own personalized section of the site. 

MVC does enable me to do that, no? I would just have to have the index check for a query string text value and use it to find the customer ID then do a redirect?

It makes sense that I would be able to do that, I just wanted to make sure before taking the plunge.  
Bas
Bas
It finds lightbulbs.
Yes. You can define your own routehandlers and such.
Chadk
Chadk
excuse me - do you has a flavor?
This is hardly anything new. Rails can do this too, and it's in v2 already. ASP.NET MVC is pretty much just a copy of that, which isn't even V1.

Mind you, Rails is much more mature. It even has it's own data layer!
HumanCompiler
HumanCompiler
Compiling humans...and code
Yah and also, wasn't the url routing stuff pushed back into ASP.NET for everyone to get some love .NET 3.5 SP1?
TommyCarlier
TommyCarlier
I want my scalps!
Yes. .NET 3.5 SP1 contains URL Routing, but not ASP.NET MVC.
harumscarum
harumscarum
out of memory
sure let me just install IIS7 on my xp box, damn, now let me try my 2003 box, damn again....
Bas
Bas
It finds lightbulbs.
Nobody claimed that it was new. Somebody just asked if it was possible. And it is.
Sampy
Sampy
This will be the sixth time we have destroyed it and we have become exceedingly efficient at it
Normal ASP .Net Page Model
  1. Figure out which page to load and call (Normally done with filesystem but you can introduce modules or Virtual Path Providers to make it more interesting)
  2. Call the ProcessRequest method on the Page
MVC Model
  1. Use Routing to find the Controller object to call
  2. Call controller object's action method
  3. Find View to call
  4. Load view and send to client
The big difference is that MVC explicitly splits "business logic" and display into two actions. The other cool thing about the model is that everything is replaceable. You can write your own code for routing, finding the right controller, calling the controller method, finding the view, processing and sending the view, etc. Everything is also based on abstractions of the ASP .Net environment classes like HttpRequest and HttpContext which makes unit testing and test-first development, TDD, easier.

I'm a big fan of this new system. It takes me back to writing web apps in Perl in college where I basically used the same model where one object performed the requested user action and the other displayed the HTML/JS.
in our project we used that approach for years Tongue Out (our approach uses pure xml for writting the rutes) pretty cool, yes, wondering what will we do after MVC comes out of beta... probably nothing thought Smiley
page 1 of 1
Comments: 11 | Views: 870
Microsoft Communities