; $Id: DEVELOPERS.txt,v 1.1 2010/03/09 16:56:51 pounard Exp $

Notes on API
============

Modules
=======

 - assistant_ref : Main feature, this module handles saving of a filters list
   for any (Node Reference field / node) couple. 
 
 - assistant_queue : This will contain all task queue/dequeue operation for
   deamon. This module, based on CRUD operations hooks() will queue tasks for
   future deamon implementation.

 - assistant_daemoncli : This is the base deamon implementation, nice'd
   PHP CLI script for queuing/dequeing assistant update tasks.
   In the future, this module will be exported in order to be easily used by
   any module that needs heavy PHP massive work to be done asynchronously.

Modules dependencies
====================

You can choose to not enable deamon. This architural choice have been made so
the deamon and queue implementations remains pluggable.

If do you not enable a deamon, the Node Reference assistant feature will be
totally useless, enable default one or write yours.

Heavy usage of hooks
====================

Main module, Solace Node Reference gives us a series of hooks defined in
assistant_ref.api.php. All submodules will use those hooks instead of drupal
defined ones.

Entry points
============

Main feature is nodereference content field based, assistant_api module main
entry point is in hook_form_alter(). This hook is used to enable/disable solr
assistant for a given field as a site wide setting.

Second main feature, which is user configurable filters is implemented through
the 'Solr Assistant' (assistant_api) filters form, accessible which the menu
system. Save, delete or any other crud operation will be done in the form submit
function.

Note that this form may be attached to node_form in the future.

The hook_assistant_ref_node_save() is run when any filters are inserted or
updated for a (field / node) couple. This allows the deamon to take care of
tasks handling without any line of code within the main module.

Notes on file naming convention
===============================

All specific JS files must be named: <module_name>.<specific_function>.js
Files used for jQuery UI integration must be named:
<module_name>.<specific_function>.ui.js
