Sometimes, bad things happen to good systems. This is stressful enough with an in-house system, but it’s even worse when the data is in the field at a customer’s site. Anyone working with a commercial application with dozens, hundreds, or even thousands of installations knows what it feels like when a remote client is in distress and a software patch is needed. What do you do? Partly, it depends on the nature of the problem, constraints on sharing and moving the data, and the nature of the solution. Below are some scenarios developers tend to run into:
- It’s unclear exactly what is going wrong and you need to run some custom code to diagnose the nature and/or extent of the problem.
- Someone on the client side made a mistake past the powers of 4D Backup to fix and now their data file need to be reworked with specialized code.
- There’s a bug in your code, 4D itself, or some interaction of the system and the OS. The fix may require new code, data modifications, or both.
There are several possible constraints and some trade-offs to consider when coming up with a solution to these sorts of problems, such as:
- It may be impractical or impossible to get at the data off-site, due to limited bandwidth, corporate policy, or legal obligations.
- You may not want to have a lot of special-purpose code for individual clients mixed in with your main source code.
- The situation may be so urgent that waiting on a new version or even a special build is not ideal or even tolerable.
- Restarting the server to solve the problem might be highly undesirable, if at all avoidable.
Down the years, developers have come up with various strategies to address these situations. Where flexibility and short response times are key issues, the most common approach is to provide an administrator with an interface that enables them to run some ad hoc code. This might take the form of access to the raw table data and the APPLY TO SELECTION dialog, a way to run FootRunner scripts, or a way to execute a 4DCODE block. This technical note describes how to use custom components instead of these other solutions. With a component, you can use the full 4D language, package data to send to the customer, extract data from the customer, and run at compiled speed. None of this requires a special build of your main application, external scripts, or even a server restart (depending on circumstances.)
Author: Cam Adams, Justin Carr, and David Adams
Download Complete Tech Note: Tech Note Document