Section 1
Last week was awfully tight as I had our final year project presentation, viva and demonstrations (http://fyp.theebgar.net). I received googles welcome pack with a small red colored notebook and a prepaid debit card loaded with 505 USD. Also I partially ported my plan to Joomla! context, studied the format of the existing Joomla! 1.6 libraries and adopted JUser for the Taxonomy API's Tree class. Expecting to complete API implementation within a week.
Section 2
Had an unofficial chat in GTalk on May 28th with one of the mentor. The following points were discussed:
1. GPL licence and borrowing styles and patterns
"me: 1. I adopted the code from TUser class in the joomla library. I can give attribution and it is under GPL. will it be a problem?
8:38 PM I did so because it is from Joomla! 1.6 and coded by core developers so I can follow the same style8:39 PM Luis: what do wou mean with giving attribute.. to state it was developed by Joomla core team instead of you?me: no to state the style and parts of the code was borrowed from this class8:40 PM Luis: ahh.. I see.. it is perfect"
me : JUser uses a sub class to handle table operations JTableUser which is located in a central location /libraries/joomla/database/tablesbut I decided to keep it along with my library
me: yes it is placed under joomla in libraryoopsi made a mistake in teh structurethat i committed:(Luis: unless you intend it to be include it in the core of Joomla framework10:14 PM me: mm the idea is that right ?Luis: I am not sure when installer will locate 3rd party librariesI think under libraries/ foldernot inside libraries/joomla/when = whereme: ah okies then finelets keep it like the current way10:15 PM jimport('taxonomy.tree');
Luis: well JClass does not exist in 1.5it is 1.6 additionme: mmsorry if i m missing any Joomla pattern:(I checked few other library classeslik filesystem,9:03 PM then only I decided to useLuis: well, there must be a good reason they have decided to inherit from JClass in certain circumstancesbut JObject includes a lot of functionality, it is worth inheritingme: but in operation JTaxTree is equivalent to JUser9:05 PM do you think I should use JObject?9:06 PM Luis: I think but let me be sure.... give me 5 minutes.. no objections to JTaxTreeme: sure no worries9:07 PM actually I wanted to check whether my choice of place to put the JTableTaxTree is correct9:14 PM me: mm what do you think?9:18 PM Luis: back.. JClass defines a protected constructor while JObject does notme: woow then its the most suitableLuis: so it is suitable for singleton pattern9:19 PM the question is, will this class be used in a singleton pattern?me: mm I guessed it from its usageyes it will beLuis: I see... in that case there is no problem with inheriting from JClass
5. Also discussed about the implementation of JLeaf (but decided to go with a particular design and evaluate the merits later)
JTree serves two purpose9:28 PM 1. acting as a representative for the table jos_taxonomy_trees and jos_taxonomy_tree_maps2. providing controlling functions9:31 PM Luis: you have implemented representation for tables via the methods I can see.,.. controlling functions are missing as JLeaf and Term are not implemented yet...ok, I think that is 100% clear.. so your question is what approach to use for JLeaf and JTerm, right? Is that your question?9:32 PM me: yes what I am saying is JTree has both methods and parametesbut I prefer to keep them separate for JLeafthere is no JTerm (i used it mistakenly)Luis: so not to implement save, bind and those things in JLeafme: yesLuis: right?me: exactly9:33 PM Luis: ok.. I got itme: they will provided through controlling functionstehy will be provided through controlling functionsbut we can just load JLeaf as loadObject from database queryI was considering it because it will be called extensively9:34 PM and memory allocation will be significant if it is made bulkyLuis: umm.. describe how you use JLeaf and loadObject.. a code sample9:35 PM me: okies JLeaf will have methods like getLeaves9:36 PM and that method will returnLuis: a list of its children??9:37 PM me: $query = "SELECT * FROM #__taxonomy_leaves WHERE tid = $tid'';
$db =& JFactory::getDBO();
$db->setQuery($query);
return $db->loadObjectList();yes something like thisdirectlyso JLeaf wont have set of variablesthey are returned immediatelyfrom the functionLuis: ahh.. not intermediate class9:38 PM me: yes and not keeping the table fields as variables in JLeaf classLuis: avoid instantiation of JLeafme: exactly9:39 PM Luis: which is expensive.. umm..9:40 PM me: I am suggesting this for anothe reason as wellLuis: ok.. what is that reason?me: unlike JTree where it involves with taxonomy_trees and taxonomy_tree_mapsJLeaf will work with many tablesleaf_relations, leave_maps, leaf_alias9:41 PM Luis: ahh.. complexcomplex handling of tables...me: and the operations are mostly acting on more than one tableat a timeyesand mostly atomic
Section 3
The lists to follow
1. Community page (sort of a homepage for all the links) : https://community.joomla.org/gsoc2009/gartheeban-ganneshapillai.html
Have-done list:
1. Specifications, API, and timeline are posted to community site.
2. SVN commit is done.
3. JTree first version is committed.
Currently In Progress:
1. Reading Mastering Joomla 1.5 Extension and Framework Development
2. Completing API library
Short term to dos:
1. Finish JTree
2. Arrange a meeting with mentors and discuss the progress and implementation of JLeaf
3. Commit changes soon and often