SlideShare une entreprise Scribd logo
1  sur  21
Moving from PHP to a nodejs full stack
CMS
September 2014
Andrew	
  Zuercher	
  
Introductions
Keystonejs 2
Andrew Zuercher
Chief Innovation Officer
CMS - Wordpress way
Keystonejs 3
•  LAMP
•  Data
–  Custom fields
–  Taxonomies
•  Themes/Marketplaces
•  Lots of plugins
BUT ITS STILL IN PHP!!!!
Makeandbuild.com – wordpress version
Keystonejs 4
•  Took an existing theme
•  Customized/Tweaked CSS
•  Different models
–  Posts
–  Portfolio items (work)
–  Service items (capabilities)
TIME TO MARKET: 2+ months
Keystone POC
Keystonejs 5
•  Drivers
–  Mongo
–  Bootstrap
–  Choice of templating
–  Express
ALL IN TOOLS WORK WITH!!!
Migration
Keystonejs 6
•  Time to market
–  Rewrote in 2 weeks
–  Integrated into sales force
–  Backported all routes
–  Development streamlined – mongo over MySQL
•  PERFORMANCE INCREASE OF 200%
Admin UI
Keystonejs 7
•  Part of keystone module
•  Default route – xxxx/keystone
•  Supports multiple users
–  active/inactive
–  Permissions
•  Editor
–  Tinymce/WYSIWYG
•  image support
•  Published/Draft/Support state support
Tech Stack Details
Keystonejs 8
•  express/connect – dynamic routes
•  Mongo – flexible model
•  Templating - jade/handlebars/mustache
•  LESS/SASS support
Services
Keystonejs 9
•  Google analytics
•  Google Maps
•  Amazon s3
•  Cloudinary
•  Embed.ly
•  Mandrill
Getting Started
Keystonejs 10
•  Yeoman generator - https://github.com/keystonejs/generator-keystone
•  Boostrap based (LESS)
> sudo npm install –g generator-keystone
> mkdir myproject
> cd myproject
> yo keystone
> node keystone
http://localhost:3000
Project structure
Keystonejs 11
•  keystone.js – intital load
•  .env – system properties
•  templates/views/xxx.hbs
•  models/xxx.js -
•  public/(styles|images|js|fonts) – static assets
•  routes/
–  index.js – baseline
–  Views/xxx.js – controllers
Adding a new model
Keystonejs 12
var	
  Project	
  =	
  new	
  keystone.List('Project',	
  {	
  
	
  map:	
  {	
  name:	
  '@tle'	
  },	
  
	
  autokey:	
  {	
  path:	
  'slug',	
  from:	
  '@tle',	
  unique:	
  true	
  },	
  
	
  sortable:	
  true,	
  
	
  defaultSort:	
  'sortOrder'	
  
});	
  
Project.add({	
  
	
  @tle:	
  {	
  type:	
  String,	
  required:	
  true	
  },	
  
	
  company:	
  {	
  type:	
  String,	
  required:	
  true,	
  ini@al:	
  true,	
  },	
  
	
  state:	
  {	
  type:	
  Types.Select,	
  op@ons:	
  'draL,	
  published,	
  archived',	
  default:	
  'draL',	
  index:	
  true	
  },	
  
	
  image:	
  {	
  type:	
  Types.S3File	
  },	
  
	
  metaData:	
  {	
  
	
   	
  @tle:	
  {	
  type:	
  Types.Text	
  },	
  
	
   	
  descrip@on:	
  {	
  type:	
  Types.Text	
  }	
  
	
  },	
  
	
  content:	
  {	
  type:	
  Types.Html,	
  wysiwyg:	
  true,	
  height:	
  400	
  },	
  
	
  tes@monial:	
  {	
  
	
   	
  text:	
  {	
  type:	
  Types.Text,	
  wysiwyg:	
  true,	
  height:	
  150	
  },	
  
	
   	
  author:	
  {	
  type:	
  String	
  },	
  
	
   	
  @tle:	
  {	
  type:	
  String	
  }	
  
	
  },	
  
	
  categories:	
  {	
  type:	
  Types.Rela@onship,	
  ref:	
  'ProjectCategory',	
  many:	
  true	
  }	
  
});	
  
	
  
Adding a new Controller
Keystonejs 13
exports	
  =	
  module.exports	
  =	
  func@on(app)	
  {	
  
	
  …	
  
	
  app.get('/work',	
  routes.views.work);	
  
	
  app.get('/work/:project',	
  
routes.views.project);	
  
•  index.js
•  Routes/views/work.js
var	
  view	
  =	
  new	
  keystone.View(req,	
  res),locals	
  =	
  res.locals;	
  
View.on(‘init’,	
  func@on(next)	
  {	
  
	
  //access	
  model	
  and	
  store	
  results	
  in	
  res.locals.data	
  
}); 	
  	
  
//	
  Render	
  the	
  view	
  
view.render('work');	
  
Adding a View
Keystonejs 14
•  Templates/views/work.hbs
<div	
  class="container">	
  
	
  <div	
  class="row">	
  
	
   	
  <div	
  class="col-­‐sm-­‐12	
  col-­‐md-­‐12">	
  
	
   	
   	
  <div	
  class="blog	
  ar@cle-­‐list">	
  
	
   	
   	
   	
  {{#	
  each	
  data.items.results}}	
  
	
   	
   	
   	
  <a	
  href="/work/{{slug}}"	
  class="ar@cle	
  blog-­‐post	
  work-­‐post">	
  
	
   	
   	
   	
   	
  <div	
  class="blog-­‐image">	
  
	
   	
   	
   	
   	
   	
  <img	
  src="{{image.url}}"	
  alt="{{company}}"	
  class="img-­‐responsive">	
  
	
   	
   	
   	
   	
  </div>	
  
	
   	
   	
   	
   	
  <div	
  class="blog-­‐content">	
  
	
   	
   	
   	
   	
   	
  <h1	
  class="blog-­‐@tle	
  cap">{{@tle}}</h1>	
  
	
   	
   	
   	
   	
   	
  <h3	
  class="work-­‐meta	
  uc">{{company}}</h3>	
  
	
   	
   	
   	
   	
  </div>	
  
	
   	
   	
   	
  </a>	
  
	
   	
   	
   	
  {{/each}}	
  
	
   	
   	
  </div>	
  
	
   	
  </div>	
  
	
  </div>	
  
</div>	
  
Additional items
Keystonejs 15
•  templates/views/layouts/default.hbs
•  Make use of bower
•  routes/middleware.js – setup injections
–  requireUser, etc
Administration UI Customization
Keystonejs 16
•  Currently they are switching to ReactJS for the Admin Ui and moving it to the
client side to allow customizable Admin Sections
•  They have made a branch with the reactjs but haven't completed a stable
version.
•  https://github.com/keystonejs/keystone/issues/204
•  https://github.com/keystonejs/keystone/issues/503
•  Once complete, plugin framework next
CMS (THEME)
Keystonejs 17
•  Seems like all their focus is the switch to React.js for the customizability. So
all other things have been pushed off. But their plan is to eventually allow for
themes.
•  THEY really want theme capability wordpress has.
•  https://github.com/keystonejs/keystone/issues/67
Example Sites
Keystonejs 18
•  sydjs.com
•  http://keystonejs.com/examples/
Security
Keystonejs 19
•  Can make use of the User permission based model and roll own
–  Check req.user to see if user is logged in
–  Identify needed chain in middleware as identified earlier (pre-route)
–  Modify chain in routes themselves ex:
exports	
  =	
  module.exports	
  =	
  func@on(app)	
  {	
  
	
  app.get('/resumes/:filename',	
  middleware.requireUser,	
  routes.views.resumes);	
  
};	
  
Deployment
Keystonejs 20
•  Don’t control .env
•  Nginx reverse proxy
•  Run via forever
•  See the oneline docs for config
–  http://keystonejs.com/docs/configuration/#options
QUESTIONS?
Keystonejs 21
Q&A

Contenu connexe

Tendances

Going Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSGoing Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSdotCMS
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewDiacode
 
WordPress as a Service
WordPress as a ServiceWordPress as a Service
WordPress as a ServiceAndrew Bauer
 
Adobe AEM for Business Heads
Adobe AEM for Business HeadsAdobe AEM for Business Heads
Adobe AEM for Business HeadsYash Mody
 
Wordpress as a Backend
Wordpress as a BackendWordpress as a Backend
Wordpress as a BackendAndrew Duthie
 
Web development - Developing Web as A Team
Web development -  Developing Web as A TeamWeb development -  Developing Web as A Team
Web development - Developing Web as A TeamMuhammad Akbar Yasin
 
Free Online SharePoint Framework Webinar
Free Online SharePoint Framework WebinarFree Online SharePoint Framework Webinar
Free Online SharePoint Framework WebinarManoj Mittal
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasSuzanne Dergacheva
 
HTML5 tutorials for beginners - Imrokraft
HTML5 tutorials for beginners - ImrokraftHTML5 tutorials for beginners - Imrokraft
HTML5 tutorials for beginners - Imrokraftimrokraft
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An OverviewNaveen Pete
 
Full stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choiceFull stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choiceFDConf
 
Introduction to JavaScript Full Stack
Introduction to JavaScript Full StackIntroduction to JavaScript Full Stack
Introduction to JavaScript Full StackMindfire Solutions
 
Building an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackBuilding an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackdivyapisces
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02Paul Bele
 
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebChris Canal
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Conference
 

Tendances (20)

Going Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSGoing Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMS
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
 
ASP.NET 5 Overview
ASP.NET 5 OverviewASP.NET 5 Overview
ASP.NET 5 Overview
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
 
WordPress as a Service
WordPress as a ServiceWordPress as a Service
WordPress as a Service
 
Adobe AEM for Business Heads
Adobe AEM for Business HeadsAdobe AEM for Business Heads
Adobe AEM for Business Heads
 
Wordpress as a Backend
Wordpress as a BackendWordpress as a Backend
Wordpress as a Backend
 
Web development - Developing Web as A Team
Web development -  Developing Web as A TeamWeb development -  Developing Web as A Team
Web development - Developing Web as A Team
 
Getting started with angular js
Getting started with angular jsGetting started with angular js
Getting started with angular js
 
Free Online SharePoint Framework Webinar
Free Online SharePoint Framework WebinarFree Online SharePoint Framework Webinar
Free Online SharePoint Framework Webinar
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and Gotchas
 
HTML5 tutorials for beginners - Imrokraft
HTML5 tutorials for beginners - ImrokraftHTML5 tutorials for beginners - Imrokraft
HTML5 tutorials for beginners - Imrokraft
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
Full stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choiceFull stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choice
 
Introduction to JavaScript Full Stack
Introduction to JavaScript Full StackIntroduction to JavaScript Full Stack
Introduction to JavaScript Full Stack
 
Building an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackBuilding an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stack
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02
 
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
 
Iconus 2016
Iconus 2016Iconus 2016
Iconus 2016
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 

Similaire à Moving from PHP to a nodejs full stack CMS

Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
Azure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityAzure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityStephane Lapointe
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_HourDilip Patel
 
CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful CodeCFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Codeindiver
 
Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4Jon Galloway
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to TornadoGavin Roy
 
Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7andrewmriley
 
WSO2 Quarterly Technical Update
WSO2 Quarterly Technical UpdateWSO2 Quarterly Technical Update
WSO2 Quarterly Technical UpdateWSO2
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Levelbalassaitis
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Next Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooNext Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooStefan Schmidt
 
Angular js for enteprise application
Angular js for enteprise applicationAngular js for enteprise application
Angular js for enteprise applicationvu van quyet
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017Matt Raible
 
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShellCCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShellwalk2talk srl
 
Windows Azure Mobile Services - The Perfect Partner
Windows Azure Mobile Services - The Perfect PartnerWindows Azure Mobile Services - The Perfect Partner
Windows Azure Mobile Services - The Perfect PartnerMichael Collier
 
Using redux and angular 2 with meteor
Using redux and angular 2 with meteorUsing redux and angular 2 with meteor
Using redux and angular 2 with meteorKen Ono
 

Similaire à Moving from PHP to a nodejs full stack CMS (20)

Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
Azure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityAzure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusability
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
 
CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful CodeCFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Code
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
12 Introduction to Rails
12 Introduction to Rails12 Introduction to Rails
12 Introduction to Rails
 
SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
 
Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7
 
CodeIgniter & MVC
CodeIgniter & MVCCodeIgniter & MVC
CodeIgniter & MVC
 
WSO2 Quarterly Technical Update
WSO2 Quarterly Technical UpdateWSO2 Quarterly Technical Update
WSO2 Quarterly Technical Update
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Next Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooNext Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring Roo
 
Angular js for enteprise application
Angular js for enteprise applicationAngular js for enteprise application
Angular js for enteprise application
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
 
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShellCCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
 
Windows Azure Mobile Services - The Perfect Partner
Windows Azure Mobile Services - The Perfect PartnerWindows Azure Mobile Services - The Perfect Partner
Windows Azure Mobile Services - The Perfect Partner
 
Using redux and angular 2 with meteor
Using redux and angular 2 with meteorUsing redux and angular 2 with meteor
Using redux and angular 2 with meteor
 

Dernier

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...SUHANI PANDEY
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Delhi Call girls
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...nilamkumrai
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls DubaiEscorts Call Girls
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubaikojalkojal131
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Datingkojalkojal131
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.soniya singh
 

Dernier (20)

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 

Moving from PHP to a nodejs full stack CMS

  • 1. Moving from PHP to a nodejs full stack CMS September 2014 Andrew  Zuercher  
  • 3. CMS - Wordpress way Keystonejs 3 •  LAMP •  Data –  Custom fields –  Taxonomies •  Themes/Marketplaces •  Lots of plugins BUT ITS STILL IN PHP!!!!
  • 4. Makeandbuild.com – wordpress version Keystonejs 4 •  Took an existing theme •  Customized/Tweaked CSS •  Different models –  Posts –  Portfolio items (work) –  Service items (capabilities) TIME TO MARKET: 2+ months
  • 5. Keystone POC Keystonejs 5 •  Drivers –  Mongo –  Bootstrap –  Choice of templating –  Express ALL IN TOOLS WORK WITH!!!
  • 6. Migration Keystonejs 6 •  Time to market –  Rewrote in 2 weeks –  Integrated into sales force –  Backported all routes –  Development streamlined – mongo over MySQL •  PERFORMANCE INCREASE OF 200%
  • 7. Admin UI Keystonejs 7 •  Part of keystone module •  Default route – xxxx/keystone •  Supports multiple users –  active/inactive –  Permissions •  Editor –  Tinymce/WYSIWYG •  image support •  Published/Draft/Support state support
  • 8. Tech Stack Details Keystonejs 8 •  express/connect – dynamic routes •  Mongo – flexible model •  Templating - jade/handlebars/mustache •  LESS/SASS support
  • 9. Services Keystonejs 9 •  Google analytics •  Google Maps •  Amazon s3 •  Cloudinary •  Embed.ly •  Mandrill
  • 10. Getting Started Keystonejs 10 •  Yeoman generator - https://github.com/keystonejs/generator-keystone •  Boostrap based (LESS) > sudo npm install –g generator-keystone > mkdir myproject > cd myproject > yo keystone > node keystone http://localhost:3000
  • 11. Project structure Keystonejs 11 •  keystone.js – intital load •  .env – system properties •  templates/views/xxx.hbs •  models/xxx.js - •  public/(styles|images|js|fonts) – static assets •  routes/ –  index.js – baseline –  Views/xxx.js – controllers
  • 12. Adding a new model Keystonejs 12 var  Project  =  new  keystone.List('Project',  {    map:  {  name:  '@tle'  },    autokey:  {  path:  'slug',  from:  '@tle',  unique:  true  },    sortable:  true,    defaultSort:  'sortOrder'   });   Project.add({    @tle:  {  type:  String,  required:  true  },    company:  {  type:  String,  required:  true,  ini@al:  true,  },    state:  {  type:  Types.Select,  op@ons:  'draL,  published,  archived',  default:  'draL',  index:  true  },    image:  {  type:  Types.S3File  },    metaData:  {      @tle:  {  type:  Types.Text  },      descrip@on:  {  type:  Types.Text  }    },    content:  {  type:  Types.Html,  wysiwyg:  true,  height:  400  },    tes@monial:  {      text:  {  type:  Types.Text,  wysiwyg:  true,  height:  150  },      author:  {  type:  String  },      @tle:  {  type:  String  }    },    categories:  {  type:  Types.Rela@onship,  ref:  'ProjectCategory',  many:  true  }   });    
  • 13. Adding a new Controller Keystonejs 13 exports  =  module.exports  =  func@on(app)  {    …    app.get('/work',  routes.views.work);    app.get('/work/:project',   routes.views.project);   •  index.js •  Routes/views/work.js var  view  =  new  keystone.View(req,  res),locals  =  res.locals;   View.on(‘init’,  func@on(next)  {    //access  model  and  store  results  in  res.locals.data   });     //  Render  the  view   view.render('work');  
  • 14. Adding a View Keystonejs 14 •  Templates/views/work.hbs <div  class="container">    <div  class="row">      <div  class="col-­‐sm-­‐12  col-­‐md-­‐12">        <div  class="blog  ar@cle-­‐list">          {{#  each  data.items.results}}          <a  href="/work/{{slug}}"  class="ar@cle  blog-­‐post  work-­‐post">            <div  class="blog-­‐image">              <img  src="{{image.url}}"  alt="{{company}}"  class="img-­‐responsive">            </div>            <div  class="blog-­‐content">              <h1  class="blog-­‐@tle  cap">{{@tle}}</h1>              <h3  class="work-­‐meta  uc">{{company}}</h3>            </div>          </a>          {{/each}}        </div>      </div>    </div>   </div>  
  • 15. Additional items Keystonejs 15 •  templates/views/layouts/default.hbs •  Make use of bower •  routes/middleware.js – setup injections –  requireUser, etc
  • 16. Administration UI Customization Keystonejs 16 •  Currently they are switching to ReactJS for the Admin Ui and moving it to the client side to allow customizable Admin Sections •  They have made a branch with the reactjs but haven't completed a stable version. •  https://github.com/keystonejs/keystone/issues/204 •  https://github.com/keystonejs/keystone/issues/503 •  Once complete, plugin framework next
  • 17. CMS (THEME) Keystonejs 17 •  Seems like all their focus is the switch to React.js for the customizability. So all other things have been pushed off. But their plan is to eventually allow for themes. •  THEY really want theme capability wordpress has. •  https://github.com/keystonejs/keystone/issues/67
  • 18. Example Sites Keystonejs 18 •  sydjs.com •  http://keystonejs.com/examples/
  • 19. Security Keystonejs 19 •  Can make use of the User permission based model and roll own –  Check req.user to see if user is logged in –  Identify needed chain in middleware as identified earlier (pre-route) –  Modify chain in routes themselves ex: exports  =  module.exports  =  func@on(app)  {    app.get('/resumes/:filename',  middleware.requireUser,  routes.views.resumes);   };  
  • 20. Deployment Keystonejs 20 •  Don’t control .env •  Nginx reverse proxy •  Run via forever •  See the oneline docs for config –  http://keystonejs.com/docs/configuration/#options