DEV Community

Discussion on: Designing a better architecture for a Node.js API

Collapse
 
jonsilver profile image
Jon Silver

Architecture isn't how to organise stuff. You don't tell your kid to "go upstairs and architect your room". Architecture is an altogether higher level discipline. As I said, it's a good article. But it's not about architecture.

Thread Thread
 
hagen00 profile image
Hagen

There is no professional body (especially with regards to JS dev) that will define exactly what "architecture" is and isn't. For me, architecture is a very loose term that can mean many things, code structure being one of them. Personally, when I think "application architecture" then the data model is fundamental and most important - but the code structure is also a part of it (as is choice of technology etc).

I think we might actually agree (that architecture is a loose and general term), I just felt it unnecessarily pedantic to moan about the title of this post when it's perfectly "fine".

"Structuring your Node.js code in a better way" just doesn't have the same ring to it!

Thread Thread
 
jonsilver profile image
Jon Silver

😁

Thread Thread
 
willallendev profile image
willallendev • Edited

developer.android.com/jetpack/guide

Android team seems to agree that this is app architecture.

If this is like "sending your kids to architect their bedrooms", doing it at a higher level would be just telling someone to choose who is going to organize a room.

This is just an architecture, planning and adacting an architecture if no just "where to put the code" is also about breaking dependencies, how each the different parts of the code interact with each other in a correct manner so each of them can be easily be manteined and tested and also be able to change technologies, and apis without having to touch a large number of files in the project. Doing app architecture at a higher level is more or less the same, just at a higher level... (highly abstracted, It could be harder or it could be easier it depends on many variables and kinds of project)

Thread Thread
 
jonsilver profile image
Jon Silver

No. Architecture is not organisation. It is about deciding how a process is systemised. It's the difference between a bottlenecked system and one that's almost infinitely scalable. It's how flexible and adaptable the system is to fit the underlying process it's running.

Everything you describe is not architecture. It's being tidy and organised. It's just low-grade devops. Sure the Android team thinks that's architecture, because let's face it, Android doesn't run at the Enterprise level, it runs at single device level. But I'd rather they didn't pollute the namespace by usurping irreplaceable words which already have established meaning.

A construction site should be kept tidy and organised for health & safety reasons. But that's not architecture. Folder structures for Node.js apps are just a way of keeping your construction site tidy & organised.

Misusing terms creates confusion. There's already enough of that. Let's not create even more.