There are 2 important files that contain the core logic. Init.php and QCalendarBase.php.
init.php initialises the calendar and also acts like a controller for all incoming ajax request. It has a factory method that creates different calendar templates/theme based on user initialisation parameters.
QCalendarBase.php is the master template/theme file. It contains many commonly used functions for the calendar. All template classes inherits from this class.
The template classes are store under the ‘themes’ directory. Each template is a combination of the ‘Model’ and ‘View’ (MVC). I wanted to separate the view but come to think about it, rendering the view for the calendar still requires significant amount of programming as there would be some sort of looping involved. I suppose other programmers might want to implement the ‘View’ using a templating engine. This is open for discussion.
To customise the calendar, the only files that the user need to change are the template class and css files. At the moment, changing the template class still requires abit of programming skills though. I feel that I can still clean up the logic there abit to make the customisation easier.