How samihaddad/vertical-tabs-chrome-extension works
Main Components
• Chrome Extension Entry Point: Represent the manifest.json file as the central configuration that tells the browser how to load the extension.
• Background Script: Highlight the background.js in app/chrome – it handles events, persistent background tasks, and communication.
• Options Page: Represent the options HTML and its accompanying JavaScript (app/chrome/options/options.html and options.js) as a distinct UI component for user preferences.
• Core Modules: Include the AngularJS core directory (app/core) containing controllers, modules, and directives (such as the tab directive) that drive the overall application behavior.
• User Interface: The app/index.html along with assets/css and assets/images serve as the primary front-facing UI of the extension.
• External Libraries: Show dependencies like AngularJS and Angular Animate (inside bower_components/angular and bower_components/angular-animate) and font-awesome, which help in rendering and animations.
Relationships and Interactions
• Manifest File (manifest.json): At the center, connect to each Chrome-specific UI (background, options, donate) indicating that each is loaded or referenced by the manifest.
• Dependency Flow: Indicate that the AngularJS framework and Angular animate are injected into the application's Angular modules, and that styles from CSS (assets/css and bower_components like font-awesome and bourbon) are applied to the UI.
Architectural Patterns and Design Principles
• MVC / MVVM Patterns: Show that the AngularJS modules (controllers, directives) are using a component-based architecture which separates concerns between view, business logic, and data.
• Modular Structure: The separation in the “app” folder (chrome, core) suggests a modular design distinguishing between Chrome-specific functionality and core application logic.
• Dependency Management: Emphasize how Bower is used to manage third-party libraries, ensuring that external dependencies are isolated and integrated properly.