+ All Categories
Home > Technology > The Original Hypertext Preprocessor

The Original Hypertext Preprocessor

Date post: 11-Jun-2015
Category:
Upload: drew-mclellan
View: 2,504 times
Download: 0 times
Share this document with a friend
Description:
With all the technical considerations of designing and shipping PHP-based software, it's easy to forget how every line of code you write can have a direct impact on your customers. Almost any code has the potential to shape the user experience and result in repeat custom or an over-subscribed helpdesk. Allow Drew McLellan to take you through the lessons learned when building Perch - a PHP content management system that banks heavily on providing a great user experience. Hear what has worked, what failed miserably, and how a goal of eliminating all support requests has driven the technical design of the product.
Popular Tags:
87
PHP Community Conference 22nd April 2011 Drew McLellan edgeofmyseat.com grabaperch.com -THE ORIGINAL- HYPERTEXT PREPROCESSOR
Transcript
Page 1: The Original Hypertext Preprocessor

PHP Community Conference 22nd April 2011

Drew McLellanedgeofmyseat.comgrabaperch.com

-THE ORIGINAL-

HYPERTEXTPREPROCESSOR

Page 2: The Original Hypertext Preprocessor

EVERY LINE OF CODE -CAN HAVE A-

DIRECT IMPACT ON USERS

Page 3: The Original Hypertext Preprocessor

DESIGNINGSOFTWARE

- FOR -

HUMANS

Page 4: The Original Hypertext Preprocessor

FUNCTIONALITY -IS NOT -

ENOUGH

Page 5: The Original Hypertext Preprocessor

REWIND

Page 6: The Original Hypertext Preprocessor

DUDE! LIKE WHAT ABOUT

DRUPAL?

Page 7: The Original Hypertext Preprocessor

“With Wordpress (don’t even get me started on Drupal), the learning curve was very high, requiring my clients to learn about posts versus pages versus custom post types.”

Page 8: The Original Hypertext Preprocessor

D O Z E N S O F

OPTIONSM I L L I O N S O F

U S E R S

Page 9: The Original Hypertext Preprocessor

THERE'S ROOM - IF YOU CAN BE -

DIFFERENT

Page 10: The Original Hypertext Preprocessor

L I G H T W E I G H T

PHP CMS FOR SMALL WEBSITES

Page 11: The Original Hypertext Preprocessor

LISTEN UP!

CLASSIN SESSION

Page 12: The Original Hypertext Preprocessor

- THE MOST -

DIFFICULT PROBLEMS

- ARE THE -

WET ONES

Page 13: The Original Hypertext Preprocessor

Support will kick your ass.Jason Fried, 37signalshttp://www.extractable.com/blog/?p=58

Page 14: The Original Hypertext Preprocessor

Helpspot really saved our ass when it came to support.Todd Dominey, SlideShowPro http://5by5.tv/bigwebshow/24

Page 15: The Original Hypertext Preprocessor

SUPPORTINVOLVES

- A LOT OF -

ASSES

Page 16: The Original Hypertext Preprocessor

MANY

CUSTOMERS ARE

INEXPERIENCED

Page 17: The Original Hypertext Preprocessor

THEY NEED

A LOT OFSUPPORT

Page 18: The Original Hypertext Preprocessor

EACH LICENSE SOLD

30 MINUTESO F S U P P O R T T I M E

Page 19: The Original Hypertext Preprocessor

- FIND WAYS TO -

REDUCESUPPORTREQUESTS

Page 20: The Original Hypertext Preprocessor

EVERY REQUEST SHOULD BE

UNIQUE

Page 21: The Original Hypertext Preprocessor

SUPPORT

YOUROWN SOFTWARE

Page 22: The Original Hypertext Preprocessor

- WHEN -

WILL THIS

FAIL?

Page 23: The Original Hypertext Preprocessor
Page 24: The Original Hypertext Preprocessor
Page 25: The Original Hypertext Preprocessor
Page 26: The Original Hypertext Preprocessor
Page 27: The Original Hypertext Preprocessor

ALL CODE BREAKS.

GREAT CODE B R E A K S W E L L

Page 28: The Original Hypertext Preprocessor

NOT ALL

ATTEMPTS ARE SUCCESSFUL

Page 29: The Original Hypertext Preprocessor
Page 30: The Original Hypertext Preprocessor

SPEEDOF RESPONSE IS THE MOST

IMPORTANT T H I N G

Page 31: The Original Hypertext Preprocessor

TECHNICALPROBLEMS

- ARE -

DIFFICULTTOO

Page 32: The Original Hypertext Preprocessor

PHP5AS STANDARD

Page 33: The Original Hypertext Preprocessor

WE WOULD

LOVE- TO MOVE TO -

PHP5.3

Page 34: The Original Hypertext Preprocessor

THE FAILEDPROMISE OF

SQLITE

Page 35: The Original Hypertext Preprocessor

SCHEMALESSSTRUCTURED DATA

Page 36: The Original Hypertext Preprocessor

!<perch:content !!!type=”text”!!!id=”heading”!!!label=”Main heading”!!!required=”true” />

Page 37: The Original Hypertext Preprocessor

<h2><perch:content id="heading" type="text" label="Heading" required="true" title="true" /></h2>

<p class="date"><perch:content id="date" type="date" label="Date" format="%d %B %Y" /></p>

<perch:content id="body" type="textarea" label="Body" textile="true" editor="markitup" required="true" />

Page 38: The Original Hypertext Preprocessor

TABLE OF

KEY-VALUE PAIRS- OR -

BIG BLOB OF

JSON

Page 39: The Original Hypertext Preprocessor

TABLE OF

KEY-VALUE PAIRS

Page 40: The Original Hypertext Preprocessor

SCALES UP

WELLCAN BE

FILTERED WITH

SQL

Page 41: The Original Hypertext Preprocessor

- REQUIRES -HOUSEKEEPING

INEFFICIENTFOR SMALL VALUES

Page 42: The Original Hypertext Preprocessor

BIG BLOB OF

JSON

Page 43: The Original Hypertext Preprocessor

STOREANY SHAPE DATA

IN ONE ROW

EXTREMELY

SIMPLE

Page 44: The Original Hypertext Preprocessor

CONTENT HAS TO BEFILTERED IN PHP

NATIVE JSON LIBRARIES

ARE NOT YETUNIVERSAL

Page 45: The Original Hypertext Preprocessor

CREATE TABLE `perch_contentItems` ( `contentID` int(10) unsigned NOT NULL AUTO_INCREMENT, `contentKey` varchar(255) NOT NULL DEFAULT '', `contentPage` varchar(255) NOT NULL DEFAULT '*', `contentHTML` longtext NOT NULL, `contentNew` tinyint(1) unsigned NOT NULL DEFAULT '1', `contentTemplate` varchar(255) NOT NULL DEFAULT '', `contentMultiple` tinyint(1) unsigned NOT NULL DEFAULT '0', `contentAddToTop` tinyint(1) unsigned NOT NULL DEFAULT '0', `contentJSON` mediumtext NOT NULL, `contentHistory` mediumtext NOT NULL, `contentOptions` text NOT NULL, PRIMARY KEY (`contentID`), KEY `idx_key` (`contentKey`), KEY `idx_page` (`contentPage`)) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

Page 46: The Original Hypertext Preprocessor

SO, UM, HOW'S

THATWORKING OUT

FOR YOU?

Page 47: The Original Hypertext Preprocessor

NON-NATIVE JSON

IS SLOW

Page 48: The Original Hypertext Preprocessor

QUERYING ACROSSTABLE COLUMNS

- AND -

JSON VALUES- IS A -

TWO STEP PROCESS

Page 49: The Original Hypertext Preprocessor

SO WHAT IS

GOODABOUT IT?

Page 50: The Original Hypertext Preprocessor

{! “heading”: “Foo”,! “date”: “2011-04-22 10:00:00”}

Page 51: The Original Hypertext Preprocessor

[! {! ! “heading”: “Foo”,! ! “date”: “2011-04-22 10:00:00”! },! {! ! “heading”: “Foo”,! ! “date”: “2011-04-22 10:00:00”! }]

Page 52: The Original Hypertext Preprocessor

[! {! ! “_rev”: 1300447544,! ! “_content”: {! ! ! “heading”: “Bar”,! ! ! “date”: “2011-04-22 10:00:00”! ! }! },! {! ! “_rev”: 1293968747,! ! “_content”: {! ! ! “heading”: “Foo”,! ! ! “date”: “2011-04-22 10:00:00”! ! }! }]

Page 53: The Original Hypertext Preprocessor

SIMPLE, EFFECTIVE

HISTORY STACK

Page 54: The Original Hypertext Preprocessor

THEORISING IS EASY

NOTHING BEATSEXPERIENCE

Page 55: The Original Hypertext Preprocessor

RUNNING PHP

EVERYWHERE IS HARD

Page 56: The Original Hypertext Preprocessor

WE'RE USED TO

CONTROLLEDPLATFORMS

Page 57: The Original Hypertext Preprocessor

ALL BETSARE OFF

Page 58: The Original Hypertext Preprocessor

- CHEAP -

HOSTINGIS CHEAP

Page 59: The Original Hypertext Preprocessor

WINDOWSIS WEIRD

Page 60: The Original Hypertext Preprocessor

MIGRATING BETWEENFILESYSTEMS

Page 61: The Original Hypertext Preprocessor

- NEVER -

MIX CASEIN MYSQL TABLE NAMES

Page 62: The Original Hypertext Preprocessor

- BE -

OPINIONATED- BUT NOT -

DICTATORIAL

Page 63: The Original Hypertext Preprocessor

WYSIWYG- IS -

EVIL

Page 64: The Original Hypertext Preprocessor
Page 65: The Original Hypertext Preprocessor

But my clients must have an editor like Word!

Page 66: The Original Hypertext Preprocessor

IT'S NOT OUR PLACE

TO TELL PEOPLEHOW TO WORK

Page 67: The Original Hypertext Preprocessor
Page 68: The Original Hypertext Preprocessor

EDIT IN PLACE- IS A -

FALSEPROMISE

Page 69: The Original Hypertext Preprocessor

HELP CUSTOMERS

SERVET H E I RCLIENTS

Page 70: The Original Hypertext Preprocessor

IDENTIFY YOUR

CUSTOMERS'PROBLEMS

Page 71: The Original Hypertext Preprocessor

CONFIDENCE- IS -

EVERYTHING

Page 72: The Original Hypertext Preprocessor

EVERY FIELD- CAN BE -

ANNOTATED

Page 73: The Original Hypertext Preprocessor

help=”Use the teacher’s initials from the timetable.”

Page 74: The Original Hypertext Preprocessor
Page 75: The Original Hypertext Preprocessor

<perch:help>!<p>Confused? Watch !!!this video:</p>!<video>...</video></perch:help>

Page 76: The Original Hypertext Preprocessor
Page 77: The Original Hypertext Preprocessor
Page 78: The Original Hypertext Preprocessor

DRAFTSPREVIEWUNDO

Page 79: The Original Hypertext Preprocessor

- BE A -

MAGICIANNOT JUST

A DEVELOPER

Page 80: The Original Hypertext Preprocessor

FUNCTIONALITY -IS NOT -

ENOUGH

Page 81: The Original Hypertext Preprocessor

LEARN TO

ACCEPT WHEN USERS ARE

H A V I N GTROUBLE

Page 82: The Original Hypertext Preprocessor

REALLY GREAT

DEVELOPERSSOLVE PROBLEMS

Page 83: The Original Hypertext Preprocessor

YOU CAN'T

WINEVERY USER

Page 84: The Original Hypertext Preprocessor

I love the little cms but the one thing I was

expecting to get is a license for multiple domain,...

if you guys can help with that you will earn a big

customer,.. and as of right now I already found 2

more cms just like yours at a lower price but what

they take a away is in the interface design,..

(which I could careless about it) but you guys still

my number 1 option but if you guys can give me a

break on that little part for licensing multiple

domains that will be very much appreciated,..

Page 85: The Original Hypertext Preprocessor

- NOT -

EVERYONE WILL GET IT

Page 86: The Original Hypertext Preprocessor

THANK YOU!Perch is at grabaperch.com

Slides: http://lanyrd.com/2011/phpcomcon

On most things, I’ am @drewm

Page 87: The Original Hypertext Preprocessor

QUESTIONS?


Recommended