[pmwiki-users] most user-friendly method of database configuration
Crisses
crisses at kinhost.org
Sun Oct 15 14:04:21 CDT 2006
On Oct 15, 2006, at 2:34 PM, marc wrote:
> Crisses said...
>>> $dbtype = $db['moodle']->get_dbtype();
>>
>> Because that's not very much different than:
>> $dbtype = $Databases['moodle']['type'];
>
> Apples and oranges to me.
I meant for the config.php variables. I lean towards an array
definition rather than requiring admins to configure classes.
>> thus doesn't warrant having to make a whole class layer for it.
>
> What's a class layer? If you're instantiating the object, and its db
> type is a necessary attribute for its constructor, then its type
> should
> live with the object, surely.
That would be up to the cookbook authors -- I was talking about
config.php -- I don't expect admins to be creating object
instances... just configuring the database variables needed for all
the various database-using programs they want to use.
PmWiki is layered. Obviously the authors have the lightest layer,
with the highest abstraction from the code. Admins are closer to the
code. Cookbook authors still deal with a layer of abstraction to the
wiki code, but are up to their elbows, and PM is whole-hog immersed
in it. So there is a class layer involved in what you're saying a
cookbook author would be using -- one class layer is ADOdb.
>> If you have good reasons sure -- but right now we're taking a big
>> step as recipe authors to incorporate ADOdb. Doing so moves the
>> database-using recipes out of the hands of the beginner cookbook
>> authors (who can ask for help, and learn, but when you want to
>> accomplish something quick and concrete that's often too much to
>> ask!).
>
> Okay, I'll back out here. I was trying to assist, because I already
> use
> ADOdb in my recipes and have amended many existing recipes likewise.
> Good luck.
What I'm saying is that we're asking authors to use ADOdb but telling
them how to use it is another level of asking for people to do
things... baby steps. If you want to create a "best practices" page
for authors to use the ADOdb abstraction layer for their recipes, I
know I'll be reading it rather than learning as I'm going along.
Crisses
More information about the pmwiki-users
mailing list