JoomlaDay 2017 Chicago
Less is MoreMatt Christensen@the_real_mattc
Who am I?
● Developer
● Offense and defense
● PHP - WordPress - Joomla - .Net
● Analytics
● Freelancer
Introduction
● Look - learn and grow before adding/buying unknown
code
● What do you need to accomplish?
● Do you need external code?
● Is it too complicated?
● Time
Introduction
● Security - you own the code - you know the source
● If not you - your team
● Duplication of code - multiple copies of the same library
Speed
● Not always a time saver to add third party code
● Last 20%
● Need to weigh the options
● Trust your team
Outline
● MVC
● Forms
● Libraries
Components - MVC
● Not true MVC
● MVVM-C
● Explain (code sample)
Model
● Interacts with data
● Returns data to the caller (view - maybe controller)
● Logic and processing can be done
● Business rules
● Calling the database
View
● Calls model(s)
● Naming can be accessed by default - see example
● Prepares display
Template(tmpl) - View-Model
● Acts like a view-model
● Displays to the screen
● Calling View
● NO LOGIC HERE
Controller
● Traffic cop
● Executes functions based on task parameter
Code
Forms
Forms
● Demo - contact form
Adding Form Fields
● Inside Models
● See com_contact
Validation
● Add rule path
● Classes act as rules
● com_contact
Libraries
● jQuery
● jQuery UI
● Bootstrap
● Take a look
jQuery
● No conflict mode (jQuery vs $)
● Version difference
Bootstrap
● Version issues
● 2 vs 3
Extras
● Update / stay up to date
● Use version control
● Backup
Conclusion
● Try before you buy
● Trust your team
● Inspect code
● Know versions
● Update/backup/source control