0
Welcome Guest! Login
0 items Join Now

Our Valentine's Day Sale is coming to an end, but it's not too late to save big! It's your last chance to save 50% on themes and 35% on memberships!
motionmailapp.com

RocketTheme Blog

Database or Flat-File CMS, Which is Better for You?

flat-file cms

Grav is a type of flat-file CMS, a content management system that stores data in files that are organized in folders rather than in a database. It handles content in a way that provides a solution that can be as simple or as powerful as the developer needs.

RocketTheme has been building products for database-backed CMS platforms like Joomla, WordPress, phpBB, and Magento for nearly a decade.

With the launch of the Grav project, built with love by members of the RocketTheme team, many of our community members wanted to know why we decided to build a flat-file CMS rather than sticking exclusively to the platforms we already work with. We still believe strongly in database-driven CMS platforms, but feel there is a place for this new generation of flat-file CMS for sites that would benefit from a smaller, more content-specific approach.

Grav isn't a typical flat-file CMS in that it handles caching, templating, and several other aspects differently. More information about Grav's features can be found on the official website.

In this article, we will take a look at a few things to consider when deciding whether or not a flat-file CMS is right for you. For the interest of simplicity, we will focus on WordPress and Joomla, and how they compare to a modern flat-file CMS like Grav.

Do You Need a Database?

A database-driven CMS like WordPress or Joomla is capable of scaling to a phenomenal degree. The frontend site can be as simple or as complex as it needs to be, but for a great many sites on the Web, a database can actually be overkill.

A flat-file CMS uses folders and basic file data to organize and assign values to content. As an example, a file in a folder labeled blog would be treated as a post in the blog category where a database would simply assign the content a value that tags it as a blog post. In Grav, specific file names can trigger page templates, enabling specific types of pages to be displayed differently.

This is sufficient for sites that take data that exists and presents it to the viewer, but may be a drawback when you want to organize content in a multitude of different ways, on the fly.

Databases allow for data to have complex relationships, while a flat-file data solution is inherently limited to simple queries.

In Grav, taxonomy settings make it possible to group content together and assign tags. This expands a bit on what's possible with a straightforward folder-file organizational system.

Ideally, you want a database if you have content that needs to be actively moved and/or assigned complex relational values.

A flat-file database would be an optimal solution for a smaller site containing content that is already prepared and organized.

If you don't have a specific requirement for a relational database, then a flat-file configuration may work just fine.

Do You Need the Site to Scale?

Is your site going to handle a moderate amount of traffic each day, or do you need it to scale readily to accept millions of requests per day? Do you have a dozen pages that need to be served, or thousands?

Flat-file CMS platforms can scale, but they have limitations, especially when compared to a well-configured database-driven CMS like WordPress to Joomla.

A major food blog with a global audience would benefit from the ability to not only handle a massive amount of requests coming in at any given time (many of which being search queries and other complex traffic requests), but also the ability to work with a massive library of content that spans many different categories.

A local restaurant posting its menu, location information, and an occasional blog post featuring its recipe of the month would probably do very well with a flat-file solution.

Speed

A lot of the focus during Grav's development has been on speed. With the beta release, we were able to achieve page load times on our main Grav site of under 20ms. This is a significant improvement over the speeds we have been able to achieve on larger dabase-driven solutions.

Being a flat-file CMS means no calls to a database, which eliminates a common cause of bottlenecking. Caching is also baked in to virtually every aspect of content delivery, further reducing the amount of overhead required to serve a page.

A database-driven CMS can be quick, but with so many moving parts on the backend, it is difficult to optimize past a certain point.

Feature Rich vs. Feature Specific

WordPress and Joomla are feature powerhouses. With WordPress, you receive an abundance of features and configuration options out of the box, many of which you might not even use. Joomla is a bit more modular, allowing you to trim any features you don't want, but it is still a pretty heavy hitter in terms of core functionality. You can even add features by way of plugins and extensions, making them capable of doing pretty much anything you could imagine.

A flat-file CMS can be as big or as simple as the developer needs it to be. At its core, it just needs to be able to grab text files and turn them into HTML. That's really all it requires, but you have the option to add features like a basic search, content slider, or breadcrumbs by way of plugins.

If all you want to do is have a handful of pages that show off your company and/or project, then the larger platforms may be overkill. It would by like using a katana when you really just need a letter opener.

Conclusion

Finding the right platform to build your site with comes down to your specific needs. If you have a big project that requires a lot of pages, multiple users, and an advanced administrative interface that guides the user through each step of the content management process, a more traditional CMS with years of development behind it can work exceptionally well.

If what you want to do is build a simple, quick site that is exceptionally portable and easy to manage, then a flat-file CMS may be an option worth considering.

If you are building a simple, small site and feel that a database-driven solution might be overkill, give a flat-file CMS like Grav a spin.

NOTE: We plan on providing themes and extensions for Grav in the future, but right now we are focusing on making it a great platform. Grav is currently in beta, and we expect regular updates as development continues.

Join the Conversation

comments powered by Disqus