I was recently asked in an interview to design the front-end architecture of Google Docs (web version). I wasn't expecting such a question so just talked about whatever I could think of at that time. However, now when I think of it, I can break-up the question around certain fundamental questions:
- How can we store the user generated content (which data structure)?
- How to store and structure the application state?
- How can we map the content and the application state to the UI (DOM manipulation)?
- How will you divide the application units like menu, text editor, etc? Monolithic or Micro front-ends? How will these components talk to each other and the text editor?
- How will you manage server communication and bind it to the application state (given that Google Docs allows many users to edit the doc at the same time and all docs should be in sync at all times)?
- What design patterns can be used to accomplish above goals?
- ...Add any relevant concepts you might think are important.
I understand that there might be different ways to architect the application, so there can be different answers. However, you should be able to justify how your solution fits the requirements?
Please note that I am not looking for answers like "You can design it in React-Redux, or Angular or Closure". Rather, I am looking for basic structure and high level architecture of the application.
Thanks.
Aucun commentaire:
Enregistrer un commentaire