SlideShare a Scribd company logo
Rapidly Prototyping
          Web Applications
          Using BackPress




WordCamp Seattle
April 16,2011
What is
    BackPress?
    http://backpress.org



“   BackPress is a PHP library of core
    functionality for web applications.
    It grew out of the immensely
    popular WordPress project, and is




                                          ”
    also the core of the bbPress and
    GlotPress sister-projects.
Basically (for the purposes of this introduction)...

BackPress is all the goodies in WordPress
 that handle user authentication, sanitize
  & escape data, and format text, etc. —
        without all the overhead.
 •	 Logging,                      •	 Object caching,
 •	 User Roles and Capabilities   •	 Formatting,
   (Permission systems),          •	 XSS and SQL injection
 •	 Database connections            protection, including a
   (across multiple servers and     variety of powerful escaping
   multiple datacenters),           functions,
 •	 HTTP Transactions,            •	 Taxonomies and
 •	 XML-RPC Server and Client,    •	 Options management

                 (Copied directly from the
                front page of backpress.org)
If you’ve developed for WordPress,
you’ve probably used one or more of
      these life-saving features:

  •	 $WPDB class (EZ-SQL plus prepare statements)
  •	 $current_user, is_user_logged_in()… etc.
  •	 HTTP API - wp_remote_request() etc.
  •	 wp_cron() – pseudo-cron functionality
  •	 sanitize_text_field(), esc_html(), wp_kses()…
  •	 wpautop(), make_clickable(), is_email()...



(if not, most likely #urdoingitwrong!)
“But most of these functions aren’t unique
 to WordPress… they were adapted from
 other sources, they’re in other packages”

    •	 True, but... WordPress core has spent years including
       and refining them from a best practices perspective.
    •	 True, but... I’m talking from the persective of someone
       who learned to code writing WP themes and plugins.
      I already know the WP syntax; why learn another framework
      just to get a project off the ground fast?
    •	 True, but... Most projects will end up with a blog or a
       CMS at some point down the road. If you’re going to
       use WordPress in your project anyway, why not start
       your project with a data structure and a syntax that’s
       compatable with WordPress?
And as importantly as any of these
reasons, from a subjective perspective:


  •	 WordPress has its own well-defined coding style
     “The source code is the documentation”: even if
     there’s no documention available on a BackPress class
     or function, its probably coded in a way that’s easy to
     read if you’re used to working with WordPress.
  •	 Answers to WordPress questions are everywhere.
     If you’re hung up on the best way to handle a specific
     problem, chances are you can get answers with a
     simple search.
What is
     rapid prototyping?

•	 Quick proof of concept - demonstrating and validating
   your idea
•	 Being “first to market”, at least with a soft launch
•	 Getting your first 10/100 users
•	 Very early-stage user feedback to guide the development
   of your project
•	 Possibly “disposable” framework, mocking up the
   functionality you may rewrite in your finished product
Concerns of rapid prototyping:

•	 Making it work
•	 Usability
•	 Basic security




                             Don’t have your
                             brand-new idea shot
                             down by this guy!
Concerns of rapid prototyping:

•	 Making it work
•	 Usability
•	 Basic security



           Not your concern (yet):
•	 Making it scale
•	 The business plan
•	 Elegant code / design
So, you decide you want to prototype your web app.


             What are your options?
Library vs Framework
•	 BackPress is technically a library, not a framework.
•	 Nothing happens by default.
•	 You have to include the parts you need in order to
   take advantage of them.
Compare starting a project in these frameworks:

  Django:                             CakePHP:
  startproject <projectname>          cake bake

  Rails:                              symfony:
  rails <projectname>                 generate:project <projectname>


Typically web frameworks have a simple command-line tool to create
the bare minimum of a project. You will still need to include or import
specific modules that you need for functionality in your app, but out
of the box, the framework provides the basic structure for separating
model and view, and displaying an initial page.


In contrast, a library like BackPress is essentially no more than a
collection of core files. It does nothing on its own. You have to decide
which files you need to include, in which order to require them, and
structure your application yourself.
With starting a BackPress project:
Get the current BackPress files; add to a directory in your project root:
svn co http://svn.automattic.com/backpress/trunk/includes  backpress




                               Most of the files were
                               ported over 2009-2010.
                               Mostly synched with WP3.0,
                               not 3.1 yet.
                               (maybe with more community
                               interest, the project will be
                               revitalized?)
With starting a BackPress project:
Get the current BackPress files; add to a directory in your project root:
svn co http://svn.automattic.com/backpress/trunk/includes  backpress

Make sure to include all the files you’ll need in your project. I usually
include something like this in a shared header file:
<?php   require_once dirname( __FILE__ ) . ‘/backpress/functions.core.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-error.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.bpdb.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/functions.formatting.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/functions.kses.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-pass.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.bp-user.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-auth.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-http.php’;
	   	   //	plus	any	other	files	you	need	for	your	specific	app	?>



              If you’re not sure what files you’ll need, might as well err on
              the side of caution to begin with. Take a look at any of the
              public projects written on BackPress for a sense of how to
              structure your init files.
With starting a BackPress project:
Get the current BackPress files; add to a directory in your project root:
svn co http://svn.automattic.com/backpress/trunk/includes  backpress

Make sure to include all the files you’ll need in your project. I usually
include something like this in a shared header file:
<?php   require_once dirname( __FILE__ ) . ‘/backpress/functions.core.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-error.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.bpdb.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/functions.formatting.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/functions.kses.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-pass.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.bp-user.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-auth.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-http.php’;
	   	   //	plus	any	other	files	you	need	for	your	specific	app	?>


Initiate your database connection, check user authentication if
necessary, process the request and include template files, etc.
With starting a BackPress project:
Get the current BackPress files; add to a directory in your project root:
svn co http://svn.automattic.com/backpress/trunk/includes  backpress

Make sure to include all the files you’ll need in your project. I usually
include something like this in a shared header file:
<?php   require_once dirname( __FILE__ ) . ‘/backpress/functions.core.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-error.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.bpdb.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/functions.formatting.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/functions.kses.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-pass.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.bp-user.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-auth.php’;
        require_once dirname( __FILE__ ) . ‘/backpress/class.wp-http.php’;
	   	   //	plus	any	other	files	you	need	for	your	specific	app	?>


Initiate your database connection, check user authentication if
necessary, process the request and include template files, etc.

Finally, let your application logic do whatever its supposed to do.
Limitations of BackPress:
                     (once you get it operational, that is)



•	 Lack of MVC (model/view/controller separation)
•	 Lack of dashboard, admin, analytics, etc.
•	 Code occasionally buggy
•	 No clear structure for how various parts should be integrated
•	 Codebase not being actively maintained
•	 Support/developer lists & forums very quiet

But really, its WordPress without the “word”... how difficult can it be?
Interlude: Some public projects using BackPress



                       (forum structure, now integrated into BuddyPress)

                       (collaborative translation tool)

SupportPress           (support ticketing system)


                    and some others being developed publicly:



GeoPress               (self-hosted geo-tagging/check-in site engine)



 All of these are available on svn and/or github. If you want to start hacking
           BackPress, any of these projects are a good place to start.
Some more resources to get started:




“BackPress, Your New Best Friend”                Wordpress Bible
Beau Lebens                                      Aaron Brazell
http://dentedreality.com.au/2009/12/backpress-   Wiley, 2010
your-new-best-friend/
Thanks, and
             Happy Hacking!


Nathaniel Taintor
http://goldenapplesdesign.com
@GoldenApples
Ad

More Related Content

What's hot (20)

CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareCUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
Alfresco Software
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
Ulrich Krause
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
Alfresco Software
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best Practices
Alfresco Software
 
BP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesBP-7 Share Customization Best Practices
BP-7 Share Customization Best Practices
Alfresco Software
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages Scalability
Tony McGuckin
 
Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)
April Sides
 
Drupal Camp LA 2011: Typography modules for Drupal
Drupal Camp LA 2011: Typography modules for DrupalDrupal Camp LA 2011: Typography modules for Drupal
Drupal Camp LA 2011: Typography modules for Drupal
Ashok Modi
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
Danilo Ercoli
 
WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best Practices
Danilo Ercoli
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
Danilo Ercoli
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
mdawaffe
 
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is NowJMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
Russell Maher
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
Peter Hilton
 
PS error handling and debugging
PS error handling and debuggingPS error handling and debugging
PS error handling and debugging
Concentrated Technology
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
reedmaniac
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2
Anil Sagar
 
Untangling6
Untangling6Untangling6
Untangling6
Derek Jacoby
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
Ulrich Krause
 
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareCUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
Alfresco Software
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
Ulrich Krause
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
Alfresco Software
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best Practices
Alfresco Software
 
BP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesBP-7 Share Customization Best Practices
BP-7 Share Customization Best Practices
Alfresco Software
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages Scalability
Tony McGuckin
 
Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)
April Sides
 
Drupal Camp LA 2011: Typography modules for Drupal
Drupal Camp LA 2011: Typography modules for DrupalDrupal Camp LA 2011: Typography modules for Drupal
Drupal Camp LA 2011: Typography modules for Drupal
Ashok Modi
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
Danilo Ercoli
 
WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best Practices
Danilo Ercoli
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
Danilo Ercoli
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
mdawaffe
 
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is NowJMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
Russell Maher
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
Peter Hilton
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
reedmaniac
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2
Anil Sagar
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
Ulrich Krause
 

Viewers also liked (7)

Open Source CMS
Open Source CMSOpen Source CMS
Open Source CMS
librarywebchic
 
DOCUMENTATION
DOCUMENTATIONDOCUMENTATION
DOCUMENTATION
Nithin Kakkireni
 
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
James Titcumb
 
library management system PHP
 library management system PHP  library management system PHP
library management system PHP
reshmajohney
 
Project on PHP for Complaint management system
Project on PHP for Complaint management systemProject on PHP for Complaint management system
Project on PHP for Complaint management system
AryaBhatt Collage of Eingineering and Technology
 
online library management system
online library management systemonline library management system
online library management system
Virani Sagar
 
ONLINE COMPLAINT MANAGEMENT SYSTEM
ONLINE COMPLAINT MANAGEMENT SYSTEMONLINE COMPLAINT MANAGEMENT SYSTEM
ONLINE COMPLAINT MANAGEMENT SYSTEM
Himanshu Chaurishiya
 
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
James Titcumb
 
library management system PHP
 library management system PHP  library management system PHP
library management system PHP
reshmajohney
 
online library management system
online library management systemonline library management system
online library management system
Virani Sagar
 
ONLINE COMPLAINT MANAGEMENT SYSTEM
ONLINE COMPLAINT MANAGEMENT SYSTEMONLINE COMPLAINT MANAGEMENT SYSTEM
ONLINE COMPLAINT MANAGEMENT SYSTEM
Himanshu Chaurishiya
 
Ad

Similar to Rapidly prototyping web applications using BackPress (20)

Wordpress as a framework
Wordpress as a frameworkWordpress as a framework
Wordpress as a framework
Aggelos Synadakis
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
ANAND PRAKASH
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
Ulrich Krause
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
Ulrich Krause
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
edm00se
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
Thomas Daly
 
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
Evan Mullins
 
Zend Framework MVC driven ExtJS
Zend Framework MVC driven ExtJSZend Framework MVC driven ExtJS
Zend Framework MVC driven ExtJS
Thorsten Suckow-Homberg
 
Bootstrap4XPages webinar
Bootstrap4XPages webinarBootstrap4XPages webinar
Bootstrap4XPages webinar
Mark Leusink
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Teamstudio
 
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys  How to Build a Successful Microsoft DevOps Including the DataDevOps and Decoys  How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
Kellyn Pot'Vin-Gorman
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
Luis Rodríguez Castromil
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
Creating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with ChaperoneCreating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with Chaperone
Gary Wisniewski
 
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
Evan Mullins
 
Os php-wiki1-pdf
Os php-wiki1-pdfOs php-wiki1-pdf
Os php-wiki1-pdf
Vrandesh Bandikatti
 
Managing Phone Dev Projects
Managing Phone Dev ProjectsManaging Phone Dev Projects
Managing Phone Dev Projects
John McKerrell
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
Up2 Technology
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
ShaimaaMohamedGalal
 
Pat Farrell, Migrating Legacy Documentation to XML and DITA
Pat Farrell, Migrating Legacy Documentation to XML and DITAPat Farrell, Migrating Legacy Documentation to XML and DITA
Pat Farrell, Migrating Legacy Documentation to XML and DITA
farrelldoc
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
ANAND PRAKASH
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
Ulrich Krause
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
Ulrich Krause
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
edm00se
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
Thomas Daly
 
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
Evan Mullins
 
Bootstrap4XPages webinar
Bootstrap4XPages webinarBootstrap4XPages webinar
Bootstrap4XPages webinar
Mark Leusink
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Teamstudio
 
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys  How to Build a Successful Microsoft DevOps Including the DataDevOps and Decoys  How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
Kellyn Pot'Vin-Gorman
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
Luis Rodríguez Castromil
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
Creating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with ChaperoneCreating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with Chaperone
Gary Wisniewski
 
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
WordCamp Asheville 2017 - So You Wanna Dev? Join the Team!
Evan Mullins
 
Managing Phone Dev Projects
Managing Phone Dev ProjectsManaging Phone Dev Projects
Managing Phone Dev Projects
John McKerrell
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
Up2 Technology
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
ShaimaaMohamedGalal
 
Pat Farrell, Migrating Legacy Documentation to XML and DITA
Pat Farrell, Migrating Legacy Documentation to XML and DITAPat Farrell, Migrating Legacy Documentation to XML and DITA
Pat Farrell, Migrating Legacy Documentation to XML and DITA
farrelldoc
 
Ad

Recently uploaded (20)

Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 

Rapidly prototyping web applications using BackPress

  • 1. Rapidly Prototyping Web Applications Using BackPress WordCamp Seattle April 16,2011
  • 2. What is BackPress? http://backpress.org “ BackPress is a PHP library of core functionality for web applications. It grew out of the immensely popular WordPress project, and is ” also the core of the bbPress and GlotPress sister-projects.
  • 3. Basically (for the purposes of this introduction)... BackPress is all the goodies in WordPress that handle user authentication, sanitize & escape data, and format text, etc. — without all the overhead. • Logging, • Object caching, • User Roles and Capabilities • Formatting, (Permission systems), • XSS and SQL injection • Database connections protection, including a (across multiple servers and variety of powerful escaping multiple datacenters), functions, • HTTP Transactions, • Taxonomies and • XML-RPC Server and Client, • Options management (Copied directly from the front page of backpress.org)
  • 4. If you’ve developed for WordPress, you’ve probably used one or more of these life-saving features: • $WPDB class (EZ-SQL plus prepare statements) • $current_user, is_user_logged_in()… etc. • HTTP API - wp_remote_request() etc. • wp_cron() – pseudo-cron functionality • sanitize_text_field(), esc_html(), wp_kses()… • wpautop(), make_clickable(), is_email()... (if not, most likely #urdoingitwrong!)
  • 5. “But most of these functions aren’t unique to WordPress… they were adapted from other sources, they’re in other packages” • True, but... WordPress core has spent years including and refining them from a best practices perspective. • True, but... I’m talking from the persective of someone who learned to code writing WP themes and plugins. I already know the WP syntax; why learn another framework just to get a project off the ground fast? • True, but... Most projects will end up with a blog or a CMS at some point down the road. If you’re going to use WordPress in your project anyway, why not start your project with a data structure and a syntax that’s compatable with WordPress?
  • 6. And as importantly as any of these reasons, from a subjective perspective: • WordPress has its own well-defined coding style “The source code is the documentation”: even if there’s no documention available on a BackPress class or function, its probably coded in a way that’s easy to read if you’re used to working with WordPress. • Answers to WordPress questions are everywhere. If you’re hung up on the best way to handle a specific problem, chances are you can get answers with a simple search.
  • 7. What is rapid prototyping? • Quick proof of concept - demonstrating and validating your idea • Being “first to market”, at least with a soft launch • Getting your first 10/100 users • Very early-stage user feedback to guide the development of your project • Possibly “disposable” framework, mocking up the functionality you may rewrite in your finished product
  • 8. Concerns of rapid prototyping: • Making it work • Usability • Basic security Don’t have your brand-new idea shot down by this guy!
  • 9. Concerns of rapid prototyping: • Making it work • Usability • Basic security Not your concern (yet): • Making it scale • The business plan • Elegant code / design
  • 10. So, you decide you want to prototype your web app. What are your options?
  • 11. Library vs Framework • BackPress is technically a library, not a framework. • Nothing happens by default. • You have to include the parts you need in order to take advantage of them.
  • 12. Compare starting a project in these frameworks: Django: CakePHP: startproject <projectname> cake bake Rails: symfony: rails <projectname> generate:project <projectname> Typically web frameworks have a simple command-line tool to create the bare minimum of a project. You will still need to include or import specific modules that you need for functionality in your app, but out of the box, the framework provides the basic structure for separating model and view, and displaying an initial page. In contrast, a library like BackPress is essentially no more than a collection of core files. It does nothing on its own. You have to decide which files you need to include, in which order to require them, and structure your application yourself.
  • 13. With starting a BackPress project: Get the current BackPress files; add to a directory in your project root: svn co http://svn.automattic.com/backpress/trunk/includes backpress Most of the files were ported over 2009-2010. Mostly synched with WP3.0, not 3.1 yet. (maybe with more community interest, the project will be revitalized?)
  • 14. With starting a BackPress project: Get the current BackPress files; add to a directory in your project root: svn co http://svn.automattic.com/backpress/trunk/includes backpress Make sure to include all the files you’ll need in your project. I usually include something like this in a shared header file: <?php require_once dirname( __FILE__ ) . ‘/backpress/functions.core.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-error.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.bpdb.php’; require_once dirname( __FILE__ ) . ‘/backpress/functions.formatting.php’; require_once dirname( __FILE__ ) . ‘/backpress/functions.kses.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-pass.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.bp-user.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-auth.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-http.php’; // plus any other files you need for your specific app ?> If you’re not sure what files you’ll need, might as well err on the side of caution to begin with. Take a look at any of the public projects written on BackPress for a sense of how to structure your init files.
  • 15. With starting a BackPress project: Get the current BackPress files; add to a directory in your project root: svn co http://svn.automattic.com/backpress/trunk/includes backpress Make sure to include all the files you’ll need in your project. I usually include something like this in a shared header file: <?php require_once dirname( __FILE__ ) . ‘/backpress/functions.core.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-error.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.bpdb.php’; require_once dirname( __FILE__ ) . ‘/backpress/functions.formatting.php’; require_once dirname( __FILE__ ) . ‘/backpress/functions.kses.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-pass.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.bp-user.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-auth.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-http.php’; // plus any other files you need for your specific app ?> Initiate your database connection, check user authentication if necessary, process the request and include template files, etc.
  • 16. With starting a BackPress project: Get the current BackPress files; add to a directory in your project root: svn co http://svn.automattic.com/backpress/trunk/includes backpress Make sure to include all the files you’ll need in your project. I usually include something like this in a shared header file: <?php require_once dirname( __FILE__ ) . ‘/backpress/functions.core.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-error.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.bpdb.php’; require_once dirname( __FILE__ ) . ‘/backpress/functions.formatting.php’; require_once dirname( __FILE__ ) . ‘/backpress/functions.kses.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-pass.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.bp-user.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-auth.php’; require_once dirname( __FILE__ ) . ‘/backpress/class.wp-http.php’; // plus any other files you need for your specific app ?> Initiate your database connection, check user authentication if necessary, process the request and include template files, etc. Finally, let your application logic do whatever its supposed to do.
  • 17. Limitations of BackPress: (once you get it operational, that is) • Lack of MVC (model/view/controller separation) • Lack of dashboard, admin, analytics, etc. • Code occasionally buggy • No clear structure for how various parts should be integrated • Codebase not being actively maintained • Support/developer lists & forums very quiet But really, its WordPress without the “word”... how difficult can it be?
  • 18. Interlude: Some public projects using BackPress (forum structure, now integrated into BuddyPress) (collaborative translation tool) SupportPress (support ticketing system) and some others being developed publicly: GeoPress (self-hosted geo-tagging/check-in site engine) All of these are available on svn and/or github. If you want to start hacking BackPress, any of these projects are a good place to start.
  • 19. Some more resources to get started: “BackPress, Your New Best Friend” Wordpress Bible Beau Lebens Aaron Brazell http://dentedreality.com.au/2009/12/backpress- Wiley, 2010 your-new-best-friend/
  • 20. Thanks, and Happy Hacking! Nathaniel Taintor http://goldenapplesdesign.com @GoldenApples