SlideShare a Scribd company logo
1 of 29
Henry Van Styn
<vanstyn@cpan.org>
The Perl Conference 2017
June 20, Washington, DC
www.rapidapp.info
rapi.io/blog
irc.perl.org - #rapidapp
Rapi::Blogmaximalist control, minimalist effort
@vanstyn
slides: rapi.io/tpc2017
About me
• Henry Van Styn (@vanstyn)
• Owner of IntelliTree Solutions, perl shop and consultancy
• Author/maintainer of RapidApp
• Catalyst and DBIx::Class contributor
• Given talks/demos of RapidApp for the past several years at The Perl
Conference
• This year I wanted to give a RapidApp demo of a
bigger, real-world app that’s real-world useful
• Married this with solving another of my long-time
unmet needs:
A real, modern perl blog platform…
Why another blog platform?
• Many reasons, a better mousetrap…
• RapidApp is already very well-suited to the problem domain
Biggest reason:
Fresh take on front-end APIs
(i.e. “themes”)
The problem with “themes”
• The word itself implies restrictiveness
‣ changing the appearance of something that is already defined
• Inventing concepts of “pages” and “sections” and “blocks” and layouts and on
and on and on that you have to adhere to
• URL end-points are predetermined, rendered HTML assembled in domain-
specific manner
• Have to learn platform-specific APIs to even get to “Hello world”
• Integrating and adapting custom HTML can be difficult and frustrating,
especially when working with designers
Rapi::Blog’s approach:
• Term chosen to give more emphasis than “theme”
• Is an ordinary, native HTML website/structure first and handles its own
business as much as possible
• Lives at the root of the site like the HTML wants
‣ This is the main blocker elsewhere
• Supports “opportunistic” templates
‣ But can still be static HTML, and just work
• The backend exposes APIs the scaffold can use, however it wants
“scaffolds”
Backend / Model
Template API
Basic Architecture:
‣ Public website structure
‣ Native HTML, CSS,
JavaScript, Images, etc
‣ HTML can include
template directives ‣ Database of ‘Posts’
‣ Taxonomies
‣ Relationships
‣ Business Logic
‣ Permissions
‣ Expose Blog-specific
template directives/methods
Scaffold
directory
Advanced
CRUD
Interfaces
RapidApp
Lets see it in action
• Start with a running site, go through the public-facing functionality -
browsing posts, pages, search, etc
• Go through the password-protected features - creating/editing posts,
comments, the new markdown editor, basic administration
• Browse the scaffold config and the templates and how they work
• Show how to create new sites with the rabl.pl create script
- demo -
How it works
• Rapi::Blog is a subclass of RapidApp::Builder
• Plack/PSGI app with very simple options:
my $app = Rapi::Blog->new({
site_path => $dir,
scaffold_path => "$dir/scaffold"
});
# Plack/PSGI app:
$app->to_app
Options
• site_path
• directory where the site lives - used for data persistence
• database files are created automatically for fresh sites
• scaffold_path
• the “document root” for the site
• serves literal/real paths from “/”
• defaults to ‘scaffold/’ inside the site_path directory
Scaffold
• Ordinary directory served at the root of the site
✴ img/foo.png served as /img/foo.png, home.html served as /home.html, and so on
• Merge/overlay with the Catalyst/RapidApp controller/module namespaces
automagically
• With no configuration it is a simple static website/folder
• Any of the files can function as templates (TT) and call directives and
accessors provided by the API
• scaffold.yml config file tells the backend how to use it
✴ such as which template to use to display posts
The scaffold tells the backend what
to do, not the other way around.
scaffold.yml
static_paths : [ css/, js/, fonts/, img/ ]
private_paths : [ private/, scaffold.yml ]
default_ext : html
landing_page : recent_posts
not_found : private/404.html
view_wrappers:
- { path: post/, type: include, wrapper: private/post.html }
scaffold.yml
static_paths : [ css/, js/, fonts/, img/ ]
private_paths : [ private/, scaffold.yml ]
default_ext : html
landing_page : recent_posts
not_found : private/404.html
view_wrappers:
- { path: post/, type: include, wrapper: private/post.html }
* which paths are static-only (no template directives) - mainly for performance
scaffold.yml
static_paths : [ css/, js/, fonts/, img/ ]
private_paths : [ private/, scaffold.yml ]
default_ext : html
landing_page : recent_posts
not_found : private/404.html
view_wrappers:
- { path: post/, type: include, wrapper: private/post.html }
* paths which should not be served publicly (but can still be included from other templates)
scaffold.yml
static_paths : [ css/, js/, fonts/, img/ ]
private_paths : [ private/, scaffold.yml ]
default_ext : html
landing_page : recent_posts
not_found : private/404.html
view_wrappers:
- { path: post/, type: include, wrapper: private/post.html }
* default file extension (lets ‘/foo’ work the same as ‘/foo.html’)
scaffold.yml
static_paths : [ css/, js/, fonts/, img/ ]
private_paths : [ private/, scaffold.yml ]
default_ext : html
landing_page : recent_posts
not_found : private/404.html
view_wrappers:
- { path: post/, type: include, wrapper: private/post.html }
* page to serve for root (‘/’) request
scaffold.yml
static_paths : [ css/, js/, fonts/, img/ ]
private_paths : [ private/, scaffold.yml ]
default_ext : html
landing_page : recent_posts
not_found : private/404.html
view_wrappers:
- { path: post/, type: include, wrapper: private/post.html }
* page to serve for HTTP/404 Not Found
scaffold.yml
static_paths : [ css/, js/, fonts/, img/ ]
private_paths : [ private/, scaffold.yml ]
default_ext : html
landing_page : recent_posts
not_found : private/404.html
view_wrappers:
- { path: post/, type: include, wrapper: private/post.html }
* special URL dispatch template wrappers to expose “Posts” …
scaffold.yml
view_wrappers:
- {
path: post/,
type: include,
wrapper: private/post.html
}
scaffold.yml
view_wrappers:
- {
path: post/,
type: include,
wrapper: private/post.html
}
Use this template (as a wrapper)
scaffold.yml
view_wrappers:
- {
path: post/,
type: include,
wrapper: private/post.html
}
Use this template (as a wrapper)
for requests starting with this
scaffold.yml
view_wrappers:
- {
path: post/,
type: include,
wrapper: private/post.html
}
Use this template (as a wrapper)
for requests starting with this
e.g. this is how /post/some-name.md renders ‘some-name.md’ from the database
Showing the demo code
• Browse the site dir
• Browse the scaffold files
• Show the scaffold.yml
• Show the app.psgi
Creating a new site is easy
rabl.pl create path/to/my-cool-blog
Easy setup with Docker
docker pull rapi/psgi
mkdir my-cool-blog
docker create -it 
--name=my-cool-blog --hostname=my-cool-blog 
-p 5001:5000 
-v $(pwd)/my-cool-blog:/opt/app 
rapi/psgi
docker start my-cool-blog
docker exec -it my-cool-blog bash
# run in the shell of the Docker container:
rabl.pl create /opt/app
app-restart && exit
Planned TBD Features
• Support multiple content formats
‣ Internals already support multiple formats and post-processors
• Expand Post database model + expose easier access to customize
• Add more prefabbed scaffolds with fancier features
• Better user auth features
‣ login via 3rd-party, self-signup w/ captcha, password reset, etc
• RSS feeds
Henry Van Styn
<vanstyn@cpan.org>
The Perl Conference 2017
June 20, Washington, DC
Questions?
@vanstyn
www.rapidapp.info
rapi.io/blog
irc.perl.org - #rapidapp
slides: rapi.io/tpc2017

More Related Content

What's hot

Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint BeastMark Rackley
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigmsIvano Malavolta
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsIvano Malavolta
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with RailsBasayel Said
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownMark Rackley
 
SharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuerySharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQueryMark Rackley
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 Fabio Franzini
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...SPTechCon
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Doris Chen
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedGil Fink
 
Bringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePointBringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePointChad Schroeder
 
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesJer Clarke
 
Vibe Custom Development
Vibe Custom DevelopmentVibe Custom Development
Vibe Custom DevelopmentGWAVA
 
Java EE revisits design patterns
Java EE revisits design patterns Java EE revisits design patterns
Java EE revisits design patterns Alex Theedom
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 Mark Rackley
 
Next Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooNext Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooStefan Schmidt
 

What's hot (20)

Web Components v1
Web Components v1Web Components v1
Web Components v1
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigms
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with Rails
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
 
SharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuerySharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuery
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
Building a spa_in_30min
Building a spa_in_30minBuilding a spa_in_30min
Building a spa_in_30min
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
 
Twig
TwigTwig
Twig
 
Bringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePointBringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePoint
 
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
 
Vibe Custom Development
Vibe Custom DevelopmentVibe Custom Development
Vibe Custom Development
 
Java EE revisits design patterns
Java EE revisits design patterns Java EE revisits design patterns
Java EE revisits design patterns
 
Show Some Spine!
Show Some Spine!Show Some Spine!
Show Some Spine!
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013
 
Next Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooNext Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring Roo
 

Similar to Rapi::Blog talk - TPC 2017

Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Angela Byron
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Acquia
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Mike Schinkel
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to TornadoGavin Roy
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPressTaylor Lovett
 
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API framework
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API frameworkSFScon 2020 - Nikola Milisavljevic - BASE - Python REST API framework
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API frameworkSouth Tyrol Free Software Conference
 
Pluggable patterns
Pluggable patternsPluggable patterns
Pluggable patternsCorey Oordt
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Curtiss Grymala
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management SystemsMatthew Turland
 
2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar SlidesDuraSpace
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracketjnewmanux
 
A Practical Guide To Hypermedia APIs - Philly.rb
A Practical Guide To Hypermedia APIs - Philly.rbA Practical Guide To Hypermedia APIs - Philly.rb
A Practical Guide To Hypermedia APIs - Philly.rbSmartLogic
 
RoR 101: Session 2
RoR 101: Session 2RoR 101: Session 2
RoR 101: Session 2Rory Gianni
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017Amanda Giles
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 

Similar to Rapi::Blog talk - TPC 2017 (20)

Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)
 
WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API framework
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API frameworkSFScon 2020 - Nikola Milisavljevic - BASE - Python REST API framework
SFScon 2020 - Nikola Milisavljevic - BASE - Python REST API framework
 
Pluggable patterns
Pluggable patternsPluggable patterns
Pluggable patterns
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
 
Lightweight web frameworks
Lightweight web frameworksLightweight web frameworks
Lightweight web frameworks
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management Systems
 
2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
 
A Practical Guide To Hypermedia APIs - Philly.rb
A Practical Guide To Hypermedia APIs - Philly.rbA Practical Guide To Hypermedia APIs - Philly.rb
A Practical Guide To Hypermedia APIs - Philly.rb
 
RoR 101: Session 2
RoR 101: Session 2RoR 101: Session 2
RoR 101: Session 2
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 

Recently uploaded

A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationHelp Desk Migration
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionWave PLM
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersEmilyJiang23
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignNeo4j
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfVictor Lopez
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAlluxio, Inc.
 
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purityAPVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purityamy56318795
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationHelp Desk Migration
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Soroosh Khodami
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfDeskTrack
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesNeo4j
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Gáspár Nagy
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfMehmet Akar
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfFurqanuddin10
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareinfo611746
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabbereGrabber
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 

Recently uploaded (20)

A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java Developers
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purityAPVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 

Rapi::Blog talk - TPC 2017

  • 1. Henry Van Styn <vanstyn@cpan.org> The Perl Conference 2017 June 20, Washington, DC www.rapidapp.info rapi.io/blog irc.perl.org - #rapidapp Rapi::Blogmaximalist control, minimalist effort @vanstyn slides: rapi.io/tpc2017
  • 2.
  • 3. About me • Henry Van Styn (@vanstyn) • Owner of IntelliTree Solutions, perl shop and consultancy • Author/maintainer of RapidApp • Catalyst and DBIx::Class contributor • Given talks/demos of RapidApp for the past several years at The Perl Conference
  • 4. • This year I wanted to give a RapidApp demo of a bigger, real-world app that’s real-world useful • Married this with solving another of my long-time unmet needs: A real, modern perl blog platform…
  • 5. Why another blog platform? • Many reasons, a better mousetrap… • RapidApp is already very well-suited to the problem domain Biggest reason: Fresh take on front-end APIs (i.e. “themes”)
  • 6. The problem with “themes” • The word itself implies restrictiveness ‣ changing the appearance of something that is already defined • Inventing concepts of “pages” and “sections” and “blocks” and layouts and on and on and on that you have to adhere to • URL end-points are predetermined, rendered HTML assembled in domain- specific manner • Have to learn platform-specific APIs to even get to “Hello world” • Integrating and adapting custom HTML can be difficult and frustrating, especially when working with designers
  • 7. Rapi::Blog’s approach: • Term chosen to give more emphasis than “theme” • Is an ordinary, native HTML website/structure first and handles its own business as much as possible • Lives at the root of the site like the HTML wants ‣ This is the main blocker elsewhere • Supports “opportunistic” templates ‣ But can still be static HTML, and just work • The backend exposes APIs the scaffold can use, however it wants “scaffolds”
  • 8. Backend / Model Template API Basic Architecture: ‣ Public website structure ‣ Native HTML, CSS, JavaScript, Images, etc ‣ HTML can include template directives ‣ Database of ‘Posts’ ‣ Taxonomies ‣ Relationships ‣ Business Logic ‣ Permissions ‣ Expose Blog-specific template directives/methods Scaffold directory Advanced CRUD Interfaces RapidApp
  • 9. Lets see it in action • Start with a running site, go through the public-facing functionality - browsing posts, pages, search, etc • Go through the password-protected features - creating/editing posts, comments, the new markdown editor, basic administration • Browse the scaffold config and the templates and how they work • Show how to create new sites with the rabl.pl create script - demo -
  • 10. How it works • Rapi::Blog is a subclass of RapidApp::Builder • Plack/PSGI app with very simple options: my $app = Rapi::Blog->new({ site_path => $dir, scaffold_path => "$dir/scaffold" }); # Plack/PSGI app: $app->to_app
  • 11. Options • site_path • directory where the site lives - used for data persistence • database files are created automatically for fresh sites • scaffold_path • the “document root” for the site • serves literal/real paths from “/” • defaults to ‘scaffold/’ inside the site_path directory
  • 12. Scaffold • Ordinary directory served at the root of the site ✴ img/foo.png served as /img/foo.png, home.html served as /home.html, and so on • Merge/overlay with the Catalyst/RapidApp controller/module namespaces automagically • With no configuration it is a simple static website/folder • Any of the files can function as templates (TT) and call directives and accessors provided by the API • scaffold.yml config file tells the backend how to use it ✴ such as which template to use to display posts
  • 13. The scaffold tells the backend what to do, not the other way around.
  • 14. scaffold.yml static_paths : [ css/, js/, fonts/, img/ ] private_paths : [ private/, scaffold.yml ] default_ext : html landing_page : recent_posts not_found : private/404.html view_wrappers: - { path: post/, type: include, wrapper: private/post.html }
  • 15. scaffold.yml static_paths : [ css/, js/, fonts/, img/ ] private_paths : [ private/, scaffold.yml ] default_ext : html landing_page : recent_posts not_found : private/404.html view_wrappers: - { path: post/, type: include, wrapper: private/post.html } * which paths are static-only (no template directives) - mainly for performance
  • 16. scaffold.yml static_paths : [ css/, js/, fonts/, img/ ] private_paths : [ private/, scaffold.yml ] default_ext : html landing_page : recent_posts not_found : private/404.html view_wrappers: - { path: post/, type: include, wrapper: private/post.html } * paths which should not be served publicly (but can still be included from other templates)
  • 17. scaffold.yml static_paths : [ css/, js/, fonts/, img/ ] private_paths : [ private/, scaffold.yml ] default_ext : html landing_page : recent_posts not_found : private/404.html view_wrappers: - { path: post/, type: include, wrapper: private/post.html } * default file extension (lets ‘/foo’ work the same as ‘/foo.html’)
  • 18. scaffold.yml static_paths : [ css/, js/, fonts/, img/ ] private_paths : [ private/, scaffold.yml ] default_ext : html landing_page : recent_posts not_found : private/404.html view_wrappers: - { path: post/, type: include, wrapper: private/post.html } * page to serve for root (‘/’) request
  • 19. scaffold.yml static_paths : [ css/, js/, fonts/, img/ ] private_paths : [ private/, scaffold.yml ] default_ext : html landing_page : recent_posts not_found : private/404.html view_wrappers: - { path: post/, type: include, wrapper: private/post.html } * page to serve for HTTP/404 Not Found
  • 20. scaffold.yml static_paths : [ css/, js/, fonts/, img/ ] private_paths : [ private/, scaffold.yml ] default_ext : html landing_page : recent_posts not_found : private/404.html view_wrappers: - { path: post/, type: include, wrapper: private/post.html } * special URL dispatch template wrappers to expose “Posts” …
  • 21. scaffold.yml view_wrappers: - { path: post/, type: include, wrapper: private/post.html }
  • 22. scaffold.yml view_wrappers: - { path: post/, type: include, wrapper: private/post.html } Use this template (as a wrapper)
  • 23. scaffold.yml view_wrappers: - { path: post/, type: include, wrapper: private/post.html } Use this template (as a wrapper) for requests starting with this
  • 24. scaffold.yml view_wrappers: - { path: post/, type: include, wrapper: private/post.html } Use this template (as a wrapper) for requests starting with this e.g. this is how /post/some-name.md renders ‘some-name.md’ from the database
  • 25. Showing the demo code • Browse the site dir • Browse the scaffold files • Show the scaffold.yml • Show the app.psgi
  • 26. Creating a new site is easy rabl.pl create path/to/my-cool-blog
  • 27. Easy setup with Docker docker pull rapi/psgi mkdir my-cool-blog docker create -it --name=my-cool-blog --hostname=my-cool-blog -p 5001:5000 -v $(pwd)/my-cool-blog:/opt/app rapi/psgi docker start my-cool-blog docker exec -it my-cool-blog bash # run in the shell of the Docker container: rabl.pl create /opt/app app-restart && exit
  • 28. Planned TBD Features • Support multiple content formats ‣ Internals already support multiple formats and post-processors • Expand Post database model + expose easier access to customize • Add more prefabbed scaffolds with fancier features • Better user auth features ‣ login via 3rd-party, self-signup w/ captcha, password reset, etc • RSS feeds
  • 29. Henry Van Styn <vanstyn@cpan.org> The Perl Conference 2017 June 20, Washington, DC Questions? @vanstyn www.rapidapp.info rapi.io/blog irc.perl.org - #rapidapp slides: rapi.io/tpc2017

Editor's Notes

  1. Going to talk about the open-source, RapidApp web framework Which has been an in-house platform that we’ve been developing internally for 5 years. Just started open-sourcing within the past year. which is an extension to Catalyst that focuses on building database-driven apps faster than ever.
  2. Going to talk about the open-source, RapidApp web framework Which has been an in-house platform that we’ve been developing internally for 5 years. Just started open-sourcing within the past year. which is an extension to Catalyst that focuses on building database-driven apps faster than ever.