H
H
Haddly2014-09-04 19:54:22
PHP
Haddly, 2014-09-04 19:54:22

What type of web projects do PHP frameworks use?

Hello. I have now more or less trained myself to edit ready-made WordPress themes on order, and since I got bored of it, out of curiosity, I am slowly understanding the PHP internals of Wordpress on Codex. But since there is a lot of noise around PHP frameworks (and WordPress, they say, does not reach the framework, because it is not MVC), I thought: is this what I am doing for the future? What kind of tasks do people solve with the help of frameworks, if there are a lot of ready-made CMS? I see business card sites, blogs, social networks, online stores (on Woocommerce for example) on the Internet. In what case does CMS become insufficient and PHP-shniks are forced to turn to frameworks? I broke my head: there are a lot of chatter and presentations on the net, and specifically no one really talks about it. All these big words are Yii, Zend, Symfony, Laravel, Doctrine. All this talk about patterns, parties, facades. Honestly: this is not a holivar for the sake of it - I would be happy to listen to specific arguments in order to decide for myself what to learn, so that I can harness it later, and not spend my whole life editing someone else's bootstrap through less.

Answer the question

In order to leave comments, you need to log in

9 answer(s)
A
Alexander Makarov, 2014-09-04
@Haddly

Frameworks solve problems that are not very optimal to solve using CMS and more often you have to constantly fight with the standards of the CMS itself than use something ready from it. For example, there is no point in using
an RSS reader like https://feedly.com/ CMS.

K
KorsaR-ZN, 2014-09-04
@KorsaR-ZN

CMS is already a finished product, and it will be difficult to do something on it, except for what it was developed for, because you are limited by its functionality and tasks, etc., in general, by everything for which purposes it was created.
A framework is something completely different, it is a building material, like plasticine, and you are free to use it as you please.
That is, a framework is just a set of functions, roughly speaking the core of your future project, usually includes: caching, ORM, templating, MVC, di, etc. developing your own product, not its core.

P
Pavel Volintsev, 2014-09-07
@copist

CMS stands for "Content Management System". See what site modules are usually meant by content management:
1. primarily text content - that is, blog entries, news, articles, wikis, product descriptions, announcements
2. user management - registration, rights management
3. media materials for content - built-in images or support for video providers (youtube, vimeo)
4. content structuring - categories and tags (or taxonomy, to be precise)
5. comments on content
6. search by content and comments
7. feedback forms and other ways of communication project authors and users
8. built-in banner system
9. statistics
N. and a few others. Not for advertising, but for clarity: a list of modules of one of the popular CMS take.ms/5k7Xd
So, if you are doing a project and you need to choose a platform, then look at this picture - are all the modules you need for the project listed in the picture?
If your answer is "yes", then your choice is CMS. You need to configure it and paint it in the desired color.
If the answer is "no", then you need to determine:
* how many modules will have to be added (programmed, adapted);
is it possible to extend the CMS with the modules you need, for example, using a plugin system;
* is there enough documentation for this CMS not to get lost in the code.
For some projects, it will turn out that it is better not to use CMS, but to write the necessary functionality from scratch, and then add to it a couple of modules that are inherent in CMS. For example, your project is about Forex activities and you need to add comments to the current exchange rate :)
And frameworks, self-written or popular, are used because they allow you to simplify and organize the program code so that the code is more compact, faster and easier to read.

S
Sergey, 2014-09-04
Protko @Fesor

Everything, including these CMS of yours, is based on the framework. In WP, a framework is an API for working with data, plugins, a system of hooks. Joomla has a pretty good framework, Drupal is partially based on Symfony components, PHP BB is there too. The core of any CMS, roughly speaking, is a framework.

A
Anton Solomonov, 2014-09-05
@Wendor

MVC is not a silver bullet. A framework is not required to implement MVC.
A framework is a set of basic components to get rid of writing the same code for the hundredth time. You can use any framework, or not use them at all. The main thing is not to overdo it with them. And then many current programmers cannot implement normal authorization without their favorite framework.

V
Viktor Vsk, 2014-09-04
@viktorvsk

CMS - for standard and typical tasks.
Frameworks are for the unique.
In fact, it would be possible without frameworks. Do every time according to your mind, 100% for your own needs and no overhead. But life is short.

P
Pavel Solovyov, 2014-09-04
@pavel_salauyou

framework - these are the basic components and structure for absolutely any application in php, for example, you cannot write a payment system on cms.

H
Haddly, 2014-09-05
@Haddly

And again, good afternoon everyone. - Summing up: it seems to me that today Yii 1.1.15 is the best balance between 1. demand among employers (in St. Petersburg ~ 30 Yii vacancies, ~ 20 Symfony vacancies and ~ 20 Zend vacancies, the demand for other PVs is vanishingly small), 2. an abundance of documentation, 3. the presence of a large number of useful snippets / bundles, 4. tolerable support from PhpStorm and NetBeans, 5. a large number of implemented projects that still need to be supported-developed-rewritten. Again, if we agree that Symfony and Zend are for large and medium projects, and Yii for medium and small ones, the number of orders (albeit less expensive) for Yii is the largest of all currently popular frameworks. Thanks for the answers and have a great weekend.

E
Evgeny Sofonov, 2014-09-11
@sofcom

First, describe the project you are going to do, all its tasks and functionality. And always proceed from the one for whom you are doing - from the user of your solution.
Then you look, if most of the "important and very, very necessary" has already been implemented in any CMS - you take and use the CMS, you will add everything else as needed. If, on the contrary, it turns out that the CMS has a lot of superfluous things for your project, and almost or not at all what is vital for the project, you take a framework.
Any project is based on something - a billing system for working with data in the form of numbers and mathematical functions are important. Wikipedia is important texts and the interaction of authors with content, the history of page changes is important, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question