1. #1
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Boca Raton, FL
    Posts
    94
    Vote Rating
    1
    jimmifett is on a distinguished road

      0  

    Default ExtDirectCF: A Managed ColdFusion Server-side stack with security

    ExtDirectCF: A Managed ColdFusion Server-side stack with security


    This is a new, heavily modified fork of aconran's DirectCFM (http://extjs.com/forum/showthread.php?t=67983) that I am calling ExtDirectCF.

    Link to original details about this project and it's evolution:
    http://extjs.com/forum/showthread.ph...767#post337767

    Features:
    Register exposed cfcs as in a stateful bean in application scope.
    Fine grain which cfcs and methods to register.
    Limit method registration to specific access scopes (remote, public, package, private).
    Preserve ColdFusion Role based access enforcement.
    Better error handling and reporting similar to java Exceptions.
    Re-written in efficient cfscript.
    Full scoping of access permission and variables.
    Managment Console style application to manage registered cfcs.
    Saving and loading of Registry.

    To Come:
    Finish mass recursive directory scan
    Un-Registering individual methods from registered components via Management Console
    bug fixes

    v.09
    * Added new Editable Paging Grid example (with Ext.ux.RowEditor) that drives
    off a query object loaded into it's cfc's stateful bean in application scope.
    Demonstrates a full CRUD api implentation. (thanks Ben Nadel for the info on
    deleting rows from a query object)
    * Added an index.cfm page in the ExtDirect directory with links to:
    - ExtDirectCF Management Console
    - the API.cfm page for debugging
    - a link to force the framework to refresh
    - a new readme file and release notes(taken from the forum)
    - a link to the forum itself
    - and a link to the above mentioned paging grid example.
    * Added support for the Ext.Direct 1.0.1 spec.

    v.08
    * Fixed paths to extjs in console.cfm and example.cfm (you will still need to modify these for your own environment)
    * Fixed dialogue size issue for add button in IE

    v0.7
    * Fixed nasty bug killing directFn. directFn now works. See example.cfm.

    * Added ability to load and save the Registry to disk.

    * Init() attempts to load Registry from disk. New arguments for Init() to specify path and file for saving Registry.

    * Added onApplicationEnd() to application.cfc to ensure Registry is backed up to disk when application scope expires.

    * ExtDirect.cfc Self Registers.

    * Added support for 'Stateful Namespaces'. Example: You have a stateful cfc loaded into application or server scope. If you try to invoke it from previous versions, you'll have a new instance of that cfc. Now, you can tell it to use the existing stateful cfc instance. Components.Ext.ExtDirect has a 'Stateful Namespace' of 'application.ExtDirect'

    * Some major internal registry structure changes.

    * Added Management Console (console.cfm) for managing registered components. It does not yet have the ability to unregister individual methods, but it will register and unregister full components.

    v0.6
    * Moved the Component Registry into a private member to prevent abuse (accessible via getExtDirectRegistry()).

    * Moved generateAPI() into the private scope and replaced with getAPIScript() in the public scope.

    * The script API is now cached internally to the bean's private scope (accessed via getAPIScript()) and is updated whenever a component/method is added or removed. This eliminates json reserializing every time the api is loaded into a page, thus saving cpu cycles.

    * Init() method now takes ns and desc as arguments to store internally and be used when generating the API script.

    * Added unRegisterComponent() and unregisterMethod to remove entries from the registry. These will be useful for the Management Console.

    * ExtDirect.cfc now registers itself upon initialization. This is to support the upcomming Management Console.

    * Fixed bug for cffunctions that do not use the 'access' attribute (shame on you! you really should be using it!) and defaults to 'public' scope

    * API.cfm changed to reflect new call to get API script

    * Fixed bug in Example.cfm

    * Expanded Example.cfm to better show off features and usage.

    v0.5
    * Initial Release

    -Jim

    p.s. If the zip file is giving anyone problems, let me know. Try to download with firefox or chrome. IE seems to corrupt it somehow.
    Attached Files
    Last edited by jimmifett; 14 Oct 2009 at 8:28 AM. Reason: Feature Update

  2. #2
    Ext JS Premium Member CutterBl's Avatar
    Join Date
    Aug 2007
    Location
    Nashville, TN
    Posts
    236
    Vote Rating
    0
    CutterBl is on a distinguished road

      0  

    Cool Feedback

    Feedback


    It all sounds great! I've downloaded everything, and look forward to taking 'er for a test drive
    --
    Steve "Cutter" Blades
    Adobe Community Professional - ColdFusion
    Adobe Certified Professional - Advanced Macromedia ColdFusion MX 7 Developer

    _____________________________
    Blog: Cutter's Crossing

    Co-Author "Learning Ext JS 3.2"

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Boca Raton, FL
    Posts
    94
    Vote Rating
    1
    jimmifett is on a distinguished road

      0  

    Default


    update

    v0.6

    fixed some bugs.
    made the example a bit clearer.
    added more support for the upcoming management console.
    made the stack self-registering.
    moved some stuff into private member access.

    see above for full details.

  4. #4
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Boca Raton, FL
    Posts
    94
    Vote Rating
    1
    jimmifett is on a distinguished road

      0  

    Default


    update

    v0.7
    Fixed a few bugs, esp a nasty bug breaking directFn.
    Added Management Console

    see above for more details

  5. #5
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Boca Raton, FL
    Posts
    94
    Vote Rating
    1
    jimmifett is on a distinguished road

      0  

    Default


    The way i'm invoking stateful cfc's (line 158 of ExtDirect.cfc) is pretty ugly, using an evaulate(), but it works. I try to avoid evaluate() like plague infested zombies.

    Does anyone have a better way of doing this?

    PHP Code:
    //StatefulNamespace = 'application.ExtDirect', specified
    //   in the cfcomponent tag's attributes and loaded into the registry
     
    //Arguments.Component is the name of the component with it's dot
    //   path and used as the struct key for variables.extDirectComponentRegistry.
    //   Example: Componets.Ext.ExtDirect
     
    //Arguments.Method is the method to call
    //   Example: saveRegistry
     
    //argv is a name/value parameter struct. With the above examples,
    //   it's simply an empty StructNew()
     
    MyStruct.OperationResult Evaluate("#variables.extDirectComponentRegistry[Arguments.Component]['StatefulNamespace']#.#Arguments.Method#(argumentcollection = argv)"); 
    -Jim

  6. #6
    Ext JS Premium Member CutterBl's Avatar
    Join Date
    Aug 2007
    Location
    Nashville, TN
    Posts
    236
    Vote Rating
    0
    CutterBl is on a distinguished road

      0  

    Question No Evaluate

    No Evaluate


    Have you tried something like...

    Code:
    MyStruct.OperationResult = VARIABLES.extDirectComponentRegistry[ARGUMENTS.Component]['StatefulNamespace'][ARGUMENTS.Method](argumentCollection:argv);
    --
    Steve "Cutter" Blades
    Adobe Community Professional - ColdFusion
    Adobe Certified Professional - Advanced Macromedia ColdFusion MX 7 Developer

    _____________________________
    Blog: Cutter's Crossing

    Co-Author "Learning Ext JS 3.2"

  7. #7
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Boca Raton, FL
    Posts
    94
    Vote Rating
    1
    jimmifett is on a distinguished road

      0  

    Default


    That doesn't work for me since the StatefulNamespace is the actual location in memory for the already instantiated component.

    So, the component is registered as 'Components.Ext.ExtDirect', but the StatefulNamespace 'application.ExtDirect' says that it's already loaded into the application scope under application.ExtDirect.

    PHP Code:
    application.ExtDirect CreateObject("Component""Components.Ext.ExtDirect").Init() 
    So what i'm trying to do is call application.ExtDirect.saveRegistry() dynamically.

    This could also be used when you load stateful cfcs into the server scope:
    PHP Code:
    server.mycfc CreateObject("Component""mycfc").Init() 
    with 'server.mycfc' as the StatefulNamespace, i'd want to dynamically call server.mycfc.someMethod();

  8. #8
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Boca Raton, FL
    Posts
    94
    Vote Rating
    1
    jimmifett is on a distinguished road

      0  

    Default


    Ok, looks like what I want to attempt with function references to replace the evaluate may not work. Oh well, at least evaluate is better than nothing.

    Anywho, some screenshots of the Management Console:
    Attached Images

  9. #9
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Management Console looks neat; great work!
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  10. #10
    Sencha User realjax's Avatar
    Join Date
    Aug 2009
    Location
    Netherlands
    Posts
    412
    Vote Rating
    6
    realjax is on a distinguished road

      0  

    Default


    This looks very interesting.
    I've tried putting ExtDirectCF in a subdir of the webroot but then all hell breaks loose.

    Is that not an option or am I missing something?

    Cheers

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi