Coldbox and VueJS untangled

Tag: cbswagger

Changing coldbox module behaviour without changing the module !

I have to admit, this title seems a little weird. How can I change some behaviour in a module without changing the code? And why do I want to change this behaviour?
Let me start with the why. I am using a lot of box modules, but sometimes there are some pieces missing, or am I not happy with some default behaviour. Many modules are very adaptable, for example using configuration settings or some interceptors. But sometimes this is not enough.
In a Free and Open Source Software world we just clone a repo, modify some code and send some pull request the the authors. But what if they don’t want your changes? I could fork the project, and create my own module, but from this moment on I am the maintainer of my own module. And sometimes other modules are depending on the module I want to fork, which is often not what I want. But there are other ways to change a module, and they work best for smaller changes. Let me explain.

Continue reading

Customize your resource routing in Coldbox

In this post I will show you how coldbox can help you creating resourceful routes, how cbswagger shows me that I don’t want the defaults resource() routing method, and how easy it is to create your own method!

If you want to create a REST API in coldbox, you often need to create a lot of routes for this API. So let’s say you want to create endpoints to list, view, update, create and delete a User resource. Following the coldbox manual, I need to implement the following routes:

Continue reading

© 2022

Theme by Anders NorenUp ↑