[Nitro] Consistency
Jonathan Buch
john at oxyliquit.de
Wed Dec 27 19:01:11 EST 2006
Hi,
> I think, we should make Nitro/Og more consistent with names. Let me
> present a list with alternatives for the same concept and the synonym
> I propose to keep:
>
> template, view -> template (already converted)
Sidenote:
This brings me to a thought I had since I was last in a course in
university here: They tought us the MVC concept and it was a little
different from what we do with Nitro.
The *View* in that concept is the calculating and presenting data to the
outside. This is what our templating mechanism and (surprise)
_the Nitro::Controller_ does. The *Model* is the complete application
logic together with the data. This is what currently the Og models
are, and also what we currently put often in the controller. The
*Controller* finally is the part accepting requests from the outside.
This picture was shown:
+------------------------+
<- | View | |
+------------| Model |
-> | Controller | |
+------------------------+
I'm coming to that, since I just read the documentation for the Python
framework Django. In http://www.djangoproject.com/documentation/faq/
it explains quite nicely on the question: "Django appears to be a MVC
framework, but you call the Controller the "view", and the View the
"template". How come you don't use the standard names?".
Note, that I would never ever propose to rename anything in Nitro based
on this information. As the Django doc make clear, it's just how you
get the job done. :P
(This was just a little 'excurse' to look a little beyond one's own nose.)
> adapter, store -> adapter (already converted)
I'm not sure that they are synonyms here... you explained quite nicely
a long time ago why they are different. The distinction here is quite
important (unimportant for someone just using Og) for the developer to
see where he is in the 'general layout'.
> model, entity, managed_class -> entity
This makes sense, yes. Although 'entity' is less descriptive than
managed_class or model. Less descriptive doesn't mean bad, but a
little 'redundancy' in the 'language' helps to understand the general
intent.
Og::Manager.entities
Og::Manager.managed_classes
Here entities sounds a little ambiguous. Since 'entity' only means
'thing/unit' in the english language, it could also mean 'all manager
instances'.
> scaffold, enchant -> enchant
I had a look inside the nitro scaffolding thing, I didn't even know
about it, and it does not seem like I would ever use it...
Yes, the scaffold -> enchant is probably the right thing to do.
> If you can find more synonyms, please let me know. If you think that
> we should keep a different synonym, let me know as well. Please note
> that I would like to keep the same synonyms throughout Nitro and Og
> (for example not scaffold in Nitro, enchant in Og)
>
> Using consistent names will make Nitro more accessible to new comers.
Make that 'newcomers browing the source'. :P
Sorry for the post with probably more question than answers, I felt a
little like making a post about general 'philosophy'. :)
I feel a little like William now (in a good sense). :P
Jo
--
Feel the love
http://pinkjuice.com/pics/ruby.png
More information about the Nitro-general
mailing list