Changes
= Architecture =
The architecture is something to consider on a rather abstract level, in the beginning of a project, but also on the level of a single task.
In the context of a whole project, architecture means defining whether there are multiple {{UBIK}} installations on different sites, what products will be involved and how they are connected topologicallyand semantically.
On task level, architecture means defining which modules are taking care of what responsibility, and how they play together.
* Custom code should be arranged so heavy-duty processes (involving much data and complex calculations) are performed on powerful machines (and not on the mobile client).
* Actually, all of the effort should be done on the server if possible, with the client just using out-of-the-box features. This won't be feasible in all cases, though.
= Data Model =
= Algorithm =
Most {{UBIK}} customizings introduce projects have custom code performing more or less complex data processing tasks.
The algorithm resulting from custom code can be highly distributed because of the way the life cycle of {{UBIK}} objects can be customized.
But it can also be a single interface with a third party system that has to crawl through a lot of data and perform many operations on them.
* Scale well with respect to more input
There are also some quick hints we can drop for you to avoid many problems. Custom code for MetaClasses:
* Don't use the "OnSaved" event if you want to modify any object as a result of another object being saved. Use "OnPrepareForSave" instead, to avoid complex saving recursions.
* Use a custom plugin to create a nice architecture for your code, using the life cycle events only to call it.
* Avoid multi-threading, but if you have to implement parallel tasks, use locking wisely to avoid dead-locks.
* Keep in mind that multiple users could work on the same objects, i.e., your customizing can be executed in parallel, on different processes. This means you have to make sure your code doesn't interfere with itself. Mostly this is relevant for updating and reading from the database, where one process can update a value while another one is assuming a different value.
Performance:
* Apply caching to reuse previously processed data and to avoid doing the same thing more than once, but clean up your cache if it becomes invalid.
Avoiding crashes:
* Check every variable for being null before you use it.
Well-formed code:
* Apply the principles of object-oriented programming (OOP) and the C# coding conventions.
* For every responsibility in the code, there should be a dedicated software module. An optimal distribution of responsibility will often make your code perform better and easier to understand and maintain.
* Give all variables, methods and classes really good and human readable names. Good naming and well-structured source code is better than any kind of comments.
= {{UBIK}} Features =