What are the things that are to be considered to write a framework in php. What should be the structure of the framework. Is there any development guide to write framework for php. How a framework can be written such that it can have api's for the plugins. Like jquery which has a core jquery file(jquery.js) and plugin's that have different jquery file.
NOTE: I know there are some existing frameworks for php. But i want to write it for a specific application.
You decide the structure of the framework. People start writing frameworks when they have a lot of experience and have their specific ideas about what their framework should do and how it should be different from the existing ones.
I'd advise to choose an existing framework.
I have some none clever answers to your questions. But it's the best I can do here.
What are the things that are to be considered to write a framework in php.
Basicly... everything.
What should be the structure of the framework.
Depends on what you need it for and what you like.
Is there any development guide to write framework for php.
No. But you can read the doku of other frameworks.
How a framework can be written such that it can have api's for the plugins.
With OOP. Just take a look at current frameworks.
If you want to learn by practice, developing a Framework may be a good idea. You must bear in mind that it's not something easy if what you want to achieve is a critical system.
You should research about architectural patterns
, such as MVC and some of its variations; also, take a look at the other Frameworks that already exist in order to learn from them.
In my opinion, if you don't want to use the different frameworks existing (CakePHP, Yii, etc.), you should classify the services that you require. For example:
etc.