Function-first vs feature-first

Function-first means that your project is structured by functions like actions, components, containers, modals, handler. However, there is the problem with scaling – it will become more and more difficult to maintain the overview since features are scattered through the whole codebase. Moreover, it usually violates the principle of locality (german: Lokalitätsprinzip): code which is executed together, should be also structured together.

Feature-first takes the whole other direction. The functions are scattered but the feature itself is self-contained and closed – actually the same structural approach you would choose for defining modules. In my experience this is a good way to structure an app which can easily scale – as long as (naming) conventions are defined on how the features/modules are structured. Inside a feature I would usually structure by function.

https://www.freecodecamp.org/news/scaling-your-redux-app-with-ducks-6115955638be/

Article reference: https://www.freecodecamp.org/news/scaling-your-redux-app-with-ducks-6115955638be/ (actually the article is about Ducks)

Architecture, Paradigmas, Design Patterns, Principles, Clean Code

  • Architecture: description of system (structure, relationships, collaboration)
  • Programming Paradigmas: imperative, functional, object-oriented
  • Design Pattern: usually parts of the systems; generic solution design for a problem; an architecture uses many design patterns
  • Programming Principles: SOLID, Law of Demeter, etc.; generic best practices
  • Clean Code: lowest level, actual source code; e.g. code formatting, lines per functions;

Dependency Inversion, Inversion of Control (IoC) and Dependency Injection (DI)

The three keywords from the title Dependency Inversion, Inversion of Control and Dependency Injection are fundamental to be understood by any developer. In this article we will take a close look into them – there are NOT the SAME. At the end, I collected a list of articles recommendations.

Continue reading “Dependency Inversion, Inversion of Control (IoC) and Dependency Injection (DI)”