Integration authors are welcome to take part in the discussion of this roadmap, add their own ideas or even help implementing solutions in G2. We need to coordinate and discuss the specific features, to make sure that the resulting solutions are useful for all integrations.
How to develop a new integration. Explain all aspects and a step by step guide. The current docs could be improved considerably, but they are a start. Also, a general document about all aspects of integrations should be written.
The google SoC project (by _dv) resulted in a embed module which provides an API to do the initial user synchronization. It can also be used to be run periodically by integrations that can't use create / update user hooks / events.
We need to add this to the official G2 repository and maybe change a few things before. You can already experiment with the code: cvs module "embed" in project gallery-contrib.
relativeG2Path is less intuitive than a absolute g2Path. And with an absolute g2Path that optionally includes the host string, we can offer embedded G2 support also if the external application is on another subdomain.
Try to keep support for relativeG2Path if g2Path isn't provided.
WPG2, joomla/G2, mediawiki etc. continue to impress by means of fantastic embedding ideas and features. But for some of those features, too much coding is required. We need to try to port those features back to the G2 embedding API or to modules.
Goal: Integrations should be able to offer such embedded features with much less code and with less work.
Embedded album / photo browser à la mediawiki -> picking images, e.g. for articles / blogs.
Powerful support for simplifying picking / showing a single image by name, path, id, or an album etc. -> show images/ albums in blogs / articles of the external application. See mediawiki, wp, mambo, drupal, ...
Drupal, joomlo, ... offer their own menus for G2 albums etc. e.g. by assembling them from theme variables. We need to offer an API for that or at least document how this can be done.
What else could be ported to the G2 API side to make the life of integration authors easier?
Extend the initial synchronization API to do synchronization in batches of 100. If you have to synchronize a large (100k+) userbase, it might be a good idea to synchronize it in smaller batches and then refresh the webbrowser for the next batch or something like that. Since our PHP/webserver platform depends on too many external factors, we need to keep the risk for corruption as small as possible.
Extend the initial synchronization API to support group synchronization too. Extend the initial synchronization API to support group membership synchronization too.
Should the complete integrations approach be changed? How can the complexity be hidden? Or are there details that could be improved?
Currently, we output in UTF-8 and input is expected to be UTF-8. UTF-8 support is a strict requirement for the external application. We need to introduce a variable input / output character encoding handling. At the samme time, it's quite sure that we keep the internal handling pure UTF-8.
Input should be easy, as we already run all HTTP input through GalleryUtilities.class.
Output is more difficult, since there's nothing like a output filter yet. Some data comes from the database, some is generated and some is from the templates. In the end, all output comes either from $gallery->translate (all template g->text runs through this too) or from the database. So the question is: what do we do about the db output? And of course set the HTTP header(); and the <meta html header accordingly. See: running Gallery2 (g2) in the non-UTF-8 environment
We could provide a G2 module which makes integrations easier where G2 is the master in the master-slave relationship between G2 and the external application. This module would listen for GalleryEntity::save/delete events (user/group create/update/delete) and it would offer a plugin structure such that a integration writer just has to write a 1-2 file G2 module to implement a few methods: initiate the external application, create/update/delete external user.
Since group management differs between the various external applications more than basic user management, we'll have to make it general enough / add enough optional switches in the sync code etc.