DevBlog

Coding my way

3 years ago in PHP, simpleCMS · 2 MIN READ

simpleCMS – The setup

In this this article series I hope to help aspiring web developers to create a simple, yet easily extensible content management system with all the modern, and popular tools like: SASS, composer, bower and the works

First off, we need something, like a core concept which will define the workings of the cms. In this case we will build something with dependency injection, MVC, and some nice stuff.

The core tenet is the following: each function that has a user accessible has a corresponding template.

What will we need to accomplish this? Simple:

  • directories
  • controllers
  • models
  • a nice autoloader (I’ve always hated all those includes)
  • tons of 3rd party libraries
  • google
  • google
  • google
  • stackoverflow

So lets start with the setup (the development environment).

  • Install a webstack (for local development), there are plenty for each OS, and there are some that are available on most of operating systems (XAMPP). I wont go into installation details, there are plenty of articles about this.
  • Install composer, you’ll have a great tool for managing 3rd party php libraries, and they even comes with a nice autoloader
  • node.js and bower, these two will come in handy when we build the front-end parts of the cms. Node.js is something like a runtime environment, with a built-in web server and bower is a package manager (like composer) for javascript libraries.
  • compass and sass, these two work best in tandem. SASS is as an alternative to CSS3, and provides much needed functionality, like variables, mixins (methods/functions), and much more (check it out in detail at http://sass-lang.com/). Comapss is a compiler for SASS, in the end we’ll get valid CSS from the sass files, and compass does just that with the added spice of automatic background compiling, and image sprite generation.
  • A version control system is a nice to have addition to the development process, because it can provide a development history, with branches, you can separate your development code from your stable code (and bugfix if necessary), and you can easily integrate it into the stable branch. It can also help to manage collaboration with a long list of people.
  • Get a development tool, or IDEs as some people like to call them, or you can just stick to notepad++ for the time being. Or you can use an IDE (like i do), my personal favorite is PHPStorm by Jetbrains… I know, it’s an app you’ll have to pay for, but it’s free for open-source projects, and has an early access program which is also free to use (if you don’t mind the occasional bugs).

And that’s it! You’re all set to start developing your very own simple content management system.

Do you think I forgot something? See a part on which we can improve? Don’t hesitate to share!

···

Miklós Galicz

I'm a hobbyist who managed to become a professional web developer who specializes in Laravel and Vue.js, also the Spice must flow.
comments powered by Disqus


© 2017 DevBlog