Post on 14-Jul-2015
October 28, 2014 LaravelTO Presentation: LaSalleCMS 1
October 28, 2014 LaravelTO Presentation: LaSalleCMS 2
Presenting LaSalleCMS
● Popular first Laravel app is a blog● To learn Laravel I developed a blog● Enjoyed it so much I decided to keep
developing it for my own sites, and as a basis for client work
October 28, 2014 LaravelTO Presentation: LaSalleCMS 3
LaSalleCMS
● Called it LaSalleCMS● Although dubbing it a “content management
system” is overstating things
October 28, 2014 LaravelTO Presentation: LaSalleCMS 4
My Sites Switched to Blog App
● SouthLaSalle.com – flagship site, was WordPress
● LaSalleMart.com – ecommerce site, was Joomla
● LaSalleCMS.com – new, originally to be Joomla Distro site
● LaSalleCAST.com – new, podcasting app: NOV 2014
● SouthLaSalleMedia– still WordPress, but will be based on LaSalleCAST
October 28, 2014 LaravelTO Presentation: LaSalleCMS 5
Coming From Joomla
● 2007 to Apr 2014 Joomla freelance consultant● Exec of Joomla User Group Toronto● Virtuemart 1.x expert● Created 3 rounds of LaSalleMart technology for
Joomla
October 28, 2014 LaravelTO Presentation: LaSalleCMS 6
JUGT
● “J” and “Abivia”deeply involvedwith JoomlaProject
● Doug doing anexcellent jobleading JUGT
October 28, 2014 LaravelTO Presentation: LaSalleCMS 7
October 28, 2014 LaravelTO Presentation: LaSalleCMS 8
Serious Version Mgmt Baggage
● Joomla changed Series 3 “LTS” versioning policy in April 2014
● Described on my sites● Upshot: increase risk of LaSalleMart 3.0
becoming prematurely obsolete, well before any ROI achieved
October 28, 2014 LaravelTO Presentation: LaSalleCMS 9
Quick About
● Live in Richmond Hill● UofT BComm grad ● Have wonderful wife, three school-aged
children● IT contractor in downtown towers before
freelancing
October 28, 2014 LaravelTO Presentation: LaSalleCMS 10
Teach Thyself
● Laracasts● Laravel Testing Decoded book ● Impressive amount/quality of online stuff● Learn by doing● Scope of learning so huge that felt like I was
back in class
October 28, 2014 LaravelTO Presentation: LaSalleCMS 11
LaSalleCMS Tour
● A pedagogical exercise that became real software
● Missing a zillion features● Front-end and back-end● User management for one user● Enjoy putting user params in a text file with no
admin GUI
October 28, 2014 LaravelTO Presentation: LaSalleCMS 12
LaSalleCMS Tour
● Contact form is a separate package● No testing (sorry Adam) as I decided I needed
to understand Laravel first – I was right. ● Refactored to use Command Bus – eye opener!
October 28, 2014 LaravelTO Presentation: LaSalleCMS 13
Folder Structure
● http://daylerees.com/breaking-the-mold● /app/ for application infrastructure● /src/ for app and psr-0● /src/routes/ for all route files● /src/plumbing/ for user-specified startup stuff
October 28, 2014 LaravelTO Presentation: LaSalleCMS 14
lasallecms.php config
● app/config/lasallecms.php● ever growing custom config params
October 28, 2014 LaravelTO Presentation: LaSalleCMS 15
Domain specific sub-folders
● Well, maybe not really fit in with what a “domain” really is... but as a practical matter...
● Each “thing” has its major “stuff” in its own sub-folders
● Eg: src/lasallecms/categories
October 28, 2014 LaravelTO Presentation: LaSalleCMS 16
Add-on Packages
● https://github.com/bbloom/lasallecms/blob/master/composer.json● Guzzle, commander, presenter, generators
(barely used), intervention (images, works great!), sanitizer, feed, twitter, my contact pkg
October 28, 2014 LaravelTO Presentation: LaSalleCMS 17
Repositories
● https://github.com/bbloom/lasallecms/tree/master/src/Lasallecms/repositories● src/lasallecms/repositories● Interface & eloquent implementation for each● Models very clean, repositories very busy● Learned: code that does the heavy lifting has to
go somewhere, and is sometimes real world irritatingly messy. I put the mess in the repository files
October 28, 2014 LaravelTO Presentation: LaSalleCMS 18
Base and Abstract Classes
● Learned that “base” and “abstract” classes are important
● So important that regardless of current need I always set up either a “base” or “abstract” class
October 28, 2014 LaravelTO Presentation: LaSalleCMS 19
Views
● https://github.com/bbloom/lasallecms/tree/master/src/Lasallecms/views● View namespacing in plumbing/view_paths.php● src/Lasallecms/views/admin & site● Lasallecms.php config determines what
subfolder to use in ../site/user-specified● using Blade, but intrigued by Twig
October 28, 2014 LaravelTO Presentation: LaSalleCMS 20
Namespacing #1 PITA
● Spent more time on namespacing problems then anything else
● composer update vs composer update --dev● composer dump-autoload vs
composer dump-autoload -o● Packages: secret handshake seems to be...
composer install --devcomposer update --devcomposer dump-autoload composer dump-autoload -o
October 28, 2014 LaravelTO Presentation: LaSalleCMS 21
Gave Up Trying to Pkg Blog App
● Set up app for eventual conversion to a workbench package
● Successfully create content package as a warm-up
● Blog app too huge● Too many twists and turns● Learned: workbench for modest add-ons
October 28, 2014 LaravelTO Presentation: LaSalleCMS 22
Builds and Composer
● I prefer headers in my PHP, especially caveat paragraph
● I need two GitHub repos: one for Packagist, and the other for my actual coding
● So I can do search-replace with Phing for build versions, etc.
● Need to do trial runs of this● Paid packages? (Thought I'd sneak this into this
presentation)
October 28, 2014 LaravelTO Presentation: LaSalleCMS 23
Thank You!
● Thank you to Chris● Thank you to LaravelTO sponsors● Thank you for being a great audience!
October 28, 2014 LaravelTO Presentation: LaSalleCMS 24
Bob Bloom
● http://SouthLaSalle.com● info@SouthLaSalle.com● @bobbloom
October 28, 2014 LaravelTO Presentation: LaSalleCMS 25
https://packagist.org/packages/bbloom/contact
October 28, 2014 LaravelTO Presentation: LaSalleCMS 26
October 28, 2014 LaravelTO Presentation: LaSalleCMS 27
Sites
● https://github.com/bbloom/lasallecms● https://packagist.org/packages/bbloom/contact● http://SouthLaSalle.com