Download - Concrete Architecture of Firefox 2
![Page 1: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/1.jpg)
Concrete Architecture of Firefox 2
Concrete Architecture of Firefox 2
Team OneJuly 6, 2007
Team OneJuly 6, 2007
![Page 2: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/2.jpg)
AgendaAgenda• Introduction• Concrete Architecture• Comparison with Conceptual• Modules• JavaScript Interpreter• XML Parser• Display Backend
• Conclusion
• Introduction• Concrete Architecture• Comparison with Conceptual• Modules• JavaScript Interpreter• XML Parser• Display Backend
• Conclusion
![Page 3: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/3.jpg)
IntroductionIntroduction
• Analyzing Concrete Architecture• Previously researched
Conceptual Architecture• Extracted Architecture from
code
• Analyzing Concrete Architecture• Previously researched
Conceptual Architecture• Extracted Architecture from
code
![Page 4: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/4.jpg)
Comparison with Conceptual
Comparison with Conceptual
• High cohesion (XPCOM)• Additional layers• Extensions• Common
• Additional dependencies
• High cohesion (XPCOM)• Additional layers• Extensions• Common
• Additional dependencies
![Page 5: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/5.jpg)
Conceptual ArchitectureConceptual Architecture
![Page 6: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/6.jpg)
Concrete BoxesConcrete Boxes
![Page 7: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/7.jpg)
Concrete ArrowsConcrete Arrows
![Page 8: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/8.jpg)
Modules: JS InterpreterModules: JS Interpreter
• Called SpiderMonkey• Written in C• Many classes and packages, but
6 seem to be most important
• Called SpiderMonkey• Written in C• Many classes and packages, but
6 seem to be most important
![Page 9: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/9.jpg)
LiveConnectLiveConnect
• Package in SpiderMonkey• Bridge between JavaScript and
Java• Depends on a few internal
classes and XPCOM
• Package in SpiderMonkey• Bridge between JavaScript and
Java• Depends on a few internal
classes and XPCOM
![Page 10: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/10.jpg)
LiveConnect DependenciesLiveConnect
Dependencies
![Page 11: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/11.jpg)
XPConnectXPConnect
• Package in SpiderMonkey• Allows JavaScript objects access
to XPCOM objects and vice-versa
• Depends on some internal classes and XPCOM
• Package in SpiderMonkey• Allows JavaScript objects access
to XPCOM objects and vice-versa
• Depends on some internal classes and XPCOM
![Page 12: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/12.jpg)
XPConnect Dependencies
XPConnect Dependencies
![Page 13: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/13.jpg)
JSInterpJSInterp
• Class in SpiderMonkey• JavaScript Interpreter Class• All classes that depend on
JSInterp are internal• All classes JSInterp depends on
are internal
• Class in SpiderMonkey• JavaScript Interpreter Class• All classes that depend on
JSInterp are internal• All classes JSInterp depends on
are internal
![Page 14: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/14.jpg)
API ClassesAPI Classes
• JSAPI, JSXDRAPI, JSDbgAPI• Used by external classes• Depend on and are depended
on by many internal classes• Façade Pattern
• JSAPI, JSXDRAPI, JSDbgAPI• Used by external classes• Depend on and are depended
on by many internal classes• Façade Pattern
![Page 15: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/15.jpg)
API ClassesAPI Classes
• JSAPI is the main API for SpiderMonkey
• JSXDRAPI is the external data representation API
• JSDbgAPI is SpiderMonkey’s debug API
• JSAPI is the main API for SpiderMonkey
• JSXDRAPI is the external data representation API
• JSDbgAPI is SpiderMonkey’s debug API
![Page 16: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/16.jpg)
Modules: XML ParserModules: XML Parser
![Page 17: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/17.jpg)
XML ParsersXML Parsers• expat module performs DOM parsing• xml module performs SAX parsing• Both work independently of each other• expat module is self-contained and
has no dependencies; however, xml module relies on stream input and string operations support from xpcom
• expat module performs DOM parsing• xml module performs SAX parsing• Both work independently of each other• expat module is self-contained and
has no dependencies; however, xml module relies on stream input and string operations support from xpcom
![Page 18: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/18.jpg)
htmlparser Modulehtmlparser Module• Abstracts away string and unichar
issues• Delegates parsing requests to expat
and xml modules, and receives the result back.
• Implements something close to a façade, however, xml talks to xpcom
• Abstracts away string and unichar issues
• Delegates parsing requests to expat and xml modules, and receives the result back.
• Implements something close to a façade, however, xml talks to xpcom
![Page 19: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/19.jpg)
Deviation from Conceptual
Deviation from Conceptual
• Nothing is invoking/depending on parser module for XML parsing requests
• Could be a dynamic dependency rather than static, which bfx and lsedit cannot capture
• Nothing is invoking/depending on parser module for XML parsing requests
• Could be a dynamic dependency rather than static, which bfx and lsedit cannot capture
![Page 20: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/20.jpg)
Modules: Display Backend
Modules: Display Backend
• Set of platform-independent drawing primitives
• Adapter to the native graphics interface (GTK, GDI, etc)
• PostScript handling• Shared sub-components
• Set of platform-independent drawing primitives
• Adapter to the native graphics interface (GTK, GDI, etc)
• PostScript handling• Shared sub-components
![Page 21: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/21.jpg)
Modules: Display Backend
Modules: Display Backend
![Page 22: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/22.jpg)
Deviation from Conceptual
Deviation from Conceptual
• UI talks directly to Display Backend
• Interaction with Common• intl• xpcom• nsprpub
• UI talks directly to Display Backend
• Interaction with Common• intl• xpcom• nsprpub
![Page 23: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/23.jpg)
ConclusionConclusion
• Conceptual Architecture Useful• Additional Layers• Additional Dependencies
• Conceptual Architecture Useful• Additional Layers• Additional Dependencies
![Page 24: Concrete Architecture of Firefox 2](https://reader036.vdocument.in/reader036/viewer/2022070400/56812e3f550346895d93bfa8/html5/thumbnails/24.jpg)
Thank youThank you
Questions?Questions?