I want to build a website with asp.net mvc3 and entity framework which user can login and make their own store under a subdomain.
There is two way that i can do that:
the first one is to create only one view page and based on the user fill the page with appropriate style and content from the database and use url rewriting to fix the url. so for example if my website name is example.com a user can login and create a subdomain like user1.example.com which then there are some pages like user1.examples.com/add , user1.examples.com/shoppingCart/Checkout ,...
or
The second way is that I can create different views and controllers and based on the user fill the views withe appropriate content and style.
the number of the pages under different subdomains are the same and even the name. For examples two different users like user1.example.com and user2.example.com both have user1.example.com/shoppingcart and user2.example.com/shoppingcart and so on.
Which way is the right way and is there any other ways to build this website? which one is more seo friendly?
I would create a user-themed layout where you can configure the design based on the chosen store.
You could make a route that basically takes the store name as an "id" and then load the design settings from the database.
Replicating views for each store sounds painful and unnecessary, plus a maintenance nightmare.