RE: [Maypole] Maypole 3.0 brainstorming

From: CUMMING, Joe, FM (Joe.CUMMING at rbos.com)
Date: Wed Oct 27 2004 - 16:48:02 BST


Can we granularize access permissions at a function level by expanding the
list of function decorators, e.g.

sub recent :Exported {
    // default access
}

sub recent :Exported Protected() {
    // only visible to those with some set permissioning
}

sub recent :Exported Protected(Admin) {
    // only visible to those with admin permissioning etc
}

-----Original Message-----
From: maypole-admin at lists.netthink.co.uk
[maypole-admin at lists.netthink.co.uk] On Behalf Of Sebastian Riedel
Sent: 27 October 2004 16:00
To: maypole at lists.netthink.co.uk
Subject: [Maypole] Maypole 3.0 brainstorming

Hi,

Now that we finally finished 2.0 it's time to think about the future.
The brainstorming started today on #maypole, maybe you guys have some
good ideas too.

  - support for multiple models (we definately need this)
    
      the implementation details are still to be defined, this is just
      a first try:

      package MyApp;
      use Maypole::Application qw/YAML -Setup/;

      package MyApp::Model::MyCDBI::Beer;

      sub ping :Exported {}

      package MyApp::Model::AnotherLDAP

      sub test :Exported {}

      __DATA__
      models:
        MyCDBI:
          base: CDBI
          dsn: 'dbi:mysql:myapp'
          user: myapp
          pass: secret
        OurLDAP:
          base: LDAP
          host: lalala
          foo: bar
        AnotherLDAP:
          base: LDAP
          host: foo
        SomePlucene:
          base: Plucene
          path: '/tmp/'
      uri_base: 'http://maypole.perl.org/myapp/'
      rows_per_page: 10
      application_name: MyApp

  - support for Controller classes (like ruby on rails) (i'm unsure about
this, maybe it just adds bloat)

      package MyApp;
      use Maypole::Application qw/YAML Authentication::Abstract Relationship
-Setup/;
      use Maypole::Constants;

      sub authenticate {
          my $r = shift;
          $r->private;
          unless ($r->user) {
              $r->controller('authentication')
              $r->action('login');
          }
          return OK;
      }

      package MyApp::Controller::Authentication;

      sub login :Exported { }

      package MyApp::Controller::Blog;
      use MyApp::Model::MyCDBI::Blog qw/-Default/;
      use MyApp::Model::MyCDBI::Post;

      sub recent :Exported {
          my ($self, $r) = @_;
          $r->objects(MyApp::Model::MyCDBI::Post->recent_posts);
      }

  
      package MyApp::Controller::Tag;
      use MyApp::Model::MyCDBI::Tag qw/-Default/;

      package MyApp::Model::MyCDBI::Post;

      sub recent_posts {
        return MyApp::Model::MyCDBI::Post->search_where(recent=>"1");
      }

      __DATA__
      models:
        MyCDBI:
          base: CDBI
          dsn: 'dbi:mysql:myapp'
          user: myapp
          pass: secret
      controllers:
        - Authentication
        - Blog
        - Tag
      uri_base: 'http://maypole.perl.org/myapp/'
      rows_per_page: 10
      application_name: MyApp
      relationships:
        'posts have tags'

So let the brainstorming begin! :)

sebastian

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole

***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority
 
This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.
                                                                                                        
Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The Royal
Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
                                                                                                               Visit our websites at:
http://www.rbs.co.uk/CBFM
http://www.rbsmarkets.com
                                                                                                       ********************************************************************************

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT