Lab book development
First off, before developing lab book, you should be familiar with their use and how they work. If you're not, go over the Lab book page. You should especially be familiar with the synchronization rules (when to synchronize).
Elements synchronizations against lab books are made based on database fields. So, all fields you want to synchronize for a model need to be present in your lab book with the exact same name. The synchronize operation iterates on both master and detail models. Two type of synchronization exist. You can either synchronize from an element or from a lab book.
Synchronization from an element
You create/edit an element an need to synchronize it. The function you'll need is LabBookMaster.syncData. It will update your data (both direct data and data array are supported) against the specified lab book. As an optional option, you can specify an expected lab book control id to make sure synchronization is being done on a valid lab bok.
Synchronization from a lab book
If you update a lab book, you have to fetch and update at all elements relying on it. In the core, when such an action occurs, a call is made to LabBookMaster.synchLabbookRecords. This function updates the linked derivatives samples and realiquots. Should you implement lab book on more models, you'll need to update that function.