hello all,
i’m starting on a rails app that will hopefully make machine maintenance
much easier at my work. i have a few general questions about what
approach to take in the design.
for each machine the app maintains, it loads a networking library,
connects to the machine and returns an object of that machine. commands
to that machine are run via instance methods of the object. different
machines use different versions of the networking library.
once i’ve created the machine object, how do i pass it back and forth
between actions? the rails documentation is very jumbled when it comes
to this.
-reid
save it as a global ?
On Tue, Apr 29, 2008 at 5:48 PM, Reid O.
i’d like to try to avoid having too many global variables. isn’t there
a way to pass objects from action to action?
Roger P. wrote:
save it as a global ?
On Tue, Apr 29, 2008 at 5:48 PM, Reid O.
On 30 Apr 2008, at 18:15, browner than u wrote:
i’d like to try to avoid having too many global variables. isn’t
there
a way to pass objects from action to action?
global variables are a horrendously bad idea. If you want something to
persist across actions use the database, the session, memcached etc…
Fred
Frederick C. wrote:
On 30 Apr 2008, at 18:15, browner than u wrote:
i’d like to try to avoid having too many global variables. isn’t
there
a way to pass objects from action to action?
global variables are a horrendously bad idea. If you want something to
persist across actions use the database, the session, memcached etc…
Fred
all i want to do is pass a “computer” object (specific to the networking
library i’m using) from action to action, just as i would in functional
programming. is this not possible?
On 30 Apr 2008, at 20:24, browner than u wrote:
to
persist across actions use the database, the session, memcached
etc…
Fred
all i want to do is pass a “computer” object (specific to the
networking
library i’m using) from action to action, just as i would in
functional
programming. is this not possible?
It is possible, by storing it in one of those places I named.
Maintaining large amounts of state across actions is not something web
apps in general are good at.
Fred
Frederick C. wrote:
programming. is this not possible?
It is possible, by storing it in one of those places I named.
Maintaining large amounts of state across actions is not something web
apps in general are good at.
Fred
great. this is good info. thanks!