Firefox üveggömb - Milyen fejlesztések érkeznek a Firefox-ba?
Concrete Architecture of Firefox 2
-
Upload
ariel-moss -
Category
Documents
-
view
14 -
download
0
description
Transcript of Concrete Architecture of Firefox 2
Concrete Architecture of Firefox 2
Concrete Architecture of Firefox 2
Team OneJuly 6, 2007
Team OneJuly 6, 2007
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
IntroductionIntroduction
• Analyzing Concrete Architecture• Previously researched
Conceptual Architecture• Extracted Architecture from
code
• Analyzing Concrete Architecture• Previously researched
Conceptual Architecture• Extracted Architecture from
code
Comparison with Conceptual
Comparison with Conceptual
• High cohesion (XPCOM)• Additional layers• Extensions• Common
• Additional dependencies
• High cohesion (XPCOM)• Additional layers• Extensions• Common
• Additional dependencies
Conceptual ArchitectureConceptual Architecture
Concrete BoxesConcrete Boxes
Concrete ArrowsConcrete Arrows
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
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
LiveConnect DependenciesLiveConnect
Dependencies
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
XPConnect Dependencies
XPConnect Dependencies
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
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
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
Modules: XML ParserModules: XML Parser
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
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
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
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
Modules: Display Backend
Modules: Display Backend
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
ConclusionConclusion
• Conceptual Architecture Useful• Additional Layers• Additional Dependencies
• Conceptual Architecture Useful• Additional Layers• Additional Dependencies
Thank youThank you
Questions?Questions?