Table of Contents

  • Migration : How to upgrade from Temma 1.x to version 2
  • Installation : Download Temma and install it to start your web project
  • Configuration : All the configuration directives of the temma.json file
  • External libraries : How to use external function libraries
  • Routing : Temma's default routing system, and advanced routing
  • Log : Use of the log system, management by criticality levels
    • Log managers : How to create your own log managers
    • Syslog : To send your logs to a Syslog server
    • Datadog : To send your logs to the Datadog service
  • Controllers : Essential parts of your web application
  • Views : Smarty templates or JSON/CSV/RSS/iCal/INI exports
    • Smarty : Default view, based on Smarty templates
    • JSON : JSON export, with or without data validation
    • CSV : CSV export
    • RSS : RSS stream export
    • INI : INI-format export
    • iCal : iCal calendar export
  • Dependency injection : The backbone of your application developments
  • Sessions : Extension of user sessions managed by PHP
  • Data sources : Unified data access management
    • SQL : Access to relational databases
    • Memcache : Access to Memcached servers
    • Redis : Access to Redis servers
    • File : Access to local file storage
    • S3 : Access to Amazon S3 storage
    • Socket : Network communication
    • ZeroMQ : Network communication using the ZeroMQ library
    • SQS : Access to Amazon SQS message queues
    • Beanstalk : Access to Beanstalkd message queue servers
    • Smsmode : To send text messages to mobile phones
    • Slack : To send notifications on Slack
    • Pushover : To send push notifications to cell phones
  • Model : How to use DAOs to access databases
    • Generic DAO : Simple DAO objects, to easily access a table
    • Custom DAO : Custom objects, to encapsulate complex queries
  • Execution flow : How to manage the execution flow, between plugins and the controller
  • Plugins : How to use plugins, and create your own plugins to modularize your code
  • Attributes : How to filter access to controllers and actions
  • Tests : To write automated integration tests.
  • Command-line interface : To create executable scripts on the command line, automatically initialized by Temma
  • Server-sent events : To send real-time events from the server to the client
  • Helpers : Items offered by Temma to help you in various circumstances
    • Command-line scripts
      • Cache : To clear the cache.
      • User : To manage users.
    • Controller + plugin
      • Auth : Controller and plugin to manage user authentication
    • Plugins
      • Api : To manage API access
      • Cache : To cache the generated HTML pages
      • Language : Multilingual localization management
    • Attributes
      • Auth : To restrict access to authenticated users
      • View : To manage controller and action views
      • Template : To define the path to the template file
      • Method : To manage the authorized HTTP methods
      • Referer : To filter access by HTTP REFERER
      • Redirect : To redirect requests automatically
    • Smarty plugins
      • urlize : Modifier to transform a text into an URL
      • filenamize : Modifier to transform a text into a file name
      • nbsp : Modifier to transform spaces into non-breakable spaces
    • Utility objects
      • ANSI : To format texts written to standard output
      • BaseConvert : To do digital base conversions
      • DataFilter : To filter and validate data
      • Email : To send emails
      • HTMLCleaner : To clean up an HTML stream coming from a WYSIWYG editor
      • Serializer : To serialize/deserialize data
      • Lock : To lock access to a file, or the execution of the current PHP script
      • Registry : To properly store global variables
      • Smarty : To process Smarty templates outside the view
      • Term : Terminal management (TTY)
      • Text : Different treatments on character strings
      • Timer : To manage stopwatches



The main differences between Temma 1.x and version 2


Temma installation is very easy


Temma configuration is based on a PHP file and optional environment variables

External libraries

Integrate easily external libraries to your projects


Temma's routing system is intentionally very simple by default, but can be extended


Writing to the log files is done in a simple and expressive way, making debugging easier


Temma's controllers are simple to build and operate, and can be easily extended


Smarty templates by default, but also JSON, CSV, RSS, iCal, INI exports

Dependency injection

This component is the backbone of your application developments


Record data relating to a user session, to switch to stateful operation

Data sources

Unified access to different data sources (SQL, Redis, Memcache, files, S3, SQS, Beanstalkd…)


Access to databases is done using the DAO pattern, with or without cache

Execution flow

Temma uses an easy-to-use plugin system to manage query execution


Modify the behavior of your application using pre- or post-controller plugins


Protect or modify access to controllers and actions using PHP attributes


Write automated test scripts

Command-line interface

Easily run command-line scripts, initialized by Temma

Server-sent events

To send real-time events from the server to the client


Temma provides severals objects to facilitate some processings