Coldbox and VueJS untangled

Tag: interceptors

Dynamic datasources part 1: QB

Recently I was working on a project where we wanted to reuse our code for multiple customers. The only difference: they all have their own database where their data was stored. We can do this in two different ways

  • deploy a new application for every customer. For a smal amount of customers that might be acceptable.
  • Based on the url we can detect which datasource we need for a customer. If we would be using the same url for all customers, we can have some central database which keeps all kind of information including datasource name for each individual customer. We could store the datasource name in a private request collection variable called mainDatasource (or put it in some user specific cache or session variable), so each customer has his own datasource.

Since our project was existing code, I have a few hundred references to <cfquery> and queryExecute and many queryBuilder (qb) calls for newer code.

Continue reading

Module dependencies in interceptors

Interceptors in coldbox are very powerful. They are components which listen to events which are announced by the core framework or modules or custom events created by your application. But this post is not about all details of creating interceptors, you can read all about it in the coldbox documentation. I am using them all the time since they are so powerful, but sometimes they don’t behave as expected, especially when your interceptor depends on other modules.

Ahh yes, the good ol chicken and the egg problem

Luis Majano

So, what’s the problem with this chicken and her egg? Actually there are two related problems. One of them is easy to solve, the other takes some more effort.

Continue reading

© 2021 ShiftInsert.nl

Theme by Anders NorenUp ↑