Introducing the Symfony Demo application
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.
How to install the Symfony Demo application¶
Open a command console and execute the following command anywhere in your system:
$ 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
symfony self-update. Once the demo application is downloaded,
use the built-in web server to run it:
$ 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. Alternatively, you can get the demo application through the symfony/symfony-demo repository.
What is this application useful for?¶
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 3
$ symfony demo $ cd symfony_demo/ $ composer require symfony/symfony:[email protected]
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.
Introducing the Symfony Demo application symfony.com/blog/introducing-the-symfony-demo-applicationTweet this
Become a certified developer! Exams are online and available in all countries.Register Now
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.