1
0
Fork 0
Commit Graph

619 Commits (024f3b778c58bedd9da9a188638456e5a4ffdc8f)

Author SHA1 Message Date
Mike Gerwitz 024f3b778c Began adding FallbackMemberBuilder test case
This is the first test case to use the new basic xUnit-style system. This
system is likely to evolve over time. Right now it's purely for
setUp, organizational and output purposes.
2011-10-14 22:05:22 -04:00
Mike Gerwitz c10fc5818a Added very basic formatted output and failure tolerance for test case
The one year anniversary of the beginning of the ease.js project is quickly
approaching. I find myself to be not quite where I had expected many months ago,
but find that the project has evolved so much further than I had event
originally anticipated. My main motivation behind the project continues to be
making my life at work easier, while providing an excellent library that others
can hopefully benefit from. If anything, it's a fascinating experiment and
clever hack around JavaScript.

Now I find myself with a newborn child (nearly four weeks old), who demands my
constant attention (and indeed, it is difficult to find the desire to put my
attention elsewhere). Still - I am a hacker. Software is my passion. So the
project must move forward.

I also find myself unwilling to create a blog for ease.js. I feel it's
inappropriate for a project that's in its (relative) infancy and does not have
much popularity (it has never been announced to anyone). As such, I feel that
commit messages will serve my purpose as useful journal entries regarding the
status of the project. They will also be interesting easter eggs for those who
would wish to seek them out for additional perspective on the project. (Granted,
one could easy script the discovery of such entries by examining the absurd
length of the commit message...perhaps the git log manpages would be useful).

So. Let's get back to the project.

ease.js is currently going through a strong refactoring in order to address
design issues that have begun to creep up as the project grew. The initial
design was a very simple one - a "series of modules", as it was originally
described in a CommonJS sense, that would provide features of a classical
Object-Oriented system. It would seem ironic that, having a focus on
classical Object-Oriented development, one would avoid developing the project in
such a paradigm. Instead, I wished to keep the design simple (because the
project seemed simple), more natural to JS developers (prototypal) and
performant (object literals do not have the overhead of instantiation). Well,
unfortunately, the project scope has increased drastically due to the success of
the implementation (and my playfulness), the chosen paradigm has become awkward
in itself and the performance benefit is indeed a micro-optimization when
compared with the performance of both the rest of the system and the system that
will implement ease.js as a framework.

You can only put off refactoring for so long before the system begins to trip
over itself and stop being a pleasure to work with. In fact, it's a slap in the
face. You develop this intricate and beautiful system (speaking collectively and
generally, of course) and it begins to feel tainted. In order to prevent it from
developing into a ball of mud - a truly unmaintainable mess - the act of
refactoring is inevitable, especially if we want to ensure that the project
survives and is actively developed for any length of time.

In this case, the glaring problem is that each of the modules are terribly,
tightly coupled. This reduces the flexibility of the system and forces us to
resort to a system riddled with conditionals. This becomes increasingly apparent
when we need to provide slightly different implementations between environments
(e.g. ES5/pre-ES5, production/development, etc and every combination).
Therefore, we need to decouple the modules in order to take advantage of
composition in order to provide more flexible feature sets depending on
environment.

What does this mean?

We need to move from object literals for the modules to prototypes (class-like,
but remember that ease.js exists because JS does not have "classes"). A number
of other prototypes can be extracted from the existing modules and abstracted to
the point where they can be appropriately injected where necessary. Rather than
using conditions for features such as fallbacks, we can encapsulate the entire
system in a facade that contains the features relevant to that particular
environment. This will also have the consequence that we can once again test
individual units rather than systems.

At the point of this commit (this entry was written before any work was done),
the major hurdle is refactoring the test cases so that they do not depend on
fallback logic and instead simply test specific units and skip the test if the
unit (the prototype) is not supported by the environment (e.g. proxies in a
pre-ES5 environment). This will allow us to finish refactoring the fallback and
environment-specific logic. It will also allow us to cleanly specify a fallback
implementation (through composition) in an ES5 environment while keeping ES5
detection mechanisms separate.

The remaining refactorings will likely be progressive. This all stemmed out of
the desire to add the method hiding feature, whose implementation varies
depending on environment. I want to get back to developing that feature so I can
get the first release (v0.1.0) out. Refactoring can continue after that point.
This project needs a version number so it can be used reliably.
2011-10-12 18:53:52 -04:00
Mike Gerwitz eb63fb812c Merge branch 'virtual/master' into virtual/refactor/master 2011-09-21 18:24:35 -04:00
Mike Gerwitz d45e0e9dc2 Removed new virtual/master reference from README that was added in master branch 2011-09-21 18:24:15 -04:00
Mike Gerwitz e6362b8d11 Merge branch 'master' into virtual/master 2011-09-21 12:03:14 -04:00
Mike Gerwitz a238c26dc5 Merge branch 'master' into virtual/refactor/master 2011-09-21 12:02:59 -04:00
Mike Gerwitz 38e8c8244d README update to reflect design alterations and present additional project information 2011-09-21 12:02:24 -04:00
Mike Gerwitz 1afcb4311f Merge branch 'master' into virtual/refactor/master 2011-09-20 23:15:30 -04:00
Mike Gerwitz 348aa7a8d0 Permitting newer versions of uglify-js
- Version 1.0.2 broke minification process as was used by ease.js, so we'll just allow any version greater than it for now
2011-09-20 23:14:46 -04:00
Mike Gerwitz 96cb49ab2b Added notice for checking virtual/master branch 2011-09-20 17:16:27 -04:00
Mike Gerwitz f21f35019e Renamed test case to MemberBuilder-MethodTest.js (#25) 2011-09-02 23:31:57 -04:00
Mike Gerwitz b0cec62c98 test-member_builder-method freed from unnecessary dependencies for testing (#25) 2011-09-02 23:25:13 -04:00
Mike Gerwitz 1af7617a83 Moved instance binding test to MethodWrappersTest (#25)
- Ah; see how much nicer this is?
2011-09-02 23:07:42 -04:00
Mike Gerwitz 5937f7b0be Transferred method __super() invocation test to MethodWrappersTest (#25) 2011-09-02 22:55:10 -04:00
Mike Gerwitz 40d555ee3f Begin moving method wrapper tests into MethodWrappersTest (#25) 2011-09-02 22:47:35 -04:00
Mike Gerwitz 24e9dd2549 Oops. Dummy want to name things correctly? (#25) 2011-09-02 22:44:11 -04:00
Mike Gerwitz 0f244ac4aa Added beginning of README.hacking 2011-09-02 22:24:16 -04:00
Mike Gerwitz bc636637cc Refactored new and override method wrappers into separate prototypes
- Note that, since we're mid-refactor, this is a bit of a mess
2011-08-31 00:24:19 -04:00
Mike Gerwitz af653aaff7 Adjusted client-side module cleaning regex in combine.tpl 2011-08-31 00:23:23 -04:00
Mike Gerwitz ce1370e025 Now passing getInst() directly into MethodwrapperFactory factory function, like good 'ol times
- I seem to have forgotten that this is necessary due to the static implementation
2011-08-31 00:05:07 -04:00
Mike Gerwitz ba251d5a21 Ensuring combined tests run last 2011-08-29 23:17:44 -04:00
Mike Gerwitz 3c5362db0a Added MethodWrapperFactory prototype
- Not yet used
2011-08-28 17:36:27 -04:00
Mike Gerwitz 70142f5059 combine script will now include modules that are not require()'d by any other module 2011-08-28 17:33:44 -04:00
Mike Gerwitz 2efdbe8969 Added missing MemberBuilder docblocks (#25) 2011-08-27 17:08:05 -04:00
Mike Gerwitz 77a4a90b79 Merge branch 'master' into virtual/refactor/master 2011-08-27 16:24:48 -04:00
Mike Gerwitz 34be3b11a8 Added bug tracker to README 2011-08-27 16:24:37 -04:00
Mike Gerwitz 302bc1540b Removed old member_builder module 2011-08-14 18:53:40 -04:00
Mike Gerwitz 758162ad0f Began refactoring member_builder module into MemberBuilder prototype (#25) 2011-08-14 18:47:48 -04:00
Mike Gerwitz 2d8e6d70a4 Replaced hard-coded, manually ordered module list with script (#25) 2011-08-14 18:45:16 -04:00
Mike Gerwitz fd95f38c87 Integrated VisibilityObjectFactory and removed old propobj (#25)
- Note that the excessive gluing is temporary
2011-08-13 23:58:08 -04:00
Mike Gerwitz c3a09c3613 Now incluiding *Test*.js files in full combined file (#25) 2011-08-13 23:14:22 -04:00
Mike Gerwitz 04318cc73d Errors during combine process now output to stderr 2011-08-13 23:12:15 -04:00
Mike Gerwitz 3530ec839c Added new prototypes to combined file (#25) 2011-08-13 23:11:59 -04:00
Mike Gerwitz f3352e6d74 Added VisibilityObjectFactoryFactory (#25)
- This may be temporary, depending on the ultimate implementation. This is intended to ease into the refactoring.
2011-08-13 23:00:03 -04:00
Mike Gerwitz b4b09930bd Added property object comment to VisibilityObjectFactory (#25) 2011-08-13 22:42:51 -04:00
Mike Gerwitz 567c9f59a0 Implemented FallbackVisibilityObjectFactory (#25) 2011-08-13 22:42:33 -04:00
Mike Gerwitz cd1f8921de Prototype tests now have 'Test' suffix, rather than 'test-' prefix (#25) 2011-08-11 23:25:20 -04:00
Mike Gerwitz 79652a1120 Moved non-fallback visibility object into VisibilityObjectFactory (system does not yet use it) (#25) 2011-08-11 23:11:37 -04:00
Mike Gerwitz 91a6fb51e9 Added assert.notStrictEqual to client-side assertions 2011-08-11 21:05:42 -04:00
Mike Gerwitz 7a579ab2aa Initial refactoring of class_builder module into ClassBuilder ctor (#25) 2011-08-09 17:27:26 -04:00
Mike Gerwitz a401c31996 Can no longer override non-virtual methods (#19) 2011-08-04 00:44:20 -04:00
Mike Gerwitz 2569dacf15 Override keyword is now required to override a virtual method (#19) 2011-08-04 00:32:10 -04:00
Mike Gerwitz bd4e18acc6 Implicit method hiding warning now applies to virtual methods as well as non-virtual (#19) 2011-08-03 22:40:55 -04:00
Mike Gerwitz 5f95fecda6 More appropriately named method hiding test (#19) 2011-08-03 22:10:46 -04:00
Mike Gerwitz db18a61d30 [#19] Began implementing method hiding (added warning for implicit hiding) 2011-07-06 19:35:00 -04:00
Mike Gerwitz bc3e879956 Corrected Warning stack trace 2011-07-06 19:12:08 -04:00
Mike Gerwitz b74e03704b Corrected member builder method test testCannotOverridePropertyWithMethod 2011-07-06 18:49:01 -04:00
Mike Gerwitz 65d988b1c6 Set stack trace limit to 20 frames for tests 2011-07-06 18:06:22 -04:00
Mike Gerwitz 1b1a4b60d5 Altered warning display and stack trace 2011-07-06 17:55:40 -04:00
Mike Gerwitz 3820ee4b07 Merge branch 'master' into virtual/master
Conflicts:
	lib/member_builder.js
	lib/util.js
	test/test-member_builder-prop.js
2011-06-30 23:11:51 -04:00