JayP
2012-11-08 02:53:52 UTC
Hi,
I am thinking of writing a rails app that interacts with the cloud and
wanted to use Fog as my client library to aws. To start I plan on doing
all the fog api calls in my models. To start I want to be able to CRUD
launch configurations so ActiveModel looks like a good place to start.
Going down this path though I'm having some design issues where when I
fetch a launch configuration using the "get" method I get
a Fog::AWS::AutoScaling::Configuration object back. I could pass this all
the way to the controller then up to the view so it has access to all the
attributes on the object but that seems weird to me since my model is
called LaunchConfiguration but the object returned from my model would be
of type Fog::AWS::AutoScaling::Configuration. If I want to create a new
model based off of everything in the returned object I could do that but it
seems like I would just be repeating everything that comes back from the
fog library but maybe this is the best approach. So my question is what
approach would you take if you were designing something like this.
Thanks in advance,
Jay
I am thinking of writing a rails app that interacts with the cloud and
wanted to use Fog as my client library to aws. To start I plan on doing
all the fog api calls in my models. To start I want to be able to CRUD
launch configurations so ActiveModel looks like a good place to start.
Going down this path though I'm having some design issues where when I
fetch a launch configuration using the "get" method I get
a Fog::AWS::AutoScaling::Configuration object back. I could pass this all
the way to the controller then up to the view so it has access to all the
attributes on the object but that seems weird to me since my model is
called LaunchConfiguration but the object returned from my model would be
of type Fog::AWS::AutoScaling::Configuration. If I want to create a new
model based off of everything in the returned object I could do that but it
seems like I would just be repeating everything that comes back from the
fog library but maybe this is the best approach. So my question is what
approach would you take if you were designing something like this.
Thanks in advance,
Jay