Skip to content

keeyipchan/tinyTinyFw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Tiny tiny php framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published