Tiny tiny php framework
PHP JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_app
_lib
_tools/layout
resources
README.md
ajax.php
index.php

README.md

A tiny tiny php framework (php 5.3+).

OVERVIEW

Browser → 'index.php?go=user:join' → Server (index.php) → module($_REQUEST['go'])->run()

API:Core

  • kv -
  • pluggable -

API:Web

  • dom -
  • layout -
  • field -
  • module -
  • command -

GOALS

  • Encourage code reuse/sensible abstractions, favor composition instead of rabid inheritance
    • Use sugar to improve readability and enforce standards (some php functions are horribly named).
  • Strict treatment of user input:
    • Field represents a domain-specific data type, use this instead of raw data types
      • Declarative: $Username = field()->must('maxChars', 255)->will('truncate');
        • Validation and other metadata is baked into the definition
        • Renderers are able to discern how to render a field based on metadata
  • Flexible in-memory dom representation:
    • Not limited to standard html tags
    • Support custom tags and transformations
    • Selectively sanitizes content -- no need to waste cycles sanitizing safe content.
      • Able to specify what needs sanitization.

ROADMAP

  • Experiment with pattern matching sugar to replace regex.
    • Large regex strings are ridiculous to maintain, it's better to have a declarative style like the dom() api.
      • Advantages: does not need to parse a regex string (faster); no escaping hell; transformable; readable, maintable.
      • See example.
  • Experiment with form building (validation, data-binding, rendering).
  • Experiment with system administration tasks, defined in a declarative way (sequence, parallel, delayed, partitioned).
  • Experiemnt with core ui controls (overlay, dialog, lists, trees, buttons, tooltips).
    • Also need some api for general browser features (history, ajax).
  • Think of ways to manage js, css, resources.