What can the CF10 RESTful API do for the Coldbox RESTful API? And vice versa?

Just started looking at some MVC JS framework / library, and most of them are expecting a RESTful API endpoint that made me think ... what can I do using CF10, which cannot be done using CF9 + ColdBox RESTful support, and vice versa?

Thanks.

+4
source share
3 answers

Restful webservices is a standard concept, and the entire implementation ultimately complies with these standards. There are already existing structures such as Taffy , Powernap, and frameworks such as ColdBox 3, Mach II, which can help create cool services in ColdFusion. And I am doing an amazing job in terms of the completeness and expansion of the possibilities offered to users. The difference is in many ways how they allow, how they allow you to create your services. Some of them follow the configuration of other agreements with their DSL, etc. And a little in terms of the opportunities that they offer.

ColdFusion 10 supports native web service support. What this leads to the table:

  • You can use your understanding of components and expand them as soothing web services.
  • Based on standard JAX-RS
    • Tons of support / applications available for expansion (testing / automation) ....
    • No implant bias, widely available / acceptable
  • Best performance
  • Improved support and doc
  • Smaller configuration
  • WADL application deployed (similar to WSDL)
  • Full JSON / XML support and easily extensible

As you will see, most of them are advantages of the fact that it is "initially" available for the language, and not for comparing functions, and that is why we implemented it. IMO there is no comparison at all. I would like all the frameworks to take advantage of the initially available function and build on top of it.

The Thumb rule should be pre CF10 to use any that suits your taste, use as a release version the usecase / post CF10 originally available or any framework that uses the same ones.

Caution: Each frame author will be biased towards his own judge before taking the jump.

ps I implemented Rest support in ColdFusion10 :)

+7
source

As a remainder, cfc will usually just be a wrapper for your model, and if your model has already been created using the cf framework, such as coldbox, you might be better off using the ReSTful web service framework implementation.

If you're starting from scratch, the new functionality in CF10 (and Railo 4) will give you infrastructure without the overhead of application infrastructure.

0
source

Great resource: https://github.com/atuttle/CF-REST-Comparison/tree/master/CF10

Requirements / Quirks

  • All remote methods must have a value of returnType = "..." (where ... is the type to be returned).
  • Don't forget restArgSource for <cfargument/> tags for URI token arguments. The default value for restArgSource is a body that will not work if you try to get a value from a URI.
  • Application mappings are not supported. Instead, use server mappings or the fully qualified cfc path.
  • Whenever you update services, I always execute this workflow: Remove "exception.log" from the log files screen Refresh REST services Check if "exception.log" returns. (If so, read it and fix the problem.)
0
source

Source: https://habr.com/ru/post/945199/


All Articles