Delegating App Base (DAB)

Delegating App Base (DAB) is a lightweight, flexible framework designed to keep things simple. It strips away the excess of rigid design patterns and over-engineered systems commonly found in many frameworks. DAB aims to give you full control and insight into your application’s inner workings without unnecessary complexity.

Key Principles

How It Works

Directory Structure

DAB’s project structure is organized to separate concerns without enforcing a strict MVC split:

Getting Started

  1. Fork the Repository or Example App:
    Begin by forking the repository—or an example app repository—to serve as your starting point. Using an example app can provide inspiration and ready-to-use code that you can build upon.
  2. Clone Your Fork:
    Once you have your fork, clone it to your local machine. This allows you to explore the structure and develop your own implementation strategies.
  3. Understand the Flow:
    Open public/index.php to see how the container is created, namespaces are registered, and the FrontController is dispatched. This file is your entry point for handling any request and understanding the overall workflow.
  4. Experiment with Routing:
    In your controllers (for example, within FrontController), look at how delegateRoute() is used to match and hand off routes. Try adding your own route patterns and controllers to explore the flexibility of the system.
  5. Extend as Needed:
    Whether you’re building a small utility or a complex application, DAB’s design lets you scale the complexity only where necessary. Create new controllers, integrate libraries, and add factories without being constrained by a rigid architecture.

By Analogy

If you're accustomed to other frameworks, you may find that some familiar concepts are absent in DAB. Here’s a guide on where to put your code and how to think about its structure compared to what you might be used to:

Routing

Middleware

Dependency Injection

Error Handling

Configuration and Environment

Asset Management

Front-End Component Helpers

A minimal JavaScript helper library is provided at /assets/dab-components.js. It offers a tiny framework for building widgets:

DOM rebuilding is manual; components do not automatically re-render on state updates.

Testing and Extensibility

License

The DAB (Delegating App Base) software is collectively owned by the DAB Community, which includes anyone who contributes to the Software or its ecosystem. The Software is open-source but proprietary, and its use is subject to the terms of the [DAB Community License](/license).

Key points:

Whether you're a beginner or an experienced developer, DAB provides a system that prioritizes clarity, control, and flexibility—allowing your projects to remain as lean or as intricate as required. Start building with DAB today and experience the difference!