Blog

Sneak Peek: ColdBox REST API Workshop - Last 5 Tickets Left

Maria Jose Herrera September 04, 2024

Spread the word

Maria Jose Herrera

September 04, 2024

Spread the word


Share your thoughts

Building a REST API for the Modern Developer!

Only 5 tickets left! Don't miss your chance to elevate your skills at our exclusive 2-day workshop in Las Vegas, Nevada, just before Adobe CFSummit 2024! This hands-on workshop is your gateway to mastering modern REST API development using ColdBox and other cutting-edge tools. Secure your spot now and take your development skills to the next level!

Register NowI

Workshop Details

  • Date: September 28th-29th, 2024
  • Location: Las Vegas, Nevada
  • Venue: To be announced soon!
  • Instructor: Luis Majano - Creator of ColdBox and Ortus Solutions CEO

Elevate your projects, boost your productivity, and enhance your efficiency with cutting-edge API development skills.

Workshop Overview

In this immersive workshop, you'll learn to build a robust REST API from scratch using ColdBox and essential Ortus tools. From setting up your environment to securing your API with JWT authentication, you'll gain practical experience in:

  • Environment Setup: Configure your API with CommandBox, environment variables, and cfconfig.
  • API Development: Create RESTful handlers with ColdBox, secure them with cbSecurity, and validate data with cbValidation.
  • API Documentation: Use Swagger annotations to document your APIs.
  • Testing: Implement BDD integration tests to ensure your API performs flawlessly.
  • Database Management: Handle database tables and data access with qb.
  • Development Tools: Utilize Postman and ngrok for API development and testing.

Register NowI

Sneak Peek Code Examples

Here's a glimpse of what you'll be doing in the workshop:

Environment Setup

Configure your environment using CommandBox:

box coldbox create app skeleton=rest-mvc

API Development

Create a RESTful handler:

component {
    function index(event, rc, prc) {
       return userService.getAllUsers()
	        .map( user -> user.getMemento( includes: rc.includes, excludes: rc.excludes) )
    }

    function save(event, rc, prc) {
        prc.oUser = userService
	        .getUser( rc.id )
	        .populate()
	        .validateOrFail()
					.save();
        return prc.oUser.getMemento();
    }
}

Securing Your API

Secure your API with JWT authentication:

route("/api/users")
    .withAction({
        GET = "index",
        POST = "save"
    })
    .securedBy("jwt")
    .toHandler("api.users");

API Documentation

Document your API with Swagger annotations:

/**
 * @swagger
 * /api/users:
 *   get:
 *     summary: Retrieve a list of users
 *     responses:
 *       200:
 *         description: A list of users
 */
component {
    function index(event, rc, prc) {
        return userService.getAllUsers()
	        .map( user -> user.getMemento( includes: rc.includes, excludes: rc.excludes) )
    }

Testing

Write BDD integration tests:

describe("User API", function() {
    it("should return a list of users", function() {
        var response = get("/api/users").json();
        expect(response).toBeArray();
    });
});

Database Management

Handle database tables and data access with qb:

component {
    function getAllUsers() {
        return qb.from("users").get();
    }

    function saveUser(user) {
        return qb.table("users").insert(user).execute();
    }
}

What’s Included

  • Lunch: Enjoy delicious meals while you learn.
  • Ortus Swag and Surprises: Take home some cool goodies from Ortus!

Target Audience

This workshop is perfect for modern CFML and BoxLang developers of all levels looking to build and secure a CFML REST API backend with JWT authentication. While familiarity with CommandBox and ColdBox is helpful, it's not required.

Register NowI

Why Attend?

You'll gain hands-on experience in:

  • Building a REST API using scaffolding templates and essential modules.
  • Implementing best practices for routing, authentication, and documentation.
  • Securing API calls with JWT authentication.
  • Creating thorough API documentation.
  • Writing and running tests to ensure optimal API performance.

Register NowI

Key Learning Points

  • CommandBox: Set up your environment, install modules, and configure migrations.
  • API Implementation: Manage JWT authentication, perform CRUD operations, and validate inputs.
  • API Documentation and Testing: Use Swagger UI Tooling and Postman to document and test your APIs.
  • Additional Topics (Time Permitting): Debugging with cbDebugger and an introduction to CI/CD.

Prerequisites

  • Programming Knowledge: Basic understanding of API concepts and ColdFusion.
  • Hardware and Software: A laptop with CommandBox, a code editor (VS Code recommended), MySQL client, Postman, and ngrok.
  • Database Setup: MySQL 8 installed locally or via Docker (remote server backup provided).

Required Tools

  • CommandBox: Download Here
  • Postman: Download Here
  • IDE for CFML and VueJS: VS Code or your preferred IDE
  • MySQL 8: Local installation or Docker container
  • MySQL DB Client

Workshop Takeaways

By the end of the workshop, you'll have a fully functional, secure, and well-documented REST API. You'll understand:

  • CommandBox basics for hosting your site.
  • Best practices for creating ColdBox REST APIs.
  • Securing your API with JWT authentication.
  • Managing databases with qb migrations.
  • Validating API inputs.
  • Testing and documenting your APIs using Postman and Swagger tools.

Meet Your Instructor

The workshop will be led by Luis Majano, the creator of ColdBox, BoxLang, and CEO of Ortus Solutions. Don't miss this opportunity to learn from an industry expert! Learn More about Luis Majano and his Modern Development trajectory

Luis Majano

Join Us

With just 5 tickets remaining, time is running out to join this transformative workshop! Don’t miss out on the chance to learn directly from industry expert Luis Majano and gain hands-on experience in building robust, secure, and well-documented REST APIs.Register now and be part of a community of forward-thinking developers ready to enhance their API development skills.

Register Now

Add Your Comment

Recent Entries

VS Code BoxLang Extension: Debugging BoxLang in CommandBox

VS Code BoxLang Extension: Debugging BoxLang in CommandBox

So you’ve installed CommandBox and are running the latest BoxLang server like a boss. You open up your browser and are met with an error message. This looks like a job for, you guessed it, the BoxLang VS Code Debugger!

Maria Jose Herrera
Maria Jose Herrera
September 26, 2024
Top ColdFusion security vulnerabilities in 2024 and how to prevent them

Top ColdFusion security vulnerabilities in 2024 and how to prevent them

ColdFusion continues to be a powerful platform for web application development. However, with its widespread use, it's crucial to remain vigilant about potential security vulnerabilities. This article provides a technical overview of the most relevant security threats affecting ColdFusion (CFML or Adobe ColdFusion) in 2024 and offers practical steps to mitigate them.

1. SQL Injection Vulnerabilities SQL Injection remains one of the most common and dangerous vulnerabilities in C...

Cristobal Escobar
Cristobal Escobar
September 24, 2024
BoxLang 1.0.0 Beta 15 Launched

BoxLang 1.0.0 Beta 15 Launched

Welcome to Beta 15! This release brings several significant enhancements aimed at improving the efficiency and functionality of the CLI environment and continued bug fixing to bring our CFML compatibility to several client applications and Ortus Libraries. Key among these is the introduction of the bx-web-support module, which allows the CLI to interface with web server capabilities, making it an excellent tool for testing and feature auditing. Additionally, the merge capabilities within module settings have been refined to support deep merges from the configuration file, ensuring greater flexibility and control.

Luis Majano
Luis Majano
September 20, 2024