[Nitro] Consistency
transfire at gmail.com
transfire at gmail.com
Wed Dec 27 22:53:54 EST 2006
George wrote:
> template, view -> template (already converted)
> adapter, store -> adapter (already converted)
> model, entity, managed_class -> entity
> scaffold, enchant -> enchant
Sigh. I hate to be the contrarian here, but I have to offer a couple of
points.
1) It's better to utilize standard terminology when you can --even if
it's not perfect 1:1 match. It still makes things easier to talk about
and more importantly it's good for MARKETING. When you can say Nito/Og
is "MVC" then that means something to people. Using those terms in the
code then furthers that connection.
2) Some of the terms are simply too general. If I were to come across
one out of the blue/on it's own, I would have no idea what it was. The
terms 'entity' especially just doesn't have much semantic value, might
I suggest "domain" (see MVC on wikipedia). I would also argue that
"adapter" is much more ambiguous than "store". I think "enchant" is
good though.
Having said that I want to say a couple of things about MVC in light of
what others are saying. I think the general notaion of MVC is a little
stilted. I have seen numerous discussions about what it actually means,
and I think that b/c of what James was saying, in that MVC came from
GUI apps and was sort of roughly fitted to Webapps.
With the way web apps work however the Controller is largely the web
server platform itself, ie. managing the HTTP request (this is where
REST comes in). And the View is the response. Whats left to Nitro then
is just the model to view part of control. But what goes unmentioned
in the system is the very back-end --the Data. When you add that to the
picture, a broader picture of "MVC" comes to light where there are
"controllers" all along teh chain: Like this:
User <-> Webserver <-> View/REST <-> Model <-> Adapter <-> Database
<-> Data
We can think of the database as a DataController and so an adapter is
really a "ModelController". The Model is the managed/enchanted class
(DomainController), then the remaining is the usual Controller of MVC.
The first is a "Rest/ViewController", that includes the template system
in the View part, then the "WebController" ie. the Webserver. We could
also add a UserController just before the user, which is the web
browser, but well let that go since the line is big enough ;-)
I know that seems a little confusing, but my point is simply that these
are really different "controllers" all along the flow chain from data
to user and back.
T.
More information about the Nitro-general
mailing list