Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Developing Modular Web Applications

Developing Modular Web Applications

Developing Modular Web Applications using the Fenix Framework

João Carvalho

April 11, 2014
Tweet

More Decks by João Carvalho

Other Decks in Programming

Transcript

  1. <copiar arch> Presentation Tier — Based on Struts Application Tier

    POJO’s Persistence Tier — Based on OJB XML Configuration Service Manager Services Filters XML! Configuration DTO’s XML! Configuration Data Repository JDBC JSP! Views Actions SQL Statements
  2. The 11 "simple" steps 1. Create a POJO to represent

    the domain object; 2. Write the SQL schema to store the domain object; 3. Write the xml configuration to map the POJO against the SQL schema; 4. Write SQL statements for custom reading of the domain object (in case something other than a read by ID or a read all was necessary); 5. Create data transfer objects for passing information to the presentation tier; 6. Write services at the application level for creating, reading, updating and deleting the domain object; 7. Write access control filters to limit who can invoke services; 8. Write service and filter configurations in a xml file; 9. Create JSP views for presenting information to the users; 10. Write Actions to handle user requests; 11. Configure struts xml files to specify the application flow.
  3. <arch ff> Presentation Tier — Based on Struts Application Tier

    Persistence Tier — Fenix Framework Based Service Manager Services Filters XML! Configuration Domain! Objects XML! Configuration Data Repository JDBC JSP! Views Actions DML Configuration
  4. • Long compilation times • Large memory requirements • Poor

    expansibility • Poor encapsulation • It becomes easy to break domain constraints
  5. Persistence Tier — Fenix Framework Based Data Repository Fenix Application

    Request Controller Module 1 Presentation Tier Application Tier Domain Objects Module 2 Presentation Tier Application Tier Domain Objects ... Module N Presentation Tier Application Tier Domain Objects
  6. DOT! IST DOT ! IST-ID FENIX ! IST DOT !

    ADIST DOT ! Reitoria! UL SOTIS JobBank SIADAP! Processes SnailMail! Tracking Domain! Browser Renderers Organizationa l! Module Fenix! Framework Regulation! Dispatch Financial! Projects Workflow File! Manage-ment Working! Capital Expenditure s Messaging Inst.! Protocols Bennu ! Framework WebServic e Scaffolding Authentica- tion i18n Groups & ACLs WebApp Scaffolding Scheduler Persistent IO Indexing Support
  7. Versioning • What’s the difference between: • v1.1.3 and v1.1.4?

    • v1.2.3 and v1.3.5? • v1.3.5 and v2.0.0?
  8. Semantic Versioning • Major Version (2.0.0) • API Disruption •

    Minor Version (1.2.0) • New (backward-compatible) API • Revision (1.2.3) • Bug fixes and internal changes http://semver.org/
  9. Dependency Nightmare org.fenixedu:bennu-portal:jar:2.3.0-SNAPSHOT +- org.fenixedu:bennu-core:jar:2.3.0-SNAPSHOT:compile | +- org.jasig.cas.client:cas-client-core:jar:3.3.0:compile | \-

    org.antlr:antlr-runtime:jar:3.5.2:compile +- org.fenixedu:fenixedu-commons:jar:1.0.0:compile +- com.google.guava:guava:jar:15.0:compile +- joda-time:joda-time:jar:2.3:compile +- com.google.code.gson:gson:jar:2.2.4:compile +- javax.ws.rs:javax.ws.rs-api:jar:2.0:compile +- com.mitchellbosecke:pebble:jar:1.0.0:compile | \- com.coverity.security:coverity-escapers:jar:1.1:compile +- pt.ist:fenix-framework-core-api:jar:2.4.0:compile | +- pt.ist:fenix-framework-core-dml:jar:2.4.0:compile | | +- commons-lang:commons-lang:jar:2.6:compile | | \- antlr:antlr:jar:2.7.7:compile | +- javax.transaction:jta:jar:1.1:compile | +- pt.ist.esw:advice-runtime:jar:1.8:compile | \- org.jgroups:jgroups:jar:3.2.7.Final:compile +- pt.ist:fenix-framework-core-consistency-predicates:jar:2.4.0:compile | +- jvstm:jvstm-fenix:jar:1.4:compile | \- pt.ist:fenix-framework-core-adt-bplustree:jar:2.4.0:compile +- javax.servlet:javax.servlet-api:jar:3.0.1:provided +- org.slf4j:slf4j-api:jar:1.7.5:compile \- junit:junit:jar:4.11:test \- org.hamcrest:hamcrest-core:jar:1.3:test
  10. Inconsistencies A @ 1.0.0 C @ 2.3.1 B @ 2.3.5

    C @ 3.4.0 YourApp @ 1.0.0 Conflict!
  11. Fenix Framework 1.x FenixFramework.initialize(new Config() { { dbAlias = "//localhost:3306/hellodb";

    dbUsername = "hello"; dbPassword = "world"; domainModelPath = "src/main/dml/domain.dml"; rootClass = MyRootClass.class; } });
  12. Q?