Hello.
I'm new to PHP, i've started it yesterday.
I want to creat a simple CMS with (PHP and PDO), what should i do?
I'm going to start with creating the CMS core. I want to create sth like a simple wordpress.
What should i do? Where should i start from? Any reference for creating CMS with PHP and PDO?

Re: want to creat a simple CMS with (PHP and PDO) 80 80

Hi Niloo.

Apart from the language, there's much to be done before start coding.

A CMS can become a monstruous project. So, the first thing I'd do would be to list down all the functionallities that you'll implement at first. 'Simple' doesn't cover it so well.

With the list at hand you can start to build your database schema, to hold all the info you'll need.

Now, with a list of functions and the basic db schema, you can plan your application architecture. It will be ajax based? The server side will be Object Oriented? What's the interface will look like? The interface will be template based? How the editing interface will look like?

With the answers to a few of that questions and a lot of others more, you'll have a clear picture of what you'll need to code. If you don't, you'll at least have enough info to ask for specific help.

If you're in doubt only about the PHP, specially if you're using MySQL, there's lots of projects that genereate PHP CRUD Classes from DB Schema. I guess a couple of them might use PDO. But I'm not sure, it's been a while since I coded PHP.

Good luck.

commented: Good advice +15
Re: want to creat a simple CMS with (PHP and PDO) 80 80

I understood, thank you @AleMonteiro.

Re: want to creat a simple CMS with (PHP and PDO) 80 80
Member Avatar

You don't mess about do you? A CMS as Ale states is a pretty big project. If you're new to PHP, then I strongly suggest you cut your teeth on something simpler to begin with. Although a CMS is an exciting project, there is a fear that you'll get bogged down with the scope of it and not learn in a methodical manner - skipping and jumping all over the place and ending up having to refactor your code in many areas as you learn something new (or find out the way you were doing something is wrong).

If you're new to programming in general, then I'd say 'slow down just a minute', go through the basics and build a few simple projects first. Experiment with the code - have fun - learn to fail and start again.

PDO is just a wrapper for interacting with your database - there's nothing fancy about it. Your main issues will be your classes - if you are thinking of using OOP that is. If not, then you're going to be up to your eyes in spaghetti code and code duplication. OOP is a very different way of thinking to procedural code and can be quite difficult to grasp - I'm still struggling with a few concepts myself.

Sorry if that sounds a bit negative. The main thing is never give up. The solution always comes with perseverence.

commented: very usefull +8
Re: want to creat a simple CMS with (PHP and PDO) 80 80

@diafol;
I'm not new to programming in general, i'm a python programmer, but i'm new to PHP.
I understood your explanation, hope to be successful with programming the CMS i've started just today! I love to get involved with great and difficult projects even when i'm new to a language:)

Re: want to creat a simple CMS with (PHP and PDO) 80 80

It will take a couple of months to learn, but if you are keen on writing a cms take a look at codeigniter or laravel.

PS PHP is miles apart from python.

Re: want to creat a simple CMS with (PHP and PDO) 80 80
Member Avatar

Good for you Niloofar, get stuck in, in that case. PHP syntax is extremely easy. Probably the easiest I've tried, so you'll get up and running in no time. If you know Python, then you'll be familiar with all the basic concepts, so you'll whizz through the "beginner stage". However, do look at the PHP manual as it is pretty up to date. There have been many changes and improvements since 5.0 and the majority(?) of online resources are seriously out of date (e.g. still using mysql_* functions).

Re: want to creat a simple CMS with (PHP and PDO) 80 80

Yes, i'm familiar with the basic, PHP syntax is very easy. Thank you for explanations @diafol.

Re: want to creat a simple CMS with (PHP and PDO) 80 80

I suggest you have a look at the many very simple cms's out there. Some are flat file some are sql driven. I started learning with the flat file because you get good at PHP without having to worry about learning the sql syntax.

The simpler CM's you can find the better.

Some of them better illistrates different parts of php than others.

This one is good at illistrating how PHP pages can be structured

http://www.havalite.com/

Check out all these great examples.

https://www.google.ca/webhp?q=flat%20file%20cms#newwindow=1&safe=off&q=flat+file+cms

Peace :)

Re: want to creat a simple CMS with (PHP and PDO) 80 80

ok, i'll try them too, Thank you @Wolf 2.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.