What are dependencies for in a framework? [closed]

2

I'm completely new to this framework issue and can not seem to find any answer in google about this question.

What are and what are the dependencies for? What do they do?

    
asked by anonymous 22.04.2016 / 15:25

2 answers

3

Dependency is a generic term that indicates that the framework needs one or more libraries (classes or other artifacts) to function properly.

For example, jquery plugins generally depend on whether the jquery proporio is 'installed' in the project without it the plugin would not work.

Several languages have some tools that facilitate the installation and manipulation of these libraries that are known as dependency managers. Some tasks that the managers offer are, library searching, donwload, installation, and the dependencies, which means that the libraries will be installed in the version compatible with the framework used in the project. Some examples of these tools are composer, maven, and more generically the Linux package managers.

    
22.04.2016 / 15:35
2

I think this is a case where an image can be worth a thousand words. This is a basic dependency map of the Nyan framework :

This framework proposes to provide a framework capable of exposing a RESTful API based on ORM-style data storage.

Realize that the framework itself is only a coordinator - it does not know how to expose REST interfaces or access data.

These actions occur in dependencies, which are the real agents in their respective domains. A typical REST call would then be an orchestration of functionality by the framework:

  

GET / data / users / 256

  • Microsoft WebAPI 2.0 receives the request, and passes it on to the framework ;
  • The framework maps the request to a previously defined ORM class, Users ;
  • StackExchange Redis checks whether the data is cached or not; if negative,
  • StackExchange Dapper generates a request for the database;
  • The database client (MySQL, Oracle, or SQL Server, for example) sends the request to the server;
  • The framework then:
    • serializes the result via NetwonSoft JSON
    • Stores serialized content in Redis
    • Uses NetMQ to notify other servers of the update
  • Microsoft WebAPI 2.0 returns the serialized result for the client.

Notice then that the above action has triggered 7 dependencies.

In a simplified way, dependencies are modules that know how to handle specific aspects of implementation; and frameworks are flow and orchestration orchestrators.

    
25.04.2016 / 16:35