going thru /components/palettes raised a few more questions:
- do all these files need to be suffixed with _palette while they are in
this directory? probably yes as long as there is tiles.js, but this
file might be moved into /components/main/, although currently used
only by palettes? this somewhat relates to a question in a previous
mail about directory structure (and is just being a pedantic ass).
- chat_form_submitted: it feels a bit weird to just evaluate whatever
comes back from the server. not so much about security implications,
but from a documenting pov, what is expected to come back from there?
- EventsPalette: i see we can't use Events as a name here, but then we
should probably rename the other palette-related class like Chat to
ChatPalette, etc.?
- ideas_palettes: rename to ideas_palette? or rather idea_palette to
go with proper english (see other mail)? :)
- ideas_palettes: so this is somewhat a combined palette for wishes and
adventures? why do the adventure functions return adventures AND
wishes? imho we should seperate these into wish_palette and
adventure_palette, as they appear seperated to the user (and actually
fill the wish window with something, albeit static content for the
moment).
- resources_palette: it appears to me this name puts a focus on
resource instead of share, although it might cause confusion with a
Resource in the database sense? rename that file to share_palette?
- tiles: why do wishes use proj_tile? rename it to wish_tile? actually,
i wonder if these 3 templates can be put into the respective palette
file, making tile.js obsolete?
cheers,
marmorkuchen
--
_ ascii ribbon campaign .oOo. GCSd-s:+aC++ULB+++W++M+PS+++Y+
( )
X Die Basis einer gesunden Ordnung ist ein grosser Papierkorb.
/ \
Yes. An emerging convention in rails and javascript coding is to name
every file with two words, where the second word is some kind of
architecture related word. So we have application_controller and
icon_factory and person_model.. This is redundant, but helps people
understand what's in the file without looking at it. It also helps
people who use TextMate or certain emacs or vim modes that let you jump
to files by typing their initials.
>- chat_form_submitted: it feels a bit weird to just evaluate whatever
> comes back from the server. not so much about security implications,
> but from a documenting pov, what is expected to come back from there?
Everything the server ever sends is eval'ed, and it's all in the
vstart.js format, consisting of calls to event(), item(), city(),
idea(). There is never any data from the server that is not in this
format.
It may make sense to wrap the eval in another function, to make
it read clearer.
>- EventsPalette: i see we can't use Events as a name here, but then we
> should probably rename the other palette-related class like Chat to
> ChatPalette, etc.?
I'll think about it. I'm definitely still playing with the new names.
>- resources_palette: it appears to me this name puts a focus on
> resource instead of share, although it might cause confusion with a
> Resource in the database sense? rename that file to share_palette?
Again, I'll think about it. I guess "share" is about sharing what YOU
have, while "resource" (for lack of a better name) is for what's out
there that other people have shared. I think.
>- ideas_palettes: rename to ideas_palette? or rather idea_palette to
> go with proper english (see other mail)? :)
>
>- ideas_palettes: so this is somewhat a combined palette for wishes and
> adventures? why do the adventure functions return adventures AND
> wishes? imho we should seperate these into wish_palette and
> adventure_palette, as they appear seperated to the user (and actually
> fill the wish window with something, albeit static content for the
> moment).
>
>- tiles: why do wishes use proj_tile? rename it to wish_tile? actually,
> i wonder if these 3 templates can be put into the respective palette
> file, making tile.js obsolete?
Okay, so there is not a one-to-one correspondence between palettes and
tile types. In particular, the ideas_palette displays both adventure
tiles and wish tiles. The wish_palette displays only wish tiles.
The wish_palette is displaying YOUR wishes, while the ideas_palette is
displaying ideas for things you might want to organize, including other
people's wishes and these things I'm calling adventures for the moment,
which are randomly generated landmark/idea combos.
That said, the name proj_tile could be something else. I'm going to be
dealing with those in the next few days and I'll figure something out.
I'll make sure its uniform by the time I'm done.
--Joe