Understanding Folder Structure and Application Architecture
Learn to define the architecture and folder structure of a Deno application.
We'll cover the following...
Define a folder structure
The first thing we need to be aware of regarding the folder structure, especially when starting a project from scratch without a framework, is that it will keep evolving with the project. A folder structure good for a project with a couple of endpoints will not be as good for a project with hundreds of them. This depends on many things, from team size to the standards defined and, ultimately, to preferences.
When defining the folder structure, we must get to a place where we can facilitate future decisions about where to locate a piece of code. The folder structure should provide clear hints on how to make good architectural decisions.
At the same time, we certainly don’t want to create an overengineered application. We’ll create enough abstractions so that modules are very contained and don’t have knowledge outside their domain, but not more than that. This also forces us to build flexible code and clear interfaces. ...