SlideShare a Scribd company logo
1 of 30
JS, CMS, UNTANGLE THE MESS
Chris Ward
@chrischinch
DISCLAIMERS
I’m more of a PHP guy

My JS use is fairly ‘traditional’
See, i’m even using Keynote!
WHY USE A CMS?
•

Ideal for a particular job

•

Existing systems

•

Familiarity
THE PROBLEMS
•

Conflicts

•

Page weight

•

Non specificity
WHAT’S AVAILABLE
Lots…
WE WILL FOCUS ON
•

Drupal

•

Wordpress

•

Joomla!

•

Expression Engine
DRUPAL JS OVERVIEW
•

Started with ‘generic’, settled on JQuery

•

Currently D7 ships with JQuery 1.4.2 / UI 1.8

•

Can easily (and often is) upgraded to latest

•

Used for UI enhancements, ajax DOM manipulation
etc…

•

All js is aggregated (if turned on)
OTHER OPTIONS

Umpteen UI modules (carousels, selectors,
Modals), JSON processing, Dynamic forms,
Responsive, Masonry, Modernizr, AngularJS,
Backbone, NodeJS and many many more…
ADDING JS
drupal_add_js() - The path to your js code + some parameters.
These allow to pass settings, how JS is to be rendered, where/when
it’s to be loaded
Four sets of arrays can be passed var Drupal = Drupal || { 'settings': {},
'behaviors': {}, 'themes': {}, 'locale': {} };
MORE INFORMATION

drupal.org/node/121997
WORDPRESS JS OVERVIEW
•

Currently ships with JQuery 1.11, Backbone,
TinyMCE and a few other scripts

•

Can easily be upgraded to latest

•

Used for UI enhancements, ajax DOM manipulation
etc…

•

Can be aggregated through plugins
ADDING JS
wp_register_script( $name, $url,
$dependencies, $version,
$load_in_footer );
wp_enqueue_script()
wp_dequeue_script()
wp_localize_script()
OTHER OPTIONS

Umpteen UI modules (carousels, selectors,
Modals), JSON processing, Dynamic forms,
Responsive, Masonry, Modernizr, AngularJS,
Backbone, NodeJS and many many more…
MORE INFORMATION

codex.wordpress.org/Using_Javascript
JOOMLA! JS OVERVIEW
•

Currently ships with JQuery 1.81, Bootstrap, JQuery
UI 1.8.23 and Mootools/Joomla JS

•

Can easily be upgraded to latest

•

Used for UI enhancements, ajax DOM manipulation
etc…

•

Can be aggregated through plugins
ADDING JS
$document =
JFactory::getDocument();
$document->addScript(‘script');
JHTML::script('sample.js',
'templates/custom/js/');
OTHER OPTIONS

Umpteen UI modules (carousels, selectors,
Modals), JSON processing, Dynamic forms,
Responsive, Masonry, Modernizr,* AngularJS*,
Backbone, NodeJS and many many more…
MORE INFORMATION

docs.joomla.org/Adding_JavaScript
EXPRESSION ENGINE JS
OVERVIEW
•

JQuery v1.6.2?

•

Can’t be upgraded

•

Used for UI enhancements, ajax DOM
manipulation etc…

•

Assume it has JS aggregation
ADDING JS
{exp:jquery:script_tag}
plugin=
ui=
effect=
file=
ee()->cp->add_js_script(array('plugin' =>
'dataTables'));
ee()->javascript->output();
ee()->javascript->compile();
OTHER OPTIONS

Hmm…
MORE INFORMATION

ellislab.com/expressionengine/user-guide/modules/jque
SUMMARY

Each CMS handles and utilises JS in it’s specialised way.
THANKS!
Chris Ward
@chrischinch
chrischinchilla.com

More Related Content

What's hot

код презентации
код презентациикод презентации
код презентации
LFadina62
 
Week 1 - How the Web Woks + Wordpress 101
Week 1 - How the Web Woks + Wordpress 101Week 1 - How the Web Woks + Wordpress 101
Week 1 - How the Web Woks + Wordpress 101
Drake Martinet
 
Hammersmith fundamentals html fundamentals
Hammersmith fundamentals   html fundamentalsHammersmith fundamentals   html fundamentals
Hammersmith fundamentals html fundamentals
Mike Bradshaw
 
Developing for the mobile web
Developing for the mobile webDeveloping for the mobile web
Developing for the mobile web
joeysim
 

What's hot (20)

Sugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeSugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a time
 
код презентации
код презентациикод презентации
код презентации
 
Multi-tenant Database Design for SaaS
Multi-tenant Database Design for SaaSMulti-tenant Database Design for SaaS
Multi-tenant Database Design for SaaS
 
Unobtrusive javascript
Unobtrusive javascriptUnobtrusive javascript
Unobtrusive javascript
 
Week 1 - How the Web Woks + Wordpress 101
Week 1 - How the Web Woks + Wordpress 101Week 1 - How the Web Woks + Wordpress 101
Week 1 - How the Web Woks + Wordpress 101
 
DevNexus 2016
DevNexus 2016DevNexus 2016
DevNexus 2016
 
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveSharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
 
Hammersmith fundamentals html fundamentals
Hammersmith fundamentals   html fundamentalsHammersmith fundamentals   html fundamentals
Hammersmith fundamentals html fundamentals
 
Developing for the mobile web
Developing for the mobile webDeveloping for the mobile web
Developing for the mobile web
 
jQuery - Boston IxDA
jQuery - Boston IxDAjQuery - Boston IxDA
jQuery - Boston IxDA
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User Group
 
Presentation on php and Javascript
Presentation on php and JavascriptPresentation on php and Javascript
Presentation on php and Javascript
 
Практическая оптимизация сервер сайд: современные реалии
Практическая оптимизация сервер сайд: современные реалииПрактическая оптимизация сервер сайд: современные реалии
Практическая оптимизация сервер сайд: современные реалии
 
Евгений Самоненко - Практическая оптимизация сервер сайд современные реалии
Евгений Самоненко - Практическая оптимизация сервер сайд современные реалииЕвгений Самоненко - Практическая оптимизация сервер сайд современные реалии
Евгений Самоненко - Практическая оптимизация сервер сайд современные реалии
 
How to Make and Maintain a Successful Installation of WordPress Multisite
How to Make and Maintain a Successful Installation of WordPress MultisiteHow to Make and Maintain a Successful Installation of WordPress Multisite
How to Make and Maintain a Successful Installation of WordPress Multisite
 
Backbone introduction
Backbone introductionBackbone introduction
Backbone introduction
 
Develop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based applicationDevelop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based application
 
WordPress Theme Development Workflow with Node.js, Ruby, Sass, Bower and Grunt
WordPress Theme Development Workflow with Node.js, Ruby, Sass, Bower and GruntWordPress Theme Development Workflow with Node.js, Ruby, Sass, Bower and Grunt
WordPress Theme Development Workflow with Node.js, Ruby, Sass, Bower and Grunt
 
MySQL Optimization from a Developer's point of view
MySQL Optimization from a Developer's point of viewMySQL Optimization from a Developer's point of view
MySQL Optimization from a Developer's point of view
 
Advance java session 9
Advance java session 9Advance java session 9
Advance java session 9
 

Viewers also liked

Viewers also liked (9)

7 4-1-7-11
7 4-1-7-117 4-1-7-11
7 4-1-7-11
 
Why your image of the world could be wrong
Why your image of the world could be wrongWhy your image of the world could be wrong
Why your image of the world could be wrong
 
Jquery mobile
Jquery mobileJquery mobile
Jquery mobile
 
14.08021403
14.0802140314.08021403
14.08021403
 
Building mobile apps with PhoneGap and Titanium appcelerator
Building mobile apps with PhoneGap and Titanium appceleratorBuilding mobile apps with PhoneGap and Titanium appcelerator
Building mobile apps with PhoneGap and Titanium appcelerator
 
93 301
93 30193 301
93 301
 
Tax free bonds - 2013
Tax free bonds - 2013Tax free bonds - 2013
Tax free bonds - 2013
 
Power your mobile app with Drupal - Melbourne Mobile, July 2013
Power your mobile app with Drupal - Melbourne Mobile, July 2013Power your mobile app with Drupal - Melbourne Mobile, July 2013
Power your mobile app with Drupal - Melbourne Mobile, July 2013
 
A Documentation Crash Course, LinuxCon 2016
A Documentation Crash Course, LinuxCon 2016A Documentation Crash Course, LinuxCon 2016
A Documentation Crash Course, LinuxCon 2016
 

Similar to JS, CMS, untangle the mess

jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
Module, AMD, RequireJS
Module, AMD, RequireJSModule, AMD, RequireJS
Module, AMD, RequireJS
偉格 高
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
Andrew Ferrier
 
Partha_Sr._PHP_Drupal_UI_Developer
Partha_Sr._PHP_Drupal_UI_DeveloperPartha_Sr._PHP_Drupal_UI_Developer
Partha_Sr._PHP_Drupal_UI_Developer
Partha Sarkar
 

Similar to JS, CMS, untangle the mess (20)

jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
 
Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JS
 
Wheel.js
Wheel.jsWheel.js
Wheel.js
 
Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)
 
Become a Successful Web Developer in Web development Field in 2017
Become a Successful Web Developer in Web development Field in 2017Become a Successful Web Developer in Web development Field in 2017
Become a Successful Web Developer in Web development Field in 2017
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
A nodejs application
A nodejs applicationA nodejs application
A nodejs application
 
Module, AMD, RequireJS
Module, AMD, RequireJSModule, AMD, RequireJS
Module, AMD, RequireJS
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done Right
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 
Javascript & Jquery
Javascript & JqueryJavascript & Jquery
Javascript & Jquery
 
Javascript fatigue, 자바스크립트 피로
Javascript fatigue, 자바스크립트 피로Javascript fatigue, 자바스크립트 피로
Javascript fatigue, 자바스크립트 피로
 
Partha_Sr._PHP_Drupal_UI_Developer
Partha_Sr._PHP_Drupal_UI_DeveloperPartha_Sr._PHP_Drupal_UI_Developer
Partha_Sr._PHP_Drupal_UI_Developer
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS Fundamentals
 
jQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FuturejQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and Future
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 

More from Chris Ward

More from Chris Ward (19)

Electron - Solving our cross platform dreams?
Electron - Solving our cross platform dreams?Electron - Solving our cross platform dreams?
Electron - Solving our cross platform dreams?
 
Automate your docs, automate yourself
Automate your docs, automate yourselfAutomate your docs, automate yourself
Automate your docs, automate yourself
 
Back to the future with static site generators
Back to the future with static site generatorsBack to the future with static site generators
Back to the future with static site generators
 
Building Cross Platform Apps with Electron
Building Cross Platform Apps with ElectronBuilding Cross Platform Apps with Electron
Building Cross Platform Apps with Electron
 
Android Programming without Java
Android Programming without JavaAndroid Programming without Java
Android Programming without Java
 
The past, present and future of swift, Voxxed Belgrade 2016
The past, present and future of swift, Voxxed Belgrade 2016The past, present and future of swift, Voxxed Belgrade 2016
The past, present and future of swift, Voxxed Belgrade 2016
 
Always Listening User Experience
Always Listening User ExperienceAlways Listening User Experience
Always Listening User Experience
 
Why you should come to DrupalSouth
Why you should come to DrupalSouthWhy you should come to DrupalSouth
Why you should come to DrupalSouth
 
Extend Drupal with a CRM, DrupalGov 2013
Extend Drupal with a CRM, DrupalGov 2013Extend Drupal with a CRM, DrupalGov 2013
Extend Drupal with a CRM, DrupalGov 2013
 
Drupal DevOps - Melbourne DevOps July 2013
Drupal DevOps - Melbourne DevOps July 2013Drupal DevOps - Melbourne DevOps July 2013
Drupal DevOps - Melbourne DevOps July 2013
 
Removing Barriers in Engagement - Melbourne Geek Night, July 2013
Removing Barriers in Engagement - Melbourne Geek Night, July 2013Removing Barriers in Engagement - Melbourne Geek Night, July 2013
Removing Barriers in Engagement - Melbourne Geek Night, July 2013
 
Tweak, Test and Debug your mobile apps from Web directions code 13
Tweak, Test and Debug your mobile apps from Web directions code 13Tweak, Test and Debug your mobile apps from Web directions code 13
Tweak, Test and Debug your mobile apps from Web directions code 13
 
Take your drupal sites offline
Take your drupal sites offlineTake your drupal sites offline
Take your drupal sites offline
 
Green Renters' Giant Green Games
Green Renters' Giant Green GamesGreen Renters' Giant Green Games
Green Renters' Giant Green Games
 
Customising civicrm
Customising civicrmCustomising civicrm
Customising civicrm
 
Drupal - Melbourne cryptoparty
Drupal - Melbourne cryptopartyDrupal - Melbourne cryptoparty
Drupal - Melbourne cryptoparty
 
HP Lovecraft, laneway learning
HP Lovecraft, laneway learningHP Lovecraft, laneway learning
HP Lovecraft, laneway learning
 
CiviCRM and Wordpress
CiviCRM and WordpressCiviCRM and Wordpress
CiviCRM and Wordpress
 
Blogging with drupal
Blogging with drupalBlogging with drupal
Blogging with drupal
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

JS, CMS, untangle the mess

Editor's Notes

  1. A content management system, been around since the 90s
  2. Umbraco, .netNuke, Movable Type - .net Drupal, Joomla, Wordpress - PHP Plone - Python Refinery - Ruby Alfresco - Java Expression Engine - PHP SiteCore - ASP
  3. All PHP, two open source, two proprietary and ones I know the best. I wanted to add more proprietary options, but it’s really hard to find information.
  4. Drupal, PHP CMS, popular with large, complex sites and is thus quite complex itself.
  5. At the same time, module developers were starting to incorporate advanced effects libraries like Dojo, moo.fx, and prototype
  6. In modules and themes, things can just be fudged in of course… Settings behaviours to be acted upon - This is so Drupal is also aware of what is going on / DOM changes and can react / cache properly theme - Adds ability for client side DOM elements to be properly styled locale - Translations
  7. Even official docs mention adding into <head> / header.php… ‘Official’ way Name (required, string): The name of the script. URL (required, string): Dependencies (optional, array): Version (optional, string): Load in Footer (optional, boolean): There are specific enqueue functions for front / admin / login pages
  8. Notice how this is exactly the same…
  9. Mootools is deprecated
  10. Joomla is more MVC based, so JS can be added in various front end locations, out of scope for this talk.
  11. * Note quite ‘native’ plugins.
  12. Into templates File to load something other than JQuery 2nd - Modules
  13. Not saying there aren’t any, but it’s not made very clear or easy to find.
  14. Wordpress and Joomla quickly and for fairly one shot Drupal more complex allowing for more flexibility that may not be needed.