ql io and node js next generation open source n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
2012: ql.io and Node.js PowerPoint Presentation
Download Presentation
2012: ql.io and Node.js

Loading in 2 Seconds...

play fullscreen
1 / 40

2012: ql.io and Node.js - PowerPoint PPT Presentation


  • 0 Views
  • Uploaded on

June 2012 presentation on ql.io and working with the system inside Node.js applications.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

2012: ql.io and Node.js


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
    Presentation Transcript
    ql io and node js next generation open source

    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

    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 1

    Topics We’ll Be Covering

    Overview of ql.io

    Language Specifications

    Monkey Patching & Enhancements

    Integrating Into Your Node Applications

    Tools and More

    ql io reducing workload processing

    ql.io: Reducing Workload + Processing

    Reduced Documentation

    Reduced Code Length

    Reduced Result Syncing

    ql io using the system

    ql.io: Using the System

    Web Endpoint

    Standalone Server

    ql io quering the web endpoint

    ql.io: Quering the Web Endpoint

    HTTP GET

    http://ql.io/q?s=QUERY

    ql io using the standalone server

    ql.io: Using the Standalone Server

    Data

    (internal)

    ql.io

    Node Host

    Data

    (external)

    topics we ll be covering 2

    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

    Language: Defining a Data Source

    Include in Request

    Include in .ql Table

    language create table for data source

    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

    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

    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

    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

    Language: Insert Request

    insert into bitly.shorten (longUrl)

    values ('http://ql.io/docs');

    "http://bit.ly/uZIvmY"

    language nested selects

    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

    ql.io: The Test Console

    Test Console: http://ql.io/console

    language including script routes

    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

    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 3

    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

    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

    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

    Patching: The Body Patch

    exports['patch body'] = function() {

    return {

    type: 'application/json',

    content: JSON.stringify({message : 'aok'})

    };

    }

    patching the response patch

    Patching: The Response Patch

    exports['patch response'] = function(args){

    var body = args.body;

    //modify response body

    return body;

    }

    topics we ll be covering 4

    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

    Node.js: Installing the Package

    npm install ql.io-engine

    node js including the engine

    Node.js: Including the Engine

    var Engine = require('ql.io-engine');

    var engine = new Engine({

    connection: 'close'

    });

    topics we ll be covering 5

    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

    Tools: API Masher

    Visualization Engine:

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

    Technology Backbone

    – ql.io

    – jQuery

    – Mustache Templates

    tools api masher 1

    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 2

    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

    Tools: API Masher Results

    Showcase Website: http://jcleblanc.com

    tools external api tables

    Tools: External API Tables

    Tables Source:

    https://github.com/jcleblanc/ql.io-tables

    thank you

    Thank You!

    http://slidesha.re/ql-io-node

    Jonathan LeBlanc

    Developer Evangelist: X.commerce

    Email: jleblanc@x.com

    Twitter: @jcleblanc

    Github: github.com/jcleblanc