On May 21, 2013, at 10:40 AM, Douglas Campos <qmx@qmx.me> wrote:

On Mon, May 20, 2013 at 03:14:33PM -0500, Kris Borchers wrote:
In our team meeting today, I brought up the question of whether or not the JavaScript clients for both SimplePush and Unified Push should live in folders under AeroGear.js or in their own repos. I would like to open this up to suggestions from the team. Please vote below.

SimplePush Currently, this lives under AeroGear.js at
https://github.com/aerogear/aerogear-js/tree/Notifier/src/simple-push
IMO, this makes sense since it also has a hard dependency on Notifier
which lives here
https://github.com/aerogear/aerogear-js/tree/Notifier/src/notifier I
would vote this remain where it is. Please vote whether or not this
should remain in the AeroGear.js repo.
keep as is


Unified Push Currently, this lives under AeroGear.js at
https://github.com/aerogear/aerogear-js/tree/Notifier/src/unified-push
IMO, this is not necessary since it could be used independently from
the rest of AeroGear. I would vote that this move to a separate repo.
This would also mean that the client object's name would change since
it is currently namespaced under AeroGear as
AeroGear.UnifiedPushClient. I would suggest it be renamed to
AGUnifiedPushClient and be added to a repo named
aerogear/unified-push-js. Please vote for whether or not this should
move and if it should, an object name and repo name.
Why can't we keep it namespaced?
+1 to split
-1 to changing the namespace.

I guess we can, the problem is since it doesn't depend on AeroGear, there is no guarantee that if the app uses the AeroGear library that it will be inserted into the document before or after this file. That means I would have one of the following scenarios:

  1. Global AeroGear object is included before this file but is then overwritten by the creation of a new object to namespace UnifiedPushClient
  2. Global AeroGear object is included after this file which then overwrites the UnifiedPushClient with the new object

These can both be solved by adding checks both to UnifiedPushClient and AeroGear.Core to see if the global AeroGear object exists and if so, add to it instead of creating a new one but it feels strange to check for the existence of AeroGear in AeroGear.Core since that is where it SHOULD be first created.

Changing the name and not using the AeroGear namespace solves this.

--
qmx
_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev