You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
(57) |
May
(287) |
Jun
(166) |
Jul
(286) |
Aug
(273) |
Sep
(254) |
Oct
(144) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Justin F. <je...@ey...> - 2001-07-09 12:48:48
|
Guys: As you know, and I unabashedly tell everyone, I am developing a number of applications/packages/modules. A lot of these are in the "toy" category, but my motive is to learn the environment and issues that it presents, and will present in a production environment, plus slowly accumulate really useful modules. Now I have a kind of development library that does some useful things like "where is module so-and-so" (in which package I forgot), and other methods that traverse the ./user/mod sub-tree and answer things about packages and modules. What I want right now is a class that understands the BC-used PHP coding standards, in which, there is a method that when given the file path and method name it parses out everything between // {{{ Method and // }}} and returns it. Anybody know where such an animal is? I have been looking around http://www.phpdoc.de/ and in the /usr/share/php/PEAR directory, but haven't found such a class. Can anyone point me to one? I'll find it, eventually, but maybe someone knows... _jef -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |
From: alex b. <en...@tu...> - 2001-07-09 06:55:20
|
> $package.mod_name->method1() That can be achieved with your "tag" patch to Page. I am suggesting something different, which would be designed specifically to manage communication between modules and probably from the outside world as well. > 1) The programmer could insure that a particular module > would be the communicant, even though there were multiple > copies of of the module. Correct. > 2) It seems that this mechanization could be "in parallel" > to any other scheme adapted, adding flexibility. Correct. > 3) Administration may be difficult, as names would > have to be kept track of. This is a major disadvantage, in my view. > == Dynamic Discovery == > This implies that after all the modules have been collected, > they are "registered" somehow by the Message Manager. Then, > a general module wants to do a call to > > $package.mod_name->method() No. MessageManager would be responsible for keeping messages, not keeping track of modules. It would record the source of the message, and make it available to all other modules if they so desire. Messages would be "get" and "set" by modules, and the ModuleManager would serve as the access point. > This is kind of analogous to an RPC call. This could get > complicated. Imagine if you had two drone modules, each > holding a dataset from different DB.TABLE's. Somehow, > the caller using the dataset from the first Drone Module > would need to mark the class "busy", reflecting the idea > that I am not finished with this data, go away. The That concept would not exist because of load order. All of this execution is linear, we don't have memory resident processes doing checks on things, etc. That means you can get, and set a message, but you can't "wait" until you see one. > 4. Give me a "handle" to the FedEx tagged module, > and when I get it, I ask the FedEx module > how much it costs for a 5 lb package > between ZIP_1 and ZIP_2. While you could do the above, that kind of thing is very much the domain of libraries. Modules should need to communicate only data to each other - and while a "network" or method calls is certainly possible if we introduce unique names to the PageDef, It gets very messy very fast. You can pass data from module to module in the global scope for the moment, later we'll have a nice way of dealing with "array traffic" in the system - but even that should be relatively simple. As far as modules making complex references to each other at runtime, while it is certainly possible, I don't see a use for it. Many of the functions that would be supported by such a system are better off as libraries used by a module to construct a chunk of presentation. _a |
From: Justin F. <je...@ey...> - 2001-07-09 03:15:25
|
Alex: I just want to put down here some thoughts for rumination. I am rather intrigued as to what is in your mind as to how the Message Manager would work. Now, any Message Manager only has so much information to work with to find/identify/advertize other modules in the set. I see problems, from my perspective, because it seems, to me, that I can almost defeat any unique way to do this, with an example. == Logical Notation == Logically, it would be nice that if a module wished to talk to another, something like this would be possible, in a kind of logical notation: $package.mod_name->method1() ADVANTAGES: 1) the instigator of this communication would not have to know anything about where that module is in $bc_page. That means that new $bc_page's could be ripped and and modules added/rearranged and the ensemble would not break if package.mod_name is somewhere in the tree. DISADVANTAGES: 1) This would not allow multiple copies of the same package.mod_name. I can imagine an advantage of having a module that gets the data dictionary of a particular DB.TABLE while another module gets the data dictionary of DB1.TABLE1. Or one module goes and SOAP's to some site and another copy is told to go SOAP to another site. Neither of the modules would have any Output. In my mind, I call these Drone Modules, they do a job, but do not print to buffer. 2) Multiple copies of the same Drone Module could only be distinguished by sequence of appearance in $bc_page, which I don't like, because that order may change often if other modules are added during development up front, ruining the hard-coded mapping. 3) The package "name" is really a directory name, and everything would break if a directory were renamed. This is probably unlikely in real life, as it would be a no-no, or a major decision. == Tag Notation == The programmer could identify any module by a tag to guarantee that it will be the only one talked to when the tag is used for selection. ADVANTAGES: 1) The programmer could insure that a particular module would be the communicant, even though there were multiple copies of of the module. 2) It seems that this mechanization could be "in parallel" to any other scheme adapted, adding flexibility. DISADVANTAGES: 3) Administration may be difficult, as names would have to be kept track of. == Dynamic Discovery == This implies that after all the modules have been collected, they are "registered" somehow by the Message Manager. Then, a general module wants to do a call to $package.mod_name->method() and the general module is guaranted that this will be found. This is kind of analogous to an RPC call. This could get complicated. Imagine if you had two drone modules, each holding a dataset from different DB.TABLE's. Somehow, the caller using the dataset from the first Drone Module would need to mark the class "busy", reflecting the idea that I am not finished with this data, go away. The Message Manager would go look for the "next free" Drone Module, and if it is not "busy", runs the method or data retrieval through, marks the module "busy" until the caller "frees" it. Or, the caller just has to insure he doesn't destroy data he doesn't need, dispensing with this "busy" business. (One can get too sophisticated) LOOK, I AM ONLY THINKING OUT LOUD HERE. What I would love to have is ability of loading multiple copies of a Drone Module that talk/fetch to, say, any database accessable in the world. I would like to ask the Message Manager 1. Give me a "handle" to an ODBC Drone Module and when I get it, I do, logically, connect to this URL/database and get a certain dataset. 2. Give me a "handle" to a MySQL Drone Module and when I get it, I do, logically, connect to the local MySQL database and get some dataset as a function of some data that I got in 1) above. Now I do what I want to do with that data, and "release" the two Drone Modules. 3. Give me a "handle" to the module tagged "ZipCodeGIS", and when I get the handle, I can fetch the latitude and longitude of a Zip from the embedded lookup table in the module. Since there is no concept of a lookup table being busy, nothing is required to mark it busy. 4. Give me a "handle" to the FedEx tagged module, and when I get it, I ask the FedEx module how much it costs for a 5 lb package between ZIP_1 and ZIP_2. 5. Give me a "handle" to the Hurricane tagged module, and when I get it, I pass in an array of tuples of time/lat/long/and the Hurricane module fetches a map of the Atlantic Ocean and draws a spline of the hurricane path with GC and deposits this updated hurricane map at some standard place. and so on... So in the above, I don't want to worry about: 1. Where a particular type of (Drone) module lives 2. I either get the reference from the Message Manager or, that there are none available, and I get a fatal error. Better yet, if none are available I import() one on the spot since it was not known apriori how many I would need (this implies being able to "force" another import, a biggie thingy.) This implies that I can write a "Queen Bee" module that is the glue, and does the Output. If I need another task to be done, or another copy of a data fetching and holding module, I add a couple of lines to the XML and re-rip... LOOK, I AM ONLY THINKING OUT LOUD HERE. Maybe I am stretching the functionality you anticipated. All the above is just food for thought. You can see that I am a bit facinated by "Drone Modules" that do a task but have no output. * Ode to BC * I abide my time, By adding a line, To my un-ripped XML, All other ways can go to hell. _jef -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |
From: Odysseas T. <ody...@ya...> - 2001-07-09 01:15:52
|
Great, We have a volunteer for autmomake. Good job John :-) odysseas --- John Donagher <jo...@we...> wrote: > > Dare I mention .. automake > > On Fri, 6 Jul 2001, Odysseas Tsatalos wrote: > > > So that seems to be the problem. > > > > You will need to get the gnu install (part of the > > fileutils package) > > Here is what mine says: > > ----- > > > install --version > > install (GNU fileutils) 4.0p > > Written by David MacKenzie. > > .... > > ----- > > > > Sorry for the trouble. If getting more GNU stuff > is > > a big no no for you, I guess, I could rewrite the > > script to avoid using -D (-D means debugging in > the > > bsd version while it has directory implications in > the > > gnu version) > > > > odysseas > > > > > > --- Jimmy Harlindong <ji...@ha...> wrote: > > > # install --version > > > usage: install [-CcDpsv] [-f flags] [-g group] > [-m > > > mode] [-o owner] > > > file1 file2 > > > install [-CcDpsv] [-f flags] [-g group] > [-m > > > mode] [-o owner] > > > file1 ... > > > fileN directory > > > install -d [-v] [-g group] [-m mode] [-o > > > owner] directory ... > > > > > > It doesn't seem to have --version as an option. > > > I am running FreeBSD 4.3-RELEASE (the latest > > > release) > > > > > > > -----Original Message----- > > > > From: > bin...@li... > > > > > > > > [mailto:bin...@li...] > > > On > > > > Behalf Of Odysseas Tsatalos > > > > Sent: Saturday, 7 July 2001 8:18 AM > > > > To: bin...@li... > > > > Subject: Re: [binarycloud-dev] Make > > > > > > > > > > > > What version of install you are using? > > > > You can do > > > > > install --version > > > > to figure it out. > > > > > > > > > > > > _______________________________________________ > > > binarycloud-dev mailing list > > > bin...@li... > > > > > > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > > > > > __________________________________________________ > > Do You Yahoo!? > > Get personalized email addresses from Yahoo! Mail > > http://personal.mail.yahoo.com/ > > > > _______________________________________________ > > binarycloud-dev mailing list > > bin...@li... > > > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > > > > > -- > > John Donagher > Application Engineer > Intacct Corp. - Powerful Accounting on the Web > 408-395-0989 > 720 University Ave. > Los Gatos CA 95032 > www.intacct.com > > Public key available off http://www.keyserver.net > Key fingerprint = 4024 DF50 56EE 19A3 258A D628 > 22DE AD56 EEBE 8DDD > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ |
From: Jimmy H. <ji...@ha...> - 2001-07-09 00:37:25
|
Diffs for FreeBSD |
From: alex b. <en...@tu...> - 2001-07-09 00:25:36
|
> So once I changed user/ then do a make, then don't touch the stuff in > build/, simply copy the htdoc/ in build into apache docroot for the > virtualhost ? Everything in build is derived, don't do development there. > What if I want to make two sites... Should I make a copy of user/ ? At the moment we don't do multiple sites, you'll have to copy the source tree wholesale. That will change. Also, I find it most convenient to run a symlink to each build: htdocs/whatever/ -> /path/to/binarycloud/build/en/htdocs/ > BTW Alex, I have a simple patch to get the "make" works in freebsd... > Anybody wants it? Can you create a diff and send it to the list? thanks! _alex |
From: Jimmy H. <ji...@ha...> - 2001-07-08 23:35:09
|
So once I changed user/ then do a make, then don't touch the stuff in build/, simply copy the htdoc/ in build into apache docroot for the virtualhost ? What if I want to make two sites... Should I make a copy of user/ ? BTW Alex, I have a simple patch to get the "make" works in freebsd... Anybody wants it? |
From: alex b. <en...@tu...> - 2001-07-08 22:31:19
|
Right, the "unique name" thing. The problem with doing it this way (even though it works :) - is that it relies on the user to setup module names in the page defs, instead of providing a global, standard way of having modules communicate (and check for communication). That adds an (as far as I am concerned) unnecessarily complex "page setup" step which requires an developer integrating your modules to look up Module names, put them in his/her page defs, etc. I can see that getting unweildy very quickly. I far prefer a MessageManager class which is capable of managing that communication than an extension to page which allows us to name tag modules. Any other opinions on this issue? > I did a quick hack to Page to give me the ability to know > what module to talk to by giving a module a "tag", and > gaining access by using this "tag". > > I am only presenting it if someone wants to keep on > writing modules and wishes to communicate between modules. > This hack is, BY NO MEANS, some sort of suggestion for > imcorporation. > > The steps are: > > 1. Put in index.php a global array called Modules_by_tag, thus: > > $Modules_by_tag = array(); > // ripped from /path/to/binarycloud/user/htdocs/index.xml > $bc_page = array( > ... > > 2. Add code in Page.php _IncludeModules($_group) thus: > ...code... > foreach ($modules[$_group]['load'] as $pos=>$mod) { > import("user.mod.$mod[package].$mod[name]"); > $this->modules[$_group][$pos] = new > $mod['name']($mod['options']); > #== added by jef == > $tag = $modules[$_group]['load'][$pos]['tag']; > if (!empty($tag)) { > global $Modules_by_tag; > $Modules_by_tag[$tag] =& $this->modules[$_group][$pos]; > } > #================= > > 4. Add 'tag' as sppropriate in index.php for a module stanza, thus: > array( > 'name' => "Blank", > 'package' => "lib", > 'load_order' => "300", > 'options' => "appears 3rd", > 'tag' => "DataDictionary", > ), > > 5. Access the tagged module properties/methods ANYWHERE thus: > global $Modules_by_tag; > $Modules_by_tag['DataDictionary']->whoami(); > > It works... If you were going to do this, I would suggest using an internal Page variable, like $Page->mod_tags['DataDictionary']->whoami(); It would not require any modification to the page def (except your addition, which is clean) - and would not pollute the global var space. I'm not averse to incorporating a modified version of this, simply becuase it is effectively zero overhead, and it is nice to be able to reference a module by name just for the hell of it. I'll run a couple tests and see. _alex |
From: Justin F. <je...@ey...> - 2001-07-08 19:05:47
|
Alex: I did a quick hack to Page to give me the ability to know what module to talk to by giving a module a "tag", and gaining access by using this "tag". I am only presenting it if someone wants to keep on writing modules and wishes to communicate between modules. This hack is, BY NO MEANS, some sort of suggestion for imcorporation. The steps are: 1. Put in index.php a global array called Modules_by_tag, thus: $Modules_by_tag = array(); // ripped from /path/to/binarycloud/user/htdocs/index.xml $bc_page = array( ... 2. Add code in Page.php _IncludeModules($_group) thus: ...code... foreach ($modules[$_group]['load'] as $pos=>$mod) { import("user.mod.$mod[package].$mod[name]"); $this->modules[$_group][$pos] = new $mod['name']($mod['options']); #== added by jef == $tag = $modules[$_group]['load'][$pos]['tag']; if (!empty($tag)) { global $Modules_by_tag; $Modules_by_tag[$tag] =& $this->modules[$_group][$pos]; } #================= 4. Add 'tag' as sppropriate in index.php for a module stanza, thus: array( 'name' => "Blank", 'package' => "lib", 'load_order' => "300", 'options' => "appears 3rd", 'tag' => "DataDictionary", ), 5. Access the tagged module properties/methods ANYWHERE thus: global $Modules_by_tag; $Modules_by_tag['DataDictionary']->whoami(); It works... _jef -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |
From: Andreas A. <a.a...@th...> - 2001-07-08 18:55:05
|
Hi Alex, > well, looks like private vars will be supported, so a naming standard is > relevant. Well for better readabiliy of course. But since private member vars are only in the scope of the class they belong to (with engine 2.0) and every attempt to access them will fail in an fatal error, the idea is to define as much variables as possible as private and use accessors to get/set them (maybe to perform additional checks). So class variables exposed to the public are reduced to a minium. >> But there should be an convention that classvars should only be accessed by >> getVarname(), setVarname() methods. So this implies all that all varnames >> without an accessor are private ones. > Hmm, I don't know if I agree with that. > What does it get you? i.e. why not, $ClassName->var ? > is there a reason to create a method name to match each public class var? Currently, not an objective reason ;-) Personally I feel better to access variables with get/set routines from outside the class and with $this->varname from the inside. But maybe with Engine 2.0 this could be an issue. If you switch some vars to private and you call them from outside the class with $ClassName->var this will cause an fatal error. >> - multiple Inheritances* >> - private member vars* >> - static member vars >> - exception handling (throw, try, catch) > no shit? No shit, I have a Zend Engine 2.0 Overview flyer here. And Peter pointet out the complete doc. > in any case, doesn't look like varnames are a big controversy :) No they are not. An they should not be. It was just a thought on this topic. Andi |
From: alex b. <en...@tu...> - 2001-07-08 18:27:53
|
> Thanks Odysseas for making this "official". I did > go in and var_dump() stuff in Page to see what was really > happening before and after uasort() and the added ksort(). > There is still that lingering aspect of > "easy" confusion between "load_order" really meaning, > for me, "instantiation order", and having nothing to > to with "loading order" into the output buffer. I think "load" is not the appropriate verb to describe output caught in the outputBuffer - in any case, I suppose we could change the array ket to inst_order or something, but to be honest I think load_order is clear once the concept is explained. > So, in any case, rendering will take place in > appearance order, unless you specifically change it > with a layout template. Exactly. > Still, WHAT I CONSIDER UNACCEPTABLE, in the current > state of affairs, is the near-complete loss of generality > of writing modules if you wish to communicate with > other modules. If you do not put things into I've dealt with that elsewhere, (i.e. yesterday) in other messages. All in good time, there will be an efficient, elegant means of doing module communication. > global scope, one must know, apriori, for any > module, what the appearance order in $bc_page > is for the other module to communicate with since > the suggested idiom is: I suggest for the moment that you use Global variables as a replacement for a manager class, which I will build at some point (after more of core is completed) That is both convenient and conspicuous in your code: $GLOBALS['moo'] is easy to grep for. > According to Alex, some kind of Manager is contemplated > to reduce this intercommunication set of problems to > something simple... Correct. > In the mean time, I want to continue writing modules, > and I am depending on intercommunication, so I may just > hack something to allow me to keep on a-goin'. Or, > just sin, and put things in global scope, and keep on > a-goin'. $GLOBALS all the way. You can do that, and still write good code (each instance of the module would first check to see if a $GLOBALS['stuff'] exists, and use it instead of doing all those queries. A module communication manager is in the pipeline, but other things need to happen first. :) > PS: I find it interesting that youse guys are into this > with a kind of mindset that a module is a_kind_of_standalone_application > and Jason and I went into this with a kind of mindset of > a module is an itty-bitty piece of Lego_which_has_to_communicate... > We are atomic physicists, and you are molecular biologists ;) Ah, but the cool thing about the system is that you can build whatever you like. I actually view modules as Legos, not complete applications. I like to build sets of very simple applications, and connect them to create more complex applications. My dislike for monolithic code is part of the impetus for binarycloud. _alex |
From: John D. <jo...@we...> - 2001-07-08 18:21:01
|
Dare I mention .. automake On Fri, 6 Jul 2001, Odysseas Tsatalos wrote: > So that seems to be the problem. > > You will need to get the gnu install (part of the > fileutils package) > Here is what mine says: > ----- > > install --version > install (GNU fileutils) 4.0p > Written by David MacKenzie. > .... > ----- > > Sorry for the trouble. If getting more GNU stuff is > a big no no for you, I guess, I could rewrite the > script to avoid using -D (-D means debugging in the > bsd version while it has directory implications in the > gnu version) > > odysseas > > > --- Jimmy Harlindong <ji...@ha...> wrote: > > # install --version > > usage: install [-CcDpsv] [-f flags] [-g group] [-m > > mode] [-o owner] > > file1 file2 > > install [-CcDpsv] [-f flags] [-g group] [-m > > mode] [-o owner] > > file1 ... > > fileN directory > > install -d [-v] [-g group] [-m mode] [-o > > owner] directory ... > > > > It doesn't seem to have --version as an option. > > I am running FreeBSD 4.3-RELEASE (the latest > > release) > > > > > -----Original Message----- > > > From: bin...@li... > > > > > [mailto:bin...@li...] > > On > > > Behalf Of Odysseas Tsatalos > > > Sent: Saturday, 7 July 2001 8:18 AM > > > To: bin...@li... > > > Subject: Re: [binarycloud-dev] Make > > > > > > > > > What version of install you are using? > > > You can do > > > > install --version > > > to figure it out. > > > > > > > > _______________________________________________ > > binarycloud-dev mailing list > > bin...@li... > > > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > -- John Donagher Application Engineer Intacct Corp. - Powerful Accounting on the Web 408-395-0989 720 University Ave. Los Gatos CA 95032 www.intacct.com Public key available off http://www.keyserver.net Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD |
From: John D. <jo...@we...> - 2001-07-08 18:20:14
|
On Sat, 7 Jul 2001, alex black wrote: > > I have not defined public/private class vars as php doesn't support them - > is anyone in favor of making an artificial distinctoin similar to the > private class names? > > like: > Private Class Vars: > _varname > Yes, all the code that John, Odysseas and I have written uses this "standard" for methods and properties. John -- John Donagher Application Engineer Intacct Corp. - Powerful Accounting on the Web 408-395-0989 720 University Ave. Los Gatos CA 95032 www.intacct.com Public key available off http://www.keyserver.net Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD |
From: alex b. <en...@tu...> - 2001-07-08 18:17:15
|
> Nope, nada, niente, pas de tout, is > load_order having _ANY_ effect on the > disto index.php. It works like a charm for me? Has done since the first crappy pseudocode version of Page that I wrote :) > then the load order still follows the order of the > module appearance in index.php, instead of > the appearance to load_order of YES! but that isn't load order. remember that _load_ (i.e. instantiation) order is _totally_different_ from output order, which is just the order that you define the modules in the page definition. it is necessary to have the two abstracted - so you can do a query that may affect another module _first_, but send output "last" > which means it is not sorting, but following appearance order. > I even added your ksort fix in Page.php where you said it > should go, and it still just follows appearance order. Look at this array: [Page] => page Object ( [title] => binarycloud page title <-- I added the title, btw :) [modules] => Array ( [content] => Array ( [2] => helloworld Object ( [options] => Array ( [example] => this is an option value [another] => 1 ) [date] => Jul:Sun:2001 ) [5] => helloworld Object ( [options] => [date] => Jul:Sun:2001 ) [0] => otherworld Object ( [stuff] => This is some sample stuff ) [4] => helloworld Object ( [options] => [date] => Jul:Sun:2001 ) [3] => helloworld Object ( [options] => [date] => Jul:Sun:2001 ) [1] => set_lang_example Object ( ) ) *** Note how the above is sorted by _output_ order, but the array kays are _load_ order. in Page, output is done by just looping through $this->modules, whereas instantiation is done by sorting on the array keys. [left] => Array ( [1] => helloworld Object ( [options] => [date] => Jul:Sun:2001 ) [0] => helloworld Object ( [options] => [date] => Jul:Sun:2001 ) ) ) Same here. _a |
From: alex b. <en...@tu...> - 2001-07-08 18:11:21
|
> Hmm, for the moment I don't see a reason. But with ZendEngine 2.0 it may be > supportet but then they would be specially marked i guess (private > $varname). well, looks like private vars will be supported, so a naming standard is relevant. > So a special naming convention isn't really neccessary. > But there should be an convention that classvars should only be accessed by > getVarname(), setVarname() methods. So this implies all that all varnames > without an accessor are private ones. Hmm, I don't know if I agree with that. What does it get you? i.e. why not, $ClassName->var ? is there a reason to create a method name to match each public class var? > - multiple Inheritances* > - private member vars* > - static member vars > - exception handling (throw, try, catch) no shit? > - destructors > - new objects model (similar to java, variables contina object handles > instead of the objects) > - improved OO Apis (java objects, com) > - internationalization (multilingual error messages, unicode, non western > charsets) Yes, this last one is a good step. Everything is pretty ISO-8859-1 heavy, it will be good to get some more mature charset support. in any case, doesn't look like varnames are a big controversy :) _a |
From: alex b. <en...@tu...> - 2001-07-08 18:02:04
|
> Under r2/binarycloud/ there are > base > build > ext > user user/ is where to go. > Which one should I work on and which one should I not touch? > Any hint for *first* time *newbie* on what to do to create a page, have a look at user/mod/hello_world/HelloWorld.php if you create a new module, you'll need to add it to a page definition, take a look at user/htdocs/index.php > template, and an admin area? How about database connection etc? Where do Template: look at user/tmpl/html/masters/example.php -- Database connection: not yet. We haven't really integrated metabase or the QueryManager, so while it is certainly possible if you are willing to do a little foo with metabase setup. _alex |
From: Justin F. <je...@ey...> - 2001-07-08 17:59:34
|
Odysseas: Thanks Odysseas for making this "official". I did go in and var_dump() stuff in Page to see what was really happening before and after uasort() and the added ksort(). There is still that lingering aspect of "easy" confusion between "load_order" really meaning, for me, "instantiation order", and having nothing to to with "loading order" into the output buffer. So, in any case, rendering will take place in appearance order, unless you specifically change it with a layout template. Still, WHAT I CONSIDER UNACCEPTABLE, in the current state of affairs, is the near-complete loss of generality of writing modules if you wish to communicate with other modules. If you do not put things into global scope, one must know, apriori, for any module, what the appearance order in $bc_page is for the other module to communicate with since the suggested idiom is: $Page->modules['group_name'][2]->get_lookup_table() to avoid going into global scope. General modules will have no idea, aprior, where to look for a particular lookup table, for example, unless one establishes a convention that, say, a lookuptable module is _always_ put into a group named something that is apriori agreed upon, and will be the only module in that group. In that cumbersome way, you can count on finding, say, the data dictionary in the module in the 'data_dictionary' group, at index zero, thus: $Page->modules['data_dictionary'][0]->get_data() So the conventions would have to be, for modules that wish to talk, or expose their properties/methods, would cause the conflicting requirements of 1. Loading in a unique group. 2. Being the only module in that group 3. Having to write a layout template to cause output to be rendered in a potentially spaghetti order, instead of the appearance order. 4. Potentially many module groups There are workarounds to this problem of discovering the module that you wish to talk to, if the communicant module appearance/group is not known apriori. Such workarounds that I have thought of, to at least use temporarily until some kind of better facility is built in, is to add something to $bc_page like, array( 'name' => "EyeLibrary", 'package' => "lib", 'load_order' => "100", 'options' => "appears 2", 'tag' => "MySQL_data_dictionary', ), and then go traverse the $bc_page tree until you find the tag "MySQL_data_dictionary", and having kept track of the ['group_name'] and appearance order, then one could talk like: $Page->modules['group_name_found'][$idx_found]->get_data_dictionary(); THIS IS EXPENSIVE. Now I am working/tinkering on something else in $Page, and probably wasting my time, whereby, using that-there completely_unofficial_tag as above, any module can call $Page->modules_by_tag['tag_wanted']->get_data_dictionary() without having to know, apriori, where the hell that module lives in the $Page->modules[] array. According to Alex, some kind of Manager is contemplated to reduce this intercommunication set of problems to something simple... In the mean time, I want to continue writing modules, and I am depending on intercommunication, so I may just hack something to allow me to keep on a-goin'. Or, just sin, and put things in global scope, and keep on a-goin'. _jef_the_sinner PS: I find it interesting that youse guys are into this with a kind of mindset that a module is a_kind_of_standalone_application and Jason and I went into this with a kind of mindset of a module is an itty-bitty piece of Lego_which_has_to_communicate... We are atomic physicists, and you are molecular biologists ;) --- Odysseas Tsatalos wrote: > > The load_order defines the order of module > instantiation (mnemonic: instantiation == loading) not > the order of display. > The order of display is the same as the order of > appearence in the index.php. > So after you run _IncludeModules > the > > $Page->modules['content'] > > order should be (as you noticed) the same as the order > of appearence. > The default layout will simply iterate over that > array outputing the cached output of each module > and that will produce the desired result. > > In order to see the actual order of modules > instantiation just stick a debugging stmt in the for > loop (function _IncludeModules), right after the > instantiation: > > foreach ($modules[$_group]['load'] as > $pos=>$mod) { > > import("user.mod.$mod[package].$mod[name]"); > $this->modules[$_group][$pos] = new > $mod['name']($mod['options']); > echo("group: $_group, module > $mod[name]\n"); > } > > You will see your debugging output right above the > binarycloud image. > > odysseas ------ -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |
From: Odysseas T. <ody...@ya...> - 2001-07-08 15:59:21
|
The load_order defines the order of module instantiation (mnemonic: instantiation == loading) not the order of display. The order of display is the same as the order of appearence in the index.php. So after you run _IncludeModules the $Page->modules['content'] order should be (as you noticed) the same as the order of appearence. The default layout will simply iterate over that array outputing the cached output of each module and that will produce the desired result. In order to see the actual order of modules instantiation just stick a debugging stmt in the for loop (function _IncludeModules), right after the instantiation: foreach ($modules[$_group]['load'] as $pos=>$mod) { import("user.mod.$mod[package].$mod[name]"); $this->modules[$_group][$pos] = new $mod['name']($mod['options']); echo("group: $_group, module $mod[name]\n"); } You will see your debugging output right above the binarycloud image. odysseas --- Justin Farnsworth <je...@ey...> wrote: > Odysseas: > > Nope, nada, niente, pas de tout, is > load_order having _ANY_ effect on the > disto index.php. > > If I comment the layout template in index.php, thus: > > 'modules' => array( > 'content' => array( > # 'layout' => array( > # 'name' => "example", > # 'package' => > "html.layouts", > # ), > > then the load order still follows the order of the > module appearance in index.php, instead of > the appearance to load_order of > > 1st 3 > 2nd 6 > 3rd 1 > 4th 5 > 5th 4 > 6th 2 > > I never have understood this... > > If I put: > > echo "<pre>"; > var_dump($Page->modules['content']); > echo "</pre>"; > > in the HelloWorld.php module, I get > > > array(6) { > [0]=> > object(otherworld)(1) { > ["stuff"]=> > string(25) "This is some sample stuff" > } > [1]=> > object(set_lang_example)(0) { > } > [2]=> > object(helloworld)(2) { > ["options"]=> > array(2) { > ["example"]=> > string(23) "this is an option value" > ["another"]=> > int(1) > } > ["date"]=> > string(12) "Jul:Sun:2001" > } > [3]=> > object(helloworld)(2) { > ["options"]=> > NULL > ["date"]=> > string(12) "Jul:Sun:2001" > } > [4]=> > object(helloworld)(2) { > ["options"]=> > NULL > ["date"]=> > string(12) "Jul:Sun:2001" > } > [5]=> > object(helloworld)(2) { > ["options"]=> > NULL > ["date"]=> > string(12) "Jul:Sun:2001" > } > > which means it is not sorting, but following > appearance order. > I even added your ksort fix in Page.php where you > said it > should go, and it still just follows appearance > order. > > > _jef > > > ------------------------ > Odysseas Tsatalos wrote: > > > > But you were right that the rest of the code > > isn't behaving the way it was supposed to :-) > > > > I needed to add a ksort right before the end of > the > > IncludeModules function > > > > ksort($this->modules[$_group]); > > > > Keep in mind that the the "example" layout that > > index.php comes with is not following the > > default order but it explicitly alters it. > > -- > Justin Farnsworth > Eye Integrated Communications > 321 South Evans - Suite 203 > Greenville, NC 27858 | Tel: (252) 353-0722 > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ |
From: Odysseas T. <ody...@ya...> - 2001-07-08 15:39:40
|
> > What will happen if the load_order value is > a number? That means, what if the value The value of the load_order can be either a string or a number. The only requirement is that when given to the function create_function('$a,$b', 'return $a["load_order"] - $b["load_order"];')); it behaves properly. so any of the sets of numbers below they will end up getting sequenced properly during loading time. 1,2,3 '1','2','3' 45, 78, 108 -8, 1.23, 3.56, 6.78 'a', 'b', 'c' $this->modules[$_group] will always end up being an array that looks like 0 => mod1, 1 => mod2 2 => mod3 ... where mod1, mod2 mod3 are the first/second/third module in your index.php in order of appearence. They will have been instantiated not in order of appearence but based on their load_order: smallest first, biggest last odysseas > of load_order is not quoted, but just > a bare integer? Down the line, will this > value be "interpreted" as an indexed array at > that level, vhen the load_order value is used > as a "key" later, and that value is an int? __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ |
From: Andreas A. <a.a...@th...> - 2001-07-08 15:02:12
|
Hi Alex, > on monday I'll be changing some important variable names, [..] Cool. Very good. > Class Vars: > varname > I have not defined public/private class vars as php doesn't support them - > is anyone in favor of making an artificial distinctoin similar to the > private class names? > like: > Private Class Vars: > _varname Hmm, for the moment I don't see a reason. But with ZendEngine 2.0 it may be supportet but then they would be specially marked i guess (private $varname). So a special naming convention isn't really neccessary. But there should be an convention that classvars should only be accessed by getVarname(), setVarname() methods. So this implies all that all varnames without an accessor are private ones. I had a talk with some guys from Zend at the german LinuxTag. ZE2.0 can be implemented in a timeframe of several months as soon as all specs are final. Other feautures planed with engine 2 are (* not yet final): - multiple Inheritances* - private member vars* - static member vars - exception handling (throw, try, catch) - destructors - new objects model (similar to java, variables contina object handles instead of the objects) - improved OO Apis (java objects, com) - internationalization (multilingual error messages, unicode, non western charsets) Andi |
From: Peter B. <re...@f2...> - 2001-07-08 13:46:55
|
At 07:36 AM 7/8/01 -0400, you wrote: >Now, being a cynic, does this mean that Zend 2.0 would go >into PHP, or will it be one of those Zend products >that are sold...?? This is the next generation Zend engine, the core of PHP, so yes it will be free. Peter. --oOo-- Narrow Gauge on the web - photos, directory and forums! http://www.narrow-gauge.co.uk --oOo-- Peter's web page - Scottish narrow gauge in 009 http://members.aol.com/reywob/ --oOo-- |
From: Justin F. <je...@ey...> - 2001-07-08 11:36:03
|
Thanks, Peter, for pointing this out. This is very interesting. The discussion of introduction of private variables starts on page 27. Now, being a cynic, does this mean that Zend 2.0 would go into PHP, or will it be one of those Zend products that are sold...?? On page 25 is a discussion of Multiple Inheritance. Lordy, this would mean that PHP would really be OOP, and not a kind of shadow OOP. _jef ---- Peter Bowyer wrote: > > At 11:49 PM 7/7/01 -0700, you wrote: > >I have not defined public/private class vars as php doesn't support them - > >is anyone in favor of making an artificial distinctoin similar to the > >private class names? > > You do realise that the next version of the Zend engine will support this? > See http://static.userland.com/sh4/gems/php/Zend%20Engine%202.0.pdf for > more details. > > Peter. > > --oOo-- > Narrow Gauge on the web - photos, directory and forums! > http://www.narrow-gauge.co.uk > --oOo-- > Peter's web page - Scottish narrow gauge in 009 > http://members.aol.com/reywob/ > --oOo-- > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |
From: Peter B. <re...@f2...> - 2001-07-08 11:22:57
|
At 11:49 PM 7/7/01 -0700, you wrote: >I have not defined public/private class vars as php doesn't support them - >is anyone in favor of making an artificial distinctoin similar to the >private class names? You do realise that the next version of the Zend engine will support this? See http://static.userland.com/sh4/gems/php/Zend%20Engine%202.0.pdf for more details. Peter. --oOo-- Narrow Gauge on the web - photos, directory and forums! http://www.narrow-gauge.co.uk --oOo-- Peter's web page - Scottish narrow gauge in 009 http://members.aol.com/reywob/ --oOo-- |
From: Justin F. <je...@ey...> - 2001-07-08 11:22:02
|
Odysseas: Nope, nada, niente, pas de tout, is load_order having _ANY_ effect on the disto index.php. If I comment the layout template in index.php, thus: 'modules' => array( 'content' => array( # 'layout' => array( # 'name' => "example", # 'package' => "html.layouts", # ), then the load order still follows the order of the module appearance in index.php, instead of the appearance to load_order of 1st 3 2nd 6 3rd 1 4th 5 5th 4 6th 2 I never have understood this... If I put: echo "<pre>"; var_dump($Page->modules['content']); echo "</pre>"; in the HelloWorld.php module, I get array(6) { [0]=> object(otherworld)(1) { ["stuff"]=> string(25) "This is some sample stuff" } [1]=> object(set_lang_example)(0) { } [2]=> object(helloworld)(2) { ["options"]=> array(2) { ["example"]=> string(23) "this is an option value" ["another"]=> int(1) } ["date"]=> string(12) "Jul:Sun:2001" } [3]=> object(helloworld)(2) { ["options"]=> NULL ["date"]=> string(12) "Jul:Sun:2001" } [4]=> object(helloworld)(2) { ["options"]=> NULL ["date"]=> string(12) "Jul:Sun:2001" } [5]=> object(helloworld)(2) { ["options"]=> NULL ["date"]=> string(12) "Jul:Sun:2001" } which means it is not sorting, but following appearance order. I even added your ksort fix in Page.php where you said it should go, and it still just follows appearance order. _jef ------------------------ Odysseas Tsatalos wrote: > > But you were right that the rest of the code > isn't behaving the way it was supposed to :-) > > I needed to add a ksort right before the end of the > IncludeModules function > > ksort($this->modules[$_group]); > > Keep in mind that the the "example" layout that > index.php comes with is not following the > default order but it explicitly alters it. -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |
From: Justin F. <je...@ey...> - 2001-07-08 10:53:35
|
Odysseus: What will happen if the load_order value is a number? That means, what if the value of load_order is not quoted, but just a bare integer? Down the line, will this value be "interpreted" as an indexed array at that level, vhen the load_order value is used as a "key" later, and that value is an int? I suppose at the end of the day, 1. MUST WE ALWAYS QUOTE the load_order value in the $bc_page structure to have things work??? 2. MUST WE ALWAYS insure that, within a module group, you _must_ have a strict series of load_order(s) such as, 1,2,3,4....N? The uasort user-supplied comparison function will just return 0, if two load_orders are the same, and the behaviour/ordering is undefined. At that point, if there is no error trapped, then we will not know how to reference and/or talk to that module from another module since if you had, i.e., a group load_order set of 1,2,2,3,4...N, then WHO IS THEN OCCUPYING: $Page->modules['module'][2]??? I know you will want to say, well, just make sure you have a perfect sequence. I will then say, yea, but if I have load_order(s) 11,22,69, I still want it to work "as expected", and "find" the second module to talk to occupying $Page->modules['top'][1] where I would expect it, whereas, if I read you correctly, you would expect it at $Page->modules['top']['22'] if it is a "true" associative array, finally, and not an indexed array, finally. Er, anybody else out there as confused as I am?????? _jef ---------------------------- Odysseas Tsatalos wrote: > > The sorting works as expected. > > Array order and key-value association are two > different things in php. > uasort doesnot change the key association, i.e., you > should not see a 0 indexed element if you didn't > original create one with that key. > > Check the *sort man pages for more info. > > odysseas -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |