[Nitro] Og Self-Interaction Question

George Moschovitis george.moschovitis at gmail.com
Wed Dec 12 03:20:43 EST 2007

One question.

why do you use property for the Game class and attr_accessor for the Web

from what I understand you keep 2 different codebases and a single database.
This looks like duplication of effort to me (and I can think of
synchronization problems, etc..) I can see no easy solution to your problem
(apart from changing to :add evolution)


On Dec 12, 2007 8:49 AM, Matthew B Gardner <weather at speakeasy.net> wrote:

> Hello --
>  I'm writing a game which uses Og with MySQL, and I want my website to be
> able to interact with that data as well. I'm wondering about solutions to
> this problem:
> Game...
> class HelpFile
>        property :name, String
>        property :body, String
>        property :viewed, Integer
> end
> Web...
> class HelpFile
>        attr_accessor :name, String
>        attr_accessor :body, String, :control => :textarea
> end
> The web class doesn't need the viewed attribute, but I'm assuming it'll
> drop
> that attribute from the database if it isn't declared. Likewise, I'm sure
> there will be web-data that I won't need in the game. I know I could
> disable
> full evolution, but I'd like to not have to do that...especially since I
> think that's one of the best reasons to use Og with my project (changing
> to
> add might not be too terrible). Maybe using two different declarations of
> essentially the same class isn't even good practice, but the game class
> having access to web-based methods and vise-versa seems problematic to me
> (not to mention the classes are in two different places).
> Does anyone have some insight on this? Implementation solutions?
> Thanks for any help -- please let me know if further clarification is
> needed,
> Matt
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20071212/a92f44fc/attachment-0001.html 

More information about the Nitro-general mailing list