I have this approach that:
- opens up a data F
- reviews its context
- analyzes some beneficial numbers and also words from each line L
- produces an intricate information framework S
- includes each analyzed information L right into S
- produces a circumstances of a data source
- creates the intricate information framework right into the data source
- returns the datastructure and also a data source link
In my viewpoint, this approach damages the solitary duty concept, as it does a lot of points simultaneously. It needs to be refactored to ensure that this is a controller approach: it directly does not recognize just how to do any one of those points, however merely calls various other smaller sized techniques doing each of them.
So I want to refactor it to ensure that it just recognizes what various other techniques to call, the appropriate order, and also does mistake handling.
Yet there is still extra I do not such as concerning this approach (in its initial kind, not the refactored one): an approach that develops an information framework ought to not recognize just how each line of a data have to be analyzed, or just how to produce an offered data source. Analyzing a line of message (string) should be done at an additional layer, analysis and also contacting a DB should be done at an additional layer, and so on
Just how can I prepare this layer framework? Any type of guidance on just how can I structure the code (all these little techniques) called by my code right into layers?
My initial approach, which recognizes just how to do reduced degree things in addition to high degree things, is damaging the Solitary Degree of Abstraction Concept (PUT). Where can I discover even more information (and also preferably instances or workouts) concerning put in Golang?
This subject was instantly shut 90 days after the last reply. New replies are no more enabled.