166 reputation
16
bio website
location Austin, TX
age 29
visits member for 3 years, 1 month
seen yesterday

Oct
29
comment Is this a secure solution for RESTful authentication?
@Donal That's true...maybe this is overkill. How would you do it? If using SSL, would you keep it simple and 1) send passwords via REST POST in plain text (encrypted via SSL) and 2) just assign a token for each user account and send that in each user's API request?
Oct
28
comment Is this a secure solution for RESTful authentication?
Yep, it'll be over HTTPS, and I'm using Sinatra for the API.
Aug
31
comment Do mixins create coupling with Ruby?
It's not a complete code listing.
Jul
24
comment One or many RESTful APIs for large company?
Good point. This is all internal, so luckily there are no liability concerns.
Jul
24
comment One or many RESTful APIs for large company?
Thank you for your feedback. Might this look like using multiple endpoints reverse-proxied or virtually mounted under one domain? Example: api.company.com/api1/resource, api.company.com/api2/resource; api1 and api2 are different endpoints possibly hosted on different machines and different vhosts.
Jul
25
comment Do mixins create coupling with Ruby?
Cool, thanks again for the follow-up of the follow-up. Now, going further, if I use App.keyring to access the keyring instance, aren't any libraries that require a keyring instance coupled to App (and require it to come along for reuse in any other Rails app utilizing keyring)?
Jul
25
comment Do mixins create coupling with Ruby?
By "everyone" I'm mainly referring to bloggers and StackOverflow-ers. So which would you strive for if you were in my shoes, solving this problem: a mixin approach or a DI approach?
Jul
25
comment Do mixins create coupling with Ruby?
So you would recommend I go a dependency injection route to provide classes access to the keyring instance? Isn't this anti-Ruby, considering everyone advocates modules/mixins over DI?
Jul
25
comment Do mixins create coupling with Ruby?
Thanks for the added response. So, let's say I put the keyring instance in the App module. Would I then "include App" in my FtpConnection class and access the keyring instance there via the "keyring" method which would be mixed into the FtpConnection class? Or would I access the keyring instance in FtpConnection via "App.keyring"? Or something else?
Jul
25
comment Do mixins create coupling with Ruby?
My application needs one keyring instance for use with multiple other classes application-wide. This is similar to a database connection. Using a dependency injection-based design, I would instantiate the keyring object at the application level, store it in a registry, and access it as a service via a service locator. Thus, it is not a singleton. Does this make sense? What would you recommend I do, considering it is needed application wide?
Jul
25
comment Do mixins create coupling with Ruby?
Maybe a symbol name could be used for the module name. Or, better yet, maybe a fancy class macro could be used in conjunction with a symbol. Hm. Does anyone know a commonly-used way around this coupling?
Jul
25
comment Do mixins create coupling with Ruby?
Well, I'm comparing this to a dependency injection approach, which might be closer to perfect and would not require copying and pasting.