V
V
Valentin Shapkin2016-02-03 01:08:19
CMS
Valentin Shapkin, 2016-02-03 01:08:19

Writing the first CMS. How is it better?

Hello. I thought about writing a CMS for personal development, for my personal website that will live for a long time and be updated as needed. Most likely it will be more like a blog but with additional. functionality.
The general plan
Articles (blog, news)
Media (photos, videos)
Comments from guests on articles
and writing an admin panel for this whole thing.
As you can see, the requests are not large, but I want to do it correctly so that later in the future I don’t get stuck in my own mess with source codes.
I have already written the first option, it works according to a simple principle;
There is an entry point -> then there is a handler that collects a page from blocks (head, content, footer) and returns the result to the user.
most of the code in the content block for displaying news and other little things.
After reading a bunch of articles on Habré and other forums, the arguments of many commentators on similar issues, including on the Toaster, everything "mixed up" in my head and an unrealistically complex picture lined up with the development of CMS.
Those. before I write a CMS, I need to "shovel" thousands of source codes of various CMS, study them, work with them for at least a year to understand how to write my system correctly?
Really, to write even the simplest CMS for personal basic needs, you have to study a bunch of other things to build an accurate picture of its development?
Questions themselves:
How to make a simple diagram for your engine?
What do I need for this and how to create at least a basic CMS architecture?
ps I am well aware of the availability of various frameworks that simplify the development process dozens of times for my tasks, but the interest is to write it myself. usually freimworks are used in my opinion for custom projects and I'm not in a hurry, but I already want to start developing humanly.
Thanks everyone for the replies! Much has become clear.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
Sergey, 2016-02-03
@smart_pro

Those. before I write a CMS, I need to "shovel" thousands of source codes of various CMS, study them, work with them for at least a year to understand how to write my system correctly?

Exactly. I would even say at least 3 years old, and a couple of dozen different projects. It is important that you get a different experience.
not if you do not write bicycles and take the framework as a ready-made basis.
Start with a framework:
- a library for rendering templates (output buffering, working with the file system a little)
- a library for request routing (go through regular expressions)
- a library for working with a database (not an ORM, start with Table Data Gateway or DAO at least. Fumble in SQL minimally).
- The core that ties it all together. Preferably with some kind of middleware concept, so that all other components do not know anything about the kernel. (Poke around in HTTP)
In general, writing a CMS is very, very boring and long. You will get through everything much faster by making individual components. Fortunately, now is the age of the composer, and you can twist and turn frameworks as you like, replacing other people's components with your own.

I
Immortal_pony, 2016-02-03
@Immortal_pony

The simplest CMS takes 8 lines of code.
Take it and modify it to suit your needs.

A
Alexander Litvinenko, 2016-02-03
@edli007

all popular CMS have long come to a framework-like structure, can your CMS be used as a framework?

D
dmitriy, 2016-02-03
@dmitriylanets

It is necessary to identify the main goals and plans for the development of CMS. If for myself and more in the direction of the convenience of development by programmers, this can be one direction something like CMF, if customer orientation is needed, then this will be a different development plan. Commercial, open source. What load will it withstand. All this should ultimately affect the architecture of the system.
From my own experience, if for yourself:
1. Take a framework, finish it to fit your needs, form the first version of the CMS
2. Take the project for money, implement it on your CMS. Analyze the architecture, errors, omissions. Create a plan to adjust the functionality of the CMS.
3. Take the project, deploy it on your CMS, implement adjustments.
and so on, all the while analyzing the system and improving it.
Here's what I would pay attention to: modularity, composer, work with the database, roles and access rights, multi-layer architecture

A
Andrew, 2016-02-05
@AndHacker

I had the same idea before. It is better to take a ready-made cms and rework it to fit your needs. For example, cut off the functional))

V
vkuranov, 2016-03-09
@vkuranov

Writing the first CMS. How is it better?

You don't need to write anything yourself. Everything has already been written. It is better to take ready-made solutions and improve them, implement your ideas to suit your tasks. I would focus on three whales: jQuery, PHPQuery and basic knowledge of PHP (MSQL is not even necessary).
Look at my website: pagelite.ru/pagelite/home/?u=t0v1y0 Its
administrative panel is on a third-party free service. And the CMS itself is on my hosting. It takes no more than 1Kbyte, it is installed without any settings, once it is installed and we don’t touch it anymore, we generally forget about it).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question