EECI US 2012

22 October 2012

I was lucky enough to go to both EECI’s this year, the European one in Leiden and the US one near Aus­tin which happened last week. In fact I was invited to speak at the US one and felt very hon­oured to present to my fel­low EE com­munity mem­bers. I gave a talk on the developer’s track and it was a full house, stand­ing room only!!

Eeci us 2012 presentation sized

The con­fer­ence last week was full of excite­ment and drama and I think that pretty much every­one who was there really enjoyed it. The qual­ity of the talks was very high and the people were great and I for one had a blast with the guys I already know and those that I met.

I want to take this oppor­tun­ity to go into more detail on the two main things that I dis­cussed in my talk (slides avail­able here).

Pro­gress­ive Add-on Devel­op­ment #

Over the past year or so I have become more and more con­vinced that in order to really innov­ate with add-on devel­op­ment, we need to work to allow and encour­age integ­ra­tion between our add-ons. Pro­gress­ive Add-on Devel­op­ment” is a concept that I came up with to describe mak­ing our add-ons com­pat­ible and extens­ible using hooks and libraries.

A pro­gress­ive add-on” con­tains hooks so that oth­er add-ons, in this case exten­sions, can hook onto it and extend its func­tion­al­ity. This means that any event on an EE site can trig­ger not only one add-on, but a series of con­sec­ut­ive add-ons without any hack­ing, as illus­trated in the fig­ure below. I refer to add-ons that are not extens­ible in this way dead-end add-ons”.

A good example of a pro­gress­ive add-on is CartThrob. Say you are devel­op­ing an e‑commerce site in which print-on-demand books can be pur­chased and you would like to auto­mate the entire pro­cess. CartThrob will pro­cess the pay­ment, but it also con­tains a hook which would allow you to cre­ate an add-on that extends the pay­ment pro­cess and sends the details to a print-on-demand ser­vice such as lulu’s API.

Progressive Add-ons

Anoth­er ele­ment of a pro­gress­ive add-on is hav­ing its main func­tions abstrac­ted into a lib­rary. This means that oth­er add-ons can load this lib­rary and inter­act with the ori­gin­al add-on. A good example of this is CE Image which has most of its image manip­u­la­tion func­tions in a lib­rary which you can call directly.

Con­tinuum #

Con­tinuum is an add-on that I have been work­ing on for the past year and a half and which I demoed dur­ing my talk at EECI. It is a real-time vis­it­or track­ing tool and I used it as a work­ing example of a pro­gress­ive add-on and dis­played the main code snip­pets which make it pro­gress­ive”. The main ele­ments which make it pro­gress­ive are embed­ded hooks, abstrac­tion to a lib­rary, tem­plate tags and callable actions, all of which can be used by oth­er third-party add-ons to extend and use the func­tion­al­ity found in Con­tinuum. The fol­low­ing dia­gram explains it best.

As you can see, the Con­tinuum exten­sion is called using hooks in the tem­plate pars­er and in oth­er add-ons (com­ment mod­ule, safecrack­er, etc.). The Con­tinuum mod­ule is called by oth­er add-ons through callable actions and with a tem­plate tag. Both the exten­sion and the mod­ule, as well as oth­er add-ons, can call the Con­tinuum lib­rary which handles all of the event log­ging logic. The lib­rary also con­tains its own set of hooks which allows it to be exten­ded, thereby com­plet­ing the flow.

Con­tinuum will be released as a free add-on next week. The idea is that developers can learn how to devel­op pro­gress­ive add-ons by look­ing at the code and that oth­er third-party add-ons can be developed spe­cific­ally to extend it, thereby cre­at­ing a mini add-on marketplace.