Skip to content

Commit 0870194

Browse files
committed
added doc for refacto
1 parent 6a768a9 commit 0870194

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

refacto.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#Cocktail refactoring
2+
3+
## Issue
4+
5+
Currently Cocktail is a single library implementing the w3c specs. The codebase starts to be big and makes it hard for new contributors
6+
to understand. Cocktail must also be used as one piece but some of its part could be of interest for the community.
7+
8+
## Proposal
9+
10+
It should be refactored into smaller libraries which will allow:
11+
- re-use. Each one can be packaged individually and most of them can be of interest
12+
for the community
13+
- easier testing
14+
- easier sharing of responsabilities among contributors.
15+
16+
## Projects
17+
18+
- Cocktail Event.
19+
- Implements the DOM Event spec
20+
- Contains the core.event package
21+
- Cocktail DOM.
22+
- Implements the DOM spec as well as the HTMLElement
23+
- It has a basic implementation of the other HTMLElement (image, video...). Only implements
24+
getter/setters to respect spec.
25+
- It inherits from Cocktail Event
26+
- It contains no platform specific code (keyboard/mouse input, networking...)
27+
- Contains:
28+
- core.dom
29+
- core.html.HTMLElement
30+
- core.html.HTMLDocument
31+
- core.html.HTMLConstants
32+
- core.parser
33+
- core.history
34+
- core.window
35+
- core.location
36+
- core.url
37+
- core.focus
38+
- Cocktail CSS.
39+
- Implements CSS parsing and CSS selector matching.
40+
- It has a dependency to the HTMLElement interface, used for CSS selector matching.
41+
- Contains:
42+
- most of core.css (TODO: complete)
43+
- Cocktail Renderer. (or Cocktail Interactive ? Live Cocktail ?)
44+
- Implements layout, rendering and cascading.
45+
- Contain the platform specific code (keyboard/mouse inputs, graphics drawing, video...)
46+
- RenderedHTMLElement inherits from DOM's HTMLElement
47+
- RenderedHTMLElement implements cascading and rendering.
48+
- All the other HTMLElements inherit from RenderedHTMLElement
49+
- RenderedHTMLDocument inerhits from HTMLDocument
50+
- RenderedHTMLDocument implements rendering's specifics (platform code, timer, ivalidation).
51+
- Contains:
52+
- core.config
53+
- core.boxmodel
54+
- core.ds
55+
- core.floats
56+
- core.font
57+
- core.geom
58+
- core.graphic
59+
- core.hittest
60+
- core.http
61+
- core.invalidation
62+
- core.layer
63+
- core.layout
64+
- core.linebox
65+
- core.multitouch
66+
- core.renderer
67+
- core.resource
68+
- core.stacking
69+
- core.timer
70+
- core.transition
71+
- plugin
72+
- port
73+
- Cocktail.
74+
- Main project, has a dependency to all the other
75+
- contain build scripts
76+
- Contains the compatibility layer with Haxe JS DOM API
77+
- Contain high-level API, (the current CocktailAPI), used to instantiate a document, acts like
78+
a simple browser
79+
- Contains:
80+
- html
81+
- api
82+

0 commit comments

Comments
 (0)