The Single File Philosophy

Given the complexity of the web and how we build it nowadays, sometimes it helps to remember that a single file can be capable of doing incredible things. Create an HTML file, add your markup, maybe augment it with some style and script tags, and now you have a self-contained and coherent site. How cool is that? The Single File Philosophy focuses on fighting against unnecessary Complexity when it's applicable. Of course, if you're collaborating on applications at Scale or sites that have various Business Requirements, then this philosophy most likely doesn't – and probably shouldn't – apply. However, there are cases where we introduce Complexity to build our single-use web apps or side projects for the sake of Convention. If we take a step back and see the project for What It Is, you may realize that you don't need to follow Convention. Everything you wrote can realistically fit into a lone readable file and nothing more.

Benefits of this approach:

Yes, this philosophy is pretty limited, and it will almost always only apply to your small projects that you decided to build over the weekend. However, sometimes it's nice to be reminded of how simple the web can be and how a little can go a long way.