Ah, the birth of a brilliant name. The conversation started, innocently enough, discussing serialization strategies for web services and David wanting to have these "consistency" and "interoperability" things...
binerdog: do you really want to parse atom in javascript in a browser?
chersobleptes: if a JSONified <entry/> is stupid for a profile,
an <entry/> in XML is just as stupid compared to
a more concise XML representation
binerdog: in an atom context a profile being an entry is as accurate as
you get, in a javascript context it makes no sense
chersobleptes: So why is Javascript not (or shouldn't it become)
an atom domain as well?
binerdog: why is a fish not a badger?
So David creates BadgerFish.
Which translates arbitrary XML (particularly Atom) into... JSON.
Content-type: application/atom+json anyone?
0 writebacks [/src/php] permanent link
Tue, 18 Oct 2005PHP gets a lot of grief in Java and Ruby camps. That said, my question is whether this is fantastically powerful, or outright scary:
Java:
Object foo = Class.forName(actionName)
.newInstance();
String templateName = (String)Class.forName(actionName)
.getMethod(eventName, new Class[]{})
.invoke(foo, new Object[]{});
PHP
$foo = new $action_name();
$template_name = $foo->$event_name();
Hmmm