SlideShare una empresa de Scribd logo
1 de 22
Extending Apostrophe to build a variable-based CMS for rendering PDF brochures Spike Brehm Front-end Engineer @ SunRun, Inc.
About Me Symfony developer since 2009 @spikebrehm About SunRun The nation’s largest provider of Solar Power Service – think SaaS Complex business model and fragmented markets Able to scale quickly because of software tools
The Problem 25 Partners 13 Markets 24 Utilities Retail vs. direct sale Maintaining Sales Documents Custom document for each combination (25 * 13 * … ) Flat PHP files, edited by hand Symlinks on the filesystem to approximate reuse
The Proposed Solution “Let’s build a CMS so that our Sales team can maintain these documents and Engineering can focus on building more cool tools!”
Introducing: Flapjack CMS for maintaining complex sales documents symfony 1.4 Doctrine 1.x apostrophePlugin 1.4 apostropheBlogPlugin 1.4
Introducing: Flapjack
Why Apostrophe? Experience Built our corporate website on Apostrophe Learned how to extend it at the app level Don’t reinvent the wheel Rich text editor templates Framework for building custom slots (widgets)
The Data Model Documents Pages Blocks Widgets Variables Visibility filters … srDocument … srPage -> aPage … aBlogItem … aSlot … srParsedVariable(not Doctrine) … srVisibilityFilterSchema … srVisibilityFilter … srVisibilityExpressionSchema … srVisibilityExpressionGroup … srVisibilityExpression … srVisibilityConsequent
Pages to Documents Why create srPage instead of extending aPage?
Slots to Pages: original aPage can be both concrete and virtual. Notice circular relationships.
Slots to Pages: Flapjack Instead of associating aBlogItem to aSlot using  the aSlot.value field, we use a join object srBlogItemBlockSlot for many-to-many. Note: simplified visibility filter schema.
Extending Apostrophe Custom Slots
Custom Slots
Custom Slots srStepListSlot:   options: symfony:       form:   false       filter: false   inheritance:     extends: aSlot     type: column_aggregation keyField: type keyValue: 'srStepList' ./symfonyapostrophe:generate-slot-type   --application=frontend --type=srStepList ?  apps/frontend/lib/form/srStepListSlotEditForm.class.php ?  apps/frontend/modules/srStepListSlot/actions/actions.class.php ?  apps/frontend/modules/srStepListSlot/actions/components.class.php ?  apps/frontend/modules/srStepListSlot/templates/_normalView.php ?  apps/frontend/modules/srStepListSlot/templates/_editView.php M  config/doctrine/schema.yml ./symfonydoctrine:build --all-classes ?  lib/model/doctrine/srStepListSlot.class.php ?  lib/model/doctrine/srStepListSlotTable.class.php ?  lib/model/doctrine/base/BasesrStepListSlot.class.php M  lib/model/doctrine/apostrophePlugin/base/BaseaSlot.class.php
_normalView.php
_editView.php
srStepListSlotEditForm.class.php
components.class.php
getArrayValueParsed()???
aSlot.class.php
Variables: edit mode
Variables: preview mode

Más contenido relacionado

Similar a Extending Apostrophe to build a variable-based CMS for rendering PDF brochures

Which Tools Are The Best For Symfony Projects_.pdf
Which Tools Are The Best For Symfony Projects_.pdfWhich Tools Are The Best For Symfony Projects_.pdf
Which Tools Are The Best For Symfony Projects_.pdfMoon Technolabs Pvt. Ltd.
 
Which Tools Are The Best For Symfony Projects_.pdf
Which Tools Are The Best For Symfony Projects_.pdfWhich Tools Are The Best For Symfony Projects_.pdf
Which Tools Are The Best For Symfony Projects_.pdfMoon Technolabs Pvt. Ltd.
 
The distinct advantages of using PHP-Symfony Framework
The distinct advantages of using PHP-Symfony FrameworkThe distinct advantages of using PHP-Symfony Framework
The distinct advantages of using PHP-Symfony FrameworkMindfire LLC
 
Adobe jax2010 1_dashboard
Adobe jax2010 1_dashboardAdobe jax2010 1_dashboard
Adobe jax2010 1_dashboardguest9776673
 
Salesforce pros and cons
Salesforce pros and consSalesforce pros and cons
Salesforce pros and consAmit Chaudhari
 
Force.com (Salesforce.com)
Force.com (Salesforce.com)Force.com (Salesforce.com)
Force.com (Salesforce.com)Vijay Maurya
 
Microsoft Dynamics CRM - XRM Advantage for Solution Builders Whitepaper
Microsoft Dynamics CRM - XRM Advantage for Solution Builders WhitepaperMicrosoft Dynamics CRM - XRM Advantage for Solution Builders Whitepaper
Microsoft Dynamics CRM - XRM Advantage for Solution Builders WhitepaperMicrosoft Private Cloud
 
Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...
Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...
Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...Multimedia Communications Lab
 
Key 101: Social Next: The Evolution of Collaboration To The Leading Social Pl...
Key 101: Social Next: The Evolution of Collaboration To The Leading Social Pl...Key 101: Social Next: The Evolution of Collaboration To The Leading Social Pl...
Key 101: Social Next: The Evolution of Collaboration To The Leading Social Pl...Franck Horowitz
 
Getting the Most out of EPMA: HFM Managing Metadata with EPMA
Getting the Most out of EPMA: HFM Managing Metadata with EPMAGetting the Most out of EPMA: HFM Managing Metadata with EPMA
Getting the Most out of EPMA: HFM Managing Metadata with EPMAfinitsolutions
 
SharePoint Framework SPFx
SharePoint Framework SPFxSharePoint Framework SPFx
SharePoint Framework SPFxVladimir Medina
 
BAM: Open Source Brand Asset Management in the Amazon Cloud
BAM: Open Source Brand Asset Management in the Amazon CloudBAM: Open Source Brand Asset Management in the Amazon Cloud
BAM: Open Source Brand Asset Management in the Amazon CloudMatthew Patulski
 
BP207: Don't Reinvent the Wheel - (Re)use Open Source Software From OpenNTF
BP207: Don't Reinvent the Wheel - (Re)use Open Source Software From OpenNTFBP207: Don't Reinvent the Wheel - (Re)use Open Source Software From OpenNTF
BP207: Don't Reinvent the Wheel - (Re)use Open Source Software From OpenNTFChristian Güdemann
 
Symfony framework-An overview and usability for web development
Symfony framework-An overview and usability for web developmentSymfony framework-An overview and usability for web development
Symfony framework-An overview and usability for web developmentifour_bhavesh
 
Startup Engineering Cookbook
Startup Engineering CookbookStartup Engineering Cookbook
Startup Engineering CookbookManish Jain
 
7 Reasons Why Umbraco CMS is the Best for Small Business
7 Reasons Why Umbraco CMS is the Best for Small Business7 Reasons Why Umbraco CMS is the Best for Small Business
7 Reasons Why Umbraco CMS is the Best for Small BusinessEdwardallen40
 
What’s New in Extended ECM 16 EP2?
What’s New in Extended ECM 16 EP2?What’s New in Extended ECM 16 EP2?
What’s New in Extended ECM 16 EP2?Thomas Demmler
 

Similar a Extending Apostrophe to build a variable-based CMS for rendering PDF brochures (20)

Which Tools Are The Best For Symfony Projects_.pdf
Which Tools Are The Best For Symfony Projects_.pdfWhich Tools Are The Best For Symfony Projects_.pdf
Which Tools Are The Best For Symfony Projects_.pdf
 
Applications Report
Applications ReportApplications Report
Applications Report
 
Which Tools Are The Best For Symfony Projects_.pdf
Which Tools Are The Best For Symfony Projects_.pdfWhich Tools Are The Best For Symfony Projects_.pdf
Which Tools Are The Best For Symfony Projects_.pdf
 
The distinct advantages of using PHP-Symfony Framework
The distinct advantages of using PHP-Symfony FrameworkThe distinct advantages of using PHP-Symfony Framework
The distinct advantages of using PHP-Symfony Framework
 
Adobe jax2010 1_dashboard
Adobe jax2010 1_dashboardAdobe jax2010 1_dashboard
Adobe jax2010 1_dashboard
 
WPEngine Summit 2019
WPEngine Summit 2019WPEngine Summit 2019
WPEngine Summit 2019
 
Salesforce pros and cons
Salesforce pros and consSalesforce pros and cons
Salesforce pros and cons
 
Force.com (Salesforce.com)
Force.com (Salesforce.com)Force.com (Salesforce.com)
Force.com (Salesforce.com)
 
Microsoft Dynamics CRM - XRM Advantage for Solution Builders Whitepaper
Microsoft Dynamics CRM - XRM Advantage for Solution Builders WhitepaperMicrosoft Dynamics CRM - XRM Advantage for Solution Builders Whitepaper
Microsoft Dynamics CRM - XRM Advantage for Solution Builders Whitepaper
 
Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...
Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...
Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...
 
Key 101: Social Next: The Evolution of Collaboration To The Leading Social Pl...
Key 101: Social Next: The Evolution of Collaboration To The Leading Social Pl...Key 101: Social Next: The Evolution of Collaboration To The Leading Social Pl...
Key 101: Social Next: The Evolution of Collaboration To The Leading Social Pl...
 
Getting the Most out of EPMA: HFM Managing Metadata with EPMA
Getting the Most out of EPMA: HFM Managing Metadata with EPMAGetting the Most out of EPMA: HFM Managing Metadata with EPMA
Getting the Most out of EPMA: HFM Managing Metadata with EPMA
 
SharePoint Framework SPFx
SharePoint Framework SPFxSharePoint Framework SPFx
SharePoint Framework SPFx
 
BAM: Open Source Brand Asset Management in the Amazon Cloud
BAM: Open Source Brand Asset Management in the Amazon CloudBAM: Open Source Brand Asset Management in the Amazon Cloud
BAM: Open Source Brand Asset Management in the Amazon Cloud
 
BP207: Don't Reinvent the Wheel - (Re)use Open Source Software From OpenNTF
BP207: Don't Reinvent the Wheel - (Re)use Open Source Software From OpenNTFBP207: Don't Reinvent the Wheel - (Re)use Open Source Software From OpenNTF
BP207: Don't Reinvent the Wheel - (Re)use Open Source Software From OpenNTF
 
Symfony framework-An overview and usability for web development
Symfony framework-An overview and usability for web developmentSymfony framework-An overview and usability for web development
Symfony framework-An overview and usability for web development
 
Startup Engineering Cookbook
Startup Engineering CookbookStartup Engineering Cookbook
Startup Engineering Cookbook
 
7 Reasons Why Umbraco CMS is the Best for Small Business
7 Reasons Why Umbraco CMS is the Best for Small Business7 Reasons Why Umbraco CMS is the Best for Small Business
7 Reasons Why Umbraco CMS is the Best for Small Business
 
Introducing symfony
Introducing symfonyIntroducing symfony
Introducing symfony
 
What’s New in Extended ECM 16 EP2?
What’s New in Extended ECM 16 EP2?What’s New in Extended ECM 16 EP2?
What’s New in Extended ECM 16 EP2?
 

Más de Spike Brehm

Managing Through Chaos (w/ presenter notes)
Managing Through Chaos (w/ presenter notes)Managing Through Chaos (w/ presenter notes)
Managing Through Chaos (w/ presenter notes)Spike Brehm
 
Managing Through Chaos
Managing Through ChaosManaging Through Chaos
Managing Through ChaosSpike Brehm
 
The Evolution of Airbnb's Frontend
The Evolution of Airbnb's FrontendThe Evolution of Airbnb's Frontend
The Evolution of Airbnb's FrontendSpike Brehm
 
Integrating Browserify with Sprockets
Integrating Browserify with SprocketsIntegrating Browserify with Sprockets
Integrating Browserify with SprocketsSpike Brehm
 
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Spike Brehm
 
JSConf US 2014: Building Isomorphic Apps
JSConf US 2014: Building Isomorphic AppsJSConf US 2014: Building Isomorphic Apps
JSConf US 2014: Building Isomorphic AppsSpike Brehm
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsIn Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsSpike Brehm
 
General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptSpike Brehm
 
Isomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassIsomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassSpike Brehm
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverSpike Brehm
 
Building a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondBuilding a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondSpike Brehm
 

Más de Spike Brehm (11)

Managing Through Chaos (w/ presenter notes)
Managing Through Chaos (w/ presenter notes)Managing Through Chaos (w/ presenter notes)
Managing Through Chaos (w/ presenter notes)
 
Managing Through Chaos
Managing Through ChaosManaging Through Chaos
Managing Through Chaos
 
The Evolution of Airbnb's Frontend
The Evolution of Airbnb's FrontendThe Evolution of Airbnb's Frontend
The Evolution of Airbnb's Frontend
 
Integrating Browserify with Sprockets
Integrating Browserify with SprocketsIntegrating Browserify with Sprockets
Integrating Browserify with Sprockets
 
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)
 
JSConf US 2014: Building Isomorphic Apps
JSConf US 2014: Building Isomorphic AppsJSConf US 2014: Building Isomorphic Apps
JSConf US 2014: Building Isomorphic Apps
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsIn Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
 
General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScript
 
Isomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassIsomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master Class
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
 
Building a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondBuilding a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and Beyond
 

Último

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 WorkerThousandEyes
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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...DianaGray10
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
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, Adobeapidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 

Último (20)

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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

Extending Apostrophe to build a variable-based CMS for rendering PDF brochures

  • 1. Extending Apostrophe to build a variable-based CMS for rendering PDF brochures Spike Brehm Front-end Engineer @ SunRun, Inc.
  • 2. About Me Symfony developer since 2009 @spikebrehm About SunRun The nation’s largest provider of Solar Power Service – think SaaS Complex business model and fragmented markets Able to scale quickly because of software tools
  • 3. The Problem 25 Partners 13 Markets 24 Utilities Retail vs. direct sale Maintaining Sales Documents Custom document for each combination (25 * 13 * … ) Flat PHP files, edited by hand Symlinks on the filesystem to approximate reuse
  • 4. The Proposed Solution “Let’s build a CMS so that our Sales team can maintain these documents and Engineering can focus on building more cool tools!”
  • 5. Introducing: Flapjack CMS for maintaining complex sales documents symfony 1.4 Doctrine 1.x apostrophePlugin 1.4 apostropheBlogPlugin 1.4
  • 7. Why Apostrophe? Experience Built our corporate website on Apostrophe Learned how to extend it at the app level Don’t reinvent the wheel Rich text editor templates Framework for building custom slots (widgets)
  • 8. The Data Model Documents Pages Blocks Widgets Variables Visibility filters … srDocument … srPage -> aPage … aBlogItem … aSlot … srParsedVariable(not Doctrine) … srVisibilityFilterSchema … srVisibilityFilter … srVisibilityExpressionSchema … srVisibilityExpressionGroup … srVisibilityExpression … srVisibilityConsequent
  • 9. Pages to Documents Why create srPage instead of extending aPage?
  • 10. Slots to Pages: original aPage can be both concrete and virtual. Notice circular relationships.
  • 11. Slots to Pages: Flapjack Instead of associating aBlogItem to aSlot using the aSlot.value field, we use a join object srBlogItemBlockSlot for many-to-many. Note: simplified visibility filter schema.
  • 14. Custom Slots srStepListSlot: options: symfony: form: false filter: false inheritance: extends: aSlot type: column_aggregation keyField: type keyValue: 'srStepList' ./symfonyapostrophe:generate-slot-type --application=frontend --type=srStepList ? apps/frontend/lib/form/srStepListSlotEditForm.class.php ? apps/frontend/modules/srStepListSlot/actions/actions.class.php ? apps/frontend/modules/srStepListSlot/actions/components.class.php ? apps/frontend/modules/srStepListSlot/templates/_normalView.php ? apps/frontend/modules/srStepListSlot/templates/_editView.php M config/doctrine/schema.yml ./symfonydoctrine:build --all-classes ? lib/model/doctrine/srStepListSlot.class.php ? lib/model/doctrine/srStepListSlotTable.class.php ? lib/model/doctrine/base/BasesrStepListSlot.class.php M lib/model/doctrine/apostrophePlugin/base/BaseaSlot.class.php

Notas del editor

  1. How many of you have used Apostrophe? How does this look different from a typical Apostrophe site?