advantage of REST in CF10 vs invoking remote metho

2020-02-15 08:17发布

问题:

Have anyone used REST in CF10 for production?

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

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

回答1:

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!