Michael Latta: Building a Composite Model in ActiveRecord

Michael that talks about his experience in creating models that inherit from an emulation of ActiveRecord.

It could be an interesting session. Michael uses ActiveScaffold to create an application for a demo, the controversy is that he does not use use ActiveRecord to managge the models ma emulates ActiveRecord with a ad-hoc class that he virtualizes.

The approach utilises to implement similar classes is to “find a bug and solve it” repetitively, that in Michael’s opinion is like making a TDD (test driven development)

Clearly emulating ActiveRecord is complicated, for example to recreate the update function, manage the association and keep the functionality of extensions and macros.

(the discussion at that time moves towards technical detail that cannot have being spared to perform this)

Also to support the counting was not an gentle undertaking Michael confirms (just as the find method).

Once the VirtualModel is compatible with ActiveScaffold you need to structure it in a way that this accepts the creation of a novel instance, also here the use of the procedure is the same; continuously finding errors and fixing them.

I find the model that is shown by Michael also not his own (at least from my trifling concern of view), nay practical value has he been able to be simulation in detail of a library such as ActiveRecord.

Annalisa