Get the real story via our bi-monthly newsletter

Search

    0
    0

rss

Send to a colleague

Home > Web Content Management > Midgard Lights An Open-Source "LAMP."

Get a Free Sample

Wondering about CMS Watch research? Sign up to receive free samples of any of our products.

Report Excerpt

The Web CMS Report 2009 looks at... Skill sets required

"Since SharePoint uses and talks to a variety of other services up and down the Microsoft stack, don't be surprised if you need to involve multiple different skill sets in the development of debugging of a SharePoint application. This too comes as a surprise to the lonely LAN administrator who installed WSS in a well-meaning attempt to provide simple services to her business colleagues. "

(p. 161)

More about The Web CMS Report 2009

Our customers say

"I think The Web CMS Report is well worth it. Information is always key to good decisions, don't skip that step! It's also surprisingly well written and not as dry as you would expect. I have an IT background and also a writing (English Literature) background, so I very much appreciated the balance of charts, tech info, and plain speaking good old sentences!
- - Paul Whittle,
Web Manager, Memorial University

NEW at CMS Watch

The Enterprise Social Software & Collaboration Report 2009The Enterprise Social Software & Collaboration Report 2009: This newly updated research critically evaluates 27 Enterprise Social Software and Collaboration packages... Read more

The Enterprise Portals Report 2009The Enterprise Portals Report 2009: This newly updated research critically evaluates 12 Enterprise Portals products head-to-head... Read more

The Digital & Media Asset Management Report 2009The Digital & Media Asset Management Report 2009: This newly updated research critically evaluates 20 DAM suppliers head-to-head... Read more

 

Glossary

Apache

Application Server

Asset Management

LDAP

Metadata

Open Source

Perl

Personalization

PHP

RDBMS

Version Control

Workflow

XML



 

Midgard 1.4

Midgard Lights An Open-Source "LAMP."

by James Christensen and Martin Gottlie
10-Oct-2001 --

Midgard has emerged as one of the leading Open Source content management systems. It has strong community support, a powerful templating architecture, and is highly customizable and extendable. It's latest and most robust administrative interface, Nadmin, is itself an Open Source Midgard extension.

Like other Open Source CM packages, customizing Midgard to your needs is not for the technically faint at heart. What follows is a fairly detailed discussion of pros and cons of the platform from a programmer's perspective.

LAMP Underpinnings

Midgard is based on "LAMP," an acronym for a set of open-source technologies that together can provide an extremely powerful platform for busy public websites. The elements are:

  • Linux, a highly reliable operating system with a great "uptime" record in web environments
  • Apache, an extremely fast and configurable Webserver
  • MySQL, a fast, tunable, relational database frequently used for Web publishing
  • PHP, a scripting language implemented as an Apache module that was built specifically for use on the web.

Apache

The core of Midgard, like the PHP engine itself, is actually an embedded Apache webserver module for templating. If you already favor Apache and the myriad of modules that can extend its capabilities, you will be very comfortable installing and using Midgard. (Midgard's tight integration with Apache is one of the reasons why IDEV selected it to manage content on the website you are visiting right now.)

MySQL

The other leg of Midgard is MySQL, a highly popular open-source database known for its ease of administration and very fast data "reads," which makes it a strong performer even for busy publishing sites. Of course, MySQL has drawbacks, too, including an absence of foreign keys, transaction support, and UNICODE compliance -- all useful attributes for highly transactional or multinational sites.

PHP

The PHP scripting language has quietly taken the Internet by storm over the past three years. Designed specifically to drive dynamic websites, PHP has been installed on more than 6.5 million websites, according to NetCraft. As a high-level scripting language, you won't be doing true object-oriented programming in PHP, but it remains a strong rapid-application environment.

Midgard uses PHP as the API into a library of lower-level functions written in "C." Although several PHP-based CM packages have emerged over the past couple of years, Midgard appears to have the strongest velocity.

Architecture

Midgard's strength lies is its templating system, which enables you to define and re-use elements.

Template elements are referred to in Midgard as "Styles" -- something of a misnomer, since in Midgard it refers to structural elements rather than presentation logic. Styles consist of a main "ROOT" element that defines the page layout and can consist of any number of sub-elements. These elements can be anything from page headers and footers, site navigation or anything else you would typically identify on a page component diagram.

Styles can be re-used to create "Substyles" that inherit all elements from the parent style and override or add individual elements as desired. This powerful feature allows you to create many similar templates that share a pool of common elements. Styles are assembled into actual website pages, allowing the content of the page to be displayed within the style template.

Similar to styles, "Pages" can also consist of individual elements that can be unique to the page itself or inherited by all sub-pages of that page. They can even override style elements, providing an extremely fine level of control over how pages or sections of a site are rendered.

Midgard supports both databased and static publishing. Static content can be easily published directly into individual, templatized web pages. Midgard provides support for dynamic content via a news topic/article infrastructure that pulls content from the MySQL database. Topic trees can be created with any number of branches. Articles are then added into the topic tree at a selected branch, although you have to script some PHP code to actually connect the databased content to the proper template.

Orginally designed to meet the needs of a modest news site, Midgard supports datatypes such as news articles and topics, to events and calendars. All of these "native" datatypes share methods for persistence (ie create a new article, change the address of a member, delete a past event) but also have object-specific code to get lists of objects, find relationship etc.

It is atop this API that web applications are built. Midgard objects are helpfully generic, but they are also fixed. This means that modifying existing objects or creating new ones requires changing -- if you dare -- the underlying C source code and recompiling the library. We have worked around this limitation by sticking with the PHP interface and using custom parameters, arbitrarily associated data, or metadata, but it's a little cumbersome and not entirely satisfying.

Nadmin

The most important application for Midgard -- the one that turns Midgard from an application framework into a relatively useful content management system -- is the administrative front end. Midgard went through two previous versions before the Hong Kong Linux Center announced "Nadmin" (now Nadmin Studio), which uses PHP and DHTML to provide an attractive and powerful interface to the underlying Midgard API.

Sample content approval screen within Nadmin
Sample content approval screen within Nadmin

Nadmin provides facilities to manage multiple websites, as well as edit web pages and smaller shared elements of HTML or PHP code.

Permissions are not terribly granular, but they can be adjusted sufficiently to allow authors and editors to see only news, designers to see only page templates and so on.

Nadmin Permissions Interface
Nadmin Permissions Interface

Nadmin adds revision control to its interface with Midgard's datatypes so that an unfortunate change to the left navigation, for example, can be "undone" and returned to a known good state. Unfortunately, Nadmin does not natively provide the ability to version an entire section or website (although a command-line tool called "Repligard" can save off a whole site or section for archival purposes -- more about that later). And editors beware: there is no native "check-out" or similar version-control mechanism to keep concurrent users from overwriting each others' work -- although the product can be extended to provide element and page locking.

One of Nadmin's other strengths is the way that it takes advantage of the versatility of Midgard's open interface to enable you to include other PHP applications within a content management framework. There are scores of quality PHP applications that can be integrated into Midgard and Nadmin with relative ease due to Midgard's (somewhat utilitarian) code management facilities. Indeed Nadmin Studio includes a forum application, some system administration applications (e.g. email), an ad server, web statistics and a search engine -- all of which are independent projects. This integration is more complete with some applications than with others, but if you have existing PHP code, expect to be able to incorporate it with little difficulty.

Repligard

Nadmin also employs Midgard's relatively new replication system, "Repligard," along with Perl and shell scripts, to accomplish a simple staging/production environment, where pages, news articles, page templates can be edited and tested in staging and pushed up to production after approval.

Repligard uses Midgard libraries to export and reimport an entire site, group of sites, or an entire database of companies and sites to an XML file, saving relationship and state information. Repligard can also be configured to export only changes made to a database since the last export. It can also pick a particular branch of the site tree to export. These export files can be used for mirroring or backup purposes.

Nevertheless, this replication is still fairly ad-hoc, but will no doubt improve as Repligard evolves to allow for finer-grained rules.

Midgard's Future

What does the future hold for Midgard? The platform's chief developers have committed to releasing a completely rewritten, stable version by December, 2001. This will probably be incorporated into a hybrid Midgard 1.6 while Midgard 2.0 is primed to completely replace the existing Midgard framework.

Interesting features slated for Midgard 2.0 include a flexible object model, so that new datatypes can be defined with little or no impact on existing code. While the present version of Midgard is wedded exclusively to MySQL, version 2.0 will be database agnostic, so that the filesystem could be used to store page templates and elements, a database could be used to store news articles and LDAP server could store user and member information.

The adoption of XML-RPC -- a cross platform protocol that allows applications to execute code on other networked machines -- raises the possibility of Perl or Python applications taking advantage of Midgard. It will also enable siteowners to off-load resource intensive applications to other servers.

Conclusion

Midgard is a powerful and flexible CMS whose strength lies in its templating system and its ability to integrate 3rd-party PHP applications.

Like other Open Source CM packages, however, Midgard is weak in areas where commercial products have made substantial investments, such as Workflow, Library Services, and Personalization. The Midgard / Nadmin combination is not for everyone, but if you have already made a commitment to Apache and/or PHP, it should join your short-list of CM platforms to consider.


Next:

Send Feedback

See all Web Content Management Channel feature articles.

Need to select a technology vendor, but confused about your choices? See our vendor-neutral technology reports.

Join the conversation

Digg This! Search Technorati Tag it on Del.icio.us



About the Author

James Christensen and Martin Gottlie

James Christensen and Martin Gottlieb are, respectively, Applications Engineer and Engineering Director at IDEV. Both have extensive experience working with the Midgard/Nadmin platform



Get a Free Sample

Wondering about CMS Watch research? Sign up to receive free samples of any of our products.



What we do

CMS Watch™ evaluates content-oriented technologies, publishing head-to-head comparative reviews of leading solutions. What makes us special?

  • Our critical analysis exposes product weaknesses as well as strengths
  • We deliver unrivaled technical depth and comprehensive project advice
  • Our research is led by international topic experts
  • We only work for buyers -- never for vendors

Contact us

CMS Watch

info@cmswatch.com

3470 Olney-Laytonsville Road Suite 131

Olney, MD USA 20832

1 800 325 6190 (customer service)

+1 617 763 5336 (int'l customer service)

Fax: +1 214 242 3048