[Maypole] Wish-list

From: n.a (n.a at ad.wakwak.com)
Date: Sun Sep 26 2004 - 13:03:37 BST


Hi all list members,

I'm very new to the maypole.
This weekend, I played with the Maypole Beer DB.
Nice! Great! Interesting!

>> Sebastian Riedel sri at oook.de
>> Sat, 04 Sep 2004 21:36:56 +0200

>> Todo:
>> * fix all open bugs (pager and search results, pager and list order...more?)
>> * put POST and GET data in $r->{params} and deprecate $r->query
>> * call additional_data() and authenticate() for plain templates
>> * make the templates valid XHTML
>> * better documentation and more complex examples
>>
>> Patches are very welcome!

Here are my humble wish lists:

* Good way to make 'Exported' subs.
  I tried to add a "top_five :Exported" sub to 'BeerDB::Beer'
according to 'The Beer Database Revisited' section.
To do this, I must select one of two tricks
  Trick 1:
   Explicitly load 'Maypole::Model::Base' to accomplish compile time
   access to attribute-handling 'MODIFY_CODE_ATTRIBUTES'

  Trick 2:
   Access '%remember' directly.

     package BeerDB::Beer;
     $Maypole::Model::Base::remember{\&top_five}='Exported';
     sub top_five { # delete ':Exported'
      ...

  Discussion
   First trick is not so bad, however I'm not sure this doesn't cause unexpected
   side-effect. Second trick is just ugly.
   Moreover, as manual goes, attribute features are still experimental,
   Therefore it seems not good for end user to use these for now.

Possible alternative is to define 'Export' class-method in
'Maypole::Model::Base' and say something like

     package BeerDB::Beer;
     SUPER->Export(\&top_five); # I'm not sure the syntax at here
     sub top_five {
        ....

* More code-saving option.

>> The Beer Database Tutorial

>> And that's all the programming that we need to do for our beer
database - roughly twenty lines of Perl code.

Yes, but less lines option please. For example, four-lines:

     package BeerDB;
     use base 'Apache::MVC::MORESIMPLE';
     BeerDB->setup("dbi:SQLite:t/beerdb.db");
     1;

All the configurations
  such as
      uri_base
      template_root
      rows_per_page
      'has_a' and 'has_many' relations
      untaint_columns
      display_tables
      display_columns (for each table)
      column_names (for each table)
should be stored in 'beerdb.db' itself or other external configuration
file(YML?).

It is also exciting to have a Web-based GUI configuration feature for these
parameters!

Buy the way, for the win32-things,
>> Simon Cozens simon at simon-cozens.org
>> Sat, 25 Sep 2004 17:42:24 +0100

>> Here are some notes I made while getting Maypole up on Win32:

>> And then tests pass. Wee!

I also have succeeded to install Maypole on my Apache1/Activeperl/XP-box.
However when I installed two maypole applications (or sub-classes ?),
the behavior is dubious.
When I try to make a list view of second application, error occurs.
It seems some-cache mechanize goes wrong.(cache of IE, Apache1, mod-perl,
Class::DBI or Maypole).
This does not occur in a Linux-box.

I'm not deeply investigate this yet. Therefore, this is not a bug report
but just an information for now.

N.A.

---

Version Info perl -v This is perl, v5.8.4 built for i386-linux-thread-multi

modules version DBD::SQLite 1.05 DBI 1.43

Class::ISA::self_and_super_versions('BeerDB') says, Apache::MVC, 0.3, Maypole, 1.7, Class::Accessor, 0.19, Class::Data::Inheritable, 0.02

Class::ISA::self_and_super_versions('BeerDB:Pub') says, Maypole::Model::CDBI, Maypole::Model::Base, -1, set by base.pm, Class::DBI, 0.96, Class::DBI::__::Base, -1, set by base.pm, Class::Data::Inheritable, 0.02, Class::Accessor, 0.19, Ima::DBI, 0.33, Class::DBI::SQLite, 0.04 # I made a dury hacking in 'Class::DBI::SQLite' to live with SQLite3.

apache version Apache/1.3.31 (Debian GNU/Linux) mod_perl/1.29 configured

_______________________________________________ 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