The Original Hypertext Preprocessor

2,992 views

Published on

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.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,992
On SlideShare
0
From Embeds
0
Number of Embeds
528
Actions
Shares
0
Downloads
31
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

The Original Hypertext Preprocessor

  1. 1. -THE ORIGINAL-HYPERTEXTPREPROCESSOR Drew McLellan edgeofmyseat.com grabaperch.com PHP Community Conference 22nd April 2011
  2. 2. EVERY LINE OF CODE -CAN HAVE A-DIRECT IMPACT ON USERS
  3. 3. DESIGNINGSOFTWARE - FOR -HUMANS
  4. 4. FUNCTIONALITY -IS NOT -ENOUGH
  5. 5. REWIND
  6. 6. DUDE!LIKE WHAT ABOUTDRUPAL?
  7. 7. “With Wordpress (don’teven get me started onDrupal), the learning curvewas very high, requiring myclients to learn about postsversus pages versuscustom post types.”
  8. 8. D O Z E N S O FOPTIONSMILLIONS OFUSERS
  9. 9. THERES ROOM - IF YOU CAN BE -DIFFERENT
  10. 10. L I G H T W E I G H TPHP CMSFOR SMALL WEBSITES
  11. 11. LISTEN UP!CLASSIN SESSION
  12. 12. - THE MOST -DIFFICULTPROBLEMS - ARE THE -WET ONES
  13. 13. Support willkick your ass.Jason Fried, 37signalshttp://www.extractable.com/blog/?p=58
  14. 14. Helpspot really savedour ass when it cameto support.Todd Dominey, SlideShowProhttp://5by5.tv/bigwebshow/24
  15. 15. SUPPORTINVOLVES - A LOT OF -ASSES
  16. 16. MANYCUSTOMERS AREINEXPERIENCED
  17. 17. THEY NEEDA LOT OFSUPPORT
  18. 18. EACH LICENSE SOLD30 MINUTESOF SUPPORT TIME
  19. 19. - FIND WAYS TO -REDUCESUPPORTREQUESTS
  20. 20. EVERY REQUEST SHOULD BEUNIQUE
  21. 21. SUPPORTYOUROWNS OFT W A R E
  22. 22. - WHEN -WILL THISFAIL?
  23. 23. ALL CODE BREAKS.GREAT CODEBREAKS WELL
  24. 24. NOT ALLATTEMPTSARE SUCCESSFUL
  25. 25. SPEED OF RESPONSE IS THE MOSTIMPORTANT T H I N G
  26. 26. TECHNICALPROBLEMS - ARE -DIFFICULT TOO
  27. 27. PHP5AS STANDARD
  28. 28. WE WOULDLOVE- TO M OVE T O -PHP5.3
  29. 29. THE FAILEDPROMISE OFSQLITE
  30. 30. SCHEMALESSSTRUCTURED DATA
  31. 31. !<perch:content!!!type=”text”!!!id=”heading”!!!label=”Main heading”!!!required=”true” />
  32. 32. <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" />
  33. 33. TABLE OFKEY-VALUE PAIRS - OR - BIG BLOB OF JSON
  34. 34. TABLE OFKEY-VALUE PAIRS
  35. 35. SCALES UPWELL CAN BEFILTERED WITHSQL
  36. 36. - REQUIRES -HOUSEKEEPING INEFFICIENT FOR SMALL VALUES
  37. 37. BIG BLOB OFJSON
  38. 38. STOREANY SHAPE DATA IN ONE ROW EXTREMELY SIMPLE
  39. 39. CONTENT HAS TO BEFILTERED IN PHP NATIVE JSON LIBRARIES ARE NOT YET UNIVERSAL
  40. 40. 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;
  41. 41. SO, UM, HOWSTHATWORKING OUTFOR YOU?
  42. 42. NON-NATIVE JSONIS SLOW
  43. 43. QUERYING ACROSSTABLE COLUMNS - AND -JSON -VALUES IS A -TWO STEP PROCESS
  44. 44. SO WHAT ISGOODABOUT IT?
  45. 45. {! “heading”: “Foo”,! “date”: “2011-04-22 10:00:00”}
  46. 46. [! {! ! “heading”: “Foo”,! ! “date”: “2011-04-22 10:00:00”! },! {! ! “heading”: “Foo”,! ! “date”: “2011-04-22 10:00:00”! }]
  47. 47. [! {! ! “_rev”: 1300447544,! ! “_content”: {! ! ! “heading”: “Bar”,! ! ! “date”: “2011-04-22 10:00:00”! ! }! },! {! ! “_rev”: 1293968747,! ! “_content”: {! ! ! “heading”: “Foo”,! ! ! “date”: “2011-04-22 10:00:00”! ! }! }]
  48. 48. SIMPLE, EFFECTIVEHISTORY STACK
  49. 49. THEORISING IS EASYNOTHING BEATSEXPERIENCE
  50. 50. RUNNING PHPEVERYWHERE IS HARD
  51. 51. WERE USED TOCONTROLLEDPLATFORMS
  52. 52. ALL BETSARE OFF
  53. 53. - CHEAP -HOSTINGIS CHEAP
  54. 54. WINDOWSIS WEIRD
  55. 55. MIGRATINGBETWEENFILESYSTEMS
  56. 56. - NEVER -MIX CASEIN MYSQL TABLE NAMES
  57. 57. - BE -OPINIONATED - BUT NOT -DICTATORIAL
  58. 58. WYSIWYG - IS -EVIL
  59. 59. But my clientsmust have aneditor like Word!
  60. 60. ITS NOT OUR PLACETO TELL PEOPLEHOW TO WORK
  61. 61. EDIT IN PLACE - IS A - FALSEPROMISE
  62. 62. HELP CUSTOMERSSERVETHEIRCLIENTS
  63. 63. IDENTIFY YOURCUSTOMERSPROBLEMS
  64. 64. CONFIDENCE - IS -EVERYTHING
  65. 65. EVERY FIELD - CAN BE -ANNOTATED
  66. 66. help=”Use theteacher’sinitials fromthe timetable.”
  67. 67. <perch:help>!<p>Confused? Watch!!!this video:</p>!<video>...</video></perch:help>
  68. 68. DRAFTSPREVIEWUNDO
  69. 69. - BE A -MAGICIAN NOT JUSTA DEVELOPER
  70. 70. FUNCTIONALITY -IS NOT -ENOUGH
  71. 71. LEARN TOACCEPTWHEN USERS AREHAVINGTROUBLE
  72. 72. REALLY GREATDEVELOPERSSOLVE PROBLEMS
  73. 73. YOU CANTWINEVERY USER
  74. 74. I love the little cms but the one thing I wasexpecting to get is a license for multiple domain,...if you guys can help with that you will earn a bigcustomer,.. and as of right now I already found 2more cms just like yours at a lower price but whatthey take a away is in the interface design,..(which I could careless about it) but you guys stillmy number 1 option but if you guys can give me abreak on that little part for licensing multipledomains that will be very much appreciated,..
  75. 75. - NOT -EVERYONEWILL GET IT
  76. 76. THANK YOU! Perch is at grabaperch.com Slides: http://lanyrd.com/2011/phpcomcon On most things, I’ am @drewm
  77. 77. QUESTIONS?

×