views:

1950

answers:

10

I am writing a comparison between 3 technology options for building our new website:

  • Wordpress
  • Drupal
  • An MVC framework

The boss is sure we should use Wordpress, but the site will be big, with many sections, subsections, pages, and complicated templates.

I'm finding it easy to compare WP + Drupal, but not so easy to state the additional advantages (over Drupal) of using an MVC framework.

So far I have:

  • Custom data storage, content types, semantics
  • APIs / REST
  • Separation of logic / UI
  • Convention, code structure

(Obviously some of the benefits will be different depending on the type of project. In this case it will be a large portal for a museum, with potential for some social stuff for visitors)

+6  A: 

You can't really compare WP or Drupal and MVC framework. What you can do is to decide whether to use an existing content-management system or roll out your own and compare ROI, TCO, development cost, etc.

Anton Gogolev
A: 

Microsoft ASP MVC (for example) is a framework for building your websites on, Drupal is a content management system where you "design" your pages but don't have to write any code.

Peter Morris
MVC is _NOT_ a framework. it's a design style. most frameworks try to shoehorn the MVC name to some layered structure; but you could totally write an MVC app without using any framework. being a little clever, you won't even need to write a small one yourself. (of course it's easier to use one)
Javier
I've clarified what I meant by changing "MVC" to "Microsoft ASP MVC (for example)".
Peter Morris
WTF? I understand the first negative vote on this because I didn't explicitly mention the MS ASP MVC when I referred to a framework, but now I have cleared this up my answer is 100% accurate and relevant, yet I get another negative?Whoever down voted, at least explain why.
Peter Morris
+2  A: 

You can build a pretty extensible site based on WP or Drupal, but you may run into design limitations set based on what the frameworks were designed to do. Drupal/WP are content management systems at the core, so if you're not managing content, you're not using the framework effectively. If you find yourself building more and more code to get around these limitations, then you have cause to build from a scratch or use a lightweight framework.

I'm currently building a site with CakePHP MVC framework and I highly recommend it. IMHO, it satisfies all of your advantages.

spoulson
A: 

The flexibility of a CMS has a limit, though with Drupal that limit is getting smaller. There is a learning curve to accomplish what you want, and it might not be the most elegant solution if you have to fudge it together with existing extensions. Of course you can always expand the functionality of any CMS yourself, but that may take more time than using a good framework in the first place.

I had this same dilemna recently, and after trying with Drupal, eventually went with the CodeIgniter MVC PHP framework instead. Probably worth investing a few days with a CMS first, to investigate if it's possible. If you then decide it'll be too difficult, use a MVC framework instead.

Stuart
+20  A: 

It's difficult to compare a CMS (e.g., Drupal, WordPress) with a MVC framework because they're in different categories.

To specifically answer your question about the advantage of a MVC framework over a CMS, the advantage of a MVC framework is simply that it allows you to design the exact web app you need from the ground up.

As for your particular situation:

Using an existing CMS such as WordPress or Drupal would be an excellent idea if they fit your needs. It avoids reinventing the wheel, saves you time, and CMSs can be quite user-friendly (to varying degrees). If you plan to delegate the task of content updates to a non-technical user, then it might be prudent to choose a novice-friendly CMS rather than spinning your own with a MVC framework, possibly resulting in an app that requires more technical expertise to maintain.

If, however, you envision that the website will require a lot of custom business logic that would be difficult to implement within the constraints of a CMS, then you might need to use a MVC framework.

Jeff
+1 It's an apples to oranges comparison.
Wayne Khan
+2  A: 

As someone who has worked on various home rolled CMS systems for the best part of the last decade my advice is don't roll your own. If you have some unique application then MVC is a nice way to code up web applications, but it's ease won't counterbalance the thousands of man hours spend building and millions of page hits of testing the OSS ones have.

Drupal is not only a nice CMS system but also is a pretty good framework for building bespoke web functionality, so you get a lot for free and only have to spend time working on what is unique to your site. (after you have learnt how to code on drupal systems)

Jeremy French
A: 

I would say the advantage of using an MVC framework to roll your own instead of using WP or Drupal are:

  1. You only code what you need. WP and Drupal are gonna have lots of stuff you don't need sitting on your server.
  2. The developers understand the whole codebase because they've written it from scratch - making it easier to maintain later.
  3. WP is a big codebase (I don't know about Drupal) as soon as you require something that isn't supported by either CMS you are going to have to dig around a lot of code.
  4. Wordpress' separation of logic / UI sucks - I mean really sucks.
  5. More flexibility. CMSs are great as you don't try to make them do something they weren't intended to do - then they become a pain.

If you are going to push for an MVC framework then you need to look carefully at which you would choose - they are not created equal. Some of them will place restrictions on your code and website layout in the same way a CMS would.

I guess it's really down to how complex the requirements are and how well a CMS or framework will meet those. For relatively simple content delivery it may be an option to write your own lightweight MVC and build upon that.

Steve Claridge
A: 

I reckon Drupal is MVC. Drupal uses a theming system which is your views and a menu system which is your controller. The modules are your models. Sure, the menu is fragmented into various modules but it's still basically MVC right?

Rimian
I would vote this down if I could. Read this: http://drupal.org/node/116677#comment-197893MVC is one of the most overused and misunderstood design patterns. True, drupal modularizes things into layers, but it's not really 'MVC', not that that's a bad thing.
Akrikos
Also, this doesn't answer the question posed.
Akrikos
A: 

I would advise you strongly against Wodpress, it is wonderful for sites with some static pages and one blog/news section, but I made a bilingual product website based on WP 2.2 and it was a major PITA with lots of hacking and writing database-reaching code into the template to make it possible.

Now I have been developing in Drupal and it is really better for larger projects (although it takes more time to set up a simple blog compared to WP) - it has wonderful modular architecture that allowed me to solve any request/problem so far by writing a module instead of hacking the core.

As for MVC/Drupal: have look what Drupal does, if you can get your result by modifying Drupal, then it is great and will save you a lot of time by not having to code the usual stuff (user registration, input sanitization, robust form handling and validation, theming infrastructure, storage abstraction, web services abstraction layer (Services module) and so on...).

Against Drupal: inherently slow, due to modular (I'm rendering a list of items, let's call all modules that implement theme_list to find out if they want to modify it) architecture, so if you are making next twitter, get a fast MVC framework instead. And caching of content for registered users still needs lot of work to be effective (a tagged cache should be in core), so sites when users are usually logged in can be slow.

Tomáš Kafka
+3  A: 

Thanks everyone for your answers. I made the case for using a Framework or Drupal, but it was decided that we should go with Wordpress, or at least start building on Wordpress and see how it goes.

FWIW here are the notes I came up with:

WORDPRESS / MU

http://wordpress.org/ http://mu.wordpress.org/

A personal publishing tool, blogging platform

  • PHP +
  • Many available widgets +
  • Multi-author support / workflow +
  • Social features (BuddyPress) +
  • Integration (BBPress etc) +
  • Easy, common +
  • Simple UI +
  • Able to manage multiple blogs (with WordPress MU) +
  • Only 2 content types (post or page) -
  • Not a real "CMS" / blog mentality -
  • Inflexible heirachy (no sections) -
  • Limited semantics -
  • Limited template choices for authors -
  • Messy code -
  • Security / exploits -

DRUPAL

http://drupal.org/

A content management framework, CMS construction kit, tools to build sites. For 'non programmers' to build websites, building blocks

  • PHP +
  • Made for big sites / portals +
  • Social features built in (each user has own profile/log, extensible) +
  • Page type selection/config by authors (block system) +
  • Scope for structured data / semantics +
  • Multiple content types (press releases, news articles, blog posts, etc.) +
  • Good community / tools +
  • Blank canvas +
  • Many features +
  • Good image handling +
  • Complex UI -
  • "Black box", very abstract code, learning curve! -
  • Customizing / theming is difficult -

FRAMEWORK

It allows you to design the exact web app you need from the ground up

  • Extensible +
  • Control of semantics, data storage +
  • APIs / Data / REST / Web services +
  • Current, modern tools, cutting edge +
  • Separation of logic/presentation (MVC design pattern) +
  • Convention - structured code, workflow +
  • Reuse/combine content +
  • Allows development of multiple UIs without touching business logic codebase +
  • Robust API / standards / patterns +
  • DRY (don't repeat yourself) +
  • Learning curve -
  • Need to design a custom UI -
  • Overkill? (depending on goals) -
meleyal