1.5. Architectural Principles

If at every turn we make just the changes required by the architecture at hand, we'll end up reworking the same areas of code repeatedly. To minimize rework and improve the chances of code reuse, it helps to have some guiding principles as we go. As with all object-oriented programming, one important principle to apply is to separate things that change from things that stay the same. We'll also try to introduce some “layering” of the code, and separate out code that deals with areas such as data access, business logic, presentation, and remote access. While this isn't a book on patterns, we'll apply them where appropriate and mention them wherever they're used.

Another guiding principle is the idea of “refactoring”—that ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.