Mindtouch梦想框架UI构成
有人将 Mindtouch 的梦想框架与 ASP.NET 前端结合使用吗?看起来页面上的所有组件都需要在客户端进行合成,其中每个组件都会回调梦想服务器以渲染另一个微小的 html 片段。就客户端性能而言,这不是很糟糕吗?有没有办法使用 Dream 框架进行服务器端 UI 组合?
Has anyone use Mindtouch's dream framework in conjunction with a asp.net frontend? It seems like all component on the page needs to be client side composited where each component is making a call back to the dream server for rendering another tiny snippet of html. Wouldn't that be bad in term of client performance? Is there any way to do server side UI composition using the dream framework?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MindTouch Dream 旨在作为 REST API 的第一个构建块。 REST 服务的粒度由您决定,因此您是否需要一次又一次地为 UI 来回运行 Dream,完全取决于您的 API 设计。
如果您碰巧在 ASP.NET 中托管 Dream 并使用 Plug 类,则对 API 的 http 请求实际上不会到达线路,而是在进程中分派,从而避免了大量开销,但您需要注意您现在已经将各个层捆绑在一起,因为如果您基于性能改进进行设计,然后在将来拆分各个层,您将会遇到令人讨厌的意外。
MindTouch Dream is meant as an REST API first building block. The granularity of your REST services is up to you, so whether you need to run back and forth to the Dream over and over for your UI, depends purely on your API design.
If you happen to host Dream inside of ASP.NET and use the Plug class, the http requests to the API won't actually hit the wire but are dispatched in process, avoiding a lot of the overhead, but you need to be aware that you've now tied tiers together, since if you design based on that performance improvement and then split the tiers in the future, you are going to have a nasty surprise.