📜 ⬆️ ⬇️

Should I write my Framework / CMS if you already have it?

Should I write my Framework / CMS if you already have it? Probably many thought about it. The question is obvious. But the answer will probably be multi-valued. Part of the community - advanced cool programmers will say why reinvent the wheel? Everything is. Need a business card site, please have one, just for yourself correct. Need an online store please. And you want your social network, not a problem! Why write your where it is clumsy, where it is wrong, and where it is generally flawed.
Now a huge number of different CMS / CMF. Probably many would agree that Zend comes first, and then all the rest went. Zend “grows husband” every year optimizes code, improves security, new modules appear, expansion options, etc. and this is all thanks to the great specs that support him.

And what can samopisny framework offer? a couple of "nedomodeli" sometimes not quite smooth. And based on this, any adequate person will gather with the spirit, set aside his framework to a distant regiment and take Zend to work.

My opinion is that when a person / student / novice sits down to study the same php, having gained some knowledge from books or the Internet, he wants to create his own website. Starting to write it comes up against the most important thing, which is very necessary - it makes you think how to write a website: let the kernel be primitive, work with the database, files, etc. This includes thinking - it gives you the opportunity to prove yourself as an inventor, albeit for yourself, albeit not quite good.
')
The more attempts he makes, albeit unsuccessful, the more experience there will be and the experience to correct his mistakes. An important aspect is that you should not sit only behind your code. The best teacher is to watch others do. Take ready-made frameworks and parse and analyze their code. Collect on these "foreign" products what their applications. See how they function using ready-made logic and architecture.

Personally, from my own experience I’ll say that when I started acquaintance with php and came to the conclusion that I needed to write a certain “core” for the site, and after searching many forums I got answers like: “Why is Zend bad?” Or “Guy, don’t reinvent the wheel. All came up to us. " This is very sad. And for a beginner, it’s not easy to master Zend, even for those lessons that are now on the net, in which everything is chewed. When you don’t understand why so much code is written to make a simple action, which I supposedly can do 2 functions in my framework, it’s hard to agree that Zend or another framework is better than yours. Of course, with time you understand and you begin to see the holes of your brainchild, and more and more often you look towards this mega-monster, the destroyer of the “childish psyche”, the handsome Zend or any other. That time and experience is what you need, and you should not beat the hands of people who have not yet grown to that class that would work with ready-made frameworks.

My first site was horrible bydloderderstvo. All mixed code, html-tags logic. Then, I realized that errors are difficult to catch from a pile of files, and created a prototype of a library with functions. It was for me raising one level higher. But for me the notion of OOP, classes, patterns, singlelton was scary and alien. But the time has come and it became clear to me that the file with functions is no longer enough. The site could be compared to writing a toy in assembler, something similar to low-level programming. I realized that something new was needed, but the OOP was not given to me in any way, and everyone wrote on the forums “ZEND! SAND! ZEND! Having dealt with the PLO with difficulty, I took up the ZEND. But as it did not grow together, I'm not talking about other frameworks. The only thing I began to do with Zend is to watch his “insides”, the realization. A lot of things were not clear. Some interesting solutions were recorded in memory. Then other frameworks went "under the knife," the desire to learn how smart people do is intensified. Examples of implementation and the code was postponed in the brain, which then resulted in the writing of its framework. I know 100% that he is damaged in some way, but I worked on it with all the “combat” techniques that I scooped all this time. After that, the understanding of the same Zend or another became much higher, and the code more elegant.

Strolling through Habra stumbled upon the post Architecture CMS where uv. Mr_fresh wrote a comment to the post:

"Eh, many of us once painted such schemes and wrote systems ... This is a great experience."

And there are many such posts, and it is offensive that many such posts are hunted down. Not everyone needs to become professional programmers. Many have enough of their own page on the Internet.

If you make a logical conclusion, then, it seems to me, there will be self-written frameworks! At least in order to grow as a specialist, to get more versatile practice. Therefore, no matter how perfect and beautiful the code would be written by experts, everyone will have their own vision of certain tasks. So are born their own fremiforms. Someone on his own to lay out your site and someone to the customer will make a simple business card site which is updated once a year. Its "samopal" is a good training ground for the exercises, but do not forget about others, at least as examples.

Source: https://habr.com/ru/post/147504/


All Articles