SlideShare uma empresa 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

Mais conteúdo relacionado

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

Salesforce pros and cons
Salesforce pros and consSalesforce pros and cons
Salesforce pros and cons
Amit Chaudhari
 
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
Microsoft Private Cloud
 
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
finitsolutions
 
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
Christian Güdemann
 

Semelhante 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?
 

Mais de Spike Brehm

Integrating Browserify with Sprockets
Integrating Browserify with SprocketsIntegrating Browserify with Sprockets
Integrating Browserify with Sprockets
Spike 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 Apps
Spike Brehm
 
General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScript
Spike Brehm
 
Isomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassIsomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master Class
Spike 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 server
Spike 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 Beyond
Spike Brehm
 

Mais 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

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
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
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...
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
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...
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

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 do Editor

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