Re: Role of operations?

On Thu, Jun 16, 2005 at 11:55:03AM +0200, Mark Nottingham wrote:
> I'm not against this kind of design, but I also want to support doing a 
> one-to-one mapping between resources and objects, as discussed before.
> 
> In other words, the description should allow both of these forms of 
> code generation:
> 
> class MyWebApp:
> 	def postEntry(args):
> 		...
> 	def getEntry(args):
> 		...
> 	def getEntryList(args):
> 		...
> 
> and
> 
> class EntryList(Resource):
> 	def GET(args):
> 		...
> 	def POST(args):
> 		...
> 	def resolveChild(name):
> 		return Entry(name)
> 
> class Entry(Resource):
> 	def __init__(self, name):
> 		self.name = name
> 	def PUT(args):
> 		...
> 	def GET(args):
> 		...
> 
> I don't think this is a big problem, just want to make sure people keep 
> it in mind as a use case.

Ok, Mark.  I have some issues with those interfaces, but those are
secondary to my major concern; is it your intent that the service
provider be the one authoring instances of the description language
which describe those interfaces?  If so, I don't see it, for the reasons
I've already given.  If not, then we're in synch, but then this is a
very different use case than what we've been assuming to date.

Cheers,

Mark.
--
Mark Baker.  Ottawa, Ontario, CANADA.          http://www.markbaker.ca
Coactus; Web-inspired integration strategies   http://www.coactus.com

Received on Thursday, 16 June 2005 14:00:35 UTC