Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Remove InstantArticle dependency from the Client #96

Closed
alucic opened this issue May 11, 2016 · 2 comments
Closed

Remove InstantArticle dependency from the Client #96

alucic opened this issue May 11, 2016 · 2 comments
Assignees
Labels

Comments

@alucic
Copy link
Contributor

alucic commented May 11, 2016

https://github.com/facebook/facebook-instant-articles-sdk-php/blob/master/src/Facebook/InstantArticles/Client/Client.php#L89

Client has hard dependency on InstantArticle. The only method being used is render which returns a markup.

Maybe we could do something like this to make Client usable outside of the SDK:

  1. Check against InstantArticleInterface that will have render method
  2. pass in string instead of InstantArticle - breaking change

Have you considered moving Client to a separate package?

Let me know what you think, I'll be happy to work on removing this dependency.

Thanks!

@everton-rosario
Copy link
Contributor

Hello @alucic, its a great point of view about separating Client from SDK (Transformer + Elements).

In the other hand the SDK + Client were designed and implemented together within the same package in a way we reduce the number of invalid Instant Article that are being submitted and being reproved in the review process.
We are still improving the SDK and validation rules to improve the number of articles approved on 1st submission. If this approval rate improves considerably and in a consistent way, we could safely disable the review process for anyone using the SDK (this is still a conceptual idea, but indeed a medium term goal to be achieved).

Considering this roadmap and that the Elements structure contained inside the SDK lib is being crucial to improve and provide a more structured and safer object tree, in a sense we can reduce the # of invalid Instant Articles submitted, probably putting apart the SDK and Client will break this improvement.

Does it make sense?

Let us know any more thoughts and thank you for your feedback.

@everton-rosario
Copy link
Contributor

@alucic, thanks for this.
Unfortunately we are not intended to make this a broader and common solution to be in this SDK.
So if you need this to be unplugged, we recommend you to use the main PHP SDK of Facebook, so you can submit your content without any strict validation.

Why?
This SDK was built and designed to suit a need to create a less error prone condition for publishers so they can produce their content with much less chances of getting an invalid markup. This way we will be soon available to bypass review for the ones using this SDK.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants