Wing Now Auto-Generates Restful Object Relationships
Wing has long been able to generate internal object relationships thanks to the goodness that is DBIx::Class, but now it can automatically write the web services for those relationships as well, thanks to two new subs in Wing::Rest:
generate_relationship(object_type, relationship_name) - This writes out a simple web service that will expose a list of “relationship_name” objects that are attached to “object_type”.
generate_all_relationships(object_type) - This interrogates DBIx::Class to find all the relationship objects and then calls generate_relationship() on each of them.
[From my blog.]
Excellent. I have been wanting to give Wing a flight since seeing at YAPC. Hoping to give it a try soon.
If/when you decide to give it a go, don't hesitate to ask questions. It's really only used internally by Plain Black at this point, so I'm sure that I'll need to add extra documentation or give you pointers when getting started.
The Wing namespace on CPAN was taken by Simon Cozens over 12 years ago.
Is this anything to do with it? A glance at the two sets of code indicates that it may not be.
Nope. No relation. Not really concerned about ever putting it on CPAN. Although given that Simon hasn't updated his app called Wing, my guess is he might be willing to give up the namespace if we ever did want to publish it.
Why?
A few reasons. The most important two are:
1) At present this toolkit is primarily for Plain Black's use, and as such we just check it out from GitHub to deploy it to our servers. It's in a public repo, and we'll be happy to help people out that are interested in using it, but we don't have any intentions at present of promoting it the way you might promote a Moose or a Catalyst type framework.
2) Wing has a lot of non-module content. While it's possible to wrap all that up so that it can be packaged into a distribution and deployed to the right locations upon installation, it's a lot of work for no gain. Which goes back to #1.