Symfony Demo 1.0.0 released
February 10, 2017 • Published by Javier Eguiluz
The Symfony Demo application is a fully-functional Symfony application developed as a learning resource and the reference implementation of the Symfony Best Practices.
This application was introduced in April 2015 and the 1.0.0 version was tagged on February 7th, 2017. A lot of changes and improvements have been added to the application since the last time we talked about it:
- 2731bae, f8d63f8: added a paginator based on PagerFanta (@ccab)
- e2d723c: added an example about how to use multiple form buttons (@voronkovich)
- 4dd93aa: added a Date Picker form field to show how to define custom types (@yceruto)
- 96bbeae: made error pages translatable (@bocharsky-bw)
- 895c518: added an example of how to use ESI caching (@sergiu-popa)
- 15ef2b7: updated the application's code to use as many modern PHP features as possible (@voronkovich)
- d8ecd9f: stopped using Assetic to manage assets (@javiereguiluz)
- 84de97a: used dynamic environment variables for critical configuration options (@dzuelke)
- 4d93cda: added a RSS channel for blog posts (@yceruto)
- e702851: added more examples of Doctrine relationships (@yceruto)
- ebca80b: added a security voter to manage blog post permissions (@yceruto)
- 963c260: allow blog posts to add tags using JavaScript widgets and Symfony Form data transformers (@yceruto)
- ... and hundreds of other minor fixes and tweaks
In addition to being a learning resource, the Symfony Demo application can
be used to showcase Symfony features, reproduce reported bugs, do performance
benchmarks, etc. Thanks to the Symfony installer you can get it just by
running the symfony demo
command.
Finally, we would like to warmly thank the great work of our contributors, specially Yonel Ceruto, Victor Bocharsky, Oleg Voronkovich and Christophe Coevoet. If you want to support this project, don't forget to star the Symfony Demo project on GitHub.
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.
Two things I want to ask:
1. What should we use instead of Assetic (what's the recommendation)?
2. Bernhard Schussek recommends us, when validating an entity, to import each validation class, and instead writing @Assert\NotBlank(), simply @NotBlank(). What's the "better" one?
Thanks.
1. There's still no official replacement for Assetic ... but stay tuned for future news about this.
2. It's a matter of personal taste. Bernhard's recommendation probably looks better in the code ... but we still use the classic Symfony practice of importing @Assert. We could reconsider this in the next versions.
Regarding the assets processing, you can keep using Assetic if it suits your need. I'm personally in the process of switching to a stack using the node tools directly (and having a `npm run watch` command in dev).
For assets, I also use frontend tools (Webpack). Splitting the frontend part (SPA) from the backend part (API) gain popularity in all ecosystems. Facebook provide a nice tool to bootstrap a SPA using React including assets management, debugging tools, linting, deployment options... https://github.com/facebookincubator/create-react-app
This is not a best practice, not in my book - Others mentioned before me, what happens when you want to create an API for that action?
I think you should be encouraging people to create services for these kinds of things - otherwise, people will just create massive controllers - just like I did 5 years ago when I was starting with Symfony. It took me years to figure out that's not how you write good software.
That's not to say I think the demo app is bad, but we might need to do some work to improve it and help people realize there's a more 'enterprise' way of writing code that comes with great benefits as well. I'm happy to help further this.
-----
This is pretty good. Reverse Engineering this will be fun.
By the way, I have also gone on to also create a Symfony and EmberJS kickstart that you can find on github https://github.com/campus-discounts/embersy
Many thanks!