We test compatibility by testing our demos with various browsers. The
old Flapjax website had a compatibility matrix. The new old omits it,
but we maintain a spreadsheet internally.
Before OOPSLA, we'll make another Flapjax release. For the release,
we'll rebuild the compatibility matrix, account for newly-released
browsers: Firefox 3.5, Safari 4, and IE8. We'll publish that matrix
on the Flapjax website.
>
> All these new global names have a very good chance of interfering with
> other libs, would it not have been preferable to adopt a jquery like
> approach and put everything in a separate namespace?
It would be better engineering, yes. I think we omit namespaces
because it makes our demos and examples shorter.
The released version of Flapjax exports all names to the flapjax
namespace:
flapjax.$B
This namespace is setup by the JsContracts tool. (I've just updated it
on Hackage. It should build without any problem.) In the Flapjax
source, if you look at fx/Makefile, you'll see how it's done.
I think you want it use a namespace and *not* use the top-level at
all. Right now, JsContracts does not support the latter, but its a
trivial patch.
Arjun
What would be a satisfactory fix? We used to have a function called
flapjaxInit that you needed to call in onload. flapjaxInit allowed
you to specify a custom namespace.
I'd rather not bring flapjaxInit back, since it's an extra line of
code that detracts from small, academic examples.
I'm open to suggestions.
How about something like this:
<script lang="javascript">
flapjaxNamespace = "myownflapjaxliveshere";
flapjaxDoNotExport = true;
</script>
<script lang="javascript" src="/fx/flapjax.js"></script>
So, if you don't specify flapjaxNamespace and flapjaxDoNotExport, it
will work as it does now. Does it look reasonable?
Arjun
Just use the "flapjax" namespace.
Best,
titto
Like this one?
http://docs.plt-scheme.org/reference/module.html#%28form._%28%28quote._~23~25kernel%29._module%29%29
Or like this one?
The problem is that "module" means about four or five different
things, and each of these seems to lead to different solutions.
Shriram
Can you provide a summary of each?
Talking about a "module", I mean something that contains a
bunch of declarations and helps to control their scope.
Something like Haskell's modules would suffice probably, but then again,
there are cases when you would like to treat modules as packages, not
just mere files. So there's a need for package management and deployment
also. In PLT Scheme there's "PLaneT", which I find great. (I'm working
through PLAI in my spare time, a great book, thanks by the by. :-))
Cheers,
Artyom Shalkhakov.
I should try to find a write-up that discusses all these things
already. In lieu of one at my fingertips, and assuming you don't want
to wait three years for me to reply (-:, here are a few of the
characteristics one might wish of something called a "module":
- modules for namespace management
- modules for separate compilation
- modules for representation hiding
- modules for parameterization
- modules for mutually-recursive parameterization
- modules for scoping meta-programming facilities
- modules with instantiability
Note that these aren't even mutually exclusive; a given module system
might satisfy more than one of these properties.
Shriram