Design Question: Where should I put this?

Hi you all,
I’m starting an application with some internal functionalities such as
“converters” and “analyzers”. Basically, my app is a wiki, but
semantically enhanced (I’ve already said that in this forum :D). The
semantic annotations are kind of “parsed” with converters and analysers
of my own, but I don’t really know where do I have to set these conv.
and analy. on my architectural design. Should they be at the model
layer? Or are they kind of controllers?

(BTW, I don’t wanna put this stuff in the lib/ directory. Or even though
I did that, I would like to “draw” them somewhere in my pretty
architectural design diagram :D)

Thanks.

Damaris F. wrote:

Hi you all,
I’m starting an application with some internal functionalities such as
“converters” and “analyzers”. Basically, my app is a wiki, but
semantically enhanced (I’ve already said that in this forum :D). The
semantic annotations are kind of “parsed” with converters and analysers
of my own, but I don’t really know where do I have to set these conv.
and analy. on my architectural design. Should they be at the model
layer? Or are they kind of controllers?

(BTW, I don’t wanna put this stuff in the lib/ directory. Or even though
I did that, I would like to “draw” them somewhere in my pretty
architectural design diagram :D)

Thanks.

Models represent data. They might be global helpers if they are only
used in the view.

But most likely, they are libraries or plugins.

Alex W. wrote:

Damaris F. wrote:

Hi you all,
I’m starting an application with some internal functionalities such as
“converters” and “analyzers”. Basically, my app is a wiki, but
semantically enhanced (I’ve already said that in this forum :D). The
semantic annotations are kind of “parsed” with converters and analysers
of my own, but I don’t really know where do I have to set these conv.
and analy. on my architectural design. Should they be at the model
layer? Or are they kind of controllers?

(BTW, I don’t wanna put this stuff in the lib/ directory. Or even though
I did that, I would like to “draw” them somewhere in my pretty
architectural design diagram :D)

Thanks.

Models represent data. They might be global helpers if they are only
used in the view.

But most likely, they are libraries or plugins.

um…but I thought in MVC, model layer represented the persistent data
AND the business logic…

Anyway, you are right about the helpers, cause I will use data stored in
models, and I will render them somehow.
Buut… I also have the other way round; I have some annotations in the
view (plain text), and I want to transform these ann. into RDF
statements, and then stored them in the repository (the model). Where
should I put this transformer? Cause even though I put this transformer
as a plugin or lib, where do I do the transformation? At the controller,
don’t I?

Lots of thanks.

Alex W. wrote:

Models represent data.

Lets not devalue the model. Its more than just data (and persistance,
in the case of the ActiveRecord pattern). Its most importantly about
behaviour, and about modelling your core domain in the software. It is
your app’s business logic - the “meat” of your app, as it were.

unknown wrote:

Alex W. wrote:

Models represent data.

Lets not devalue the model. Its more than just data (and persistance,
in the case of the ActiveRecord pattern). Its most importantly about
behaviour, and about modelling your core domain in the software. It is
your app’s business logic - the “meat” of your app, as it were.

Ummmm… so, perhaps it wouldn’t be so baaaaad letting and analyzer as
part of the model, cause the analyzer takes an input of the user and
transform it to store it persistently…

I always visualized the model as one of those shape-pegboards that only
let square pegs in the square hole, and so on. (like this:
http://www.educationallearninggames.com/images/shapes-chucky-puzzle.jpg)

So the model / pegboard sits between the controller (and the world) and
your database. It is the model’s job to do whatever transformations are
necessary to enable the data to fit through the hole. (business logic,
sanitizing, etc)

Oook, thank you all! :smiley:

It sounds like part of your model to me.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs