DEV Community

Discussion on: Open question. Is it really possible to keep a big project code clean?

Collapse
 
jamesmh profile image
James Hickey

Large apps will always be hard to navigate - just because they are big...

All apps will get messy over-time too. I think the key is to write your apps as simple as possible (which sometimes does require a complex strategy) and in a way that individual pieces are easy to replace.

That's why I prefer to avoid sharing code as much as possible. That way, most parts of the app are isolated and can be replaced without affecting other parts.

Using something like Clean Architecture or something like a vertical slice architecture really helps.

Collapse
 
kriyeng profile image
David Ibáñez

Thank you James,

When you reffer to avoid sharing code, do you mean sharing code between modules in the same app, or not code shareable code in mind for future projects?

Does it means that is better to write two almost identical functions in two modules to not share between both or not to use a module for common functions?

I'll take a look to your link!
Thank you!!

Collapse
 
jamesmh profile image
James Hickey

Generally, I mean sharing code between modules or assemblies, etc.

At face value that might sound strange to many, but I've seen this hinder large projects because they are all coupled together due to these shared "common" libraries.

This is what something like microservices totally avoids - which is one of the main reasons these services are easily replaced, etc.