SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Similaire à Building a variable-based CMS for rendering PDF brochures with Apostrophe

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
 

Similaire à Building a variable-based CMS for rendering PDF brochures with Apostrophe (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?
 

Plus 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
 

Plus 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
 

Dernier

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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 RobisonAnna Loughnan Colquhoun
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Dernier (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Building a variable-based CMS for rendering PDF brochures with Apostrophe

  • 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

Notes de l'éditeur

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