Creating a 'website builder' - How would I architect it? [closed]
Asked Answered
C

3

13

I've been tasked with adding a website builder to our suite of applications. Most of our clients are non technical small business owners (brick and mortar stores, mom and pop shops). I've been told that I should be looking at Blogger Template Editor and trying to see if I can make something that fully featured and easy to use. The idea being that our customers should be able to bring their business online without knowing anything about web development.

I mostly work with c# and silverlight on a day to day basis. So going with .net is likely the best way for me. ASP.NET MVC and SPARK look very attractive, but I am not too sure about how I will accomplish the following things

1- How do I build a templating system that allows a designer to create templates that use a certain format and are compatible with my app. Is there any generic framework out there for this?

2- How would I persist the changes the client makes to his/her site (for example the client changes the background color and adds a list of ingredients on a page).

Edit: Yes I am aware this is a big task and I am potentially looking at writing a fullblown CMS, however our clients need very limited and basic functionality to begin with and I imagine this would be an iterative process, with perhaps more developers coming on later if the product proves to be successful. I will make these concerns known to our manager though.

Initially I am planning on just giving them a few templated layouts and allow them to customize what goes in the various sections as well as the colors and images with CSS. HAML and Sass look like they could be useful and I could persist all user customizable parameters in a database.

Am I thinking along the right lines or completely off the mark here?

Craniometry answered 17/6, 2010 at 7:14 Comment(1)
are you talking about something like a mini-Wix or mini-weebly integrated as part of your application; if so you need to spell it out.Lode
H
13

It depends a lot on your requirements.

A simple solution would be to have several base-templates with placeholders that get filled with content/other templates later.

I.e. a template might look like this:

<html>
  <head><title>foo</title></head>
  <body>
    <div id="menu">{auto_generated_menu}</div>
    <h1>{page_header}</h1>
    <div id="content">
      {page_content}
    </div>
  </body>
</html>

Then you provide the users with a simple way to define page headers and page_contents, i.e. the first might just be a textbox, the content is filled by using something like TinyMCE. If necessary, the clients can use other placeholders in the content, but that might not be neccessary.

After that you just add an auto-generated menu, create the logic that replaces the placeholders with the user-entered content (something along the lines of template.Content = template.Content.Replace("{page_content}", customer.Pages['foo'].GetTemplateContent("page_content")); )and maybe add a CSS stylesheet with color and font settings provided by the customers.

The most complex part is the backend and user-authentification.

This solution is simple to implement and has no real flexibility at all but it allows customers to quickly write a few texts and add some fancy images without having to care about anything else.

To persist color settings, write them into the database and create a new CSS stylesheet everytime they are changed. For other content just use a Database table "content" with the columns "key" and "value" and you might want to generate static HTML pages on every change.

Halima answered 17/6, 2010 at 12:14 Comment(0)
P
6

You've effectively been given the task of writing a full blown Content Management System. This is a mammoth task that would probably take a lone developer anything from 6 - 24 months to build depending on experience (this based on development time of other CMS' on the market). For instance, the developers of Umbraco (an Open source ASP.NET CMS) are busy porting their CMS over to ASP.NET MVC, work started around beginning of this year and is not expected to be built until middle of next year, and they're some of the most talented devs in the industry.

I'm not doubting your talents, but unless your boss has given you a very large time scale to work to, or you plan on your website builder being extreme basic with minimal features, perhaps building a full blown Website builder or CMS is biting off more than you can chew.

As other posters have recommended, you should perhaps try existing CMS on the market such as Umbraco if you're a .NET developer.

If you do insist on building your own, it will need some serious planning. Look at software architectural design patterns such as DDD (Domain Driven Design), SOLID principles such as Dependency Injection, the Repository Pattern, Persistance Ignorance, Service Layers etc etc. MVC is definitely the right way to go. Also check out Martins Fowler's book Patterns of Enterprise Application Architecture or Dino Esposito's Microsoft .NET: Architecting Applications for the Enterprise or Eric Evans Domain-Driven Design: Tackling Complexity in the Heart of Software

Parallax answered 17/6, 2010 at 11:55 Comment(0)
M
4

If you want to go with .NET i'd recommend taking a look at Umbraco, which is a pretty popular open source CMS with a very good community behind it. It's written in Webforms at the moment, but the next version (5) is being redone in ASP.NET MVC.

It's also avaialable on Microsoft's Web App Gallery so it's a breeze to install.

Masseuse answered 17/6, 2010 at 8:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.