Kordonme
Kordonme

Reputation: 2294

What is best practice on ASP.NET MVC projects and extensionable/skinned systems?

I've been wondering about best practices on creating a project in MVC, and let others create extension/modules/plugins and skins/themes etc, for it.

For example WordPress is great at this. Just upload a file or folder. Or even browse the plugins directly from your WP administration and install by a simple click.

Does anybody here have a few tips on how to create a project that allows that flexibility. For the skins I might need to implement my own viewengine, right?

Any good resources and tips would be great.

Thanks!

Upvotes: 1

Views: 760

Answers (2)

Kordonme
Kordonme

Reputation: 2294

I ended up using a VirtualPathProvider since I wanted the views outside of the application. Now, we made it possible for the views to be stored in the database.

Upvotes: 0

John Farrell
John Farrell

Reputation: 24754

Skinning isn't that hard, just swap stylesheets. For using a different set of templates, yes, you'd need just customize, not write your own, viewengine. This is pretty easy and all you'd have to do is tell MVC to look in different places for your views:

http://www.dotnetguy.co.uk/post/2010/01/31/ASPNET-MVC-e28093-Dynamically-Changing-The-Master-Page-(Theming).aspx

The MVC plugins widgets question has been asked before:

https://stackoverflow.com/questions/2230482/asp-net-mvc-2-widgets/2230833#2230833

Upvotes: 1

Related Questions