27
October 28, 2014 LaravelTO Presentation: LaSalleCMS 1

LaSalleCMS Presentation at LaravelTO Meet-Up

  • Upload
    bbloom9

  • View
    209

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 1

Page 2: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 3: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 3

LaSalleCMS

● Called it LaSalleCMS● Although dubbing it a “content management

system” is overstating things

Page 4: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 5: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 6: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 6

JUGT

● “J” and “Abivia”deeply involvedwith JoomlaProject

● Doug doing anexcellent jobleading JUGT

Page 7: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 7

Page 8: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 9: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 10: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 11: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 12: LaSalleCMS Presentation at LaravelTO Meet-Up

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!

Page 13: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 14: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 14

lasallecms.php config

● app/config/lasallecms.php● ever growing custom config params

Page 15: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 16: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 17: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 18: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 19: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 20: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 21: LaSalleCMS Presentation at LaravelTO Meet-Up

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

Page 22: LaSalleCMS Presentation at LaravelTO Meet-Up

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)

Page 23: LaSalleCMS Presentation at LaravelTO Meet-Up

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!

Page 24: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 24

Bob Bloom

● http://SouthLaSalle.com● [email protected]● @bobbloom

Page 25: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 25

https://packagist.org/packages/bbloom/contact

Page 26: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 26

Page 27: LaSalleCMS Presentation at LaravelTO Meet-Up

October 28, 2014 LaravelTO Presentation: LaSalleCMS 27

Sites

● https://github.com/bbloom/lasallecms● https://packagist.org/packages/bbloom/contact● http://SouthLaSalle.com