Gavin appeared on the Online ColdFusion Meetup July 7th. The session the start of an Building an API Series, the recording and slides are now available.
Adobe Developer Week is returning this July 2022, bigger and better than previous years. The developer week will be multiple sessions per day, for 5 days from July 18th to July 22nd. Ortus Solutions is proud to announce not one, but two speakers, Luis Majano and Gavin Pickin are presenting on APIs, back to back on Monday July 18th.
We are excited to announce Ortus's Training Workshop at CF Summit in Las Vegas this October 5th and 6th, 2022. Luis Majano and Gavin Pickin will be leading this workshop bringing you a deep dive 2 day workshop using the ColdBox framework to build a REST API to power a VueJS front end application, deployed to multiple platforms with the power of Quasar. The workshop is back in the Luxurious Aria Hotel and Casino, following Adobe's CF Summit this year.
We are very excited to finally update our swagger modules to version 2:
swagger-sdk, cbSwagger. This major version has tons of new features and improvements when documenting ColdBox APIs. However, the biggest features are that we now support the latest Open API Spec => v3.0.2 and we can export your documentation in either JSON or YAML. Check out the release notes below to see all the great new improvements.
Here are our slides from our ColdBox Hierarchical MVC presentation at this year's Adobe ColdFusion Summit. You can also find the source code for our demo here: https://github.com/lmajano/hmvc-presso-demo or you can install it via CommandBox:
box install lmajano/hmvc-presso-demo.
Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API? How many ways do you test your API? Not all tests are created equal.
Version 3.0 makes the OpenAPI/Swagger specification the default documentation format for describing your APIs, while deprecating the Relax programmatic DSL ( scheduled EOL is v4.0 ). In addition, the release includes a complete overhaul of the user interface and Relax API Test Tool, to provide users with a seamless experience for documenting, viewing, testing and exporting in a variety of formats.
Today we will be making a contact database that you can quickly and easily manage using ColdBox and Vue.js. We will be using bootstrap in our project to make it the UI look a little better but it is completely optional if you want to use this in your own project.
For this project I will be using CommandBox to generate all my files.
TL;DR: View the repo here
Step 1: You can skip this step if you already have a project set up.
From CommandBox run:
coldbox create app name=CBVue skeleton=rest --installColdBox
This will give us a minimal project with a handlers\BaseHandler.cfc (needed to make our life easy when creating a REST API) and an handlers\Echo.cfc which is an example usage to get you started.
Now that we have our project started we need to tweak a few things.
First, since this is a template that is expecting to be setup for REST only, the Echo.cfc is set to be the default entry point. Since we want to create a view that accesses a REST API we need to point that to a view.
Sometimes when you define an incoming API route, you want it to match certain environment or aspect conditions. The
addRoute() has an argument called
condition, which can be a closure or UDF pointer that must return a
boolean and receives the incoming
requestString. You can then decide if the route should execute or just be ignored.
So if a route matches via the
pattern, then this closu...