This is part of a series of posts about Moving Past The Monolith. To start at the beginning, click here.
If you’re truly building modular applications, consider breaking the modules up into their own deployable web applications. There are so many good reasons to do this.
- This allows us to deploy (or more importantly, not deploy) each module independently! This is a huge deal! No more regression testing the whole application when you change one part of it.
IfWhen at some point you want to switch web frameworks (and you know you will — how many of you are stuck on an AngularJS monolith when you wish you could build new stuff in a newer framework?), you can start building new things a new way without having to rewrite the rest of the application.
Most of you will want to create one URL that users will go to access the application, but this doesn’t mean that you can’t deploy each module independently. Use a reverse proxy like IIS URL rewriting or nginx to set up routing rules that will redirect traffic based on a url to different hosted web sites. Reverse proxy routing is different than DNS routing (which just routes a domain or subdomain to an IP address), it allows you to route based on patterns in the URL (e.g. I can route http://mysite.com/posts and http://mysite.com/users to different hosted web sites).
Read the next post in this series, Planning ahead.