views:

34

answers:

1

Im a spring newby (been baby sitting an ERP tool for the past 5 years). Anyway, I've got a few of the sample apps (petstore/etc) running, got spring security basics figured out, and am ready to start a new project. My question is, are there any best practices for "breaking apart" the site into different webapps.

For example, the project will have the standard web stuff (/contactus, /about, etc), a user area (/myprofile, etc), and an admin section (/admin/users, etc). Is it generally the practice to roll all of this into one webapp, or I was thinking about possibly removing all of the admin funtionality to a separate webapp. Other than being able to keep the admin site running while the other stuff is down for maintenance, is there any reason for breaking apart the project? Any best practices to be observed here?

Any advice would be appreciated...

A: 

I would recommend splitting your web application where it makes sense. As you already have mentioned, splitting a web application comes with the (quite huge) benefit that you can have parts of the site running while updating other parts. Other advantages to splitting the web application are:

  • Quicker development, smaller web applications will be quicker to deploy in a test environment or embedded container.
  • Easier dependency management, you avoid having a large web application that depends on all your other projects.
  • You will have a more secure site, there is less risk of information leaking from one application to the other (e.g. admin information leaking to the customer site) than if you have everything in one big application.
  • ...

How to split a web project depends on the project (of course), but try to find areas where you see a clear sepration from the rest of the web application.

Kristoffer E