What is Mocha?

Mocha was the original project name of the very popular scripting language known as Javascript , an extremely rich, powerful and flexible programming language that has a large, highly developed syntax, a huge library of standard methods (functions) and built-in capabilities to create complex, object-oriented data structures and methods.

Because Javascript is the world's most misunderstood programming language , we will always be misunderstood when we say "Javascript". If we want others to understand Javascript as the programming language it is, we should refer to it as "Mocha".

The kind of scripting we have seen in web browsers for the last decade, I continue to call Javascript. I use the term Mocha to refer to the usage of Javascript beyond that scope, often on both the client-side and server-side and integrated with other technologies such as XML and Java, producing "Web 2.0" applications.

06.08.2005, 20:56

Do you remember Gopher?

"[We] like to consider the hundreds of interconnected Gopher servers to be one large distributed entity; thus, we speak of "the Gopher", with its many small parts, spread throughout the Internet. The Gopher is always growing, always changing. It's everywhere, but you can't locate it; it's always there, but you can't see it. ... The Gopher is the largest and most practical example of applied pantheism in the history of mankind." 

Boy, do I feel old right now!

02.08.2005, 21:42


The current.tv disappointment

When I heard that Al Gore bought the News World International channel and was planning a mix between MTV and CNN, a concept I had in the back of my mind for the last decade, I was looking forward to see how this concept would fly.

Well, current.tv is here - and while I see the mix, it's not the mix I saw. The funny thing is that they acknowledge themselves that the kind of TV they make is being replace by the Internet when they say "Right now, at this moment in history, TV is the most powerful medium in the world". My idea of a mix between MTV and CNN on the other hand would be the kind of TV that will survive the Internet. I'll carry it around with me some more.

02.08.2005, 9:02


OpenMocha Project Roadmap

I just added a project roadmap to the openmocha.org website.

The concepts OpenMocha is based on have been deployed in Mocha Objects
through versions 3, 4 and 5 for many years and are quite mature. With
OpenMocha these concepts have been moved to an open source foundation
and while OpenMocha is not yet "feature complete", the features that
are currently implemented are stable and OpenMocha 0.5 or later can be
used in production.

http://openmocha.org/openmocha /roadmap/

Coming soon: OpenMocha 0.6 as well as more documentation and examples.

01.08.2005, 12:14


MochiKit Javascript Library

MochiKit consists of:
  • Async - manage asynchronous tasks
  • Base - functional programming and useful comparisons
  • DOM - painless DOM manipulation API
  • DateTime - "what time is it anyway?"
  • Format - string formatting goes here
  • Iter - itertools for JavaScript; iteration made HARD, and then easy
  • Logging - we're all tired of alert()
  • Visual - visual effects and colors

27.07.2005, 12:04


Getting your feet wet with OpenMocha

Paul Adams of Webmonkey is getting your feet wet with Ruby on Rails . So, I thought we could just compare how the same exercise would play out in Mocha.

Paul starts by pointing you to the installation instructions so you can install Ruby and Rails. He says  "However you get your RoR on your system, the procedure is pretty simple once it's installed", whatever that means ;-)  Next, he points out that you also need to install a database system such as MySQL or PostgreSQL.

Then he creates a "bookmarker" database and adds a "bookmarks" table. Then he types "rails Bookmarker" to create a new Rails app. Then a "config/database.yml" file to point to the previously created database. Then he types "ruby ./Bookmarker/script/generate scaffold Bookmark" to create the app's components based on that database. Then he starts the server and goes to http://oursite.org:3000/bookmarks. Finally he edits a template to add links to the bookmarked URLs.

Now let's see what we have to do in order to get there with Mocha:

  • You need to have Java installed
  • download OpenMocha
  • extract the downloaded archive
  • execute ./start.sh (or start.bat on Windows)
  • create an admin account at http://oursite.org:8080/register
  • copy the authentication code to the server.properties file
  • login at http://oursite.org:8080/login

Actually, this already completes our exercise, but lets say you want to add a new, separate Bookmarks application.

  • copy apps/main to apps/bookmarks
  • add "bookmarks" on a new line to the apps.properties file
  • restart OpenMocha
  • go to http://oursite.org:8080/bookmarks/login

Done. Don't believe me? Try it!

Ok, I admit this turned out to be a silly exercise. But hey, I only promised to get your feet wet - and believe me, that you did more than you realise. Welcome to OpenMocha! You really do have a working web application without writing a single line of code. And as you will see in a forthcoming example, you can now customize this application further by adding code, extending its functionality or overriding any default behavior.

25.07.2005, 13:22


People flocking to see global warming

In the Swiss Alps, a rapidly melting glacier has become the latest must-see on the travel circuit.
 
Since the beginning of the summer, the remains of the Trift Glacier have been made more easily accessible thanks to a new cable car service and the opening of a spectacular suspension footbridge .

"The glaciers in the Alps are melting," Baumberger continues. "We have almost too much water in summertime and that’s a problem. The advantage of glaciers is that they store water, regulating the circulation. If the glaciers disappear, the water will not be impeded on its way down the slope and that will cause flooding in the lowlands."

"If you want to replace the function of a glacier, you have to build a dam, which can technically regulate the flow of water," he adds.

25.07.2005, 09:25


Rails vs Struts vs Mocha

I just read " Ruby on Rails and J2EE: Is there room for both? " where Aaron Rustad compares Rails and Struts in three steps:

  1. The front controller
  2. The action and the model
  3. The persitence framework

 So, how does our Mocha environment compare?

 

 

The "front controller" in Helma would look for a stored object whos parent node structure matches the name hierarchy of the requested URL. Unless the next element in the requested URL specifies an alternative action method, the "main" action method of that object's prototype would then be called. The URL might look something like...

    http://localhost/orders/4/delete/

...where "4" would be a child object of "orders" and "delete" would be an action method of its prototype. Similar to Rails, the file structure can be used to define this prototype structure...

    app/Order/delete.hac

...but that method can also be set anywhere else in the code, even during runtime:

    Order.prototype.delete_action = function(){
         var parent = this._parent;
         parent.removeChild(this);
         res.redirect(parent.href());
    }

 

While the 'list' action could be specified as a parameter of the parent.href() call, this would most likely not be necessary.  In OpenMocha, the main action of the parent object will generate that list.

So, we already covered steps 1 and 2, the front controller and the action and model. Now, what about step 3?  There is no step 3. The objects are automatically stored in the embedded db.

Alternatively, the objects can also be mapped against a relational db, controlled through a type.properties file .

18.07.2005, 22:55


>>> 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
> 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?
> Anno 1999: Der Oberhasler
> Anno 1998: crossnet
> 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?
> Global Screen Design Services



Forum for Direct Democracy

Javascript server-side

Helma Project


Christoph Zumbrunn
2610 Mont-Soleil, Switzerland
+41 329 41 41 41
chris@zumbrunn.com
IRC: zumbrunn on freenode.net
Jabber: chris@zumbrunn.com
Skype: ChrisZumbrunn
Listening to: worldradio.ch
Xing profile



Chris Zumbrunn's Mochazone
> Helma at the 2008 OpenExpo in Zurich
> Large Hadron Collider
> Ecmascript Harmony
> The A-Z of Programming Languages jumps to Javascript
> Fresh Javascript IDE in Ganymede Eclipse release
> Helma at the Linuxwochen in Linz
> Brendan on the state of Javascript evolution
> Is AppleScript done?
> ES4 Draft 1 and ES3.1 Draft 1
> Want ES4 in Helma today?
> SquirrelFish!
> ES4 comes to IE via Screaming Monkey
> Apple's position on ECMAScript 4 proposals
> Helma Meeting Spring 2008
> Attila Szegedi about Rhino, Helma and Server-Side Javascript, and scripting on the JVM in general
> Helma 1.6.2 ready to download
> Larry Lessig's case for creative freedom
> Earthlings - Can you face the truth?
> The Story of Stuff
> A Quick Start to Hello World
> The Overlooked Power of Javascript
> Adobe's position on ES4 features, plus the Flex 3 SDK source code is now available under the MPL
> Solar cell directly splits water for hydrogen
> Asynchronous Beer and Geeking and other opportunities to talk about Helma, Rhino and Javascript on the server-side
> Openmocha and Jhino updated to 0.8
> Even more Server-side Javascript with Jaxer
> e4xd and jhino - javascript server-side soft-coding
> Additional Filename Conventions
> Update to Helma 1.6.1
> Netscape, the browser, to live one more month
> SimpleDB vs CouchDB
> Helma powered AppJet - Takeoff!
> CouchDB for Helma
> Bubble bursting friendship bracelets
> Evolving ES4 as the universal scripting language
> Helmablog and an article in Linux Pro Magazine
> More praise for Helma
> Javascript as Universal Scripting Language
> So, what's up with World Radio Switzerland?
> Helma Conspiracy Theory
> JSONPath and CouchDB
> Hold the whole program in your head, and you can manipulate it at will
> Keeping track of localhost:8080
> Rhino 1.6R6 with E4X fix and patches for Helma
> Helma 1.6 is ready!
> Junction brings Rhino on Rails to Helma
> Javascript for Java programmers
> The server-side advantage
> John Resig on Javascript as a language
> Rhino on Rails
> Release Candidate 3 of Helma 1.6.0
> ECMAScript 4 Reference Implementation
> Antville Summer Of Code 2007
> Helma 1.6.0-rc2
> Using H2 with Helma
> Helma warped around existing db schemas
> Rocket the Super Rabbit
> Bootstrap is out of the bag
> The last mention of Microsoft
> Helma 1.6.0-rc1
> Introducing Planet Helma
> Helma ante portas
> Fixing Javascript inheritance
> Shutdown-Day the Helma way
> Upcoming Helma 1.6, new reference docs and IRC channel
> Making Higgs where the Web was born
> Jala for Helma
> See you at Lift'07
> More on Javascript Inheritance
> Mocha Inheritance
> Helma 1.5.3
> Fresh Rhino on Safari
> Truly Hooverphonic!
> Helma 1.5.2
> RFC 4329 application-ecmascript
> Helma 1.5.1 ready to download
> Aptana - Eclipse reincarnated as a Javascript IDE
> Building the Conversational Web
> Drosera steps in to debug Safari
> Helma 1.5.0 has been released!
> Helma 1.5 RC2 is ready
> Helma 1.5.0 Release Candidate 1 available for download
> FreeBSD Jails the brand new easy way
> Javascript 2 and the Future of the Web
> Frodo takes on chapter 3
> No Rough Cut :-(
> Welcome to Helma!
> 40th Montreux Jazz Festival
> trackAllComments
> Rails' greatest contribution
> Consensus vs Direct Democracy
> A candidate for CSCSJS or a Mocha Fetchlet
> A (Re)-Introduction to JavaScript
> coComment Roundup
> Track your comments
> Sketching image queries and reinventing email
> ECMAScript - The Switzerland of development environments
> I love E4X
> Tutorial D, Industrial D and the relational model
> Stop bashing Java
> E4X Mocha Objects
> Logging and other antimatters
> Stronger types in Javascript 2
> Javascript Diagnosis & Testing
> Homo Oxymora
> Yeah, why not Javascript?
> Moving beyond Java
> Spidermonkey Javascript 1.5 finally final
> Helma Trivia
> 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
> More >>>