[MGNLNEWSLETTER-42] Refactor to use campaignmonitor monitor API v3 Created: 13/Nov/12  Updated: 27/Mar/13  Resolved: 25/Mar/13

Status: Closed
Project: Newsletter (closed)
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3

Type: Improvement Priority: Major
Reporter: Tomáš Gregovský Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

The Campaign Monitor now using API v3, but our magnolia-module-newsletter-campaign-monitor still using old API v2. We should move to new API.

API v3: http://www.campaignmonitor.com/api/
Java library which implements the complete functionality of the Campaign Monitor API: http://campaignmonitor.github.com/createsend-java/
old API v2: http://www.campaignmonitor.com/api/v2/



 Comments   
Comment by Magnolia International [ 01/Mar/13 ]

Some review notes:

  • Bundles: We have magnolia-module-newsletter-campaign-monitor-1.3-SNAPSHOT-bundle.zip and magnolia-module-newsletter-bundle-1.3-SNAPSHOT.zip.
    The former includes the CM integration module and its dependencies. The related pom has a note that says "If we need this assembly (it includes official API campaign monitor wrapper), it needs to have a better name to avoid confusion with the simple bundle". Indeed.
    The latter ALSO includes the CM module, but without its dependencies, which makes it quite useless.
  • Module dependencies: /META-INF/magnolia/newsletter-campaign-monitor.xml depends on newsletter:1.2.1/* instead of 1.3. Make sure all module deps are up to date.
  • Pom dependencies: magnolia-module-newsletter-bundle has a dependency on magnolia-module-newsletter-campaign-monitor which excludes soap libraries. AFAICT, these are not used anymore, so why keep the exclusion ? Please cleanup.
  • If the CM Soap service is gone, why do we still have the wsdl file ?
  • If the CM Soap service is gone and replaced by a REST/Json service, what's the HttpSubscriber still good for ? Does it still even work ?

Side note: you seem to have introduce windows-line endings in some of the files. Normally, this doesn't happen with Git, unless you transfer the file between machines using different line-ending with another mechanism than Git itself. I think I fixed it, but be careful. If you need to work on several machines on the same project, you can always push between your machines without pushing to the central server, or create a temporary branch

Comment by Magnolia International [ 01/Mar/13 ]

And another note regarding the test: why do you use @BeforeClass and static members ? I don't really see any benefit here; if there is, it should be noted/commented.

Comment by Milan Divilek [ 25/Mar/13 ]
  • Bundles: We have magnolia-module-newsletter-campaign-monitor-1.3-SNAPSHOT-bundle.zip and magnolia-module-newsletter-bundle-1.3-SNAPSHOT.zip.
    The former includes the CM integration module and its dependencies. The related pom has a note that says "If we need this assembly (it includes official API campaign monitor wrapper), it needs to have a better name to avoid confusion with the simple bundle". Indeed.
    The latter ALSO includes the CM module, but without its dependencies, which makes it quite useless.
  • If the CM Soap service is gone and replaced by a REST/Json service, what's the HttpSubscriber still good for ? Does it still even work ?

We have two campaign manager service implementations - HttpSubscriber and JsonSubscriber.
HttpSubscriber - provides only basic functionality of campaign-monitor (CM). Adds a subscriber (email address, name) to an existing subscriber list and unsubscribe user from subscriber list. For example you cannot subscribe user with custom fields. It is not supported by the HTTP get interface. For most people is enough basic functionality so we use the HttpSubscriber by default and Http Subscriber also doesn't need any special libs which are not part of our bundles.
JsonSubscriber - use official CM Json API wrapper - so we can simply add more functionality (like support for subscribe user with custom fields) to our subscriberservice. But the JsonSubscriber needs official API wrapper(createsend-java) library and its dependencies.

That's why we have two newsletter-bundles. magnolia-module-newsletter-bundle-1.3-SNAPSHOT contains CM module, but without its dependencies - because this bundle is intended to be used with HttpSubscriber which doesn't need createsend-java library.
If someone need extended functionality of CM then he can use JsonSubscriber and then he has to use magnolia-module-newsletter-campaign-monitor-1.3-SNAPSHOT-bundle which contain createsend-java library and its dependencies.

Comment by Milan Divilek [ 27/Mar/13 ]

https://git.magnolia-cms.com/gitweb/?p=enterprise/newsletter.git;a=commit;h=9cbb156d1d9bfb0029a29588258244cd7a72889f
https://git.magnolia-cms.com/gitweb/?p=enterprise/newsletter.git;a=commit;h=444666b48fe2aa8a45709cd87db8eb3100c05c31

Generated at Mon Feb 12 10:22:16 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.