Background story on Carriers?

Hi all, noob here.

I have tried searching the documentation for information regarding carriers and why they exists but couldn’t find anything. Are they some sort of optimization to avoid handling large “real” objects?

1 Like

The carriers is the raw data without methods, the data can be serializable and transferable between the applications. For each carrier you have an object, example OrderCarrier with Order, that encapsulate the carrier and ensure that the carrier that are stored in memory caches not are changed by mistake. The Order-object have methods for changing information and when the information is stored in database the carrier is also updated in memory to reflect the changes.

This is a pattern that exists in the older part of Litium API; in the newer API we using read-only objects that ensures that memory caches not are changed.


Perfect, this was exactly what I was looking for. Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.