G
G
Grigory Vasilkov2016-01-31 03:48:34
Programming
Grigory Vasilkov, 2016-01-31 03:48:34

How are dependencies correctly made in a modular system?

I read one blog that chewed on the problem of modern frameworks - they say these are cumbersome constructions with a huge pile of code that few people need. And so this author chewed on this topic and at the end gave a solution - make the modular structure of your application. The pieces, they say, have their own views, models and controllers and are assembled together (probably he meant a bus (in the people - an array, for the old school - a one-dimensional matrix) of events or instructions).
And how is the last OOP elephant implemented in this case?
Let's say I have a Messages module - its task is to store all error message methods, collect them, keep logs, and if you think about it, even do a trace.
There is a Router module - which breaks the address line into pieces and determines - the language, which means the product parameters, or a piece of the url responsible for the page.
And now the Router has errors, that is, it DEPENDS on the Messages module.
How competently (so that without crap in the future) to make such dependencies?
In the tire itself? In the main module? Or are all dependencies included directly in the Router module file? And if through one dependency? For example, there is also a language module. And the router needs bugs, and the bugs need languages. And languages, by the way, also require errors, for logging, which phrases are missing.
And how to make dependencies here so that they are also loaded in a row, as expected? And no duplicates.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2016-01-31
@zolt85

In the case of Java, everything has already been invented for us a long time ago and it's called OSGi

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question