When we start developing an application from scratch, things are pretty straightforward. However, when continuing developing and the business logic becomes harder and harder we struggle a problem of performance and many other issues. Sometimes, we have to write 'dirty code' or not writing well in order to achieve our goal and accomplish the task. The probelm is when your are a freelancer and you don't work in a team with seniors and architects you may don't take care about some details and write code that could be dirty and you don't respect the best practices or performance or another application limit. What are the suggestions for a freelancer to make good application without the guidance of seniors and architects?
We try to build our apps into modules making it easier to maintain for instance for all apps as a starting point we will always have these modules:
This way we can separate out logic into smaller components it's still easy to dirty up the code. When you get busy it's very tempting to do too many things in one class/file
I find by separating our features into other classes helps to keep organised or even helpers for re-usable components
You can get an idea of best practices by reading blogs and books and stackexchange. There's quite some information out there on how to structure to prevent problems.
That said, practical experience isn't the same as theoretical knowledge. And developing software that's too big to keep in your head all by yourself is rather different from personal projects.
I think that the ways to get this experience are either to join a big team, or to make your project big and old enough that you don't have an overview anymore. It's not easy to get alone. But then, it's also less necessary, which is what makes personal projects much more productive than large enterprise systems.
John Cullen
I'd recommend creating a template for future projects based on the current project. Starting from scratch often times creates extremely redundant programming efforts on your part. I use my own personal Node/React/SQL template that has sessions from the get-go so I don't have to worry about it every time I build a full-stack website.