Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ColdFusion MVC frameworks & RESTful Service mismatch?

Most CF MVC Frameworks use the front controller pattern. Usually Search Engine Safe (SES) plugin together with URL Rewrite are used to construct friendly URLs. However, when it comes to implementing RESTful services, using a MVC framework seems like a layer of complexity added on top of another layer of complexity.

How should one tame this beast? Any nice and clean approach of supporting RESTful services with ColdFusion? Any MVC framework out there that can expose RESTful services easily?

Thanks

like image 433
Henry Avatar asked Jan 28 '26 08:01

Henry


1 Answers

ColdBox has been supporting RESTful URLs for a long time now. In 3.0 you can even split the incoming HTTP verbs to execute different actions in a nice decoupled manner. read here: http://blog.coldbox.org/post.cfm/coldbox-rest-enabled-urls

You can even have HTTP method security on your event handlers very easily:

component{

    this.allowedMethods = {
        LIST = "GET",
        SAVE = "POST,PUT"
    };
}
like image 128
Luis Majano Avatar answered Jan 30 '26 23:01

Luis Majano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!