More Land Brokr/NCRE integration means more xml_response_fromhackery. This one involves the message center.
NCRE messages are STI trees. That is:
class Message < ActiveRecord::Base
acts_as_tree :order => ‘created_at DESC’
end
class PurchaseMessage < Message
def summary
“blah blah”
end
end
class OpenHouseMessage < Message
def summary
“blah blah”
end
end
So the [...]
As I mentioned in the explanation for my response_from plugin, I have two apps that communicate via a private XML REST API. This is trivial using my xml_response_from method (in my response_from plugin) and with Rail's to_xml; trivial, that is, unless you want to use single table inheritance.
For example, let's say you have:
class User < [...]
It's not a big secret: I'm writing blogging software. This, in a sense, sucks because it's already been written many, many times; while I coded I often (like, every 20 minutes) tried to think of how this could be abstracted into a plugin or five. Since this is a big task I might do it [...]
There are many examples of Web sites that use some sort of account key as a subdomain: WordPress.com, VIdentity, Blogger, SuprGlu, Listal, and LandBrokr are a few examples. Here are the important bits that I learned while doing it for LandBrokr.
You can get the subdomain via request.subdomains[0]. When you're developing on your laptop you need [...]
Update: This can be replaced, mostly, with Rails 2.0’s ActiveRecord#from_xml.
As I assured in a prior post, I spent today hacking on a plugin to make it easier to consume XML REST APIs. The result is the ResponseFrom plugin. It's the opposite of this:
respond_to { |w| w.xml { render :xml => User.find_first } }
xml_response_from handles requesting [...]
By Mike Burns
|
Posted in Uncategorized
| Tags: activerecord, deprecated, http, landbrokr, myncre, net::http, plugin, rails, response_from, rest, xml |
Yesterday Phil reminded me of an important feature that I had only half-implemented: condos.
I finished that off today. The part I'm unsure about is how the map will handle them. I'm using Google's tabbed info windows, but those can only support three tabs. Yahoo! and I had a discussion about it a while back without [...]
First off, many thank yous to Brian Del Vecchio for linking to MyNCRE from BostonWTF. It's an awesome idea and Brian's an awesome guy. Thanks!
In other news, I spent much of today hacking on a REST XML API. The good news: respond_to is awesome, as is render's :xml argument and especially ActiveRecord::Base's to_xml method. The [...]
I've flipped the switch and sent MyNCRE totally into production mode.
I'm nervous, I'll admit.
For months we had been developing in a half-production mode. The whole deployment on myncre.com was in production, but the database settings were using the development database. Really, the only change I made today was changing over to the production database.
That didn't [...]
This is my work Web log. I need a separate blog than my personal one so that I don't confuse customers and clients with my posts about parties and live shows. If they want it, they can have it, but I'm not going to flaunt it.
So, here's what I do for work: I write Web [...]