Responses to comments

Apr 7, 2012 at 4:24 PM

Robert posted the following comment on web services tutorial page:

ps: how about an odata endpoint as well? might be a nice addition along with the json serialization format

I read your "About business logic" blog post. I think your conclusion is correct. Domain objects as dumb property bags, whereas logic is encapsulated in modules (which promote composability and reuse, provided there's a function-level access granularity). Have you considered a message-based approach? modules may also handle system messages (such as create, retrieve/read, update, delete, validate, and so on). given that a module is an opt-in feature, you might have a module listening to rest-based queries and expose business logic to rest only if required. this lets library consumers decide if rest calls are raw or go through a controller (I'd say the latter is the more common case). apologies if this is not the right place to comment. very interesting project by the way, just like Irony. :)

Response:

About OData - looked at it closely when was designing web services and even considered using its format for default and first implementation. But then it appeared too much work. But the idea of some standard way of submitting a "batch update" is certainly appealing. And some other features - REST in general does not standardize many things that are common. This is something worth looking at again in the future - provided OData is still there. For now, it looks like it's mostly supported by MS-produced tools.

Message-based approach - actually working on smth like this right now. To provide a way for a module to directly hook into web service and handle messages coming to selected URLs. In some reduced way, it is already implemented for HTML pages - ErrorLogging handles requests for error list pages. This is implemented through extra HtmlPageHandlers that are hooked to the web service. So the generalization of this idea is naturally ability to hook general REST message handlers from modules.

thanks for the input!

Jul 9, 2012 at 12:00 PM

Roman,

I didn't notice this until now - work and all (the usual). Thanks for your reply.

You're right regarding OData - mostly MS-related, fairly nice syntax though.

I think the closest production-ready example of a message-based system I can think of right now is MSCRM (let's consider the latest version). All in all fairly extensible. It also uses OData (which is why I was thinking about it in the original comment), quite handy from JavaScript web clients. Part of your intended audience might be already familiar with these concepts, so I thought "why not suggest it?". :)

Rob

PS: Your work is always top notch, thanks for your contributions.