Build your own CMS – an overview
January 27, 2011This is the second post in a series documenting my development and implementation of a content management system (CMS) built on the ASP.NET MVC Platform.
In this post, we’ll review the existing website of the client and the rough CMS solution architecture.
Introducing GlobalBeers
My client is the fictitious internet company, GlobalBeers, that markets and sells beer from all over the world, to all over the world. They currently have a website consisting of mostly static pages which will need to be replaced or enhanced by the CMS I’m building.
The site has the following page hierarchy:
- Home
- Products (lists product categories and 2 featured products)
- Product Category (describes the category and lists all products within)
- Product Page (product page of a specific beer)
- Product Category (describes the category and lists all products within)
- Company
- About
- Contact
All pages sit in a standard master page template that renders the header, footer and menu. The menu lists all of the pages except for the individual product pages.
Solution Architecture
During development I’m going to put the existing GlobalBeers website (as described above) in the same solution as the CMS projects, but this is not necessary.
The CMS platform itself will consist of two projects:
- A class library containing all core CMS code
- An ASP.NET MVC CMS administration web application
Once CMSified, the GlobalBeers website will have to contain a reference to the core CMS class library, but not the administrative MVC site – that’ll be isolated so it can be deployed and administered separately (for instance, on an internal, private network).
Rough solution architecture: (I’m showing only what’s interesting)
- GlobalBeers.Cms [class library]
- Models
- Repositories
- Templates
- _Includes
- Default.xml
- Web
- Controllers
- CmsController.cs
- ViewModels
- CmsPageViewModelBase.cs
- Modules
- CmsPageModule.cs
- LanguageModule.cs
- Controllers
- GlobalBeers.Cms.WebUI [administrative CMS site]
- Content
- Controllers
- AdminController.cs
- Scripts
- Views
- Admin
- GlobalBeers.WebUI [existing GlobalBeers website]
To be clear, there are two web applications. The administrative CMS website is the place end users will log into and create, edit and configure content that is ultimately all saved to a database. The client website is the one that actually contains the true front end – the fictitious www.globalbeers.com.
I’ll get into the details of the CMS projects and some of the code I’ve included here in the following posts.
Technology choices
I’ll be using ASP.NET MVC 2 and .NET 4.
Why MVC and not Web Forms?
I debated building the CMS platform with ASP.NET Webforms, but it was clear that MVC was best choice. Pages will be heavily based on templating which will require an immense amount of flexibility in the way pages are constructed and rendered.
I blogged a while back about XML-driven dynamic forms and how it’s such a relief not having to deal with the complex control hierarchy of the Webforms model. This CMS platform will use XML templates and render certain administrative pages in a similar way.
What about the client’s existing website?
This is running MVC too, but only for convenience. It is actually my intent for this CMS platform to work with Webforms as well. One of the core requirements of mine is to not impose a strict set of technology standards or development methodologies on the consuming website.
To utilize the CMS, the client website will only need to:
- Reference the required DLLs
- Configure a few Http Modules in the web.config
More to come!
Tags: build your own cms
Categories: Application Development, Content Management
