0

I will try to give as much details I can about this project. First of all sorry about my English because it's not my native language.

It's not directly a question, is about your opinion for the architecture, I am student and not a professional developer of Google-extensions that's why I am asking for your opinions. I am currently developing a Google Extension about integration of Gmail website with a Enterprise CRM.

I have been doing a lot of research and each day get a bit more confused and at the same time I see many possibilities in this architecture.

The final architecture I have decided to do is the next:

  • Google Extension
  • Background.js, file which is going to send request to a CRM API using AJAX. At the same time is going to communicate with the next file Content.js using "chrome.runtime.onMessage.addListener" this way it allows me to answer request produced in the Gmail website as we will see after.
  • Content.js, file which allows me to interact with DOM elements from the Gmail interface. In many researches I have seen the are many ways to "extract" elements from Gmail interface, but they are like "`zZ. I-TJ ...*" and I don't want to loose time with this issue, so I have decided to use gmail.js, a Open Source API to extract elements and at the same time, the most important thing, inject elements directly to the interface. Here the problem is that using Gmail.js as the author says:

I still need to add implementation for chrome extension, works by injecting js for now

  • Injected.js, file which implement all the logic from the buttons clicked, and at the same time, shows a new sidebar next to the inbox or email details, showing CRM details. Here we can use the class from gmail.js.

  • CRM API, access to a central database storage and answer the request produced against its API using JSON AJAX requests.

Here a give a visual example of the architecture: Architecture planning

If you have any suggestion, something that can cause troubles, just an advice, everything will be taken in count, I am sure. Thank you

I have read posts like:

  1. How to develop Chrome extension for Gmail?
  2. Including gmail.js

I have tried:

  1. Using gmail.js directly in the content script, always getting:

'Uncaught TypeError: Cannot read property 'GLOBALS' of null'

Obviously because it's not prepared to do it. 

If this kind of question is not allowed notify me and I will delete it or update it.

2
  • "If this kind of question is not allowed" It is problematic indeed, as it would fall under "opinion-based" questions which are off-topic. Commented Feb 15, 2016 at 14:17
  • Also, that's a lot of questions mashed into one. Take a look at this guide and try to isolate questions that can be answered. It's better to create several questions than one asking many things at once. Commented Feb 15, 2016 at 14:20

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.