Build a server-side RESTful API with Coldbox (Merapi)

Why take this course?
π Build a Server-Side RESTful API with Coldbox (Merapi) Course by Philippe SAMBOR
π Course Headline: Dive into building modern applications using ColdFusion with our comprehensive guide on constructing a REST API with Coldbox (Coldbox 6.5, Lucee 5.3, MySQL 5.7). This course is your gateway to mastering the art of RESTful services, documentation, and testing with the latest tools and practices!
π Course Description:
In this course, we embark on a journey to build a robust REST API leveraging Coldbox's powerful framework. We'll start by setting up our database schema using MySQL 5.7 and the cfmigrations
module within the Merapi ecosystem, creating four tables: Countries, Currencies, Cities, and Airports. This initial step will provide a solid foundation for our application data.
- Database Setup with cfmigrations: We'll guide you through adding tables to your MySQL schema and populate them with seed data, ensuring that your database is ready for action. π οΈ
Moving forward, we'll construct a model that aligns with our database schema using an XML schema file. This approach serves as an alternative to the Quick ORM method used in previous courses, offering a unique way to map entity class properties to table columns and load entities without an ORM. π
- Custom Object Relational Mapper: Discover how to implement a custom ORM by reading the XML schema and creating a simple loader file. π
We'll enhance our model with a BaseService component, acting as an abstraction layer for common queries. This will streamline the development process by eliminating repetitive code when writing query methods in child components. π οΈ
- BaseService Component: Learn how to create a base service component to abstract and reuse common data access operations. π
To ensure the reliability of our model, we'll utilize the TestBox module to write both unit and integration tests. These tests are crucial for validating that our entity models and service components function correctly before moving on to building the API. β
- Testing with TestBox: Gain hands-on experience in writing comprehensive tests to ensure your application's functionality. π§ͺ
As we delve into the API construction, we'll focus on creating API handlers and ensuring that our Swagger documentation is up to date and exportable. Each handler will implement actions such as index, show, create, update, and delete. We'll also write integration tests for each action to ensure they work as expected. π οΈ
- API Handlers and Actions: Learn how to build and test API handlers with the necessary actions. π
The Swagger documentation is a critical aspect of building RESTful APIs. We'll use the cbswagger
module to generate Swagger JSON files based on our API, which can then be imported into tools like Postman for further testing and validation. This step will also create an openAPI.yaml
file, providing a clear and structured documentation of your API within the Swagger Editor. π
- Swagger Documentation: Master the process of documenting your API with Swagger Editor and Postman tools. π
π― Course Outcome:
By the end of this course, you will have a solid understanding of how to build a server-side RESTful API using Coldbox. You'll be equipped with the skills to design, implement, and test your APIs, ensuring that they are well-documented and ready for production. This course is your stepping stone to creating efficient, scalable, and maintainable server-side applications with ColdFusion!
π Prerequisites:
- Basic understanding of ColdFusion (Coldbox, Lucee, and MySQL are used in this course)
- Familiarity with the concepts of RESTful services and API design principles
π οΈ Tools & Technologies Covered:
- Coldbox Framework (Version 6.5)
- Lucee Server (Version 5.3)
- MySQL Database
cfmigrations
Module for database schema setup- TestBox for writing tests
- Swagger/OpenAPI for API documentation and testing
Embark on this learning journey today and transform your ColdFusion skills with a RESTful approach using Coldbox! ππ
Loading charts...