1 / 19

Plug-in Architectures

Plug-in Architectures. Presented by Truc Nguyen. What’s a plug-in?. “a type of program that tightly integrates with a larger application to add a special capability to it” - CNET “a set of software components that adds specific abilities to a larger software application” - Wikipedia.

derry
Download Presentation

Plug-in Architectures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Plug-in Architectures Presented by Truc Nguyen

  2. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special capability to it” - CNET “a set of software components that adds specific abilities to a larger software application” - Wikipedia

  3. What’s a plug-in? • Component architectures • Semantics • Plug-ins • Extensions • Add-ons

  4. Plug-ins • Not hard-coded into host app • Unknown at compile time • Not a standalone application • One step further: compose an entire application out of plugins

  5. Why do have plug-ins? • Extensible • Modular • Customizable • Keep It Small and Simple!

  6. Traditional vs Pure

  7. Traditional Plug-in • Extend capabilities of base application • Not compiled into the application

  8. Pure Plug-in • Everything is a plug-in • Plug-ins extend other plug-ins • Where does that leave the base application? • A run-time engine for plug-ins • Plug-ins become hosts to other plug-ins by providing extension points • How do plug-ins play nicely with each other? • Abide by the framework’s or each other’s rules

  9. Pure Plug-in Engine • Keeping track of where the right plug-in code is and running it • Maintain a registry of plug-ins and functions that go with each • Manage extension model and dependencies between plug-ins

  10. Plug-in Design Patterns • Best practice solutions to solve a design problem • How to support dynamic loading of modules unknown during compilation

  11. Plug-in Pattern

  12. Eclipse • Well known as a Java IDE • Pure plug-in architecture • Runtime engine itself is a bunch of core plug-ins except for tiny bootstrap code • Universal plug-in architecture for creating “anything, but nothing in particular” • Each plug-in has a manifest

  13. Eclipse

  14. Gecko (NPAPI) • Netscape Plugin Application Programming Interface • Plug-in is completely controlled by web page that calls it • On start, Gecko looks for plug-in modules in a specified locations on the system • On a page with certain embedded media, checks for plug-in with matching MIME type creates new instance and runs it

  15. Photoshop • Central Plug-in loader • Scans PiPL (Plug-in Property List) • Fixed types • filter, import, export, file format, automation • selection and parser (not implemented by 3rd party) • Non-Photoshop applications can support Photoshop plug-ins

  16. Chrome • Scripting API vs Browser API • Extensions can modify the DOM • Can have access to the history, current tabs, bookmarks, etc • Composed of files, can be packaged as .crx • manifest.json • HTML files • JavaScript • Other resources (e.g CSS, images)

  17. Chrome • Background pages • Persistent or event • Content scripts are JS that executes in the context of the page just loaded • Can change the DOM on the current page • Can’t change the DOM on the background page of parent extension • Callbacks execute on a user action

  18. Challenges • Installing and updating • Configuration plugin • Security • Concurrent plug-in version • Eclipse convention: Only plug-ins that contribute code libraries can coexist • Scalability

  19. Questions?

More Related