Answer the question
In order to leave comments, you need to log in
What is needed for a modern web framework?
I have been working for several months on creating a web framework in C ++ (like Phalcon but without dependence on Zend), unfortunately now I can’t boast of the source code, I want to get an opinion on what is good in frameworks and what is needed for a modern web framework.
Thanks everyone!
PS - CodeIgniter is taken as a basis.
Answer the question
In order to leave comments, you need to log in
what is good about frameworks
Oh damn, the first answer killed me. What other buzzwords will full-stack mega developers & super duper architects write, that have a billion salary about that're using a lot of intellectual words.
But again, where are you going? I'm at my level as an auto mechanic trying to do less to make it last longer. And of course, so that when I get bored, I could hire anyone, even a beginner, and after looking at it for a day, he understood what was here and where. And at the output, a regular site will turn out - which is easily finalized, and breaks into pieces if necessary.
There are also coders from the word "Tru" who prefer to tell a beginner for three days about how to install "packages" and configure "dependencies" and that they then even get an "application" that you know "Hello, World!" displays.
As for the fact that it’s stupid to start with CI - yes, they did something very simple, but they managed to be too smart in it. 10 config files clogged with some rarely-used settings already says a lot.
I personally need in the framework:
** Simple routing - regular expressions, immediately throw language processing and reverse link generation into it.
Honestly, I rarely needed routes in a file - I always dragged them into the database , it was easier to create pages in navigator than constantly editing routes first, then controllers, then creating actions.... locales), pages (with paths to views) and user sessions
** Instead of actions and controllers, leavecontrollers alone, which can simply be nested an unlimited number of times . Do not forget that controllers need to be able to be stored in different files, in any folder structure
** A clear system for working with the database and generating model code. Moreover, in such a way that the "initial model" is generated, and you create a new one on the basis of the original one, so that your changes are not overwritten each time. The ideal model is an array with fields and default values pre-driven into it . A normal PHP array. The main thing is that when outputting and working with it, you do not need to first make it an array, just to conveniently view it .
** There is such a practice - to put all the work with the model into the model. I can not say anything. But for each module on the site, I always had my own error messages. Therefore, implement a unified system of "data validation in the model", and then fight with the clumsy:
The system reports:
1) The username must be 1-30 characters
2) The username cannot contain ...
Why? Errors are written in the module itself - if it is an authorization module - write that "Authorization failed, enter so-and-so."
** When searching from the database, do not forget that sometimes you need a) links and b) nested conditions connected via AND / OR
**
** More different inheritances (in languages, for example - when there is a default language and there are several levels at which a person can choose a language - cookies, database, software-installed, selected on the site or entered in the address bar)
** It is enough to store languages in one file for each language, separating them through cat__lang and in json format, so that they can be easily loaded from JS
** Modularity is that it is possible to connect ready-made libraries quickly and easily, respectively, and write them easily
** Ready-made authorization (which, by the way, takes one file in 200 lines, and not like many others - they will write their sessions, write some flash messages, "states", and as a result, write the registration again anyway)
** Well, in good hands, of course, it's nice to have all sorts of migrations, for very large projects, where the database is deleted and re-uploaded - the work of two days
Community? In the ass of the community. Every time you need to ask your community (read - suck, appease) a desire to help, well, or wait a week until you deign to get off your towers). Oh, I even had, one such community boy said - "I say, I will not help you, because I do not like your views." He taught me how to live for half an hour, and at the end he said that he didn’t have 5 minutes to just tell me how what I asked was done.
Documentation? Well, yes and no. If your f-work is as simple as a bottle - there is no need to write these kilometers and walls of text - except for the drochev on them of those people who like to study and know everything - there will be no sense. On the f-work, simple operations should be done, everything else is created to order.
Embedding all sorts of libraries in the code - different bootstraps, such as popular ones, angulars, etc. - in the ass. Who wants to - add.
This should turn out to be so micro-sized in terms of code that you don’t even want to write documentation. The main thing is not to expect that you will cover all the needs of the audience. Rather, on the contrary, aim that you will give the audience (by the way, not always as dumb as, for example, me) a methodology for developing applications without using the technologies that they use now.
The ideal business line of work is when your system will allow beginners to be as smart as professionals because it will be very simple. And on this system it will always be possible to do miracles, not necessarily in 5 minutes, but using the tools that are.
And yes, forget to make your tools trustworthy. I’ll say for myself - for a very long time I tried to understand the Yii developers, who sort of made the authorization ready, in the end I realized that it wasn’t me who was an idiot, but they were thinking about something there, it’s not clear what.
Just be simple.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question