SlideShare a Scribd company logo
1 of 28
Download to read offline
BACK-END WITH

     SONATA ADMIN BUNDLE
                       AND SYMFONY2, OF COURSE...

                            Andrea Delfino
                            andrea.delfino@gmail.com




             SYMFONYDAY 2012
sabato 6 ottobre 12
•Developer with 10+ years experience
                      •Either SysAdmin (DevOps ❤)
                      •Actually working for Skuola.net
                      •I love Free Software (free as in freedom)
                      •Knowledge sharing (Web, LUG, ..., PUG)

                                           @ottimo
                              https://github.com/andreadelfino

                             PUG Turin: http://torino.grusp.org



             SYMFONYDAY 2012
sabato 6 ottobre 12
THE PROBLEM
                                          TIME
                  Often we have little time for developing the back-end




             SYMFONYDAY 2012
sabato 6 ottobre 12
THE PROBLEM
                                       EXPECTATIONS
                      We're migrating from an CMS with a good back-end




             SYMFONYDAY 2012
sabato 6 ottobre 12
THE SOLUTION

                           X
                      phpMyAdmin

             SYMFONYDAY 2012
sabato 6 ottobre 12
ALTERNATIVE

                      • Homebrew
                      • Altri Framework
                      • SF2/Doctrine CRUD Generator
                      • AdmingeneratorGeneratorBundle
                      • WhiteOctoberAdminBundle
                      • FooSimpleAdminBundle (one-dev-bundle)



             SYMFONYDAY 2012
sabato 6 ottobre 12
OR...

                      SonataAdminBundle
                          “Admin is not only about Model; but about providing a
                      consistent and rich user experience for managing data.”
                                                                    Thomas Rabaix




             SYMFONYDAY 2012
sabato 6 ottobre 12
SONATA PROJECT
                                      http://sonata-project.org



                      • Mantainer: Thomas Rabaix (https://github.com/rande)
                      • Sponsor: Ekino (http://www.ekino.com)
                      • Obiettivo: e-commerce framework
                      • State: 13 bundles e some libraries




             SYMFONYDAY 2012
sabato 6 ottobre 12
FEATURES OVERVIEW
                 Dashboard                                             Templating
                                                                       •Base templates (field, list, filter) can be overwritten
                 List                                                  •Layout templates can be defined into the Service
                 •Automatic sort                                        Container
                 •Link to associated admin (Post => User)
                 •Custom templates                                     Others
                 •Row Action: edit, create, view, ...                  •Nested Admin (ie: /news/post/5/comment/list filter
                 •Batch Action                                          and create comments only for the post with id=5)
                 •Clever row visualisation: boolean values are         •Contextual Breadcrumb
                  represented with 'check picture'                     •Persistent parameters across an Admin
                 •Filter                                               •Side menu option
                 •Pagination                                           •Translated into 17 languages: CA, DE, EN, ES, FR, HR,
                                                                        IT, JA, LB, NL, PL, PT_BR, PT_PT, RU, SK, SL and UK
                 Edit / Create                                         •Built to be extended
                 •Inline edition                                       •Explain command line utility
                 •Association management (create related model with
                  + icon)                                              Bundles (on top of)
                 •Group fields                                          •SonataMediaBundle: a media manager bundle
                 •Sortable option                                      •SonataNewsBundle: a news/blog bundle
                 •Modal window to select model (when the list can be   •SonataPageBundle: a page (CMS like) bundle
                  important)                                           •SonataUserBundle: integration of FOSUserBundle and
                 •Dynamic form on [one|many]-to-many association        SonataAdminBundle
                  (add new element)




             SYMFONYDAY 2012
sabato 6 ottobre 12
ECOSYSTEM
                                     Symfony Framework
                                    Symfony Components
           SonataCacheBundle                                                  SonataPageBundle
            SonataBlockBundle                                                SonataNewsBundle
           SonataJQueryBundle                                                SonataMediaBundle
             KnpMenuBundle                                                    SonataUserBundle
                Exporter           SonataAdminBundle                            Symfony CMF
                                     abstract class Admin


               SonataDoctrineORMAdmin   SonataDoctrineMongoDBAdmin   SonataDoctrinePhpcrAdmin




             SYMFONYDAY 2012
sabato 6 ottobre 12
INSTALLATION


                • vi deps && vendors install (branch/2.0 + sf2.0)
                • composer (master + sf2.1)




             SYMFONYDAY 2012
sabato 6 ottobre 12
CONFIGURATION


                      • autoload.php + AppKernel.php
                      • config.yml + routing.yml




             SYMFONYDAY 2012
sabato 6 ottobre 12
MAYBE NOT EVERYONE KNOWS THAT...

                             In Bundle               Standalone
                      src/                     src/
                         Skuola/                  Skuola/
                           UniversitaBundle/        AdminBundle/
                               Admin/                   Admin/
                           VersioniBundle/          UniversitaBundle/
                               Admin/               VersioniBundle/
                           ...                      ...

                          skuola.net/admin         admin.skuola.net



             SYMFONYDAY 2012
sabato 6 ottobre 12
ADMIN CLASS
                          Class as a Service

          Service                              Our Admin class




                                      Entity




            Admin pool    Dashboard            Controller
                            group
             SYMFONYDAY 2012
sabato 6 ottobre 12
DASHBOARD
                                                   Twitter
                                 Quick actions   Bootstrap ;)




                      Entities
                                                 }Group




             SYMFONYDAY 2012
sabato 6 ottobre 12
Filters
                         LIST VIEW
                        Custom fields                   Actions




                            Export


                                       Batch actions

             SYMFONYDAY 2012
sabato 6 ottobre 12
LIST VIEW




             SYMFONYDAY 2012
sabato 6 ottobre 12
LIST VIEW
                                    Admin class

                          List Mapper


                                          Custom Template



                                             Custom Actions




             SYMFONYDAY 2012
sabato 6 ottobre 12
LIST VIEW


                                         Actions Route


                                     Filters




             SYMFONYDAY 2012
sabato 6 ottobre 12
EDIT / CREATE FORM
                         Associated Entity

                                         Properties
                                                       Entity Collection
                                                      (ManyToMany with
                                                         extra fields)



                                                       Help inline

                                       CRUD Actions
             SYMFONYDAY 2012
sabato 6 ottobre 12
EDIT / CREATE FORM
       Modal windows ;)
                                          List View



                      Opera




          Click to choose
            association




             SYMFONYDAY 2012
sabato 6 ottobre 12
EDIT / CREATE FORM
                                                  Create Form



          Etichette




                      Creating a new associated Entity


             SYMFONYDAY 2012
sabato 6 ottobre 12
EDIT / CREATE FORM
                           Form Mapper

                                  Model type

                                                  Collection type


                                         Custom visualization


                                           Help inline



             SYMFONYDAY 2012
sabato 6 ottobre 12
MAYBE NOT EVERYONE KNOWS THAT...


                                           Form fields template




                                              Custom field block




             SYMFONYDAY 2012
sabato 6 ottobre 12
OTHER FEATURES
                      •Controller for custom and batch actions
                      •Lifecycle Callbacks
                      •Validation
                      •Advanced Templates customization
                      •Pagination
                      •Sidebar & Menu (via KnpMenuBundle)
                      •Translations (10+ languages, Italian included)
                      •ACL / Security Layer (SonataUserBundle + FOSUserBundle)
                      •CLI Utility (app/console sonata:admin:*)
                          http://sonata-project.org/bundles/admin/2-0/doc/index.html



             SYMFONYDAY 2012
sabato 6 ottobre 12
CONCLUSIONI
                      • Very powerful and flexible
                      • Active community (>260 fork, >50 contrib)

                      •Stable release nearsometimesbut still missing
                                           for sf2.0...
                      • Documentation is                lacking

                      • Unstable “master” version (for sf2.1)


                          Being a Good OSS Contributor - Jeremy Mikola (http://joind.in/talk/view/7216)




             SYMFONYDAY 2012
sabato 6 ottobre 12
Questions?


             SYMFONYDAY 2012
sabato 6 ottobre 12
Grazie
                                       So long, and thanks for all the fish! ;)




                                              @ottimo
                                 https://github.com/andreadelfino

                                      andrea.delfino@gmail.com



                      Thanks to Thomas Rabaix (@th0masr) for support and Lineke Kerckhoffs-
                                    Willems (@the_linie) for presentation tips.



             SYMFONYDAY 2012
sabato 6 ottobre 12

More Related Content

What's hot

Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
Ricardo Sanchez
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
Magento Dev
 
Jetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserJetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browser
littlebtc
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
littlebtc
 
Drush Aegir & Drush, Drupal Roadshow Austria
Drush Aegir & Drush, Drupal Roadshow AustriaDrush Aegir & Drush, Drupal Roadshow Austria
Drush Aegir & Drush, Drupal Roadshow Austria
Iztok Smolic
 

What's hot (20)

Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
 
Plone 5 theming unleashed
Plone 5 theming unleashedPlone 5 theming unleashed
Plone 5 theming unleashed
 
OpenCms Days 2013 - Site Management Tool
OpenCms Days 2013 - Site Management ToolOpenCms Days 2013 - Site Management Tool
OpenCms Days 2013 - Site Management Tool
 
Tomboy Web Sync Explained
Tomboy Web Sync ExplainedTomboy Web Sync Explained
Tomboy Web Sync Explained
 
Surviving a Plane Crash, a NU.nl case-study
Surviving a Plane Crash, a NU.nl case-studySurviving a Plane Crash, a NU.nl case-study
Surviving a Plane Crash, a NU.nl case-study
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
Composer & Drupal
Composer & DrupalComposer & Drupal
Composer & Drupal
 
Drupal 8 Vocab Lesson
Drupal 8 Vocab LessonDrupal 8 Vocab Lesson
Drupal 8 Vocab Lesson
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
 
OpenCms Days 2016: Multilingual websites with OpenCms
OpenCms Days 2016:   Multilingual websites with OpenCmsOpenCms Days 2016:   Multilingual websites with OpenCms
OpenCms Days 2016: Multilingual websites with OpenCms
 
Jetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserJetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browser
 
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and GruntOpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsers
 
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
 
Drush Aegir & Drush, Drupal Roadshow Austria
Drush Aegir & Drush, Drupal Roadshow AustriaDrush Aegir & Drush, Drupal Roadshow Austria
Drush Aegir & Drush, Drupal Roadshow Austria
 
Dependency management in Magento with Composer
Dependency management in Magento with ComposerDependency management in Magento with Composer
Dependency management in Magento with Composer
 

Viewers also liked

sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundle
th0masr
 
Construire et gérer son identité professionnelle en ligne
Construire et gérer son identité professionnelle en ligneConstruire et gérer son identité professionnelle en ligne
Construire et gérer son identité professionnelle en ligne
Julien PIERRE
 
Sonata form
Sonata formSonata form
Sonata form
RSNO
 

Viewers also liked (20)

Easy backends with Symfony2 and the Sonata Admin bundle
Easy backends with Symfony2 and the Sonata Admin bundleEasy backends with Symfony2 and the Sonata Admin bundle
Easy backends with Symfony2 and the Sonata Admin bundle
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundle
 
Back-end con SonataAdminBundle (e Symfony2, of course...)
Back-end con SonataAdminBundle (e Symfony2, of course...)Back-end con SonataAdminBundle (e Symfony2, of course...)
Back-end con SonataAdminBundle (e Symfony2, of course...)
 
E-réputation,Nécéssité de gérer son image sur le web #wasexotweetup Numéro 5
E-réputation,Nécéssité de gérer son image sur le web #wasexotweetup Numéro 5E-réputation,Nécéssité de gérer son image sur le web #wasexotweetup Numéro 5
E-réputation,Nécéssité de gérer son image sur le web #wasexotweetup Numéro 5
 
Construire et gérer son identité professionnelle en ligne
Construire et gérer son identité professionnelle en ligneConstruire et gérer son identité professionnelle en ligne
Construire et gérer son identité professionnelle en ligne
 
Sonata allegro presentation
Sonata allegro presentationSonata allegro presentation
Sonata allegro presentation
 
Identité numérique
Identité numériqueIdentité numérique
Identité numérique
 
Sonata form
Sonata formSonata form
Sonata form
 
Symfony et Sonata Project chez Canal+
Symfony et Sonata Project chez Canal+ Symfony et Sonata Project chez Canal+
Symfony et Sonata Project chez Canal+
 
(株)農業情報設計社の取り組みついて
(株)農業情報設計社の取り組みついて(株)農業情報設計社の取り組みついて
(株)農業情報設計社の取り組みついて
 
Semester 7 - Industrial Training (Final Presentation)
Semester 7 - Industrial Training (Final Presentation) Semester 7 - Industrial Training (Final Presentation)
Semester 7 - Industrial Training (Final Presentation)
 
IoTt時代のERPに求められる条件とは2017Mar.
IoTt時代のERPに求められる条件とは2017Mar.IoTt時代のERPに求められる条件とは2017Mar.
IoTt時代のERPに求められる条件とは2017Mar.
 
Industrial training presentation
Industrial training presentationIndustrial training presentation
Industrial training presentation
 
Contoh Presentation Latihan Industri (PIS)
Contoh Presentation Latihan Industri (PIS)Contoh Presentation Latihan Industri (PIS)
Contoh Presentation Latihan Industri (PIS)
 
Webの仕組みとプログラミング言語
Webの仕組みとプログラミング言語Webの仕組みとプログラミング言語
Webの仕組みとプログラミング言語
 
Sonata presentation to Advisors
Sonata presentation to Advisors Sonata presentation to Advisors
Sonata presentation to Advisors
 
Microsoft Dynamics 365 - The Mordern Retail Platform
Microsoft Dynamics 365 - The Mordern Retail PlatformMicrosoft Dynamics 365 - The Mordern Retail Platform
Microsoft Dynamics 365 - The Mordern Retail Platform
 
Identité Numérique & Réseaux Sociaux
Identité Numérique & Réseaux SociauxIdentité Numérique & Réseaux Sociaux
Identité Numérique & Réseaux Sociaux
 
MySQLerの7つ道具 plus
MySQLerの7つ道具 plusMySQLerの7つ道具 plus
MySQLerの7つ道具 plus
 
Io tプラットフォーム主要ベンダ相関図2017mar.
Io tプラットフォーム主要ベンダ相関図2017mar.Io tプラットフォーム主要ベンダ相関図2017mar.
Io tプラットフォーム主要ベンダ相関図2017mar.
 

Similar to Back-end with SonataAdminBundle (and Symfony2, of course...)

Drupal sharing in HP7
Drupal sharing in HP7Drupal sharing in HP7
Drupal sharing in HP7
jimyhuang
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
meghsweet
 
Calling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBayCalling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBay
Tony Ng
 
"Portrait of the developer as The Artist" Lockheed Architect Workshop
"Portrait of the developer as The Artist" Lockheed Architect Workshop"Portrait of the developer as The Artist" Lockheed Architect Workshop
"Portrait of the developer as The Artist" Lockheed Architect Workshop
Patrick Chanezon
 

Similar to Back-end with SonataAdminBundle (and Symfony2, of course...) (20)

.Net without spending a buck
.Net without spending a buck.Net without spending a buck
.Net without spending a buck
 
Simplifying End-user Drupal 7 Content Administration
Simplifying End-user Drupal 7 Content Administration Simplifying End-user Drupal 7 Content Administration
Simplifying End-user Drupal 7 Content Administration
 
What's new in MySQL 5.6
What's new in MySQL 5.6What's new in MySQL 5.6
What's new in MySQL 5.6
 
Automate IBM Connections Installations and more
Automate IBM Connections Installations and moreAutomate IBM Connections Installations and more
Automate IBM Connections Installations and more
 
Automate IBM Connections Installations and more
Automate IBM Connections Installations and moreAutomate IBM Connections Installations and more
Automate IBM Connections Installations and more
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
 
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012
From Eclipse to Document Management - Eclipse DemoCamp Grenoble 2012
 
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
 
Survey of Container Build Tools
Survey of Container Build ToolsSurvey of Container Build Tools
Survey of Container Build Tools
 
PloneSocial Roadmap PLOG2013
PloneSocial Roadmap PLOG2013PloneSocial Roadmap PLOG2013
PloneSocial Roadmap PLOG2013
 
Introduction into Drupal site building
Introduction into Drupal site buildingIntroduction into Drupal site building
Introduction into Drupal site building
 
Modularity problems
Modularity  problemsModularity  problems
Modularity problems
 
Recipes for Drupal distributions
Recipes for Drupal distributionsRecipes for Drupal distributions
Recipes for Drupal distributions
 
Drupal sharing in HP7
Drupal sharing in HP7Drupal sharing in HP7
Drupal sharing in HP7
 
Drupal in-depth
Drupal in-depthDrupal in-depth
Drupal in-depth
 
Entity cache
Entity cacheEntity cache
Entity cache
 
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
 
Calling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBayCalling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBay
 
"Portrait of the developer as The Artist" Lockheed Architect Workshop
"Portrait of the developer as The Artist" Lockheed Architect Workshop"Portrait of the developer as The Artist" Lockheed Architect Workshop
"Portrait of the developer as The Artist" Lockheed Architect Workshop
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Back-end with SonataAdminBundle (and Symfony2, of course...)

  • 1. BACK-END WITH SONATA ADMIN BUNDLE AND SYMFONY2, OF COURSE... Andrea Delfino andrea.delfino@gmail.com SYMFONYDAY 2012 sabato 6 ottobre 12
  • 2. •Developer with 10+ years experience •Either SysAdmin (DevOps ❤) •Actually working for Skuola.net •I love Free Software (free as in freedom) •Knowledge sharing (Web, LUG, ..., PUG) @ottimo https://github.com/andreadelfino PUG Turin: http://torino.grusp.org SYMFONYDAY 2012 sabato 6 ottobre 12
  • 3. THE PROBLEM TIME Often we have little time for developing the back-end SYMFONYDAY 2012 sabato 6 ottobre 12
  • 4. THE PROBLEM EXPECTATIONS We're migrating from an CMS with a good back-end SYMFONYDAY 2012 sabato 6 ottobre 12
  • 5. THE SOLUTION X phpMyAdmin SYMFONYDAY 2012 sabato 6 ottobre 12
  • 6. ALTERNATIVE • Homebrew • Altri Framework • SF2/Doctrine CRUD Generator • AdmingeneratorGeneratorBundle • WhiteOctoberAdminBundle • FooSimpleAdminBundle (one-dev-bundle) SYMFONYDAY 2012 sabato 6 ottobre 12
  • 7. OR... SonataAdminBundle “Admin is not only about Model; but about providing a consistent and rich user experience for managing data.” Thomas Rabaix SYMFONYDAY 2012 sabato 6 ottobre 12
  • 8. SONATA PROJECT http://sonata-project.org • Mantainer: Thomas Rabaix (https://github.com/rande) • Sponsor: Ekino (http://www.ekino.com) • Obiettivo: e-commerce framework • State: 13 bundles e some libraries SYMFONYDAY 2012 sabato 6 ottobre 12
  • 9. FEATURES OVERVIEW Dashboard Templating •Base templates (field, list, filter) can be overwritten List •Layout templates can be defined into the Service •Automatic sort Container •Link to associated admin (Post => User) •Custom templates Others •Row Action: edit, create, view, ... •Nested Admin (ie: /news/post/5/comment/list filter •Batch Action and create comments only for the post with id=5) •Clever row visualisation: boolean values are •Contextual Breadcrumb represented with 'check picture' •Persistent parameters across an Admin •Filter •Side menu option •Pagination •Translated into 17 languages: CA, DE, EN, ES, FR, HR, IT, JA, LB, NL, PL, PT_BR, PT_PT, RU, SK, SL and UK Edit / Create •Built to be extended •Inline edition •Explain command line utility •Association management (create related model with + icon) Bundles (on top of) •Group fields •SonataMediaBundle: a media manager bundle •Sortable option •SonataNewsBundle: a news/blog bundle •Modal window to select model (when the list can be •SonataPageBundle: a page (CMS like) bundle important) •SonataUserBundle: integration of FOSUserBundle and •Dynamic form on [one|many]-to-many association SonataAdminBundle (add new element) SYMFONYDAY 2012 sabato 6 ottobre 12
  • 10. ECOSYSTEM Symfony Framework Symfony Components SonataCacheBundle SonataPageBundle SonataBlockBundle SonataNewsBundle SonataJQueryBundle SonataMediaBundle KnpMenuBundle SonataUserBundle Exporter SonataAdminBundle Symfony CMF abstract class Admin SonataDoctrineORMAdmin SonataDoctrineMongoDBAdmin SonataDoctrinePhpcrAdmin SYMFONYDAY 2012 sabato 6 ottobre 12
  • 11. INSTALLATION • vi deps && vendors install (branch/2.0 + sf2.0) • composer (master + sf2.1) SYMFONYDAY 2012 sabato 6 ottobre 12
  • 12. CONFIGURATION • autoload.php + AppKernel.php • config.yml + routing.yml SYMFONYDAY 2012 sabato 6 ottobre 12
  • 13. MAYBE NOT EVERYONE KNOWS THAT... In Bundle Standalone src/ src/ Skuola/ Skuola/ UniversitaBundle/ AdminBundle/ Admin/ Admin/ VersioniBundle/ UniversitaBundle/ Admin/ VersioniBundle/ ... ... skuola.net/admin admin.skuola.net SYMFONYDAY 2012 sabato 6 ottobre 12
  • 14. ADMIN CLASS Class as a Service Service Our Admin class Entity Admin pool Dashboard Controller group SYMFONYDAY 2012 sabato 6 ottobre 12
  • 15. DASHBOARD Twitter Quick actions Bootstrap ;) Entities }Group SYMFONYDAY 2012 sabato 6 ottobre 12
  • 16. Filters LIST VIEW Custom fields Actions Export Batch actions SYMFONYDAY 2012 sabato 6 ottobre 12
  • 17. LIST VIEW SYMFONYDAY 2012 sabato 6 ottobre 12
  • 18. LIST VIEW Admin class List Mapper Custom Template Custom Actions SYMFONYDAY 2012 sabato 6 ottobre 12
  • 19. LIST VIEW Actions Route Filters SYMFONYDAY 2012 sabato 6 ottobre 12
  • 20. EDIT / CREATE FORM Associated Entity Properties Entity Collection (ManyToMany with extra fields) Help inline CRUD Actions SYMFONYDAY 2012 sabato 6 ottobre 12
  • 21. EDIT / CREATE FORM Modal windows ;) List View Opera Click to choose association SYMFONYDAY 2012 sabato 6 ottobre 12
  • 22. EDIT / CREATE FORM Create Form Etichette Creating a new associated Entity SYMFONYDAY 2012 sabato 6 ottobre 12
  • 23. EDIT / CREATE FORM Form Mapper Model type Collection type Custom visualization Help inline SYMFONYDAY 2012 sabato 6 ottobre 12
  • 24. MAYBE NOT EVERYONE KNOWS THAT... Form fields template Custom field block SYMFONYDAY 2012 sabato 6 ottobre 12
  • 25. OTHER FEATURES •Controller for custom and batch actions •Lifecycle Callbacks •Validation •Advanced Templates customization •Pagination •Sidebar & Menu (via KnpMenuBundle) •Translations (10+ languages, Italian included) •ACL / Security Layer (SonataUserBundle + FOSUserBundle) •CLI Utility (app/console sonata:admin:*) http://sonata-project.org/bundles/admin/2-0/doc/index.html SYMFONYDAY 2012 sabato 6 ottobre 12
  • 26. CONCLUSIONI • Very powerful and flexible • Active community (>260 fork, >50 contrib) •Stable release nearsometimesbut still missing for sf2.0... • Documentation is lacking • Unstable “master” version (for sf2.1) Being a Good OSS Contributor - Jeremy Mikola (http://joind.in/talk/view/7216) SYMFONYDAY 2012 sabato 6 ottobre 12
  • 27. Questions? SYMFONYDAY 2012 sabato 6 ottobre 12
  • 28. Grazie So long, and thanks for all the fish! ;) @ottimo https://github.com/andreadelfino andrea.delfino@gmail.com Thanks to Thomas Rabaix (@th0masr) for support and Lineke Kerckhoffs- Willems (@the_linie) for presentation tips. SYMFONYDAY 2012 sabato 6 ottobre 12

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n
  129. \n
  130. \n
  131. \n
  132. \n
  133. \n