title: Is this architecture definition OK? Multi-tier (Spring / Multi DB)
body: <p>Here´s the background, maybe some of the terms are incorrect, as I´m not an expert in this area:</p>
  
  <blockquote>
    <p>I applied several years ago the
    following architecture, in order for
    getting code reuse and kind-of
    separation of concerns:</p>
    
    <ul>
    <li><strong>Presentation Layer</strong>: Using ASP.NET with C#. The web page logic is
    programmed in here, but the business
    logic is defined in a separate layer</li>
    <li><strong>Model Definition Layer</strong>: Groups all the business entities of the
    system (i.e. Document, User, Folder).
    There are no actions (methods beside
    getters and setters) defined on the
    object. It just represents a record
    from a table (or a join of tables) in
    the database</li>
    <li><strong>Business Logic Layer</strong>: The clases in here are named <em>"Engines"</em>, and they
    have all the business rules
    interaction for each Business entity
    (i.e. DocumentEngine has all the
    methods that represent the business
    rules for handling Documents over the
    system, like Adding, Deleting,
    Updating, etc.). These methods use (as
    parameters) and return Business entities (defined on Model definition) in many cases, in others just use/return primitives.</li>
    <li><strong>Data access layer</strong>: This layer retrieves the data (using the Data
    Access Service) from database and
    <em>convert</em> it into Business Entities (Creating an instance of an object defined in MDL and set its properties values with the corresponding field values retrieved from DB).
    Like the Business Logic Layer, it uses
    and return the Business entities or primitives
    previously mentioned as a single
    object or a collection of object
    (using Generics)</li>
    <li><strong>Data access service</strong>: Using the Simple Factory Pattern, creates the
    database connection according to the
    specified parameters, so it can
    retrieve the information from multiple
    DB engines. </li>
    </ul>
    
    <p>OK then, when I need, for example a list of documents, I open the web page, the business rule is called with the proper parameters (i.e. the Folder Id for this case). Then the data access layer uses the DAS to query the database and converts the record(s) retrieved into Business entities (Defined in the MDL). This business entity (or collection of entities) is returned trough layers to the Presentation Layer.</p>
  </blockquote>
  
  <p>Now, maybe this is not the best architecture, but it has worked very well to me, so now I´m trying to use the same approach but using Java with Spring MVC as the presentation layer, so I´ll have</p>
  
  <ul>
  <li>Presentation (Spring MVC)</li>
  <li>Model definition layer</li>
  <li>Business logic layer </li>
  <li>Data access layer</li>
  <li>Data access service (Database factory using JDBC)</li>
  </ul>
  
  <p>The business requirements are "create an enterprise lightweight web application, that can be extended easily, connected to multiple DB (Oracle, SQL Server, mySQL) with minimal code changes, I18N supporting, ability of logging user activities, having several presentation modes (Web, Mobile) and looks very nice like Web2.0 applications XD" </p>
  
  <p>What do you think? Is this a good architecture definition? Should I change something in order to comply with business requirements?</p>
  
  <p>Thanks in advance for your cooperation</p>