Today we're glad to officially introduce the Symfony Demo application. This project is a fully-functional Symfony application developed as a learning resource. The application deprecates the old AcmeDemoBundle and it can be considered the reference implementation of the Symfony Best Practices.
Technically, the application consists of a blog engine with both a public and a private section:
The private section is a simple CRUD backend developed from scratch:
Every application page includes a Show Source button which displays the Symfony controller and the Twig template used to render the current page:
In addition, the source code of the application contains tons of comments to help you better understand why and how things work.
Open a command console and execute the following command anywhere in your system:
1 | $ symfony demo
|
This command leverages the Symfony Installer to download and install the demo
application. If the demo
command doesn't work, update your old installer
version executing symfony self-update
. Once the demo application is downloaded,
use the built-in web server to run it:
1 2 | $ cd symfony_demo/
$ php app/console server:run
|
The Symfony Demo application is designed to run out-of-the-box, so you won't need to configure anything or run any other command.
1) Learning Symfony
This is the most obvious reason to use this demo application and its main purpose when we developed it.
2) Teaching Symfony
This application can also be a useful teaching resource to train your company interns and to deliver workshops during events organized by the Symfony community.
3) Testing new Symfony features
Do you want to test the great features introduced by a new Symfony version without messing your applications up? Install the demo application, update the Symfony dependency and you're done!
For example, you can test Symfony 2.7 beta features as follows:
1 2 | $ symfony demo
$ composer require symfony/symfony:2.7.x@beta
|
4) Relative benchmarks
The demo application is developed as a learning resource, so you cannot use it in a performance benchmark. However, it can be used to do relative performance benchmarks.
Install a fresh new demo application and profile it with Blackfire. Introduce some changes in the application and profile it again. You can now visually compare both executions and check out how much the application performance improved or degraded.
What a Symfony developer should know about the framework: News, Jobs, Tweets, Events, Videos,...