[xwiki-devs] [Proposal] Better support for Google Analytics (XWIKI-6579)
Hi Devs, I would like to answer XWIKI-6579 properly, we had an initial patch that continue tu use the .vm we had before in the core for GA support, filling it properly and providing a configuration page (see https://github.com/dgervalle/xwiki-platform/commit/192753ce97f94baf34aa2a2a4... ). Since I do not see it as good as it could be, we have rewritten this patch to use a JSX, in place of the .vm. (I know JSX is loaded defer at the top now, but since the whole GA script is asynchronous, there is no more a requirement to have it in the bottom IMHO). The JSX is activated by the configuration page. Now I am wondering how I should integrate this solution in the existing code base ? 1) location : A) in XWiki B) in GoogleAnalytics space 2) document(s): A) a single document XWiki.GoogleAnalyticsConfig (config page as content, defining a class for config, containing the config object instance, and a JSX) and using translation from the core B) two documents (or more), the same as above or splitted, with a separate XWiki.GoogleAnalyticsTranslations (for just a few string, but how could it be managed with L10N ?) C) same as A, but with translation in the place official extensions will manage their translation for being supported by i10l 3) application nature: A) in the global xar, deployed by default, without anything special B) in the global xar, but with an application definition in XApp.XWikiApplicationGoogleanalytics C) in its own xar, deployable from a xwiki maven repositiory with the new extension manager D) in its own xar, on my own maven, as a private contrib, accessible manually with the new extension manager 4) sources: A) added directly to the administration application B) in xwiki-plateform-core/xwiki-platform-googleanalytics C) in ???, the place to put xar that will be build for 3C above and officially released by the XWIki Development team D) in my own github repository (for 3D) Since the code is ready, and this is just a matter of packaging, fast answer would be nice :) Personally, I felt very annoyed by where to put the translations (to manage them with l10n), so I see only how to do a simple AAAA solution, but thought the best would be AAAC or ACCC, but really do not know how to really implement it, and I feel we are not yet ready for them. WDYT ? What should I do right now ? -- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
Hi Denis, On Mon, Jul 4, 2011 at 2:29 PM, Denis Gervalle <[email protected]> wrote:
Hi Devs,
I would like to answer XWIKI-6579 properly, we had an initial patch that continue tu use the .vm we had before in the core for GA support, filling it properly and providing a configuration page (see https://github.com/dgervalle/xwiki-platform/commit/192753ce97f94baf34aa2a2a4... ).
Since I do not see it as good as it could be, we have rewritten this patch to use a JSX, in place of the .vm. (I know JSX is loaded defer at the top now, but since the whole GA script is asynchronous, there is no more a requirement to have it in the bottom IMHO). The JSX is activated by the configuration page. Now I am wondering how I should integrate this solution in the existing code base ?
1) location : A) in XWiki
+1
B) in GoogleAnalytics space
-1
2) document(s): A) a single document XWiki.GoogleAnalyticsConfig (config page as content, defining a class for config, containing the config object instance, and a JSX) and using translation from the core
Usually it's not good to have both config and code in the same place since it makes upgrades difficult.
B) two documents (or more), the same as above or splitted, with a separate XWiki.GoogleAnalyticsTranslations (for just a few string, but how could it be managed with L10N ?)
This is better IMO. Unfortunately, we still have to hardcode L10N bundle documents in the admin...
C) same as A, but with translation in the place official extensions will manage their translation for being supported by i10l
3) application nature: A) in the global xar, deployed by default, without anything special
+1
B) in the global xar, but with an application definition in XApp.XWikiApplicationGoogleanalytics C) in its own xar, deployable from a xwiki maven repositiory with the new extension manager D) in its own xar, on my own maven, as a private contrib, accessible manually with the new extension manager
4) sources: A) added directly to the administration application
+1
B) in xwiki-plateform-core/xwiki-platform-googleanalytics C) in ???, the place to put xar that will be build for 3C above and officially released by the XWIki Development team D) in my own github repository (for 3D)
Since the code is ready, and this is just a matter of packaging, fast answer would be nice :) Personally, I felt very annoyed by where to put the translations (to manage them with l10n), so I see only how to do a simple AAAA solution, but thought the best would be AAAC or ACCC, but really do not know how to really implement it, and I feel we are not yet ready for them. WDYT ? What should I do right now ?
Yes, translation management for applications is a PITA. I think it's part of Apps Within Minutes to work on this, though. Jerome
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Mon, Jul 4, 2011 at 14:40, Jerome Velociter <[email protected]> wrote:
Hi Denis,
On Mon, Jul 4, 2011 at 2:29 PM, Denis Gervalle <[email protected]> wrote:
Hi Devs,
I would like to answer XWIKI-6579 properly, we had an initial patch that continue tu use the .vm we had before in the core for GA support, filling it properly and providing a configuration page (see
https://github.com/dgervalle/xwiki-platform/commit/192753ce97f94baf34aa2a2a4...
).
Since I do not see it as good as it could be, we have rewritten this patch to use a JSX, in place of the .vm. (I know JSX is loaded defer at the top now, but since the whole GA script is asynchronous, there is no more a requirement to have it in the bottom IMHO). The JSX is activated by the configuration page. Now I am wondering how I should integrate this solution in the existing code base ?
1) location : A) in XWiki
+1
B) in GoogleAnalytics space
-1
2) document(s): A) a single document XWiki.GoogleAnalyticsConfig (config page as content, defining a class for config, containing the config object
instance,
and a JSX) and using translation from the core
Usually it's not good to have both config and code in the same place since it makes upgrades difficult.
Agreed, but AFAIK the ConfigurableClass and the config object is always in the same document, which is not good either. Since we do not use the ConfigurableClass code fully, we can manage to store the configuration object elsewhere. What do you think to put the instance of the config object in XWikiPreferences ? Or do you prefer four documents, XWiki.GoogleAnalyticsConfig, XWiki.GoogleAnalyticsSheet, XWiki.GoogleAnalyticsClass and XWiki.GoogleAnalyticsJSX ?
B) two documents (or more), the same as above or splitted, with a separate XWiki.GoogleAnalyticsTranslations (for just a few string, but
how
could it be managed with L10N ?)
This is better IMO. Unfortunately, we still have to hardcode L10N bundle documents in the admin...
Not only, how do we manage them to be translated, l10n.xwiki.org only translate the core translations, as far as I know. If we package it with the global xar and directly in the admin apps, I think we need to put the translation in the core for now.
C) same as A, but with translation in the place official extensions will manage their translation for being supported by i10l
3) application nature: A) in the global xar, deployed by default, without anything special
+1
B) in the global xar, but with an application definition in XApp.XWikiApplicationGoogleanalytics C) in its own xar, deployable from a xwiki maven repositiory with the new extension manager D) in its own xar, on my own maven, as a private contrib, accessible manually with the new extension manager
4) sources: A) added directly to the administration application
+1
B) in xwiki-plateform-core/xwiki-platform-googleanalytics C) in ???, the place to put xar that will be build for 3C above and officially released by the XWIki Development team D) in my own github repository (for 3D)
Since the code is ready, and this is just a matter of packaging, fast
answer
would be nice :) Personally, I felt very annoyed by where to put the translations (to manage them with l10n), so I see only how to do a simple AAAA solution, but thought the best would be AAAC or ACCC, but really do not know how to really implement it, and I feel we are not yet ready for them. WDYT ? What should I do right now ?
Yes, translation management for applications is a PITA. I think it's part of Apps Within Minutes to work on this, though.
Jerome
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
On Mon, Jul 4, 2011 at 15:15, Denis Gervalle <[email protected]> wrote:
On Mon, Jul 4, 2011 at 14:40, Jerome Velociter <[email protected]> wrote:
Hi Denis,
On Mon, Jul 4, 2011 at 2:29 PM, Denis Gervalle <[email protected]> wrote:
Hi Devs,
I would like to answer XWIKI-6579 properly, we had an initial patch that continue tu use the .vm we had before in the core for GA support, filling it properly and providing a configuration page (see
https://github.com/dgervalle/xwiki-platform/commit/192753ce97f94baf34aa2a2a4...
).
Since I do not see it as good as it could be, we have rewritten this patch to use a JSX, in place of the .vm. (I know JSX is loaded defer at the top now, but since the whole GA script is asynchronous, there is no more a requirement to have it in the bottom IMHO). The JSX is activated by the configuration page. Now I am wondering how I should integrate this solution in the existing code base ?
1) location : A) in XWiki
+1
B) in GoogleAnalytics space
-1
2) document(s): A) a single document XWiki.GoogleAnalyticsConfig (config page as content, defining a class for config, containing the config object
instance,
and a JSX) and using translation from the core
Usually it's not good to have both config and code in the same place since it makes upgrades difficult.
Agreed, but AFAIK the ConfigurableClass and the config object is always in the same document, which is not good either. Since we do not use the ConfigurableClass code fully, we can manage to store the configuration object elsewhere. What do you think to put the instance of the config object in XWikiPreferences ?
Or do you prefer four documents, XWiki.GoogleAnalyticsConfig, XWiki.GoogleAnalyticsSheet, XWiki.GoogleAnalyticsClass and XWiki.GoogleAnalyticsJSX ?
B) two documents (or more), the same as above or splitted, with a separate XWiki.GoogleAnalyticsTranslations (for just a few string, but how could it be managed with L10N ?)
This is better IMO. Unfortunately, we still have to hardcode L10N bundle documents in the admin...
Not only, how do we manage them to be translated, l10n.xwiki.org only translate the core translations, as far as I know. If we package it with the
No, there is already a lot of different translations in l10n.xwiki.org nothing prevent you to add one for your application.
global xar and directly in the admin apps, I think we need to put the translation in the core for now.
C) same as A, but with translation in the place official extensions will manage their translation for being supported by i10l
3) application nature: A) in the global xar, deployed by default, without anything special
+1
B) in the global xar, but with an application definition in XApp.XWikiApplicationGoogleanalytics C) in its own xar, deployable from a xwiki maven repositiory with the new extension manager D) in its own xar, on my own maven, as a private contrib, accessible manually with the new extension manager
4) sources: A) added directly to the administration application
+1
B) in xwiki-plateform-core/xwiki-platform-googleanalytics C) in ???, the place to put xar that will be build for 3C above and officially released by the XWIki Development team D) in my own github repository (for 3D)
Since the code is ready, and this is just a matter of packaging, fast answer would be nice :) Personally, I felt very annoyed by where to put the translations (to manage them with l10n), so I see only how to do a simple AAAA solution, but thought the best would be AAAC or ACCC, but really do not know how to really implement it, and I feel we are not yet ready for them. WDYT ? What should I do right now ?
Yes, translation management for applications is a PITA. I think it's part of Apps Within Minutes to work on this, though.
Jerome
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Well, Since I do not receive more comments, and the implementation is a single XWiki document, I have prepared a simple patch against the administration application with translation in the core (like most current configuration panels). This could be change later if a new standard emerge when the extension manager is fully ready, since this module is not a dependency. Now the configuration class definition, the sheet and the JSX are all in XWiki.GoogleAnalyticsCode, and the configuration object is store in XWiki.GoogleAnalyticsConfig, which is created on the fly. The JSX is activated by setting one or more GA account in the configuration, and simply by changing the JSX execution status from 'On Demand' to 'Always'. The current status is also displayed in the configuration. This JSX use the latest asynchronous code from Google. The patch is available here for review: http://goo.gl/HQH3w I'd like to push this upstream as soon as possible. Denis On Mon, Jul 4, 2011 at 16:24, Thomas Mortagne <[email protected]>wrote:
On Mon, Jul 4, 2011 at 15:15, Denis Gervalle <[email protected]> wrote:
On Mon, Jul 4, 2011 at 14:40, Jerome Velociter <[email protected]> wrote:
Hi Denis,
On Mon, Jul 4, 2011 at 2:29 PM, Denis Gervalle <[email protected]> wrote:
Hi Devs,
I would like to answer XWIKI-6579 properly, we had an initial patch that continue tu use the .vm we had before in the core for GA support, filling it properly and providing a configuration page (see
https://github.com/dgervalle/xwiki-platform/commit/192753ce97f94baf34aa2a2a4...
).
Since I do not see it as good as it could be, we have rewritten this patch to use a JSX, in place of the .vm. (I know JSX is loaded defer at the top now, but since the whole GA script is asynchronous, there is no more a requirement to have it in the bottom IMHO). The JSX is activated by the configuration page. Now I am wondering how I should integrate this solution in the existing code base ?
1) location : A) in XWiki
+1
B) in GoogleAnalytics space
-1
2) document(s): A) a single document XWiki.GoogleAnalyticsConfig (config page as content, defining a class for config, containing the config object
instance,
and a JSX) and using translation from the core
Usually it's not good to have both config and code in the same place since it makes upgrades difficult.
Agreed, but AFAIK the ConfigurableClass and the config object is always in the same document, which is not good either. Since we do not use the ConfigurableClass code fully, we can manage to store the configuration object elsewhere. What do you think to put the instance of the config object in XWikiPreferences ?
Or do you prefer four documents, XWiki.GoogleAnalyticsConfig, XWiki.GoogleAnalyticsSheet, XWiki.GoogleAnalyticsClass and XWiki.GoogleAnalyticsJSX ?
B) two documents (or more), the same as above or splitted, with a separate XWiki.GoogleAnalyticsTranslations (for just a few string, but
how
could it be managed with L10N ?)
This is better IMO. Unfortunately, we still have to hardcode L10N bundle documents in the admin...
Not only, how do we manage them to be translated, l10n.xwiki.org only translate the core translations, as far as I know. If we package it with the
No, there is already a lot of different translations in l10n.xwiki.org nothing prevent you to add one for your application.
global xar and directly in the admin apps, I think we need to put the translation in the core for now.
C) same as A, but with translation in the place official
extensions
will manage their translation for being supported by i10l
3) application nature: A) in the global xar, deployed by default, without anything special
+1
B) in the global xar, but with an application definition in XApp.XWikiApplicationGoogleanalytics C) in its own xar, deployable from a xwiki maven repositiory with
the
new extension manager D) in its own xar, on my own maven, as a private contrib, accessible manually with the new extension manager
4) sources: A) added directly to the administration application
+1
B) in xwiki-plateform-core/xwiki-platform-googleanalytics C) in ???, the place to put xar that will be build for 3C above
and
officially released by the XWIki Development team D) in my own github repository (for 3D)
Since the code is ready, and this is just a matter of packaging, fast answer would be nice :) Personally, I felt very annoyed by where to put the translations (to manage them with l10n), so I see only how to do a simple AAAA solution, but thought the best would be AAAC or ACCC, but really do not know how to really implement it, and I feel we are not yet ready for them. WDYT ? What should I do right now ?
Yes, translation management for applications is a PITA. I think it's part of Apps Within Minutes to work on this, though.
Jerome
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
participants (3)
-
Denis Gervalle -
Jerome Velociter -
Thomas Mortagne