SlideShare a Scribd company logo
Moving Beyond WordPress
at Tech in Asia
- Lester & Melvin
T
Tech in Asia (YC W2015) is a media, events, and jobs platform
for Asia’s tech communities.
We are a team of 100 across 12 cities in the region
spanning editorial, product, community and events functions.
About Tech in Asia
History of WordPress at Tech in
Asia
● Tech in Asia is 5 years old
● Back then Tech in Asia was known as Penn Olson
● Been on WordPress since the start
● Using a customized WordPress theme (not using any theme
framework)
● Most features are custom coded plugins. Third-party plugins just
doesn’t scale well and didn’t meet our requirements.
Walking Down Memory Lane
18th August 2014
Product Team Formed
Walking Down Memory Lane
27th October 2014
List View
Walking Down Memory Lane
17th October 2014
Trending Articles / Member System
Walking Down Memory Lane
20th April 2015
Added Facebook & Google Login
Walking Down Memory Lane
28th May 2015
User Generated Content / Upvoting
Articles
Walking Down Memory Lane
17th August 2015
Whiter, Flatter, Sleeker Design
Walking Down Memory Lane
16th December 2015
Major Redesign Using WP API And React
Walking Down Memory Lane
31st May 2016
Jobs
WordPress as our Back-end
WordPress as our Back-end
WordPress API
● WordPress REST API infrastructure was in WordPress core since
WordPress 4.4 (8th December 2015)
● Prior to WordPress 4.4, we have been testing WordPress REST
API Plugin (https://wordpress.org/plugins/rest-api/) in preparation
for the release
● We are not using the default namespace provided by the plugin
○ Eg: /wp-json/wp/v2/posts
● We are using our own namespace with our own payload format
○ Eg: /wp-json/techinasia/2.0/posts
Namespace / Version / Payload Format
● Namespace /techinasia/
○ Avoid conflicts
○ Our own identity
● Version /2.0/
○ We used “2.0” instead of “v2”
■ Float for easy validation
● Payload
○ Only return what the client needs
○ Standardized payload format and pagination format
○ Eg: https://www.techinasia.com/wp-json/techinasia/2.0/posts
The Move To WordPress API
● Unified API
○ Same API for web, iOS and Android
● Service-Oriented Architecture (SOA)
○ Laravel used for Startups & Jobs database
○ WordPress used for Editorial & Community content
● Separation of concerns
○ FE engineers need not touch API and vice versa
● Hiring
○ Easier to hire a JS guy to implement an API then a
WordPress engineer
Features
● Can’t use most of the WordPress plugins
○ Custom coded feature as a plugin
■ Comment upvoting, notification, registration, login
● 3rd party plugins mainly backend related
○ AMP, Google XML Sitemaps, Instant Articles, Redis Object
Cache, TinyMCE Advanced
Services
● Impossible to built everything ourselves
● Search in WordPress is horrible
○ Google Custom Search
○ https://developers.google.com/custom-search/
● Jetpack Notification is a closed service
○ Stream
○ https://getstream.io/
● Jetpack Proton doesn’t work for our use-case
○ Kraken
○ https://kraken.io/
Authentication, Authorization and
Session
● Deal with Authentication, Authorization and Session management
● Authentication / Authorization
○ WordPress
○ wp_signon() and user_can() function
● Session
○ Data stored in Redis
○ Overwrite WP session data with “determine_current_user”
filter
○ Session information is set in cookie in the browser
○ Cookie sent along with API request (web) or via Authorization
Rate Limiting / Caching
● API is open, prone to abuse
● Rate limiting GET / PUT / POST requests
○ Discourage spamming
○ Return 429 Too Many Requests when that happens
● Caching
○ Most of our users are “logged out” which makes caching easy
○ Most GET requests should be cached
○ Even a 1-minute cache would help for a heavy traffic site like
TIA
Future?
● Editorial CMS like Automattic’s Calypso
○ Bypass WP-Admin
○ Desktop app using React with Electron
○ Customized to our editor’s workflow
○ More APIs needed
React as our Front-end
React as our Front-end
Choosing a front-end framework
● 2015 was an interesting year for front-end development.
○ React’s popularity exploded.
○ Angular 2 was being announced; not fully backward
compatible with Angular 1.
○ ES2015 - the most significant upgrade to JavaScript was
finalised in June.
React’s Virtual DOM
Credits: http://calendar.perfplanet.com/2013/diff/
WordPress Theme Template
React’s JSX Syntax
React Ops Stuff
● Babel (https://babeljs.io/)
○ Transpile JSX and ES2015+ code to ES5
● webpack (http://webpack.github.io/)
○ Module bundler (with a lot of magic)
○ Code splitting
○ Hot reloading
Flux Architecture
● An architecture to manage data between different views
● Data travels in a unidirectional flow
● Many variants of Flux - Redux is currently the most popular
Credits: https://code-cartoons.com/a-cartoon-guide-to-flux-6157355ab207
Routing with React
● Routing separate from WordPress
● Using react-router (https://github.com/reactjs/react-router)
● How do we handle pretty permalinks?
(https://www.techinasia.com/%postname%)
○ Custom WP REST API that takes in the slug
○ Call the API that returns the post object
○ Get post type from the object
○ Render the correct component accordingly (page / post)
Search Engine Optimization
● SPA + SEO don’t really go well together
○ Not all search engines can “understand” JavaScript
● One trick: take a “screenshot” of the page
○ Service: Prerender.io (https://prerender.io/)
● Dynamically adding meta tags into the document:
○ react-helmet (https://github.com/nfl/react-helmet)
Tips on Starting out React
● Cover the basics without the ops part:
https://facebook.github.io/react/docs/getting-started.html
● Start with a good boilerplate (react-boilerplate)
● Learn JavaScript (ES2015+)
○ Challenge: Functional Programming with JS
Free book: https://leanpub.com/javascriptallongesix
● Redux: https://egghead.io/courses/getting-started-with-redux
Any Questions?
The End

More Related Content

What's hot

Iconus 2016
Iconus 2016Iconus 2016
Iconus 2016
Mark Roden
 
Building a scalable infrastructure for social mobile web apps
Building a scalable infrastructure for social mobile web appsBuilding a scalable infrastructure for social mobile web apps
Building a scalable infrastructure for social mobile web apps
ngonpham
 
Microsoft, Web Standards and OSS
Microsoft, Web Standards and OSSMicrosoft, Web Standards and OSS
Microsoft, Web Standards and OSSMahdi Taghizadeh
 
Tech Stack Ideas
Tech Stack IdeasTech Stack Ideas
Tech Stack Ideas
nsclark
 
What is a good technology stack today?
What is a good technology stack today?What is a good technology stack today?
What is a good technology stack today?
Netlight Consulting
 
Evolution / History of ASP.NET
Evolution / History of ASP.NETEvolution / History of ASP.NET
Evolution / History of ASP.NET
Anoop Kumar Sharma
 
Salesforce Apex Hours : Node red for salesforce
Salesforce Apex Hours : Node red for salesforceSalesforce Apex Hours : Node red for salesforce
Salesforce Apex Hours : Node red for salesforce
Amit Chaudhary
 
WordPress as a Service
WordPress as a ServiceWordPress as a Service
WordPress as a Service
Andrew Bauer
 
Testing your Single Page Application
Testing your Single Page ApplicationTesting your Single Page Application
Testing your Single Page Application
Wekoslav Stefanovski
 
Creating Custom HTML Helpers in ASP.NET MVC
Creating Custom HTML Helpers in ASP.NET MVCCreating Custom HTML Helpers in ASP.NET MVC
Creating Custom HTML Helpers in ASP.NET MVC
Lohith Goudagere Nagaraj
 
Migration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMigration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET Core
Miroslav Popovic
 
Being With Rails App For 3 Years
Being With Rails App For 3 YearsBeing With Rails App For 3 Years
Being With Rails App For 3 Years
deeeki
 
Office script labs
Office script labsOffice script labs
Office script labs
Mark Roden
 
IBM Domino Modernizing apps with Angularjs
IBM Domino Modernizing apps with AngularjsIBM Domino Modernizing apps with Angularjs
IBM Domino Modernizing apps with Angularjs
Dominopoint - Italian Lotus User Group
 
Coding with jetpack
Coding with jetpackCoding with jetpack
Coding with jetpack
Rich Collier
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
asim78
 
Building a community of Open Source intranet users
Building a community of Open Source intranet usersBuilding a community of Open Source intranet users
Building a community of Open Source intranet users
Luke Oatham
 
Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0
EastBanc Tachnologies
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack DiscussionZaiyang Li
 
Html 5
Html 5Html 5

What's hot (20)

Iconus 2016
Iconus 2016Iconus 2016
Iconus 2016
 
Building a scalable infrastructure for social mobile web apps
Building a scalable infrastructure for social mobile web appsBuilding a scalable infrastructure for social mobile web apps
Building a scalable infrastructure for social mobile web apps
 
Microsoft, Web Standards and OSS
Microsoft, Web Standards and OSSMicrosoft, Web Standards and OSS
Microsoft, Web Standards and OSS
 
Tech Stack Ideas
Tech Stack IdeasTech Stack Ideas
Tech Stack Ideas
 
What is a good technology stack today?
What is a good technology stack today?What is a good technology stack today?
What is a good technology stack today?
 
Evolution / History of ASP.NET
Evolution / History of ASP.NETEvolution / History of ASP.NET
Evolution / History of ASP.NET
 
Salesforce Apex Hours : Node red for salesforce
Salesforce Apex Hours : Node red for salesforceSalesforce Apex Hours : Node red for salesforce
Salesforce Apex Hours : Node red for salesforce
 
WordPress as a Service
WordPress as a ServiceWordPress as a Service
WordPress as a Service
 
Testing your Single Page Application
Testing your Single Page ApplicationTesting your Single Page Application
Testing your Single Page Application
 
Creating Custom HTML Helpers in ASP.NET MVC
Creating Custom HTML Helpers in ASP.NET MVCCreating Custom HTML Helpers in ASP.NET MVC
Creating Custom HTML Helpers in ASP.NET MVC
 
Migration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMigration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET Core
 
Being With Rails App For 3 Years
Being With Rails App For 3 YearsBeing With Rails App For 3 Years
Being With Rails App For 3 Years
 
Office script labs
Office script labsOffice script labs
Office script labs
 
IBM Domino Modernizing apps with Angularjs
IBM Domino Modernizing apps with AngularjsIBM Domino Modernizing apps with Angularjs
IBM Domino Modernizing apps with Angularjs
 
Coding with jetpack
Coding with jetpackCoding with jetpack
Coding with jetpack
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
 
Building a community of Open Source intranet users
Building a community of Open Source intranet usersBuilding a community of Open Source intranet users
Building a community of Open Source intranet users
 
Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
 
Html 5
Html 5Html 5
Html 5
 

Similar to Moving Beyond WordPress At Tech in Asia

WordPress Tallahassee Meetup: Turning WordPress Sites Into Web & Mobile Apps
WordPress Tallahassee Meetup: Turning WordPress Sites Into Web & Mobile AppsWordPress Tallahassee Meetup: Turning WordPress Sites Into Web & Mobile Apps
WordPress Tallahassee Meetup: Turning WordPress Sites Into Web & Mobile Apps
Caldera Labs
 
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason FreyDesign Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
ManageIQ
 
JIO and WebViewers: interoperability for Javascript and Web Applications
JIO and WebViewers: interoperability  for Javascript and Web ApplicationsJIO and WebViewers: interoperability  for Javascript and Web Applications
JIO and WebViewers: interoperability for Javascript and Web Applications
XWiki
 
#RADC4L16: An API-First Archives Approach at NPR
#RADC4L16: An API-First Archives Approach at NPR#RADC4L16: An API-First Archives Approach at NPR
#RADC4L16: An API-First Archives Approach at NPR
Camille Salas
 
Aditya raj cv
Aditya raj   cvAditya raj   cv
Aditya raj cv
Aditya Raj
 
Scaling WordPress - Project Lana WordPress Team
Scaling WordPress - Project Lana WordPress TeamScaling WordPress - Project Lana WordPress Team
Scaling WordPress - Project Lana WordPress Team
Dat Hoang
 
VN Tech Seminor Vol.1
VN Tech Seminor Vol.1VN Tech Seminor Vol.1
VN Tech Seminor Vol.1
Shuhei Yamashita
 
How we leveraged Drupal to build a leading SaaS product
How we leveraged Drupal to build a leading SaaS product How we leveraged Drupal to build a leading SaaS product
How we leveraged Drupal to build a leading SaaS product
Invotra
 
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpress
ngonpham
 
Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...
Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...
Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...
rtCamp
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
Naveen Pete
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
LINAGORA
 
The Decoupled CMS in Financial Services
The Decoupled CMS in Financial ServicesThe Decoupled CMS in Financial Services
The Decoupled CMS in Financial Services
Open Source Strategy Forum
 
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development ModelLaskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Garindra Prahandono
 
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Neo4j
 
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
Chris Shenton
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform Update
Ido Green
 
GlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices togetherGlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices together
Restlet
 
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.govNot Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Chris Shenton
 

Similar to Moving Beyond WordPress At Tech in Asia (20)

WordPress Tallahassee Meetup: Turning WordPress Sites Into Web & Mobile Apps
WordPress Tallahassee Meetup: Turning WordPress Sites Into Web & Mobile AppsWordPress Tallahassee Meetup: Turning WordPress Sites Into Web & Mobile Apps
WordPress Tallahassee Meetup: Turning WordPress Sites Into Web & Mobile Apps
 
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason FreyDesign Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
 
APIs for mobile
APIs for mobileAPIs for mobile
APIs for mobile
 
JIO and WebViewers: interoperability for Javascript and Web Applications
JIO and WebViewers: interoperability  for Javascript and Web ApplicationsJIO and WebViewers: interoperability  for Javascript and Web Applications
JIO and WebViewers: interoperability for Javascript and Web Applications
 
#RADC4L16: An API-First Archives Approach at NPR
#RADC4L16: An API-First Archives Approach at NPR#RADC4L16: An API-First Archives Approach at NPR
#RADC4L16: An API-First Archives Approach at NPR
 
Aditya raj cv
Aditya raj   cvAditya raj   cv
Aditya raj cv
 
Scaling WordPress - Project Lana WordPress Team
Scaling WordPress - Project Lana WordPress TeamScaling WordPress - Project Lana WordPress Team
Scaling WordPress - Project Lana WordPress Team
 
VN Tech Seminor Vol.1
VN Tech Seminor Vol.1VN Tech Seminor Vol.1
VN Tech Seminor Vol.1
 
How we leveraged Drupal to build a leading SaaS product
How we leveraged Drupal to build a leading SaaS product How we leveraged Drupal to build a leading SaaS product
How we leveraged Drupal to build a leading SaaS product
 
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpress
 
Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...
Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...
Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
The Decoupled CMS in Financial Services
The Decoupled CMS in Financial ServicesThe Decoupled CMS in Financial Services
The Decoupled CMS in Financial Services
 
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development ModelLaskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
 
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
 
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform Update
 
GlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices togetherGlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices together
 
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.govNot Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
 

Recently uploaded

GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 

Recently uploaded (20)

GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 

Moving Beyond WordPress At Tech in Asia

  • 1. Moving Beyond WordPress at Tech in Asia - Lester & Melvin T
  • 2. Tech in Asia (YC W2015) is a media, events, and jobs platform for Asia’s tech communities. We are a team of 100 across 12 cities in the region spanning editorial, product, community and events functions. About Tech in Asia
  • 3. History of WordPress at Tech in Asia ● Tech in Asia is 5 years old ● Back then Tech in Asia was known as Penn Olson ● Been on WordPress since the start ● Using a customized WordPress theme (not using any theme framework) ● Most features are custom coded plugins. Third-party plugins just doesn’t scale well and didn’t meet our requirements.
  • 4. Walking Down Memory Lane 18th August 2014 Product Team Formed
  • 5. Walking Down Memory Lane 27th October 2014 List View
  • 6. Walking Down Memory Lane 17th October 2014 Trending Articles / Member System
  • 7. Walking Down Memory Lane 20th April 2015 Added Facebook & Google Login
  • 8. Walking Down Memory Lane 28th May 2015 User Generated Content / Upvoting Articles
  • 9. Walking Down Memory Lane 17th August 2015 Whiter, Flatter, Sleeker Design
  • 10. Walking Down Memory Lane 16th December 2015 Major Redesign Using WP API And React
  • 11. Walking Down Memory Lane 31st May 2016 Jobs
  • 12. WordPress as our Back-end WordPress as our Back-end
  • 13. WordPress API ● WordPress REST API infrastructure was in WordPress core since WordPress 4.4 (8th December 2015) ● Prior to WordPress 4.4, we have been testing WordPress REST API Plugin (https://wordpress.org/plugins/rest-api/) in preparation for the release ● We are not using the default namespace provided by the plugin ○ Eg: /wp-json/wp/v2/posts ● We are using our own namespace with our own payload format ○ Eg: /wp-json/techinasia/2.0/posts
  • 14. Namespace / Version / Payload Format ● Namespace /techinasia/ ○ Avoid conflicts ○ Our own identity ● Version /2.0/ ○ We used “2.0” instead of “v2” ■ Float for easy validation ● Payload ○ Only return what the client needs ○ Standardized payload format and pagination format ○ Eg: https://www.techinasia.com/wp-json/techinasia/2.0/posts
  • 15. The Move To WordPress API ● Unified API ○ Same API for web, iOS and Android ● Service-Oriented Architecture (SOA) ○ Laravel used for Startups & Jobs database ○ WordPress used for Editorial & Community content ● Separation of concerns ○ FE engineers need not touch API and vice versa ● Hiring ○ Easier to hire a JS guy to implement an API then a WordPress engineer
  • 16. Features ● Can’t use most of the WordPress plugins ○ Custom coded feature as a plugin ■ Comment upvoting, notification, registration, login ● 3rd party plugins mainly backend related ○ AMP, Google XML Sitemaps, Instant Articles, Redis Object Cache, TinyMCE Advanced
  • 17. Services ● Impossible to built everything ourselves ● Search in WordPress is horrible ○ Google Custom Search ○ https://developers.google.com/custom-search/ ● Jetpack Notification is a closed service ○ Stream ○ https://getstream.io/ ● Jetpack Proton doesn’t work for our use-case ○ Kraken ○ https://kraken.io/
  • 18. Authentication, Authorization and Session ● Deal with Authentication, Authorization and Session management ● Authentication / Authorization ○ WordPress ○ wp_signon() and user_can() function ● Session ○ Data stored in Redis ○ Overwrite WP session data with “determine_current_user” filter ○ Session information is set in cookie in the browser ○ Cookie sent along with API request (web) or via Authorization
  • 19. Rate Limiting / Caching ● API is open, prone to abuse ● Rate limiting GET / PUT / POST requests ○ Discourage spamming ○ Return 429 Too Many Requests when that happens ● Caching ○ Most of our users are “logged out” which makes caching easy ○ Most GET requests should be cached ○ Even a 1-minute cache would help for a heavy traffic site like TIA
  • 20. Future? ● Editorial CMS like Automattic’s Calypso ○ Bypass WP-Admin ○ Desktop app using React with Electron ○ Customized to our editor’s workflow ○ More APIs needed
  • 21. React as our Front-end React as our Front-end
  • 22. Choosing a front-end framework ● 2015 was an interesting year for front-end development. ○ React’s popularity exploded. ○ Angular 2 was being announced; not fully backward compatible with Angular 1. ○ ES2015 - the most significant upgrade to JavaScript was finalised in June.
  • 23. React’s Virtual DOM Credits: http://calendar.perfplanet.com/2013/diff/
  • 26. React Ops Stuff ● Babel (https://babeljs.io/) ○ Transpile JSX and ES2015+ code to ES5 ● webpack (http://webpack.github.io/) ○ Module bundler (with a lot of magic) ○ Code splitting ○ Hot reloading
  • 27. Flux Architecture ● An architecture to manage data between different views ● Data travels in a unidirectional flow ● Many variants of Flux - Redux is currently the most popular Credits: https://code-cartoons.com/a-cartoon-guide-to-flux-6157355ab207
  • 28. Routing with React ● Routing separate from WordPress ● Using react-router (https://github.com/reactjs/react-router) ● How do we handle pretty permalinks? (https://www.techinasia.com/%postname%) ○ Custom WP REST API that takes in the slug ○ Call the API that returns the post object ○ Get post type from the object ○ Render the correct component accordingly (page / post)
  • 29. Search Engine Optimization ● SPA + SEO don’t really go well together ○ Not all search engines can “understand” JavaScript ● One trick: take a “screenshot” of the page ○ Service: Prerender.io (https://prerender.io/) ● Dynamically adding meta tags into the document: ○ react-helmet (https://github.com/nfl/react-helmet)
  • 30. Tips on Starting out React ● Cover the basics without the ops part: https://facebook.github.io/react/docs/getting-started.html ● Start with a good boilerplate (react-boilerplate) ● Learn JavaScript (ES2015+) ○ Challenge: Functional Programming with JS Free book: https://leanpub.com/javascriptallongesix ● Redux: https://egghead.io/courses/getting-started-with-redux