SlideShare une entreprise Scribd logo
1  sur  40
ql.io and Node.js: Next Generation
Open Source Web Querying System




                                 Jonathan LeBlanc
                Developer Evangelist: X.commerce
                           Email: jleblanc@x.com
                               Twitter: @jcleblanc
                     Github: github.com/jcleblanc
Topics We’ll Be Covering

        Overview of ql.io

        Language Specifications

        Monkey Patching & Enhancements

        Integrating Into Your Node Applications

        Tools and More
Topics We’ll Be Covering

        Overview of ql.io

        Language Specifications

        Monkey Patching & Enhancements

        Integrating Into Your Node Applications

        Tools and More
ql.io: The Problem is API Overload
ql.io: Developing for Mobile
ql.io: Reducing Workload + Processing


                Reduced Documentation


                Reduced Code Length


                Reduced Result Syncing
ql.io: Increasing Performance (Requests)
ql.io: Error Handling and Reporting
ql.io: Open Standard Foundation
ql.io: Using the System


     Web Endpoint     Standalone Server
ql.io: Quering the Web Endpoint



        HTTP GET
        http://ql.io/q?s=QUERY
ql.io: Using the Standalone Server

      Data
   (internal)
                  ql.io        Node Host




      Data
   (external)
Topics We’ll Be Covering

        Overview of ql.io

        Language Specifications

        Monkey Patching & Enhancements

        Integrating Into Your Node Applications

        Tools and More
Language: Defining a Data Source


   Include in Request   Include in .ql Table
Language: Create Table for Data Source


  create table TABLE_NAME
      on select get from "http://api.com/?val1={val1}"
      using defaults val1="VALUE",
                      val2="VALUE”;
Language: Sample Github Issues Table


  create table github.issues
      on select get from "https://github.com/api/v2/json/
                          issues/list/{user}/{repository}/
                          {state}/"
      using defaults state="open";
Language: Obtain Data From New Tables


        select * from TABLE_NAME
           where val1="VALUE"
           and val2="VALUE"
           limit 10
           offset 3;
Language: Sample Github Table Call

         select * from github.issues
             where user="jcleblanc"
             and repository="reddit-php-sdk";

 {
 "comments": 0,
 "body": "http://www.phpdoc.org/",
 "title": "Use standardized documentation",
 "updated_at": "2011/12/11 13:49:07 -0800",
 "html_url": "https://github.com/jcleblanc/reddit-php-sdk/issues/3",
 "state": "open”
 }
Language: Insert Request


      insert into bitly.shorten (longUrl)
          values ('http://ql.io/docs');



               "http://bit.ly/uZIvmY"
Language: Nested Selects

 select ItemID, ViewItemURLForNaturalSearch, Location
     from details
     where itemId
     in (select itemId
              from finditems
              where keywords='mini cooper');

  [
  "330730216553",
  "http://www.ebay.com/itm/Clubman-Auto-Sunroof-Prem-…",
  "Huntingdon Valley, Pennsylvania"
  ],
ql.io: The Test Console
      Test Console: http://ql.io/console
Language: Including Script Routes

 user = "jcleblanc";
 slides = select * from slideshare where user="{user}";
 twitter = select * from github.users where user="{user}";

 return {
   "slides": "{slides}",
   "twitter": "{twitter}"
 }
 via route '/social' using method post;
Language: Using Script Routes




 curl --header "content-type: application/x-www-form-urlencoded"
            -d "user=jcleblanc" http://localhost:3000/social
Topics We’ll Be Covering

        Overview of ql.io

        Language Specifications

        Monkey Patching & Enhancements

        Integrating Into Your Node Applications

        Tools and More
Patching: Including the Monkey Patch



  create table TABLE_NAME
      on select get from "http://api.com/?val1={val1}"
      using defaults val1="VALUE"
      using patch "patch.js";
Patching: Validating Input Parameters


 exports['validate param'] = function(args, param, value) {
    switch(param) {
        case 'duration' :
             return !isNaN(value - 0)
        default:
             return true;
    }
 }
Patching: The Body Patch


 exports['patch body'] = function() {
   return {
      type: 'application/json',
      content: JSON.stringify({message : 'aok'})
   };
 }
Patching: The Response Patch


   exports['patch response'] = function(args){
      var body = args.body;

       //modify response body

       return body;
   }
Topics We’ll Be Covering

        Overview of ql.io

        Language Specifications

        Monkey Patching & Enhancements

        Integrating Into Your Node Applications

        Tools and More
Node.js: Installing the Package




           npm install ql.io-engine
Node.js: Including the Engine



       var Engine = require('ql.io-engine');
       var engine = new Engine({
                        connection: 'close'
                    });
Node.js: Building the Script
Topics We’ll Be Covering

        Overview of ql.io

        Language Specifications

        Monkey Patching & Enhancements

        Integrating Into Your Node Applications

        Tools and More
Tools: API Masher

    Visualization Engine:
    https://github.com/jcleblanc/api-masher

    Technology Backbone
      – ql.io
      – jQuery
      – Mustache Templates
Tools: API Masher


 var format = “<li><a href=‘{{link}}’ target=‘_blank’>
     <img src=‘{{media:content.media:thumbnail.url}}’
     width=‘{{media:content.media:thumbnail.width}}’
     height=‘{{media:content.media:thumbnail.height}}’ /></a>
     <br /><span class=‘small’>
     <a href=‘{{link}}’ target=‘_blank’>{{title}}</a></span></li>”;
Tools: API Masher

 var query = “create table slideshare
   on select get from ‘http://www.slideshare.net/rss/user/{user}’
   resultset ‘rss.channel’;
   select * from slideshare where user=“jcleblanc”

 var insertEl = “widgetContainer”;

 parser.push(query, format, insertEl);
 parser.render();
Tools: API Masher Results

    Showcase Website: http://jcleblanc.com
Tools: External API Tables



     Tables Source:
     https://github.com/jcleblanc/ql.io-tables
ql.io: The Link
Thank You!
http://slidesha.re/ql-io-node




                  Jonathan LeBlanc
 Developer Evangelist: X.commerce
            Email: jleblanc@x.com
                Twitter: @jcleblanc
      Github: github.com/jcleblanc

Contenu connexe

Tendances

Embulk at Treasure Data
Embulk at Treasure DataEmbulk at Treasure Data
Embulk at Treasure DataSatoshi Akama
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play appsYevgeniy Brikman
 
Asynchronous web apps with the Play Framework 2.0
Asynchronous web apps with the Play Framework 2.0Asynchronous web apps with the Play Framework 2.0
Asynchronous web apps with the Play Framework 2.0Oscar Renalias
 
Restful App Engine
Restful App EngineRestful App Engine
Restful App EngineRyan Morlok
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails DevsDiacode
 
Creating a modern web application using Symfony API Platform, ReactJS and Red...
Creating a modern web application using Symfony API Platform, ReactJS and Red...Creating a modern web application using Symfony API Platform, ReactJS and Red...
Creating a modern web application using Symfony API Platform, ReactJS and Red...Jesus Manuel Olivas
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015Fernando Hamasaki de Amorim
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN StackTroy Miles
 
Aligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsAligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsMatthew Beale
 
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubPowershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubEssam Salah
 
Java Play RESTful ebean
Java Play RESTful ebeanJava Play RESTful ebean
Java Play RESTful ebeanFaren faren
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShellDale Lane
 
Java Play Restful JPA
Java Play Restful JPAJava Play Restful JPA
Java Play Restful JPAFaren faren
 
Professional Help for PowerShell Modules
Professional Help for PowerShell ModulesProfessional Help for PowerShell Modules
Professional Help for PowerShell ModulesJune Blender
 
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsZephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsMark Baker
 
RESTful API Design & Implementation with CodeIgniter PHP Framework
RESTful API Design & Implementation with CodeIgniter PHP FrameworkRESTful API Design & Implementation with CodeIgniter PHP Framework
RESTful API Design & Implementation with CodeIgniter PHP FrameworkBo-Yi Wu
 
Power shell training
Power shell trainingPower shell training
Power shell trainingDavid Brabant
 

Tendances (20)

Embulk at Treasure Data
Embulk at Treasure DataEmbulk at Treasure Data
Embulk at Treasure Data
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
 
Asynchronous web apps with the Play Framework 2.0
Asynchronous web apps with the Play Framework 2.0Asynchronous web apps with the Play Framework 2.0
Asynchronous web apps with the Play Framework 2.0
 
Restful App Engine
Restful App EngineRestful App Engine
Restful App Engine
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 
Creating a modern web application using Symfony API Platform, ReactJS and Red...
Creating a modern web application using Symfony API Platform, ReactJS and Red...Creating a modern web application using Symfony API Platform, ReactJS and Red...
Creating a modern web application using Symfony API Platform, ReactJS and Red...
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN Stack
 
Aligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsAligning Ember.js with Web Standards
Aligning Ember.js with Web Standards
 
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubPowershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge Club
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
effective_r27
effective_r27effective_r27
effective_r27
 
Java Play RESTful ebean
Java Play RESTful ebeanJava Play RESTful ebean
Java Play RESTful ebean
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShell
 
Java Play Restful JPA
Java Play Restful JPAJava Play Restful JPA
Java Play Restful JPA
 
Professional Help for PowerShell Modules
Professional Help for PowerShell ModulesProfessional Help for PowerShell Modules
Professional Help for PowerShell Modules
 
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsZephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensions
 
RESTful API Design & Implementation with CodeIgniter PHP Framework
RESTful API Design & Implementation with CodeIgniter PHP FrameworkRESTful API Design & Implementation with CodeIgniter PHP Framework
RESTful API Design & Implementation with CodeIgniter PHP Framework
 
4.2 PHP Function
4.2 PHP Function4.2 PHP Function
4.2 PHP Function
 
Power shell training
Power shell trainingPower shell training
Power shell training
 

Similaire à 2012: ql.io and Node.js

High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioJonathan LeBlanc
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterHaehnchen
 
From Java to Kotlin - The first month in practice
From Java to Kotlin - The first month in practiceFrom Java to Kotlin - The first month in practice
From Java to Kotlin - The first month in practiceStefanTomm
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Tony Frame
 
Prairie DevCon 2015 - Crafting Evolvable API Responses
Prairie DevCon 2015 - Crafting Evolvable API ResponsesPrairie DevCon 2015 - Crafting Evolvable API Responses
Prairie DevCon 2015 - Crafting Evolvable API Responsesdarrelmiller71
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In ActionHazem Saleh
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesChris Bailey
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroMohammad Shaker
 
Exploring an API with Blocks
Exploring an API with BlocksExploring an API with Blocks
Exploring an API with BlocksPronovix
 
An Overview of Node.js
An Overview of Node.jsAn Overview of Node.js
An Overview of Node.jsAyush Mishra
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code維佋 唐
 
Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)DoiT International
 
Kubernetes Overview - Deploy your app with confidence
Kubernetes Overview - Deploy your app with confidenceKubernetes Overview - Deploy your app with confidence
Kubernetes Overview - Deploy your app with confidenceOmer Barel
 
Creating a modern web application using Symfony API Platform Atlanta
Creating a modern web application using  Symfony API Platform AtlantaCreating a modern web application using  Symfony API Platform Atlanta
Creating a modern web application using Symfony API Platform AtlantaJesus Manuel Olivas
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responsesdarrelmiller71
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Making Things Work Together
Making Things Work TogetherMaking Things Work Together
Making Things Work TogetherSubbu Allamaraju
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Amazon Web Services
 

Similaire à 2012: ql.io and Node.js (20)

High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.io
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
 
From Java to Kotlin - The first month in practice
From Java to Kotlin - The first month in practiceFrom Java to Kotlin - The first month in practice
From Java to Kotlin - The first month in practice
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
 
Prairie DevCon 2015 - Crafting Evolvable API Responses
Prairie DevCon 2015 - Crafting Evolvable API ResponsesPrairie DevCon 2015 - Crafting Evolvable API Responses
Prairie DevCon 2015 - Crafting Evolvable API Responses
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - Intro
 
Exploring an API with Blocks
Exploring an API with BlocksExploring an API with Blocks
Exploring an API with Blocks
 
An Overview of Node.js
An Overview of Node.jsAn Overview of Node.js
An Overview of Node.js
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
 
Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)
 
Kubernetes Overview - Deploy your app with confidence
Kubernetes Overview - Deploy your app with confidenceKubernetes Overview - Deploy your app with confidence
Kubernetes Overview - Deploy your app with confidence
 
Creating a modern web application using Symfony API Platform Atlanta
Creating a modern web application using  Symfony API Platform AtlantaCreating a modern web application using  Symfony API Platform Atlanta
Creating a modern web application using Symfony API Platform Atlanta
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Session-1.pptx
Session-1.pptxSession-1.pptx
Session-1.pptx
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Making Things Work Together
Making Things Work TogetherMaking Things Work Together
Making Things Work Together
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
 

Plus de Jonathan LeBlanc

JavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the ClientJavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the ClientJonathan LeBlanc
 
Improving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data InsightsImproving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data InsightsJonathan LeBlanc
 
Better Data with Machine Learning and Serverless
Better Data with Machine Learning and ServerlessBetter Data with Machine Learning and Serverless
Better Data with Machine Learning and ServerlessJonathan LeBlanc
 
Best Practices for Application Development with Box
Best Practices for Application Development with BoxBest Practices for Application Development with Box
Best Practices for Application Development with BoxJonathan LeBlanc
 
Box Platform Developer Workshop
Box Platform Developer WorkshopBox Platform Developer Workshop
Box Platform Developer WorkshopJonathan LeBlanc
 
Modern Cloud Data Security Practices
Modern Cloud Data Security PracticesModern Cloud Data Security Practices
Modern Cloud Data Security PracticesJonathan LeBlanc
 
Understanding Box UI Elements
Understanding Box UI ElementsUnderstanding Box UI Elements
Understanding Box UI ElementsJonathan LeBlanc
 
Understanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scopingUnderstanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scopingJonathan LeBlanc
 
The Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments GloballyThe Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments GloballyJonathan LeBlanc
 
Modern API Security with JSON Web Tokens
Modern API Security with JSON Web TokensModern API Security with JSON Web Tokens
Modern API Security with JSON Web TokensJonathan LeBlanc
 
Creating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from ScratchCreating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from ScratchJonathan LeBlanc
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaJonathan LeBlanc
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsJonathan LeBlanc
 
Node.js Authentication and Data Security
Node.js Authentication and Data SecurityNode.js Authentication and Data Security
Node.js Authentication and Data SecurityJonathan LeBlanc
 
PHP Identity and Data Security
PHP Identity and Data SecurityPHP Identity and Data Security
PHP Identity and Data SecurityJonathan LeBlanc
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaJonathan LeBlanc
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsJonathan LeBlanc
 
Future of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable SecurityFuture of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable SecurityJonathan LeBlanc
 

Plus de Jonathan LeBlanc (20)

JavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the ClientJavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the Client
 
Improving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data InsightsImproving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data Insights
 
Better Data with Machine Learning and Serverless
Better Data with Machine Learning and ServerlessBetter Data with Machine Learning and Serverless
Better Data with Machine Learning and Serverless
 
Best Practices for Application Development with Box
Best Practices for Application Development with BoxBest Practices for Application Development with Box
Best Practices for Application Development with Box
 
Box Platform Overview
Box Platform OverviewBox Platform Overview
Box Platform Overview
 
Box Platform Developer Workshop
Box Platform Developer WorkshopBox Platform Developer Workshop
Box Platform Developer Workshop
 
Modern Cloud Data Security Practices
Modern Cloud Data Security PracticesModern Cloud Data Security Practices
Modern Cloud Data Security Practices
 
Box Authentication Types
Box Authentication TypesBox Authentication Types
Box Authentication Types
 
Understanding Box UI Elements
Understanding Box UI ElementsUnderstanding Box UI Elements
Understanding Box UI Elements
 
Understanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scopingUnderstanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scoping
 
The Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments GloballyThe Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments Globally
 
Modern API Security with JSON Web Tokens
Modern API Security with JSON Web TokensModern API Security with JSON Web Tokens
Modern API Security with JSON Web Tokens
 
Creating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from ScratchCreating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from Scratch
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication Media
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile Payments
 
Node.js Authentication and Data Security
Node.js Authentication and Data SecurityNode.js Authentication and Data Security
Node.js Authentication and Data Security
 
PHP Identity and Data Security
PHP Identity and Data SecurityPHP Identity and Data Security
PHP Identity and Data Security
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication Media
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile Payments
 
Future of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable SecurityFuture of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable Security
 

Dernier

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

2012: ql.io and Node.js

  • 1. ql.io and Node.js: Next Generation Open Source Web Querying System Jonathan LeBlanc Developer Evangelist: X.commerce Email: jleblanc@x.com Twitter: @jcleblanc Github: github.com/jcleblanc
  • 2. Topics We’ll Be Covering Overview of ql.io Language Specifications Monkey Patching & Enhancements Integrating Into Your Node Applications Tools and More
  • 3. Topics We’ll Be Covering Overview of ql.io Language Specifications Monkey Patching & Enhancements Integrating Into Your Node Applications Tools and More
  • 4. ql.io: The Problem is API Overload
  • 6. ql.io: Reducing Workload + Processing Reduced Documentation Reduced Code Length Reduced Result Syncing
  • 8. ql.io: Error Handling and Reporting
  • 9. ql.io: Open Standard Foundation
  • 10. ql.io: Using the System Web Endpoint Standalone Server
  • 11. ql.io: Quering the Web Endpoint HTTP GET http://ql.io/q?s=QUERY
  • 12. ql.io: Using the Standalone Server Data (internal) ql.io Node Host Data (external)
  • 13. Topics We’ll Be Covering Overview of ql.io Language Specifications Monkey Patching & Enhancements Integrating Into Your Node Applications Tools and More
  • 14. Language: Defining a Data Source Include in Request Include in .ql Table
  • 15. Language: Create Table for Data Source create table TABLE_NAME on select get from "http://api.com/?val1={val1}" using defaults val1="VALUE", val2="VALUE”;
  • 16. Language: Sample Github Issues Table create table github.issues on select get from "https://github.com/api/v2/json/ issues/list/{user}/{repository}/ {state}/" using defaults state="open";
  • 17. Language: Obtain Data From New Tables select * from TABLE_NAME where val1="VALUE" and val2="VALUE" limit 10 offset 3;
  • 18. Language: Sample Github Table Call select * from github.issues where user="jcleblanc" and repository="reddit-php-sdk"; { "comments": 0, "body": "http://www.phpdoc.org/", "title": "Use standardized documentation", "updated_at": "2011/12/11 13:49:07 -0800", "html_url": "https://github.com/jcleblanc/reddit-php-sdk/issues/3", "state": "open” }
  • 19. Language: Insert Request insert into bitly.shorten (longUrl) values ('http://ql.io/docs'); "http://bit.ly/uZIvmY"
  • 20. Language: Nested Selects select ItemID, ViewItemURLForNaturalSearch, Location from details where itemId in (select itemId from finditems where keywords='mini cooper'); [ "330730216553", "http://www.ebay.com/itm/Clubman-Auto-Sunroof-Prem-…", "Huntingdon Valley, Pennsylvania" ],
  • 21. ql.io: The Test Console Test Console: http://ql.io/console
  • 22. Language: Including Script Routes user = "jcleblanc"; slides = select * from slideshare where user="{user}"; twitter = select * from github.users where user="{user}"; return { "slides": "{slides}", "twitter": "{twitter}" } via route '/social' using method post;
  • 23. Language: Using Script Routes curl --header "content-type: application/x-www-form-urlencoded" -d "user=jcleblanc" http://localhost:3000/social
  • 24. Topics We’ll Be Covering Overview of ql.io Language Specifications Monkey Patching & Enhancements Integrating Into Your Node Applications Tools and More
  • 25. Patching: Including the Monkey Patch create table TABLE_NAME on select get from "http://api.com/?val1={val1}" using defaults val1="VALUE" using patch "patch.js";
  • 26. Patching: Validating Input Parameters exports['validate param'] = function(args, param, value) { switch(param) { case 'duration' : return !isNaN(value - 0) default: return true; } }
  • 27. Patching: The Body Patch exports['patch body'] = function() { return { type: 'application/json', content: JSON.stringify({message : 'aok'}) }; }
  • 28. Patching: The Response Patch exports['patch response'] = function(args){ var body = args.body; //modify response body return body; }
  • 29. Topics We’ll Be Covering Overview of ql.io Language Specifications Monkey Patching & Enhancements Integrating Into Your Node Applications Tools and More
  • 30. Node.js: Installing the Package npm install ql.io-engine
  • 31. Node.js: Including the Engine var Engine = require('ql.io-engine'); var engine = new Engine({ connection: 'close' });
  • 33. Topics We’ll Be Covering Overview of ql.io Language Specifications Monkey Patching & Enhancements Integrating Into Your Node Applications Tools and More
  • 34. Tools: API Masher Visualization Engine: https://github.com/jcleblanc/api-masher Technology Backbone – ql.io – jQuery – Mustache Templates
  • 35. Tools: API Masher var format = “<li><a href=‘{{link}}’ target=‘_blank’> <img src=‘{{media:content.media:thumbnail.url}}’ width=‘{{media:content.media:thumbnail.width}}’ height=‘{{media:content.media:thumbnail.height}}’ /></a> <br /><span class=‘small’> <a href=‘{{link}}’ target=‘_blank’>{{title}}</a></span></li>”;
  • 36. Tools: API Masher var query = “create table slideshare on select get from ‘http://www.slideshare.net/rss/user/{user}’ resultset ‘rss.channel’; select * from slideshare where user=“jcleblanc” var insertEl = “widgetContainer”; parser.push(query, format, insertEl); parser.render();
  • 37. Tools: API Masher Results Showcase Website: http://jcleblanc.com
  • 38. Tools: External API Tables Tables Source: https://github.com/jcleblanc/ql.io-tables
  • 40. Thank You! http://slidesha.re/ql-io-node Jonathan LeBlanc Developer Evangelist: X.commerce Email: jleblanc@x.com Twitter: @jcleblanc Github: github.com/jcleblanc

Notes de l'éditeur

  1. Mashing up multiple data sourcesPerformance issuesAdd slides showing performance hits
  2. Most mobile applications will, on average, make at least 5+ HTTP data requests per UI paint.
  3. Language based on a SQL-like syntax which exports all data to JSON
  4. If you’re using the web endpoint you would make HTTP GET requests to the API endpoint, inserting your query in the request. A JSON response will be returned to you.
  5. If you download the standalone server version of ql.io, it will sit on top of your existing node server (or within your node applications) and be able to query your internal data and/or external data sources
  6. A create table call (to define a data source) may be included in the HTTP request to the ql.io web source or defined in a .ql file, which is added into the /tables directory of your application.
  7. Update / Delete requests not currently supported, but are being actively worked on.
  8. create table slideshare on select get from &quot;http://www.slideshare.net/rss/user/{user}&quot; resultset &quot;rss.channel&quot;;create table github.users on select get from &quot;http://github.com/api/v2/json/user/show/{user}&quot;;user = &quot;jcleblanc&quot;;slides = select * from slideshare where user=&quot;{user}&quot;;twitter = select * from github.users where user=&quot;{user}&quot;;return { &quot;slides&quot;: &quot;{slides}&quot;, &quot;twitter&quot;: &quot;{twitter}&quot;}
  9. Route files are also stored with the .ql extension but are placed under the routes directory
  10. var script = &quot;create table geocoder &quot; + &quot; on select get from &apos;http://maps.googleapis.com/maps/api/geocode/json?address={address}&amp;sensor=true&apos; &quot; + &quot; resultset &apos;results.geometry.location&apos;&quot; + &quot;select lat as lattitude, lng as longitude from geocoder where address=&apos;Mt. Everest&apos;&quot;;engine.execute(script, function(emitter) {emitter.on(&apos;end&apos;, function(err, res) {console.log(res.body[0]); });});
  11. var script = &quot;create table geocoder &quot; + &quot; on select get from &apos;http://maps.googleapis.com/maps/api/geocode/json?address={address}&amp;sensor=true&apos; &quot; + &quot; resultset &apos;results.geometry.location&apos;&quot; + &quot;select lat as lattitude, lng as longitude from geocoder where address=&apos;Mt. Everest&apos;&quot;;engine.execute(script, function(emitter) {emitter.on(&apos;end&apos;, function(err, res) {console.log(res.body[0]); });});