“打开” REST 框架 (.Net)
我们有一个可能有用的本土框架 实现基于 REST 的 Web 服务。
它是一个 .net c# 项目,用于 Web 应用程序。
它的用法如下:用动态内容内联替换模板“标签”。示例标签:{{recentposts window=7 max=10}}
它的作用:使用(检查的)参数将“标签”解析为命令,调用 处理程序配置为处理命令并返回数据,使用 xsl 转换数据, 将 {{...}} 替换为结果。
我有预感这可以被修改以创建某种形式的基于 REST 的 服务、将 url 解析为带参数的命令、调用处理程序等。 并将结果写入http响应。
作为返工的替代方案,我正在寻找某种东西 这可能是开箱即用的。
可以使用哪些成熟(开源)框架? 它必须提供一个 http 外观,以便轻松地执行 REST 操作,并且除了提供 API 之外, 一种绕过这个外观的方法,允许创建命令对象,完成所有调用和转换,而不是将 http 响应写入某个流。
We have a homegrown framework that might be useful
to implement REST based webservices.
It is a .net c# project, used in a webapplication.
What it is used like: inline substitution of template 'tags' with dynamic content. sample tag: {{recentposts window=7 max=10}}
What it does: parsing 'tag' to command with (checked) parameters, invoking a
handler configured to handle the command and return data, transforming the data with xsl,
substitute {{...}} with the result.
I have a hunch that this could be reworked to create some form of REST based
services, parsing an url to a command with parameters, invoking a handler etc.
and writing the result to http response.
As an alternative to reworking I'm looking for smth
that might be useable instead, out of the box.
What are mature (open source) frameworks that could be used?
It has to provide a http facade, to do the REST stuff easily, and besides provide an API,
a way to bypass this facade, allowing command objects to be created, having all the invocation and transformation done and instead of writing to http response to some stream.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ServiceStack 怎么样?
引自网页:
...... com/present/view?id=dg3mcfb_208gv3kcnd8" rel="nofollow">“概述”幻灯片。
How about ServiceStack?
Quote from the webpage:
...and an "overview" slideshow.
我使用 EasyHttp 来处理 REST 基础服务,它可以轻松地处理 JSON 和 XML 服务,并且还支持使用检索到的对象作为动态对象。非常易于插入和使用,您不必再担心 Http 请求/响应。
I use EasyHttp to work with REST base serices, it works easily with JSON and XML services and also supports working with retrieved object as a dynamic object. Very easy to plug and use and you don't have to worry about Http Request/Response anymore.
我认为 OpenRasta 可能值得一看
https://github.com/openrasta/openrasta-稳定/维基
真的很好用并且很容易上手
I think it may be worth taking a look at OpenRasta
https://github.com/openrasta/openrasta-stable/wiki
It's really nice to use and easy to get started with