190

How to build your own CMS, and why you shouldn't

 6 years ago
source link: https://blog.intracto.com/how-to-write-your-own-cms-and-why-you-shouldnt
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

15 december 2016

How to build your own CMS, and why you shouldn't

For a while now we've been looking for a competent alternative to compete with Drupal. When a client requests a Content Management System (CMS), our go-to-technology has always been Drupal, which is also the reason why 65% of our developers are Drupal developers. Lately, however, we've had a growing need for a custom CMS solution.

blog-How-to-build-your-own-CMS-and-why-you-shouldn't-header
Joeri Timmermans
Joeri Timmermans
Projectmanager

How we started out

blog-How-to-build-your-own-CMS-and-why-you-shouldn't-flowchart

We've built up some experience with Bolt CMS and Wordpress but none of those provided an adequate, customisable CMS. After briefly looking into a few CMS possibilities built on top of Symfony, we decided none of these would fit our needs. We were afraid we would spend most of our time writing hacks to make their code work the way we wanted.

So, quite foolishly, we decided to build our own CMS. As most developers experience at some time or other over the course of their careers, we were convinced our idea was great and we would build a revolutionairy new CMS from the ground up.

blog-How-to-build-your-own-CMS-and-why-you-shouldn't-rewrite

Our first rewrite

Oh how wrong we were to think that, here's what happened: for a few days of development things were getting along just nicely. However, soon enough it was time to tackle our first challenging feature: Translations and Versions of a page object. There are many ways to deal with this problem and all of them have their own benefits and drawbacks. After some pondering, we stumbled upon PHPCR (PHP Content Repository) and turned towards Symfony CMF(Content Management Framework), which is based on PHPCR. This framework has solutions for both of these problems, so after some experimenting we decided to rewrite our code base and base our CMS on the foundation of Symfony CMF. Our progress skyrocketed and we got so much work done. 

We then came to the point where we had to deal with our second major challenge: building an admin interface that would allow us to manage our setup. We started creating CRUD (Create-Read-Update-Delete) actions and got along slowly. Every time we started a new part, we refactored it to be as scalable and future-proof as possible. After a few days of development, we realised this was going to take a while. We noticed the Symfony CMF team suggesting to use the Sonata Admin Bundle to handle backends, this led us to considering Sonata. 

blog-How-to-build-your-own-CMS-and-why-you-shouldn't-sonata

Our second rewrite

At this point we started to lose confidence in the idea of building our own CMS. We started asking around if people had experience with Sonata and how much work it would take to change course for the 3rd time. We decided we would allow ourselves 3 days to try and get something done. If, within that time frame, we could get a Sonata setup that was equal to or better than our current Symfony CMF approach, we would make the switch. Otherwise we'd continue developing our own CMS since we'd already spent quite some time developing it. 

Surprisingly, we managed to get everything up and running. We had a working CMS including our custom features in less than 3 days. At this point we realised we'd been foolish to think we should write our own CMS from scratch. A Content Management System is a common necessity in software development. Many people have tackled this issue before, so we're far better off helping to improve an open source project and contributing to a community than to throw yet another new alternative into the mix, and maintain our own code. 

blog-How-to-build-your-own-CMS-and-why-you-shouldn't-admin

Learnings

There are always going to be pros and cons when using an open source CMS, these are the main points we're taking away from this experience: 

  • Fast develoment
  • Community help
  • Most problems have been solved, or a solution is present
  • Less maintenance (since the community helps)
  • Security is being watched by the community
  • Documentation can be lacklustered(Sonata's, for example, isn't the greastest)
  • Open source code means some code may not be optimal and contributing is going to be time consuming. (but worth it)

Conclusion

Overall, writing your own CMS is a great experience since it gives you some insight into a common problem in software development: content management. However, extending from open source has many advantages over rolling your own solution.

So before you start writing the next big thing, make sure you contemplate all your options.


Recommend

  • 2
    • bothsidesofthetable.com 2 years ago
    • Cache

    Why You Shouldn’t Be Fooled by Your Own Expertise

    Why You Shouldn’t Be Fooled by Your Own ExpertiseI am wired to discount people who have total assuredness in their point-of-view, have dogmatic positions or use data as a crutch or substitute for logic. I appreciate people...

  • 4

    Developers shouldn't distribute their own software December 9, 2019 on Drew DeVault's blog An oft-heard complaint about Linux is that software distribution often t...

  • 6

    React, ProseMirror, and ReduxBuild Your Own: React, ProseMirror, and ReduxThis course was originally designed as a two-week learning sprint to be taken on by the Oak team at the New York Times. The go...

  • 54
    • stjepang.github.io 4 years ago
    • Cache

    Build your own block_on()

    If you’ve ever wondered how block_on from the futures crate wor...

  • 42
    • stjepang.github.io 4 years ago
    • Cache

    Build your own executor

    Now that we’vebuilt the block_on() function, it’s time to take one step further and turn it into a real executor. We w...

  • 7

    Using ShutIt to Build Your Own Taiga Server Recently someone brought to my attention this issue on Github. https://github.com/taigaio/taiga-scripts/issues/...

  • 10
    • www.lewisgavin.co.uk 3 years ago
    • Cache

    How to Build Your own SOCIAL NETWORK

    The essence of a social network can easily be stored in a single table with two columns. This post was inspired by the complex way social networks are depicted, especially in diagrams and it made me think about how to simplify the ide...

  • 8

    How to Build Your Own Ionic Library for NPM December 15, 2020 By Simon 0 Comments

  • 9

    Build your own Programming Language with Scala Posted 2019-09-11One strength of Scala is implementing programming languag...

  • 6

    20 February 2020 / product Build your own location-aware logistics app in an hour Mobile apps are driving the digital transformati...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK