Silverstripe integration


I’ve been thinking about integrating dhtmlxScheduler as Silverstripe CMS module. Everything else is quite simple except database integration. Silverstripe uses database abstraction such as:

class Scheduler extends DataObject {

    static $db = array(
            'event_id' => 'Int',
            'event_name' => 'Varchar',
            'start_date' => 'SSDatetime',
            'end_date' => 'SSDatetime',
            'details' => 'Text',

This will include forementioned fields and db fields that Scheduler class extends. My question is, as I don’t know too much about programming and DB programming in php, what would be the most logical way to integrate Silverstripe database usage with dhtmlxscheduler, since I don’t want to have a separate database for the calendar and silverstripe installation. Benefits of using Silverstripe DB system would also, hopefully, be automatic multiple calendar support.

There are two possible solutions

a) write your own data-source class , which must implement 4 base methods ( get record, add record, update record, delete record ) and calls Silverstripe for all such actions instead of direct DB interactions. ( it will require a bit of PHP knowledge, but nothing really complicated )

b) you can discard server side connectors at all. Scheduler receives data as xml, and it doesn’t matter is such xml generated by the connector’s code, or by your custom solution