在CF10中REST的优点与通过ajax调用远程方法的优势? [英] advantage of REST in CF10 vs invoking remote method through ajax?

查看:168
本文介绍了在CF10中REST的优点与通过ajax调用远程方法的优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人在CF10中使用REST生产?

Have anyone used REST in CF10 for production?

如何更好地使用ajax调用远程方法, foo.cfc?method = blah

How is that better then ajax calling remote method, e.g. foo.cfc?method=blah?

你能让RESTful API纯无状态吗?

Can you get your RESTful API pure stateless? Do you still rely on session cookie?

推荐答案

REST和对方法的远程调用是两个完全不同的选项,两者都不是必然更好。默认情况下,CF中的REST服务是无状态的。这真的取决于你,如果你想得到会议涉及或任何其他状态的事情。我建议阅读更多关于REST,看看它是你想要构建的那种API。祝你好运!

REST and remote calls to a method are two entirely different options, neither of which are necessarily "better". REST services in CF are stateless by default. It's really up to you if you want to get sessions involved or any other state for that matter. I would suggest reading more about REST to see if it's the kind of API you'd like to build. Good luck!

这篇关于在CF10中REST的优点与通过ajax调用远程方法的优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆