SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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 ShareAlfresco Software
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCUlrich 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 ShareAlfresco Software
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesAlfresco Software
 
BP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesBP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesAlfresco Software
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityTony 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 DrupalAshok Modi
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressDanilo Ercoli
 
WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesDanilo 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 codeDanilo Ercoli
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIsmdawaffe
 
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 NowRussell Maher
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learnedPeter 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 Dutyreedmaniac
 
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.2Anil Sagar
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntfUlrich Krause
 

Tendances (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
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
 
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
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best Practices
 
BP-7 Share Customization Best Practices
BP-7 Share Customization Best PracticesBP-7 Share Customization Best Practices
BP-7 Share Customization Best Practices
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages Scalability
 
Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)Introduction to Module Development (Drupal 7)
Introduction to Module Development (Drupal 7)
 
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
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 
WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best Practices
 
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
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
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
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
 
PS error handling and debugging
PS error handling and debuggingPS error handling and debugging
PS error handling and debugging
 
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
 
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
 
Untangling6
Untangling6Untangling6
Untangling6
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
 

En vedette

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 systemVirani Sagar
 
ONLINE COMPLAINT MANAGEMENT SYSTEM
ONLINE COMPLAINT MANAGEMENT SYSTEMONLINE COMPLAINT MANAGEMENT SYSTEM
ONLINE COMPLAINT MANAGEMENT SYSTEMHimanshu Chaurishiya
 

En vedette (7)

Open Source CMS
Open Source CMSOpen Source CMS
Open Source CMS
 
DOCUMENTATION
DOCUMENTATIONDOCUMENTATION
DOCUMENTATION
 
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...
 
library management system PHP
 library management system PHP  library management system PHP
library management system PHP
 
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
 
online library management system
online library management systemonline library management system
online library management system
 
ONLINE COMPLAINT MANAGEMENT SYSTEM
ONLINE COMPLAINT MANAGEMENT SYSTEMONLINE COMPLAINT MANAGEMENT SYSTEM
ONLINE COMPLAINT MANAGEMENT SYSTEM
 

Similaire à Rapidly prototyping web applications using BackPress

CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMANAND PRAKASH
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPagesUlrich Krause
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the BasicsUlrich 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 PageSpeededm00se
 
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 SPFxThomas 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 webinarMark 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 UsabilityTeamstudio
 
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 DataKellyn Pot'Vin-Gorman
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuis 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 DevelopmentEvan 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 ChaperoneGary 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 ProjectsJohn McKerrell
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With LoveUp2 Technology
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfShaimaaMohamedGalal
 
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 DITAfarrelldoc
 

Similaire à Rapidly prototyping web applications using BackPress (20)

Wordpress as a framework
Wordpress as a frameworkWordpress as a framework
Wordpress as a framework
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
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
 
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
 
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
 
Zend Framework MVC driven ExtJS
Zend Framework MVC driven ExtJSZend Framework MVC driven ExtJS
Zend Framework MVC driven ExtJS
 
Bootstrap4XPages webinar
Bootstrap4XPages webinarBootstrap4XPages webinar
Bootstrap4XPages webinar
 
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
 
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
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
 
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
 
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
 
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!
 
Os php-wiki1-pdf
Os php-wiki1-pdfOs php-wiki1-pdf
Os php-wiki1-pdf
 
Managing Phone Dev Projects
Managing Phone Dev ProjectsManaging Phone Dev Projects
Managing Phone Dev Projects
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
 
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
 

Dernier

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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.pdfsudhanshuwaghmare1
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

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