PHP MVC Framework Design -
I am currently in a problem that I can not really solve by myself:
I have started the code a "small" framework (browsergame-framework), which in some way adheres to the MVC pattern.
Now I have my index, bootstrap, db adapter, dispatcher, cover, but I do not really know how to "link them" I've coded their methods etc. But I do not know how to design them to work like an engine.
And the next problem is my controller, I do not know how to "link" them so that they can easily reach the entire framework .... Yes, this is misleading, that's why I You need help, some generic plans will be very good to "how to structure a framework".
Thank you.
You are putting the car before the horse. Frameworks have not been written, they have grown up. One of the four gangs from Ralph Johnson.
edit
I do not understand what the author means "application", this means the raw-coded-project Is this original project done with basic functionality which will be taken in the later framework.
Either, based on your expertise in programming and problem domain. This is a goal (a useful framework) that is important, the process should help you to get the best possible. You can either start at a slow speed, develop three applications in the same problem domain without sharing any code, and just look at the code and see what they have the same, and potentially Against these three finished applications to collect the code, the common fragments will not encourage you during the development of the second and third applications, nor do the concurrent ones Will hinder their development with Unrsnrcna.
Assume that you want a framework to reduce the writing browser based, turn-based strategies.
Your first turn is to write this single game, with the idea of using the code again without a single game, but focusing on its reuse Along with: decisively implement all the principles of refactor, programming: ,,,, etc. Especially the dry code reuse (repeat not repeat) is the basic principle of programming, and the first step on the way to a framework is. You will end up with a library of classes and / or functions that are used in the game.
To write your second turn, follow the principles described above, using another game-based, alternate-based strategy, the first game code. You will find that much of this is unique to the game first. Use pieces that can be fitted in the second one without any amendments, which are useful but they are not quite fit, so they are useful and fit in both the games do fit.
Repeat the process with the third game.
The three smallest numbers that give you any hope of accessing the code, that the problem domain (looks really triangular) OTOH, achieving a useful framework without the support of real-world applications There is a definite way to end up with a stack of useless crap.
Johnson:
Can not develop reusable frameworks just by setting down and problem domain by thinking about
Carefully read the "Three Example" section.
Comments
Post a Comment