npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

extdirect

v2.0.5

Published

Ext.Direct connector for Sencha Touch/ExtJS

Downloads

267

Readme

Sencha Ext.Direct connector for node.js

Important: Version 2.0.0 and up is not compatible with previous 1.x branch

Compatibility:

  • Sencha Touch 2.3+
  • Ext JS 4.2.x+
  • Ext JS 5+
  • Ext JS 6.5+

Example code

Sample applications for Touch and Ext JS can be found here: https://github.com/jurisv/extdirect.examples

Official Sencha example (using Ext JS 6.5) can be found here: https://github.com/sencha-extjs-examples/Coworkee

Ext JS:

* Application structure with API provider
* Grid CRUD Master-detail
* Cookie / Session
* Direct method call, shows regular call and onw that has hard exception (syntax error)
* Form Load / Submit
* Form file upload (Cross domain upload is not supported!)
* Tree root / child dynamic load
* Metadata (Starting from Ext JS 5)
* Namespaces (From 4.2)

Sencha Touch:

* Application structure with API provider
* List read using directFn
* Form load / submit

Usage

For usage please refer to Examples.

Configuration description:

{
    "ES6": false, // Support method discovery without `function` keyword.  
    "rootNamespace": "Server", // Namespace in which server will be accessible from client side
    "apiName": "API", // API name
    "apiUrl": "/directapi", // URL to retrieve API configuration
    "classRouteUrl": "/direct", // URL to call Direct methods
    "classPath": "/direct", // Direct class location in filesystem relative to the server directory
    "server": "localhost", // Hosting server name
    "port": "3000", // Hosting server port
    "protocol": "http", // http | https
    "timeout": 30000, // Operation timeout
    "cacheAPI": false, // Set true to cache API's for production. During development setting to false will allow to make any changes and access API's without server reload.
    "relativeUrl": false, // Use relative URL's
    "appendRequestResponseObjects": true, // If true, will append req and res objects to method call
    "enableMetadata": true, // Metadata support
    "responseHelper": true, // Automatically append success true|false
    "enableProcessors": true //Enable Helpers to have methods before and after API discovery as well as before and after Transaction batch
}

Changelog:

  • 2.0.5 (10 jul 2017)

    • Add link to Sencha official example. No changes in API.
  • 2.0.4 (14 may 2017)

    • Support method discovery without function keyword. Implement #35
  • 2.0.3 (14 may 2017)

    • Wrong url is computed at request /directapi Fix #36
  • 2.0.2 (23 feb 2017)

    • Fix deeply nested api discovery
  • 2.0.1 (3 jun 2015)

    • Allow callback to return boolean "false" value. (@cpmoser)
  • 2.0.0 (14 may 2015)

    • Comment source code and use descriptive variable names #21
    • Implement namespaced Classes to have nested actions #29 See below
    • Add namespace support (nested Actions) You can now organize files using folders
    • More streamlined definition for metadata and formHandler (//@meta and //@formHandler )
    • Exclude non .js files from API discovery
    • Separate route paths for classes (classRouteUrl and classPath)
    • Use latest Express framework in examples, closes #28
    • New property 'cacheAPI' allows to bypass node module caching, which gives the option to work on class files without reloading the server
    • Callback format changed to be in line with node.js standards callback(err, result); closes #30
    • New property 'responseHelper'. It will add success: true/false to result payload if:
      • We set success to true if responseHelper is TRUE and callback is called without any arguments or with true as result or result object is present, but success is missing
      • We set success to false if autoResponse is TRUE and callback is called with result set to false
    • Place Processor files or any othere relevant scriots in .scripts folder. It will be ignored during API discovery
    • API Processor. Two methods beforeApi and afterApi to hook in to API discovery flow. See Examples for ExtJS
    • Router Processor. Two methods beforeTransaction and afterTransaction. See Examples for ExtJS. Use them to open and close db connection.
    • Add support for metadata #27