Where are the frameworks for creating libraries?

Whenever I create a PHP library (not a framework), I keep reinventing everything.

"Where can I put the configuration parameters?"

"Which design template to use here?"

"How should all classes extend each other?"

etc.

Then I wonder if there isn't a suitable library to use anywhere?

It is similar to a web application framework (symfony, cakephp ...), but instead of creating a web application, this framework will help the coder build the library by providing all the standard framework and classes (observer pattern, dependency injection, etc.).

I think this will be the next important thing if it is not available right now. This way the standard will be followed when creating libraries, otherwise it will be like a jungle where everyone creates their own structure and a lot of coders just code without thinking about reuse etc.

There are currently no frameworks for building libraries?

If not, do you disagree with me that this is the way to do it, with the library framework?

Because I really am throwing a lot of time (weeks!) Just thinking about how to organize things, both at the code level and at the file level, when I should just start coding the logic.

Share your thoughts!

+2


a source to share


3 answers


Okay, now Bill basically said everything I was going to say, but anyway. I can add some links:

If you want something that you can simply embed into your website and start coding your application, you're looking for a full screen framework that makes heavy use of the Customization Convention . Symfony comes to mind from modern frameworks .



If you need standalone components, look for component libraries like Zeta Components (formerly ezComponents) or Zend Framework or Symfony Components (includes DI framework ). You can reuse them or extend them to add additional requirements. Or use Doctrine if you need an ORM. And don't forget about PEAR .

However, how you use the above or what you do with them, you cannot download anything anywhere. Architecture and Design is the responsibility of the developer (or architect). You cannot download this because it probably won't fit your application without significant changes. Templates such as GOF templates or PoEAA templates offer general problem-solving guidelines, but you always need to adapt them to your application.

+4


a source


I think there is a framework that suits your needs. Developers make a distinction between full-screen frameworks and more component-based frameworks.

Component based structural structures include a collection of finer grained components that can be used more or less independently. Examples are configuration, authentication, email, web services, etc.

If you are talking about a structure that makes it easy to develop these components, I'm not sure what the value is. Frames provide value by abstracting out the common code they think you'll need. What is the common code between the authentication component and the email component?



Framework improves developer productivity for well-known tasks. The more specific and well-known the task, the more she may assume that she knows how to do it. Example: Drupal or MediaWiki.

But frameworks don't do OO design for any arbitrary code for you. This movement is in the opposite direction, from more concrete and to broader objectives. It is difficult to define common code that can abstract away from such a wide range of technologies as "libraries".

+4


a source


Most of what you describe is called software development. This is the essence of using basic software and language tools to form a complex solution. When it comes to simplifying and abstracting repetitive parts, that's what most modern languages ​​do.

I think the answer to your question is Python, .NET, Ruby

+1


a source







All Articles