Skip to content
Romans Malinovskis edited this page Apr 20, 2016 · 21 revisions

Agile Data - Domain Model and Persistance framemwork

Agile Data is a unique library that enforces correct design of Business Logic in your PHP application and handles persistence (interaction with database) in flexible and scalable way.

  • Business Models - Implement a clean business logic [DM].
  • Active Record - Use this when you need individual record access [DM].
  • Explicit Loading and Saving - Don't rely on framework to do loading magic for you. Load data yourself. [PM]
  • Relation Mapping - Traverse between business data [DM].
  • Persistence - Design and tweak how your Business Models are mapped into tables [DM->PM].
  • Derived Queries - Express your Business Models as SQL queries [PM].
  • Expressions - Use Derived queries to add fields in your Business Models that are calculated in SQL [PM].
  • Query Building - Build an execute complex multi-row queries mapped from your Business Models [PM].
  • Unit-testing - Business Models can be decoupled from persistence layer for efficient Unit Testing [DM].
  • Aggregation and Reports - Support report generation techniques, aggregation and unions for your Business models [DM].

Our design goals are: (old list)

  • Design around existing challenges in ORM, ActiveRecord and SQL Builders.
  • Come up with a clean concept before coding.
  • Implementation must be simple for new developers and powerful enough for seasoned geeks.
  • Educate developers on efficient database use instead of resorting to "hacks" (pre-fetching etc).
  • Any Query. Should be usable with any database schema and produce any request.
  • PDO/SQL Vendor support as well as NoSQL vendor support.
  • Take full advantage of Vendor features where possible (sub-queries, derived query, expressions)
  • Never execute hidden queries.
  • Keep low overheads. Small code footprint.
  • Allow to fully separate "Business Models" from "Persistence logic".
  • Provide reliable way to Unit-test Business Logic and all operations without need of default database.
  • Minimum requirements, PHP 5.5+.
  • Full unit test coverage, standard compliance, detailed documentation.
  • License under MIT.

Links