dr bigno z e or: how i learned to stop worrying and love the syd-phpug
DESCRIPTION
BigNo Z ePick(et)s By BigNo Z e. Dr BigNo Z e or: How I Learned to Stop Worrying and Love the SYD-PHPUG. BigNo Z e is / I am. An ImPHPostor – ie. I have never been employed to write PHP I work alone ...... - PowerPoint PPT PresentationTRANSCRIPT
Dr BigNoZe or:How I Learned to Stop Worrying
and Love the SYD-PHPUG
BigNoZePick(et)sBy BigNoZe
BigNoZe is / I am
An ImPHPostor – ie. I have never been employed to write PHP
I work alone ...... BUT I am not a SPHPY – I attend PHP-UG
cause I expect to mentor/work in a PHP project one day
And I have written some PHP systems – one of which started during the Great War of 1997
The Super League War
1997 Super League goes to war – and VP Porker says “It's too much to try and run the tipping comp this year with pen and paper! Two draws – all sorts of teams and dates??”
The BigNoZe Team steps up to the plate
We designed and wrote a Nix based Footy Tipping system in Dataflex
An NRL/Super League Round
+----------------------------+-------- Home ----------------- Away ---------+ | Punter*: STEVEJ | X Manly vs St George | | Sport *: RUGBY LEAGUE | X Western Subs vs Sydney City | | Round *: 16 | X Newcastle vs North Sydney | | Date : 13/06/97 | X ADELAIDE vs LEEDS | | Journal: 360 | CASTLEFORD vs HUNTER X | | Posted : | X NTH QUEENSLAND vs OLDHAM | | | BRADFORD vs AUCKLAND X | | | X CANTERBURY vs HALIFAX | | | X CANBERRA vs LONDON | | | X BRISBANE vs WIGAN | | | WARRINGTON vs PENRITH X | | | SHEFFIELD vs PERTH X | | | ST HELENS vs CRONULLA X | | | vs | | | vs | | | vs | | | vs | | | vs | | | vs | | | vs | | | | +- F9 to Create Punters Forms+----------------------------------- F3 to Save -+
Tipsters are Tabulated
+-----------------------------------------------------------------------------+ | Punter Rounds --> 1 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | | | BRIAN 7 7 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | SIMON 7 7 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | TONY 7 7 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ANNE 3 3 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | MERAL 3 3 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | PAUL 3 3 ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | | ____________________ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | +------------------------Do you want a hard copy ???-N------------------------+
For fun and education we rewrote the system in
VB6 – using Distributed COM for the office ASP – for the web when people left the office PHP – for when we realised ASP (and
Windoze in general) sucked and Linux rules.
The original PHP BigNoZePicks
Was pretty awful because it was basically ASP with a '$' sign prepended to the variable names
There were no functions – no separation of HTML from code etc etc etc.
There were some include files for screen drawing etc.
I abstracted out a few lines of code and wrote some functions but essentially thought ”I should rewrite this one day – 2000? Last used 2002 Soccer World Cup”
>> to 2008 Australia Day – Social Cricket Match
Tikal
What are those guys doing?
I ask “What are those guys doing?” VP says “They're scoring” I say “Where's the laptop” He says “I think it's all done on paper” I go “Really? Why?” Everyone just looks at me like I am stupid.
They say nothing. Boy did I feel stupid!
BigNoZePick(et)s is Born
So I determined then and there that no Australian cricketer need live without a wagonwheel by 2010
I also determine this is a chance to pull together all the bits and pieces I have gleaned from the SYD PHP-UG over all those years.
A new, clean project! A living document ? An education resource?
My Education/Honour Role
There's a copy of the code here www.bignozepicks.com Downloads
I started with ADO-DB – I ditched it for PDO
thankyou Kevin – see /includes/dbsetup.inc.php /includes/competition.oop.php /includes/tipster.oop.php
SPL - Iterators
Calls to the file system thankyou Kevin – SPL/ Directory Iterator
/includes/listdir.inc.php
Internationalisation
Remember the Milk presentation recommended to plan for Internationalisation and Scalability no matter what the project
Smarty templates provides a simple international option – come on PHP6?
See /smarty.tpl/configs/*.conf PHP handles time zones – but I think I do
this at the user experience with a chunk of Javascript.
Emails and PDF
Thankyou to Brent who presented phpMailer FPDF see selections.php for both of these
Security
The GeekGuys presentation – I tried to remember the simple stuff
Fingerprint Session variables see /includes/config.php and logout.php Be wary of filename extensions Use a honey pot to stop robot logins/posting see index.php and form_token Hoover all $_POST /whatever variables see /includes/hoover.oop.inc Encrypt passwords
Smarty Templates
I had already been using them a bit but Geoffs presentation gave me some extra insights. Not for everyone apparently. BigNoZePick(et)s is Smarty gone a bit crazy.
start at /smarty.tpl/templates/main.classic.tpl
Documentation
Thankyou Dean and Tim phpDocumentor I used this to create both the PHP
documentation and the HELP screens via the DocBook format
Other Bits and Pieces
I use phpThumb to handle images http://phpthumb.sourceforge.net/
I use a backup routine from http://www.oldguy.us/
I currently support MySQL and SQLite thanks to PDO.
Demo databases are generated from live data via masking User information see backuppicks.php
Project Stuff
Code repository is Subversion - thankyou Rich
Project Tracking Management is Trac – thankyou Rich
Outstanding ?
Session handling via MySQL - James PHPUnit for regression testing – thankyou
Sebastian Phar(JAR) release with SQLite – thankyou
Tim. Move code repository to Bazaar – thankyou
James Finish and hand off the project to Google or
Yahoo – watch for the BigNoZePick(et)s media kit next PHP meeting – thankyou Steve
Quick Demo? Fin!Any Questions?