B
B
BlackTritium2013-11-13 12:22:44
CMS
BlackTritium, 2013-11-13 12:22:44

writing cms. python vs php.

I am a beginner web-deloper, worked only on html, css, js. And that knowledge is more superficial. I thought it was time to get off the "crutches" of Wordpress for something of my own. A reasonable solution is to write a CMS for your needs. Here the question arises which language is better php or python. I'm too inexperienced to see the difference in them. If we talk about specific tasks, then I need to write a CMS. It should have such features as: - Full interaction with the database, from lists, tables, rows, and build a table already on the client side according to its parameters, changing partially or completely the structure. - Recording files, before recording, they should be automatically renamed, and fall into the directory I need. - accordingly, the creation of pages, the transition between them, a multi-level hierarchy. I don't know which language to choose for implementation, because PHP is the king of server languages, and Python is just easy in syntax, plus it has a problem with the transition from version 2 to version 3. Help me decide. Do not poke your nose into Google, but give advice.

Answer the question

In order to leave comments, you need to log in

11 answer(s)
T
TonyFreed, 2013-11-13
@BlackTritium

In fact, the language itself is not so important. It is important how well you understand what is happening behind the scenes and what can happen in different situations. Of course, there are languages ​​that are better suited to certain tasks. But almost all tasks are solved in any language. Therefore, understanding processes is more important than knowing languages. Roughly speaking, if you were asked how to get somewhere and you don’t know, then you won’t be able to explain in your native Russian. And if you know, then with or without a dictionary, explain in any language.

Since you are familiar with WordPress, learn PHP. As a framework, I would recommend CodeIgniter as the easiest.

I do not advise you to go into Python and other languages ​​now. PHP, even without frameworks, is sharpened for the web and makes work much easier. With it, it is quite easy to learn to understand and do basic things (database communication, query processing, the concept of OOP, MVC, Design Patterns). When you feel that you are good enough in PHP and in understanding the basics of programming, take on Python / Ruby / Java / and so on.

Also, there is actually more work to be done in PHP.

Good luck

A
ASPAnt, 2013-11-13
@ASPAnt

Which one you know better, write on that. True, judging from the first sentence, you do not know the wrong one or the wrong one. So it's a matter of taste.

V
Vladimir Sokolovsky, 2013-11-13
@inlanger

At one time, they switched from Wordpress to Django for many reasons. One of the main reasons is the language itself - writing in Python turned out to be much nicer and faster. Wordpress customization sometimes resembles dancing with a tambourine - it is often not clear where the next bug will come out. In this regard, Django turned out to be much more predictable, which ultimately translates into a faster development and project support process. But sometimes we use Wordpress, but only when it is clear in advance that this project fits perfectly into the CMS concept and there will be no need to fence bicycles.

B
Boris Syomov, 2013-11-13
@kotomyava

Writing your own CMS with no real programming skills is one of the most unwise ideas, really. =) You will learn almost nothing, but with this you will not even get a bicycle, but a bicycle with square wheels, and in what language it will be written, if you even have the patience to bring it to the end, it will not matter at all.

If for some reason WP is not enough for you, look at other ready-made solutions, and if you want more rapid development, try writing at least a sensible extension for the same WP. This will be a good start.

To get to know Python, you need to start learning and applying it, again. And then you can make an informed choice. And again, start with the basics, don't aim to write your own CMS.

A
Andrey Unger, 2013-11-13
@Cobalt

From personal experience: you should not write your own cms and use the finished one. Especially for a novice developer. It means that you should not write cms for the sake of cms itself. The fact is that when you try to apply it in some non-standard project, it turns out that the architecture does not allow you to do something and you have to build crutches. As a result, after a couple of iterations, cms turns into a set of crutches. A very confusing set of crutches.

In my more than ten years of practice, I have come to the conclusion that cms and libraries are too restrictive. But during this time, a huge number of solutions to all sorts of typical problems has accumulated. And now, creating a new project, we simply drag the classes and functions from the "experienced baggage" into the desired project and edit it for our own needs. That is, in fact, the same set of crutches, but without everything superfluous.

Therefore, the following advice - if there is a project that does not burn on time - write from scratch in such a way that you can use the same code in other projects. But don't go for versatility. It is better to fix a couple of methods in the class in the next project than to spend a day writing a class for all occasions. By the next project, you will already see the convenience / clumsiness of certain elements of your crutches and you may want to fix something in them. As a result, you will have a constantly developing and replenished "baggage of crutches" which will become better and cleaner from project to project.

S
Sergey Tikhonov, 2013-11-13
@Keyon

Look at nodejs, since you know js it will be easier and faster =)

D
Dmitry Prikhodchenko, 2013-11-13
@LazyProger

First, look at how much cms is written in PHP and how much in Python, I’ll immediately say that PHP has a huge lead.

PS all those requirements that you wrote are very easy to implement in PHP PSS php is very easy to learn and its syntax is quite clear.

T
Timur Tuchkovenko, 2013-11-13
@eill

in this case, this is not a change of language, but a change of ideology in the first place.

when moving from php to python, you will have to change the way of thinking a lot (I recently crawled from perl to python, however, in things closer to the system and now I feel it to the fullest).

positive experience, I recommend.

B
BlackTritium, 2013-11-13
@BlackTritium

Thank you all very much for your advice. I will try to continue working on Php, but with a framework

M
Matvey Pravosudov, 2013-11-13
@oxyberg

I myself began to study PL with PHP, I think to switch to python, but it seems to be not very common (maybe for the better), so you can rarely come across another shit code in python.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question