forked from Joose/Joose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
205 lines (139 loc) · 7.13 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
TASKS
=====
- test Joose.O.* helpers (partially done)
- derive 'stable' branch (should track releases of Task.Joose.Stable)
- merge Joose3 to 'master'
- add simple attribute 'defaultMethodClass' ala 'defaultAttributeClass'
DOCUMENTATION
=============
- document internals, notably the introspection API
-- properties hierarchy (Property -> PropetySet -> Mutable -> Composition -> Stem)
-- property's life stages (preApply/apply/unapply/postUnApply)
-- brief description of built-in properties (attributes/methods/method modifiers/requirements)
-- meta levels (proto/managed/meta)
--- reasons for the 3rd level
-- life stages of class
--- initialize/extractConstructor/adaptConstructor/construct/prepareProps/extractSuperClass/
processSuperClass/adaptPrototype/finalize/processStem/extend/
--- class mutation (extend, stem open/closed)
-- namespaces and class declaration
--- declaration (with helpers, goes trough the Joose.Namespace.Manager)
--- mutation (bypass the Joose.Namespace.Manager, managed by metaclass)
--- Joose.Namespace.Keeper
- Joose.Cookbook
-- add receipts for:
--- adding new builder
--- overriding a default attribute metaclass
- Joose.Manual
-- Installation
--- check the procedure on Mac OS
--- verify that procedure works on several platforms (CPAN Testers at least) especially on Windows
- document how class can be used as role (w/o inherited properties)
- replace the examples for 'static' with ones from real world (KiokuJS)
BENCHMARKING
============
- add benchmarking capabilities to Test.Run (or create a separate benchmarking tool)
- create a benchmark suite, and measure the:
-- startup time (of Joose itself)
-- class declaration time
-- class mutation time
-- class instantiation time (notably with traits)
- track the statistics in Changes file
- optimize everything! :)
PERFORMANCE (depends on BENCHMARKING)
=====================================
- convert all OVERRIDE modifiers in core to AROUND? (need to benchmark them 1st)
- implement optimization for methods&OVERRIDE modifiers w/o calls to `SUPER` in body. Inline them directly, w/o wrappers.
Probably should be configurable, to avoid increasing of startup overhead.
- reduce the core codebase till the 6-7Kb after YUI+gzip (after the core refactoring, see below)
REFACTORING
===========
- rewrite the core in a bit more functional style - remove 'unApply/postUnapply' stages
should give noticeable speed-up for class declarations/mutations, as the whole 2 stages won't be
propagated across all properties
we'll just clear the prototype and then re-apply it from scratch,
plus - we'll also receive a noticeable reduce of the codebase
- make `builderClass` and `stemClass` attributes private (as they are checked during normal class mutations also)
- sanitize the `create` method of Joose.Namespace.Manager
- make all stem elements lazy, so class w/o modifiers for example won't spent time for them
- introduce subs - degraded methods w/o ability to call SUPER
EXTENSIONS
==========
- JooseX.Builder.Also
-- should allow implicit ordering of builders, to address the Rhino issues (which iterates over properties randomly)
and allow multiple modifiers in the same class
- JooseX.Type
-- every class is a type
-- every role is a type?
-- types deriving (check Moose)
- JooseX.Attribute:
-- delegation
-- predicating/clearing (goes into core)
-- typing, coercion
-- traits for attributes (test)
- JooseX.Method.Overloaded (multi-methods, depending from calling signature), depends on JooseX.Type
- JooseX.Method.Labeled (attach some meta-info to methods)
or rather
- JooseX.Property.Labeled (attach some meta-info to any property (notable attribute))
- JooseX.Detach - allow detaching/applying traits at arbitrary run-time moments
clean implementation requires the `__proto__` support
IDEAS
=====
- 'immutable' builder (indicates that class/role won't mutate). Only matter for Roles, as mutation of classes doesn't trigger
the changes in sub/super classes.
- some kind of obfuscator to reduce the codebase size?? (function () { var a='Joose', b='Managed'; top[a][b] etc })()
- try Closure compacter
- "immutable traits" (should have name) - cache the derived meta-class, then re-use it, instead of re-creating for each instance
should give cheap "lightweight" traits
- add alias 'static' for 'my'? (reserved word)
- property set & stem should only provide the composition logic, `apply/unapply` logic should be delegated to meta
(in form of hooks?)
- only schedule the calls to `preApply/postUnApply` when it explicitly asked by attribute?
(currently just skipped for requirements for example)
- merge advanced attribute Role (Joose.Managed.Attribute.Builder) into bootstrap role (should give small startup boost)
- merge bootstrap role into managed class
DONE
====
- add exception for inheritance from nothing ( isa : null )
- ability to freely inherit from non-Joose superclasses
-- extensive test suite
-- implementation
- JooseX.Meta.Parameterized (aka parameterized roles, + classes)
- add SKIP and TODO methods to Test.Run
- inter-op with NodeJS
- ability to specify the method for attribute initialization ("builder" in Moose meaning)
- alias static methods (not properties) to the constructor (should be delegates to 'my')
Some.Class.method = function () {
this.my.method.apply(this.my, arguments)
}
- allow regexes as initialization values for advanced attributes
- fix JSAN shell 'install' command (prefix)
- release Module::Build::Functions (CSJ)
- release Module::JSAN
- JooseX.Attribute.Accessor.Unified - getter and setter as single function
- JooseX.Class.Singleton; http://gist.github.com/243923
- if (this.hasAttribute('builderClass')) this.getBuiderTarget() - to create a separate builder class for each metaclass
- + stem
- needs a test
- fix OpenJSAN.org html extraction method
- release JSAN::Shell
- rewrite 'my' Singleton as Class methods (and create a separate Singleton core metaclass or JooseX)
- refactor advanced attributes from roles to adding methods directly (should be well test-covered first)
- refactor methods & modifiers to reduce overhead
- migrate AUGMENT modifier to closures
- anonymous classes
- refactor helpers
- fix multiple failures under FF3.5
- does for superclasses
- migrate to github
- add override check for PUT modifiers
- fix namespace managers executeIn to omit the args?
- refactor addRole (add something like 'beforeAdd' hook, which is very often needs to be overridden)
- global 'traits' config? to apply traits immediatly after instance creation?
- Class as Role? spec&implemented or remove
- subclass builder and stem classes on-demand only
- BUILD method to prepare the arguments passed to constructor
- refactor Joose.Helper to a global "instantiator" of classes. Then it will be possible to apply roles to it, to globally modify the class creation process
- merge Containable to Mutable
- cleanClone of Stem move to Composition
- fix frames double loading in Opera (Test.Run)