Antville Project

skinmanager consolidation

I just commited a patch to CVS to get rid of dual skin managing infrastructure in weblogs: "skinmanager" containing the skins and "skins" doing functional management on them. From now on, everything is contained and managed within the skinmgr prototype. The direct benefit is that some code becomes a bit nicer, but the real reason is to make the skin manager less dependent on its surrounding (I was playing with plugging a skinmanager at antville root level, wich is now possible with a few additional hacks, but it's also possible that somebody might want to plug it into a different application altogether.) Let me know if you encounter any problems (in your local installations - it's not on antville.org yet).

PS: An interesting experiment: update to the newest CVS version and then add

skins = mountpoint(skinmgr)

in root/type.properties. Then invoke URL /skins in your antville root. While the skinmanager itself would work, you'll get errors from the security functions and rendering functions which expect a weblog object to be around. If we can solve these errors (not just in a per-case basis by making root look like weblog, but by defining some standard modes of interaction) we'd be able to get true meaningful modularity, I think.

comment    

 
robert, May 16, 2002 at 3:48:43 PM CEST

sounds interesting

first of all thanks for your change - that definetly makes things easier (and nicer too).

reg. your experiment: as long as you don't have any db-stored skins on root it's fine, but how does (should) it work if you want that? root has no WEBLOG_ID (which is the foreign key according to skinmgr/type.properties), which afaik will lead to an sql-clause "where WEBLOG_ID = null" - a thing i wanted to post on helma-list a few days ago but i forgot ;-) maybe that could be solved in helma so that if a value that should appear in an sql-clause is null, the clause should be i.e. "WEBLOG_ID is null".

just curious: how could one make root "look like weblog"? and yes: modules is the way to go ;-)

link  

 
hns, May 16, 2002 at 4:52:46 PM CEST

It's actually a bit different now

With the fix for bug 79, Helma complains (rightly) when adding skin objects to root, since skin objects have an object reference to weblog. After changing that reference to a simple integer property, things work! But not really! Because now root skins have a value of 0 in their WEBLOG_ID field, which happens to be the ID of the root object, but would be mistaken for a weblog id.

So... I think the solution is to extend object references to be able to handle references to different tables/types. I messed around a bit and this is what I came up with. For simple object references (in our case, skin objects' reference to the containing object - notice that I replaced "weblog" with "owner"):

owner = object () owner.local = OWNER_ID owner.foreign = ID owner.table = OWNER_TABLE

And for collections (in our case skinmgr)

_children = collection (skin) _children.local = ID _children.foreign = OWNER_ID _children.table = OWNER_TABLE

I discussed something like this a few days ago with Tom Förster. Comments?

link  

 
hns, May 16, 2002 at 5:28:52 PM CEST

making root "look like weblog"

just curious: how could one make root "look like weblog"?

I was talking about duplicating the functions of weblog in root.

link  

 
robert, May 16, 2002 at 7:11:51 PM CEST

that's how

i found out what i submitted as bug 79 ;-) i did exactly what you described above, and i came to pretty the same conclusion, except that i wouldn't specify the table, but the name of the prototype-column:

owner = object () owner.local = OWNER_ID owner.foreign = ID owner.table = OWNER_PROTOTYPE

or _children = collection (skin) _children.local = ID _children.foreign = OWNER_ID _children.prototype = PROTOTYPE

this seems pretty consistent to me (.prototype is already used in type.properties-format 1.2).

link  

 
hns, May 16, 2002 at 9:26:38 PM CEST

no strong preferences

between "table" and "prototype". But the notation isn't very clear yet. In the first case, with an object reference,

owner.prototype = OWNER_PROTOTYPE

it's quite clear that we're talking about a local column describing the prototype of the referenced object. But in the case of the collection,

_children.prototype = OWNER_PROTOTYPE

it looks just the same, while it's the other way round. I tried mixing in some pieces of "local" and "foreign", but it remains just as confusing (to me, at least).

link  

 
robert, May 16, 2002 at 10:41:46 PM CEST

"table" appears wrong to me, because it actually defines a column. but you're right: in case of collections this is really confusing (while in case of object-references it looks pretty logical for me) ...

link  

 
hns, May 17, 2002 at 10:10:56 AM CEST

How about

_children.parentprototype = OWNER_PROTOTYPE

I think the "parent" fits well with the "_children". The original version

_children.prototype = CHILD_PROTOTYPE

could mean a local column defining the prototype of child objects, although I'm not sure we'll need this.

link  

 
robert, May 17, 2002 at 11:29:42 AM CEST

definetly a better way to describe that, but it's still not absolut logical. i assume you already checked this:

_children.foreignprototype = OWNER_PROTOTYPE

to some point this makes sense to me, because _children.foreign = OWNER_ID also references a foreign column defining the parent's id. so the whole stuff would look like this:

_children=collection(skin) _children.local=ID _children.foreign=OWNER_ID _children.foreignprototype=OWNER_PROTOTYPE

but this also might be confusing, because .foreignprototype could easily be misunderstood for defining the children's prototype ... so i think your suggestion is definetly best.

(but maybe we should discuss this on hop-mailinglist)

link  


... comment
 
tobi, May 17, 2002 at 4:47:38 PM CEST

remove files in /skin?

i did not follow the whole discussion here, but would like to know if the prototype skin is now obsolete and could/should be deleted in my local installation/cvs?

link  

 
hns, May 17, 2002 at 5:50:52 PM CEST

nope

I just removed a collection (aka virtual subnode) from weblog objects. Even if we had removed any files, CVS would do that for you as part of updating.

link  


... comment


The Antville Server Fund has been a great success. Thanks to everybody who contributed!
online for 8550 Days
last updated: 1/4/11, 10:22 AM
status
Youre not logged in ... Login
menu
November 2024
SunMonTueWedThuFriSat
12
3456789
10111213141516
17181920212223
24252627282930
July
recent
zfuture's house here is zfuture's
house
by zfuture (7/31/03, 2:59 AM)
i understand your concerns however,
i hardly can think of a solution. certainly, if the...
by tobi (7/29/03, 9:47 AM)
Found several more similar sites
listed This is getting to be quite a concern to...
by cobalt123 (7/27/03, 7:56 PM)
Second Post Alert on Referrer
bug livecatz I put this into "help" and now here:...
by cobalt123 (7/26/03, 7:14 PM)
well it's not easy to
find from here, anyway. think we should include a link,...
by tobi (7/24/03, 11:25 AM)
So finally I found
the helma Bugzilla - stupid me.
by mdornseif (7/24/03, 10:28 AM)
clock not that it's particularly
earthshattering but the antclock is running slow by about 15...
by kohlehydrat (7/23/03, 8:25 PM)
but blogosphere.us isn't can't really
be rated as spam can it?
by kohlehydrat (7/23/03, 8:08 PM)
More referrer spam www.webfrost.com
by Irene (7/23/03, 7:55 PM)
How to log skin names
I accessed to console?? Hi, I would like to know...
by winson (7/23/03, 4:12 PM)

Click here to get an XML version of this weblog.

Made with Antville
powered by
Helma Object Publisher