SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

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
 

What's hot (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
 

Similar to 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
 

Similar to 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
 

Recently uploaded

Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
₹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
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 

Recently uploaded (20)

Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
₹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...
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 

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