1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    32
    Vote Rating
    0
    scottpenrose is on a distinguished road

      0  

    Default Ext.Direct Perl

    Ext.Direct Perl


    Hi Team

    On Friday I built my first two Server Stack backends for Ext.Direct in Perl.

    The first implementation (called simple) is there as a reference implementation. It is a useful source to help get you started porting Ext.Direct functionality to your own framework.

    The second implementation (called modperl) is a more complete and functional implementation, and because all classes are loaded at Apache start time, it is quite fast.

    I have not completed all functionality (e.g. file uploads).

    Enjoy

    Scott
    UPDATES
    • 27/August/2009 - support for before/after hooks & form post data

  2. #2
    Sencha - Community Support Team SamuraiJack1's Avatar
    Join Date
    May 2008
    Posts
    550
    Vote Rating
    3
    SamuraiJack1 will become famous soon enough

      0  

    Default


    Cool. How about to CPAN it?

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    32
    Vote Rating
    0
    scottpenrose is on a distinguished road

      0  

    Default


    CPAN is the plan... I like to put it up only once it is working though, so give me a day or two :-)

    Scott

  4. #4
    Sencha - Community Support Team SamuraiJack1's Avatar
    Join Date
    May 2008
    Posts
    550
    Vote Rating
    3
    SamuraiJack1 will become famous soon enough

      0  

    Default


    Sounds good, will be glad to help if needed.

  5. #5
    Ext User
    Join Date
    Jun 2008
    Posts
    32
    Vote Rating
    0
    scottpenrose is on a distinguished road

      0  

    Default


    Quote Originally Posted by SamuraiJack1 View Post
    Sounds good, will be glad to help if needed.
    Thanks SamuraiJack. What I really need help with is firstly what features people would like? Within reason that is :-)

    Here are some questions:
    • Configuration - what format should the CPAN module accept?
    • Class instantiation - do we need to bother? I have been calling the methods directly.
    • What target - CGI, CGI via simple Module, Apache modperl?

    Mostly I am concentrating on the ModPerl implementation, as that is the one I am currently using, but I can easily abstract it.

    Thanks.

  6. #6
    Sencha - Community Support Team SamuraiJack1's Avatar
    Join Date
    May 2008
    Posts
    550
    Vote Rating
    3
    SamuraiJack1 will become famous soon enough

      0  

    Default


    Quote Originally Posted by scottpenrose View Post
    • Configuration - what format should the CPAN module accept?
    To start a CPAN module use 'module-starter' command-line utility, provided in the Module::Starter distribution.

    Quote Originally Posted by scottpenrose View Post
    • Class instantiation - do we need to bother? I have been calling the methods directly.
    I'd recommend to use Moose - a modern class system implementation for perl. It will handle all the underlaying technical details, like providing constructors, etc.

    Quote Originally Posted by scottpenrose View Post
    • What target - CGI, CGI via simple Module, Apache modperl?
    Mostly I am concentrating on the ModPerl implementation, as that is the one I am currently using, but I can easily abstract it.
    I'd recommend to create an abstract standalone implementation first, and then a plugin for Catalyst.

  7. #7
    Ext User
    Join Date
    Jun 2008
    Posts
    32
    Vote Rating
    0
    scottpenrose is on a distinguished road

      0  

    Default


    Quote Originally Posted by SamuraiJack1 View Post
    To start a CPAN module use 'module-starter' command-line utility, provided in the Module::Starter distribution.
    :-) Not quite what I meant. I have been writing Perl for about 17 years, have lots of perl modules on CPAN - http://search.cpan.org/~scott/

    What I mean is - configuration format. E.g. Config::Config, or Perl Data dump or JSON parsed. Because it is Apache we could use Apache format, but that tends to be a bit heavy weight.

    Quote Originally Posted by SamuraiJack1 View Post
    I'd recommend to use Moose - a modern class system implementation for perl. It will handle all the underlaying technical details, like providing constructors, etc.
    Thanks. I quite like Moose, I used to produce heaps of code using Class::Std.

    Quote Originally Posted by SamuraiJack1 View Post
    I'd recommend to create an abstract standalone implementation first, and then a plugin for Catalyst.
    Yes I think Catalyst is an important one to write for. I have done a few projects with Catalyst but I can't say I am an expert.

    I think the best approach right now is to complete the missing bits in simple - such as file upload.

    Thanks

    Scott

  8. #8
    Sencha - Community Support Team SamuraiJack1's Avatar
    Join Date
    May 2008
    Posts
    550
    Vote Rating
    3
    SamuraiJack1 will become famous soon enough

      0  

    Default


    Quote Originally Posted by scottpenrose View Post
    :-) Not quite what I meant. I have been writing Perl for about 17 years, have lots of perl modules on CPAN - http://search.cpan.org/~scott/
    Sorry )

    Quote Originally Posted by scottpenrose View Post
    What I mean is - configuration format. E.g. Config::Config, or Perl Data dump or JSON parsed. Because it is Apache we could use Apache format, but that tends to be a bit heavy weight.
    Perhaps, Config::Any?

  9. #9
    Ext User
    Join Date
    Jun 2008
    Posts
    32
    Vote Rating
    0
    scottpenrose is on a distinguished road

      0  

    Default


    Quote Originally Posted by SamuraiJack1 View Post
    Perhaps, Config::Any?
    Thanks, that is perfect. The really nice thing is that one supported input is JSON, which we need anyway.

  10. #10
    Ext User
    Join Date
    Jun 2008
    Posts
    32
    Vote Rating
    0
    scottpenrose is on a distinguished road

      0  

    Default New version released

    New version released


    New version released:
    • simple CGI now supports Form posts
    • modperl now supports loading config via Config::Any (Perl, JSON, YAML - you pick).
    • modperl now support CGI form posts and returns (example also updated to show error on email)
    • modperl now supports 'before' and 'after' method calls on each action and method - allows you to implement your own security, logging etc.
    • modperl now "use CGI;" for form data

    Scott