Coming from Django or Rails
This page is for developers who know Django or Rails and are new to PHP or to Exponential. Both frameworks share Exponential's spirit of "batteries included": Django ships an admin, Rails ships generators and conventions. Exponential ships an editorial administration, a content model with versions and translations, permissions, and a template language.
Contents
- Side by side
- The admin you already know, and more
- PHP for Python and Ruby developers
- What you will miss
Side by side
| Django | Rails | Exponential 6 | Page |
|---|---|---|---|
urls.py | config/routes.rb | module.php, URL aliases | Routing |
| views | controllers | module views | Controllers |
| templates (DTL, Jinja) | ERB | the template language | The view layer |
| models, ORM | ActiveRecord | content classes; eZPersistentObject | The content model |
| migrations | migrations | .dba files and upgrade scripts | Migrations |
settings.py | config/environments/*.rb | INI files, EXP_ENV | Configuration |
| middleware | Rack middleware, filters | request rules, listeners | Middleware |
| signals | callbacks | ezpEvent, workflows | Events |
manage.py commands | bin/rails, rake | bin/php/console | Command line |
| Celery | Active Job, Sidekiq | expqueue | Queues |
contrib.auth, permissions | Devise, Pundit | users as content, roles and policies | Authentication, Authorization |
sites framework | multiple apps or engines | siteaccesses | Siteaccesses |
| gettext | I18n | .ts catalogues, translated content | Translations |
| Gunicorn, Uvicorn | Puma | PHP-FPM, Velocity, FrankenPHP | Servers and deployment |
The admin you already know, and more
The Django admin generates forms for models; Exponential's administration is built for editors rather than developers: a content tree, drafts and versions, translations side by side, a rich text editor, image variations, approval workflows, a page builder, a trash, an audit trail and roles. Content-first Python and Ruby CMSs exist too; if you know one, Exponential's content classes will feel natural. Start with the administration tour before writing code.
PHP for Python and Ruby developers
- Each request starts from
index.php; under PHP-FPM nothing survives between requests, under Velocity the workers persist like a Gunicorn or Puma worker would (The request lifecycle). - Composer is the package manager (pip, Bundler) and Packagist the index.
- Arrays are both lists and dictionaries; much configuration in
module.phpanddefinition()is arrays. - Naming: kernel classes use the
eZprefix, the project's new code usesexp, and your own classes take a prefix of your organization or extension (Autoloads and class naming). - The PHP developers' pages cover the language side (PHP developers: start here).
What you will miss
- Model-driven migrations generated from code changes.
- A model-to-form layer like Django forms or
form_with. - An in-process test client.
- Generators for every piece; the RAD tools cover the common ones (RAD tools).
Related pages
- Concept dictionary
- Coming from Express or Spring
- Task: build a small CRUD module
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.