The next generation of Mocha Objects might evolve in a direction that would look something like the following, tying in tighter with the hard-coding environment of Helma:
./Site/list.view.control
// function at Site.prototype.views.list.control(that)
if (this.topics.count()) {
that.topics = {};
for (var topic in this.topics) {
that.topics.name = this.topics[topic].name;
that.topics.count = this.topics[topic].comments.count();
}
}
./Site/list.view
<table border="1">
<tr if="topics">
<th lookup="true">Topic Name</th>
<th lookup="true">Comment Count</th>
</tr>
<tr for="topics" class="rowcolor{ $topics % 2 }">
<td>{ topics$.name }</td>
<td if="!topics$.count" lookup="true">
No comments yet</td>
<td if="topics$.count == 1" lookup="true">
{ topics$.count } comment</td>
<td if="topics$.count > 1" lookup="true">
{ topics$.count } comments</td>
</tr>
<tr if="!topics">
<td colspan="2" align="center" lookup="true">
This list is empty</td>
</tr>
</table>
./Site/list.control
// function at Site.prototype.controls.list
var content = {
main : this.views.list.render()
};
var page = Page.views.default.render(content);
return page;
this.views.list.control() is invoked when the list view is rendered.
When it is invoked, "that" is the object which was passed as parameter
of the render() method or otherwise an empty/default object. "that" is
the object that will be used as the Javascript context when rendering
the view.
Views would be E4X Javascript XML objects. When Helma would render
these views, it would parse them for "lookup", "if" and "for"
attributes and then evaluate them in the context of "that".
When parsing the "for" attributes, Helma would loop through the indicated object (topics) with
"for(var $topics in topics)"
and repeat the specified element (the table row) with
topics$ == topics[$topics]
When parsing the "lookup" attributes, Helma would check if a lookup
handler function exists and if so would apply it to the element's
content.
this.controls.list would be the function that is called in order to handle the request, similar to todays this.list_action.
9.12.2005, 9:02
Javascript logging from
log4j
to
log4js.
GCC on MacOS X with GCJ
.
W3C has chartered a
Web APIs Working Group
.
There is no danger from antimatter.
There are of course other dangers
on the CERN site, as in any laboratory: high voltage power in certain
areas, deep pits to fall in, etc.
Wikis, weblogs
and microlearning, learning from microformats:
The theory of Vanilla
.
24.11.2005, 7:02
|
From Brendan Eich's
JS2 design notes
:
Goals:
-
Support
programming in the large
with stronger types and naming.
-
Enable
bootstrapping
,
self-hosting
, and
reflection
.
- Backward compatibility apart from a few simplifying changes.
Non-Goals:
- To become more like any other language (including Java!).
- To be more easily optimized than the current language.
Type operators and type annotations
Type annotations are optional.
To support strict options that require every declaration to be annotated,
*
may be used for ⊤ (the top type), e.g.
var v is *
, which is equivalent to
var v
.
Note that
*
is used differently for E4X, but its meaning as
⊤ is unambiguous in type operator and annotation right operand contexts.
In a nutshell,
is t
annotations insist on type
t
and defend against null and undefined (no more "foo has no properties" errors;
with static analysis, an error that can't be avoided at runtime can even be
reported at compile time).
as t
annotations enforce (
is t
)-or-null invariance.
And
to t
annotations convert according to cleaner,
class-extensible rules.
[...]
Given types, you can assert (is), coerce (as), or convert (to).
Conversion alone is not enough, since it either leaves null
unconverted, which is a "foo has no properties" hazard that one should
be able to assert against with an annotated declaration; or conversion
changes, e.g., null to String "null", which may be acceptable with
dynamic types only (Edition 3 and earlier), but which is wrong with
asserting and coercing annotations such as "var str is String" and "var
strOrNull as String".
Since "to" converts rather than asserts or coerces, it is not sufficient as the only kind of type annotation.
Hence the symmetry between the type operators and annotations.
Failing to provide an annotation for a type operator gratuitously
forces programmers to hand-code constraints, instead of letting the
type system do the work.
10.11.2005, 17:32
|
Some interesting additions that were made to the AjaxPatterns page:
Diagnosis
-
Logging
Instrument your Javascript with log messages.
-
Debugging
Diagnose problems with a Javascript debugger.
-
DOM Inspection
Use a DOM Inspection Tool to explore the dynamic DOM state.
-
Traffic Sniffing
Diagnose problems by sniffing Web Remoting traffic.
Testing
-
Simulation Service
Develop the browser application against "fake" web services that simulate the actual services used in production.
-
Browser-Side Test
Create automated tests of browser-side Javascript components.
-
Service Test
Build up automated tests of web services, using HTTP clients to interact with the server as the browser normally would.
-
System Test
Build automated tests to simulate user behaviour and verify the results.
10.11.2005, 16:25
|
"
Artificial artificial intelligence
" and "
why the future doesn't need us
".
"[...] a well-known
problem with the design and use of technology, and one that is clearly
related
to Murphy's law - "Anything that can go wrong, will." (Actually, this is
Finagle's law, which in itself shows that Finagle was right.)"
5.11.2005, 17:57
|
"Why isn't JavaScript the most popular server-side scripting language? To which my reply is:
yeah, why not?"
In one point, oriba san's comment is certainly right:
"I can't seem to find one good information resource for javascript. it's scattered all over the web.
javascript is a mess
."
That is true, which is why I believe so strongly that we should make tabula rasa and call the paradigm shift towards modern client/server-side Javascript by its original project name:
Mocha!
That way we will know what we get when we google for information resources.
"So my earlier prediction has become true: JavaScript is gaining
popularity as an all-purpose development language. One thing's for
sure:
there are more and more JavaScript-based frameworks popping up
for all levels of application development."
Well, in the case of OpenMocha and Helma they might be "popping up"
more, but they've been around and have evolved for several years. So,
has Whitebeam. And Trimpath Junction isn't on the server-side (but
could be, using Helma). All these server-side projects' roots go back to the
1998-2000 time frame. In retrospect I must say, neither
me
nor
Hannes
did a very good job at telling people that our projects were "server-side Javascript".
30.10.2005, 11:31
|
"When Java started, it was easy to write web applications.
Now, to build a Java application in the lightweight way, you need to learn
servlets, XML, struts, some persistence framework like Hibernate or
iBATIS, and Spring to help glue it all together. That's an oppressive
learning curve. And three years from now, when the state of the art has
changed, you'll have to do it all again.
Java's not approachable to the
masses like it once was.
"
29.10.2005, 10:39
|
Release Candidate 1 goes back all the way to March 3rd, 2000.
Finally declared final now
, this release actually carries a September 2004 version date.
24.10.2005, 21:39
|
|
|
> Finding Java Packages
|
|
> JSEclipse Javascript plug-in for Eclipse
|
|
> Catching up to Continuations
|
|
> Mighty and Beastie Licenses
|
|
> Tasting the OpenMocha Console
|
|
> "Who am I?", asks Helma
|
|
> Savety vs Freedom and other recent ramblings
|
|
> Mont-Soleil Open Air Lineup
|
|
> Rhinola - Mocha reduced to the minimum
|
|
> OpenMocha 0.6 available for download
|
|
> E4X presentation by Brendan Eich
|
|
> What is Mocha?
|
|
> Do you remember Gopher?
|
|
> The current.tv disappointment
|
|
> OpenMocha Project Roadmap
|
|
> MochiKit Javascript Library
|
|
> Getting your feet wet with OpenMocha
|
|
> People flocking to see global warming
|
|
> Rails vs Struts vs Mocha
|
|
> The JavaScript Manifesto
|
|
> OpenMocha is ready for a spin
|
|
> The limits of harmonization
|
|
> Le Conseil fédéral au Mont-Soleil
|
|
> Amiga History Guide
|
|
> The people must lead the executive, control the legislature and be the military
|
|
> Copyback License
|
|
> Looking at FreeBSD 6 and Beyond
|
|
> Qualified Minority Veto
|
|
> The Doom of Representative Democracy
|
|
> Violence in a real democracy
|
|
> Concordance and Subsidiarity
|
|
> Wrapping Aspects around Mocha Objects?
|
|
> Future of Javascript Roadmap
|
|
> Baby steps towards Javascript heaven
|
|
> Mac OS X spreading like wildfire
|
|
> Trois petits filous à Faoug
|
|
> Jackrabbit JSR 170
|
|
> Rich components for HTML 5
|
|
> More Java Harmony
|
|
> Mac goes Intel
|
|
> Google goes Rumantsch
|
|
> Oxymoronic Swiss-EU relations
|
|
> Rico and Prototype Javascript libraries
|
|
> Paul Klee - An intangible man and artist
|
|
> Incrementalism in the Mozilla roadmap
|
|
> Mocha multi-threading
|
|
> Moving towards OpenMocha
|
|
> Google goes Portal
|
|
> What Bush doesn't get
|
|
> Unique and limited window of opportunity
|
|
> Persisting Client-side Errors to your Server
|
|
> Dive Into Greasemonkey
|
|
> Brown bears knock on Switzerland's door
|
|
> The experience to make what people want
|
|
> "Just" use HTTP
|
|
> Yes, what is gather?
|
|
> A Free Song for Every Swiss Citizen
|
|
> Java in Harmony
|
|
> Jan getting carried away
|
|
> Evil Google Web Accelerator?
|
|
> JSON.stringify and JSON.parse
|
|
> Ajax for Java
|
|
> The launching of launchd
|
|
> Timeless RSS
|
|
> Kupu
|
|
> SNIFE goes Victorinox
|
|
> AJAX is everywhere
|
|
> Papa Ratzi
|
|
> How Software Patents Work
|
|
> Ten good practices for writing Javascript
|
|
> Free-trade accord with japan edges closer
|
|
> Mocha at a glance
|
|
> Adobe acquires Macromedia
|
|
> Safari 1.3
|
|
> View complexity is usually higher than model complexity
|
|
> Free Trade Neutrality
|
|
> SQL for Java Objects
|
|
> Security Bypass
|
|
> Exactly 1111111111 seconds
|
|
> Kurt goes Chopper
|
|
> Choosing a Java scripting language
|
|
> Spamalot's will get spammed a lot
|
|
> The visual Rhino debugger
|
|
> The Unix wars
|
|
> EU-Council adopts software patent directive
|
|
> FreeBSD baby step "1j"
|
|
> Never trust a man who can count to 1024 on his fingers
|
|
> Visiting the world's smallest city
|
|
> Finally some non-MS, non-nonsense SPF news
|
|
> Swiss cows banned from eating grass
|
|
> Ludivines, the "Green Fairy" of absinthe
|
|
> First Look At Solaris 10
|
|
> EU Commission Declines Patent Debate Restart
|
|
> Alan Kay's wisdom guiding the OpenLaszlo roadmap towards Mocha?
|
|
> 1 Kilo
|
|
> Re: FreeBSD logo design competition
|
|
> Schweizer Sagen
|
|
> Europas Eidgenossen
|
|
> XMLHttpRequest glory
|
|
> Art Nouveau La Chaux-de-Fonds 2005-2006
|
|
> The Beastie Silhouette
|
|
> The Number One Nightmare
|
|
> Safe and Idempotent Methods such as HEAD and TRACE
|
|
> Sorry, you have been verizoned.
|
|
> Daemons and Pixies and Fairies, Oh My!
|
|
> Sentient life forms as MIME-attachments: RFC 1437
|
|
> Anno 2004: CZV
|
|
> Web Developer Extension for Firefox
|
|
> Refactoring until nothing is left
|
|
> Brendan, never tired of providing Javascript support
|
|
> Catching XP in just 20 Minutes
|
|
> Designing the Star User Interface
|
|
> Rhino, Mono, IKVM. Or: JavaScript the hard way
|
|
> Re: SCO
|
|
> Judo
|
|
> Convergence on abstraction and on browser-based Console evaluation
|
|
> Today found out that inifinite uptimes are still an oxymoron
|
|
> New aspects of woven apps
|
|
> Original Contribution License (OCL) 1.0
|
|
> Unified SPF: a grand unified theory of MARID
|
|
> BSD is designed. Linux is grown.
|
|
> 5 vor 12 bei 10 vor 10
|
|
> Mocha vs Helma?
|
|
> Schattenwahrheit: Coup d'etat underway against the Cheney Circle?
|
|
> Abschluss Bilaterale II Schweiz-EU
|
|
> From Adam Smith to Open Source
|
|
> Linux - the desktop for the rest of them
|
|
> Big Bang
|
|
> Leaky Hop Objects
|
|
> Return Path Rewriting (RPR) - Mail Forwarding in the Spam Age
|
|
> Microsoft Discloses Huge Number Of Windows Vulnerabilties
|
|
> Steuerungsabgabe statt Steuern
|
|
> Anno 2003: deployZone
|
|
> The war against terror
|
|
> The war against terror (continued)
|
|
> The relativity of Apple's market share
|
|
> Are humans animals?
|
|
> Server-side Javascript
|
|
> Anno 1999: Der Oberhasler
|
|
> Anno 1998: crossnet
|
|
> Think different
|
|
> Geschwindigkeit vs Umdrehungszahl
|
|
> Anno 1997: Xmedia
|
|
> "The meaning of life is to improve the quality of all life"
|
|
> Anno 1996: CZV
|
|
> How do I set a DEFAULT HTML-DOCUMENT?
|
|
> Crossnet - der kollektive Intellekt der Schweiz
|
|
> Global Screen Design Services
|
|
> Anno 1993: Macro-micro navigator
|
|
> Anno 1992: Intouch i-station
|
|
> Anno 1991: mediacube
|
|
> Anno 1990: RasterOps
|
|
> Anno 1988: Perfect by Fairground Attraction
|
|
> Anno 1968: Mony Mony and People Got to Be Free
|
|
> August 28th 1968: William Buckley Vs Gore Vidal
|