Documentation
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
- Update : Keep Temma up-to-date in 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
- Internal objects : Temma internal objects (Config, Request, Response, Session)
- 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
- Discord : To send messages to Discord
- 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
-
Controller + plugin
- Auth : Controller and plugin to manage user authentication
-
Plugins
- Api : To manage API access
- Cache : To cache the generated HTML pages
- Debug : To easily debug Temma projets
- KebabCaseUrl : To manage URLs using kebab-case format
- Language : Multilingual localization management
- Attributes
-
Smarty plugins
- dump : Modifier and block tag to dump data
- 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
- Dumper : To dump data
- Email : To send emails
- ExtendedArray : Extended operations on arrays
- File : Extended operations on files
- 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
- Misc : Miscellaneous features.
- 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
Components
Migration
The main differences between Temma 1.x and version 2
Installation
Temma installation is very easy
Configuration
Temma configuration is based on a PHP file and optional environment variables
External libraries
Integrate easily external libraries to your projects
Routing
Temma's routing system is intentionally very simple by default, but can be extended
Log
Writing to the log files is done in a simple and expressive way, making debugging easier
Controllers
Temma's controllers are simple to build and operate, and can be easily extended
Views
Smarty templates by default, but also JSON, CSV, RSS, iCal, INI exports
Dependency injection
This component is the backbone of your application developments
Sessions
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…)
Model
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
Plugins
Modify the behavior of your application using pre- or post-controller plugins
Attributes
Protect or modify access to controllers and actions using PHP attributes
Tests
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
Helpers
Temma provides severals objects to facilitate some processings