e4xd and jhino - javascript server-side soft-coding

A new and experimental core for a complete rewrite of Openmocha.

The e4xd sub-project provides the javascript server-side for the Openmocha project, a javascript application server with a "soft-coding" framework.

The soft-coding allows modifications and development work from the "inside" of the running web application. The behavior of the web application can be changed in ways that closely relates to the hierarchical content structure of the resulting website, without the need to "hard-code" these changes in code files.

Every content object becomes "sovereign" and can define its own behavior, overriding what it would inherit from the hard-coded prototypes or from other soft-coded objects higher up in the content structure hierarchy.

The e4xd objectengine leverages naming conventions for hard-coded filenames and soft-coded object property names to overlay the hard-coded and soft-coded properties and methods and determine the behavior of an object at runtime.

Internally, these conventions follow the existing ones of the Helma framework, but expand that philosophy, adding additional conventions and accomodating to the needs of the soft-coding environment.

The jhino sub-project provides a base application scaffold for the soft-coding environment. It leverages the e4xd object engine and adds an additional layer of conventions, resulting in a basic scaffold for a working base application with CRUD type functionality and access control. Basically, jhino already provides a fully working soft-coding environment, but requires the standard Helma development tools such as the shell and inspector to do the actual "soft-coding".

The e4xd javascript server-side currently requires a patched version of Helma and Rhino. In the case of Rhino, e4xd depends on the JOMP patch and Helma needs to be modified to do the additional file suffix mapping required by e4xd.

Getting Started

  • 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://localhost:8080/exampleapp/register
  • copy the authentication code to the server.properties file
  • login at http://localhost:8080/exampleapp/login

 

Prerequisites and System Requirements

To run OpenMocha a Java Virtual Machine 1.4 or better is required.

For FreeBSD and other operating systems with ports collection you may install a JRE or JDK from the ports collection. For Windows, Linux and Solaris you can get a Java runtime or development kit from http://java.sun.com/j2se/downloads/. If you are on Mac OS X then you already have a Java runtime that will work well with OpenMocha.

While you can integrate OpenMocha with other tools such as Apache and MySQL, you do not have to. OpenMocha is pre-configured to be deployed on its own and comes with a built-in object oriented database and web server.

Getting started with OpenMocha

On the e4xd.org site, you should be able to find a working build to download and simply start with ./start.sh

For FreeBSD, Linux, Solaris, Mac OS X and other Unix flavors, start the Helma framework by invoking ./start.sh from the command line. On Windows, invoke start.bat instead.

If the java command can not be found, make sure the JAVA_HOME environment variable is set to the location of your Java installation.

With Helma running, you should be able to connect using your browser and the URL http://127.0.0.1:8080/ or http://localhost:8080/

To initialize the setup, complete the user registration form at http://127.0.0.1:8080/exampleapp/register and follow the instructions to copy the security information into the server.properties file. You may then login to your new OpenMocha server via http://127.0.0.1:8080/exampleapp/login and start configuring and deploying your web applications.

Installing jhino modules in a existing Helma setup

In addition to the full openmocha build, there is also a build that contains only the jhino modules and patched jar files, in order to add jhino to your own helma install. You would need to replace the helma.jar and rhino.jar in your Helma install with the patched versions. The "objectengine" and "jhino" modules are expected to be placed in Helma's modules directory and the exampleapp would normally go into Helma's apps directory. You could then start the example app from your manage application or add it to the apps.properties file to have it start automatically.

More info and help

Other than what you find on the (possibly not yet existing) e4xd.org website, the best places to get in touch are the openmocha mailing list and google group or the #helma@irc.freenode.net IRC channel .

Also, in case you are new to Helma, you of course need to add the helma.org website and mailing lists to the top of that list.

To get in touch with me directly, you should find additional contact information on the zumbrunn.com site.

Chris Zumbrunn < chris@zumbrunn.com > https://zumbrunn.com

22.1.2008, 16:35

Even more Server-side Javascript with Jaxer

Coincidence has it that there is even more server-side Javascript news right now: Jaxer

It is basically Mozilla running behind Apache on the server-side, extended with the server-side functionality you would expect, like reading/writing files, db access and other external communication. But since the server-side runs inside a full fledged browser environment, with not only the DOM but CSS and all the client-side js functionality, including XMLHTTP requests and the whole bit, you can really work on both sides with less mental switching.

Take a look at the example John Resig mentions :

<html>
<head>
  <script src="http://code.jquery.com/jquery.js" runat="both"></script>
  <script>
    jQuery(function($){
      $("form").submit(function(){
        save( $("textarea").val() );
        return false;
      });
    });
  </script>
  <script runat="server">
    function save( text ){
      Jaxer.File.write("tmp.txt", text);
    }
    save.proxy = true;
    
    function load(){
      $("textarea").val(
        Jaxer.File.exists("tmp.txt") ? Jaxer.File.read("tmp.txt") : "");
    }
  </script>
</head>
<body onserverload="load()">
  <form action="" method="post">
    <textarea></textarea>
    <input type="submit"/>
  </form>
</body>
</html>

Maybe sometimes it really helps to see both the client-side and server-sider code together like this, without the need to switch between separate files for views and controls. That's something to keep in mind for Jhino. With the older versions of Openmocha you always had the server-side and client-side code together on one page when using the web-based editor. With Jhino we currently lost that. So, this is one good argument to bring back a gui editor where one can see all the properties and behaviors of a Mocha object at a glance.

I'm not sure how often it will really make sense to run the code on both the client and server side. I hope we will come up with some interesting use cases for this, because the idea is intriguing!

23.1.2008, 13:07

Openmocha and Jhino updated to 0.8

New versions of the Openmocha and Jhino javascript server-side packages are available to download . They now contain basic support for fetchlets and many bug fixes:

  • Added support for fetchlets, javascript functions that are invoked on the client-side but run on the server-side.
  • added sendScript method, which renders a script to be sent to the clientside
  • turned the rhino.debug property for the exmapleapp back on, since the debugger is now working again
  • fixed render method to always return an xml object
  • fixed breadcrumbs to be properly combined in a div and changed stylesheet accordingly
  • changed initial registration process to be more distinct from the normal login/register experience
  • added experimental support for clientside and serverside filename extensions
  • changed Page to Scaffold in order to work around a problem where the page prototype overrides the one in an applications main repository if the jhino module is added via an app.addRepository call
  • added workaround for Helma bug #598, which causes onInit on the root object to fail
  • fixed lists to be contained in ul-element as intended and to use an items title and only fallback on the name if there is no title
  • updated rhino to latest cvs head with debugger related bug fixes
  • updated helma to current svn trunk and added fetchlet support
4.2.2008, 1:05

Asynchronous Beer and Geeking and other opportunities to talk about Helma, Rhino and Javascript on the server-side

What's the one senseful thing to do if you live anywhere remotely near a pub called "The Rhino"? Exactly, you go there to talk about Rhino and the wonderful things you can do with it on the server-side thanks to Helma . For example, you can do this at The Rhino in Toronto , where Kristan "Krispy" Uccello initiated a meetup of Javascript geeks to take place every second Monday evening of the month.

The next Ajax Pub Nite is February 11, 2007 at 7pm in Toronto at The Rhino.

If you live at the other end of the world, I'm sure Maksim Lin's talk on Web Development with Helma would be another excellent opportunity for Rhino chatter. I assume that takes place somewhere in Melbourne, Australia, but the exact place and time is yet to be announced.

Then there would be another chance at the OpenExpo in Berne , Switzerland, where I'll be presenting the Helma project on the 12th and 13th of March 2008.

And if you are at Lift'08 this week, I won't mind talking about Helma there either :-)

5.2.2008, 11:56

Solar cell directly splits water for hydrogen

"Plants trees and algae do it. Even some bacteria and moss do it, but scientists have had a difficult time developing methods to turn sunlight into useful fuel. Now, Penn State researchers have a proof-of-concept device that can split water and produce recoverable hydrogen."

http://wattwatt.com/pulses/236/solar-cell-directly-splits-water-for-hydrogen/

26.2.2008, 18:56

Adobe's position on ES4 features, plus the Flex 3 SDK source code is now available under the MPL

Larsen Hansen and Jeff Dyer have issued a position statement outlining Adobe's point of view on how the ECMA TG1 should proceed towards ES4 . Looks reasonable to me.

Plus the Flex 3 SDK source code is now available under the MPL and includes tools to disassemble .swf Flash files. It also contains the code for the actionscript compiler. Note that they messed up, however, and the compiler modules are missing in the released download package. They have since added the missing files to the subversion repository . So, you'll need to check it out from there .

26.2.2008, 20:42

>>> The Overlooked Power of Javascript

> A Quick Start to Hello World
> The Story of Stuff
> Earthlings - Can you face the truth?
> Larry Lessig's case for creative freedom
> Helma 1.6.2 ready to download
> Attila Szegedi about Rhino, Helma and Server-Side Javascript, and scripting on the JVM in general
> Helma Meeting Spring 2008
> Apple's position on ECMAScript 4 proposals
> ES4 comes to IE via Screaming Monkey
> SquirrelFish!
> Want ES4 in Helma today?
> ES4 Draft 1 and ES3.1 Draft 1
> Is AppleScript done?
> Brendan on the state of Javascript evolution
> Helma at the Linuxwochen in Linz
> Fresh Javascript IDE in Ganymede Eclipse release
> The A-Z of Programming Languages jumps to Javascript
> Ecmascript Harmony
> Large Hadron Collider
> Helma at the 2008 OpenExpo in Zurich
> Release Candidate 1 of Helma 1.6.3
> Helma 1.6.3 Release Candidate 2
> Helma 1.6.3-rc3 ready for testing
> Helma turns 1.6.3
> First Soleil on Mont-Soleil
> Anno 2004: CZV
> Server-Side Javascript Standard Library
> Is the Bespin web-based code editor the ideal future ServerJS IDE?
> New Eclipse Helma plugin project
> The best solution is that one isn't needed
> ReverseHttp and RelayHttp
> ES5 Candidate Specification
> A car has nothing to do with a carpet
> Think different
> Crossnet - der kollektive Intellekt der Schweiz
> Anno 1992: Intouch i-station
> Anno 1990: RasterOps
> Anno 1991: mediacube
> Anno 1993: Macro-micro navigator
> Server-side Javascript
> Surrender by Cheap Trick
> Permaculture 101
> Be part of the solution, not part of the problem
> CometD at a glance
> PubSubHub against spam and walled gardens
> Web-based editing of sandboxed server-side javascript apps
> Hang You From the Heavens by The Dead Weather
> Anno 1988: Perfect by Fairground Attraction
> August 28th 1968: William Buckley Vs Gore Vidal
> Anno 1968: Mony Mony and People Got to Be Free
> Unus Pro Omnibus - Omnes Pro Uno
> Been there, but haven't done that
> If they are not ready for what they need, give them the backbone for their future baby steps
> Before implementing a solution to a problem, always search for a workaround, because the workaround is often better than the original solution
> JVM Web Framework Smackdown
> Eating healthier would safe the planet
> ServerJS - putting Javascript to work on the *other* side
> CommonJS effort sets JavaScript on path for world domination
> While society must do things the right way, its people must find ways to do the right thing
> ServerJS - Brewing The Perfect Storm
> Move your money - It's a Wonderful Life
> You find what you google for.
> Module system strawpersons
> Keep Cool My Babies!
> Written In Reverse by Spoon
> The Moon And The Sky by Sade
> Helma 1.7.0 has escaped its stealth existence
> Modules, Proxies, and Ephemeron Tables
> Server-Side Javascript since... way back: RingoJS!
> Anno 1989: Lambada by Kaoma
> Eternal September
> AOL expanding Internet services
> Searching Gopherspace
> NEW-LIST digests
> ACTIV-L Digest
> Acorn Archimedes RISC Technology
> Hello World on C128 in CP/M Mode
> Anno 1986: Max Headroom in the News
> Anno 1985: Amiga 1000
> Anno 1982: Vic-20
> RhinoJS
> Lost and Found by Steve Mason
> Your Personal Religion by Sophie Hunger
> RingoJS 0.5 released
> Sweet People by Alyosha
> RingoJS vs NodeJS
> Get Around by Neil Young
> How creativity occurs
> The Future Is Unwritten
> What's Up Doc? by Carbon/Silicon
> Will Adobe see the light (of Day)?
> Good for Adobe, Good for Day, Good for the Ecosystem
> confederate?
> Brendan Eich on Proxies, Modules and other Proposals and Strawman
> CoffeeScript, underscore.coffee and underscore.js
> We have the world we want
> Lila Luftschloss
> If there is anything supernatural, it is humanity itself
> Oh No! by Marina And The Diamonds
> Reality is an onion, and depending on how deep you think, it may seem to contradict itself
> Web services should be both federated and extensible
> Freude herrscht!
> The Cluetrain Manifesto
> The Paul Allen Suit
> Erbix CommonJS soft-coding engine
> Nice comparison of Ringo and Node
> Faked web browsing
> Angry World by Neil Young
> Anno 1987: Knowledge Navigator
> Open source Facebook replacement Diaspora drops first alpha
> Restrepo
> Bungee jumps for all congressman, free!, no strings attached
> Link Love for Javascript
> Predictions of an ugly IPv4-to-IPv6 transition
> Ringo Release 0.6
> Order is an addictive illusion
> Peaceful Valley Boulevard and Rumblin
> Rhinola 0.8 - Server JS reduced to the minimum
> Unconditional Responsibility meets Total Compassion
> Which system setting, Mr. Citrix?
> Making Antimatter where the Web was born
> WikiLeaks moves to Switzerland
> Democracy Now!
> So Long, Larry King Live
> You register me in 50 states
> Daniel Ellsberg on Wikileaks
> Software Engineering
> California by Joni Mitchell
> Friedrich Dürrenmatt - Die Schweiz als Gefängnis
> Please Take by Wire
> Fixing the Future
> Cablecom baffled by service interruptions
> The decision to store data in a database is usually a case of premature optimization
> Could uprisings in Egypt and the Arab world produce a 'Muslim Gandhi'?
> No more White Stripes
> It Hurts Me Too by First Aid Kit
> Asmaa Mahfouz starting a revolution
> Think before teaching young dogs old tricks
> How to Save the World, Fast and Easy
> Powerful stroke of insight
> Madame Trudeaux by KT Tunstall
> Re: Administrivia
> Blue Tip by The Cars
> Piledriver Waltz by Alex Turner
> Canada, please evolve
> Heavyweight Champion of the World by Reverend and the Makers
> Everything is either simple or flawed
> AIR is to apps as PDF is to docs
> Wishful thinking is the mother of all progress
> Nuclear plants in Switzerland are modern Orgetorixism
> Newark Peace Education Panel
> Photoshop Startup Memories and First Demo
> BZ Internet Cafe
> Xjournal
> Morgana - Selling Digital-Font based Sign-writing
> Macworld Expo 1988 Amsterdam
> The right time to buy Apple stock
> Bürgerbrief
> Analog Desktop Publishing in 1984
> Enable the Creative
> Christiana Bike gone missing in Basel
> Postel's Law
> Best Music, News, and More is Back!
> bumblebee
> FidoNet
> Cute Barristas at Peet's Coffee
> Storm Song by Smoke Fairies
> Earth Mother and Fortieth Floor by Lesley Duncan
> Permaculture - A Quiet Revolution
> Paradise with Side Effects
> The Data Liberation Front
> What's Next California
> Not becoming part of the problem when trying to be part of the solution
> Customer Experience Management
> Adobe Digital Enterprise Platform
> This Painting is Not Available in Your Country
> Strength in Numbers by Colin Scallan
> RingoJS 0.8.0 is out!
> Re: parteifrei.ch
> Stuff by George Carlin
> Damn Love Song by Amy LaVere
> Switzerland is Not a Nation - it is a Philosophy
> Ralph Nader, Dennis Kucinich, Ron Paul
> 25th Fête de la Lune Noire
> Die Grünen sind die liberalsten
> How To Design A Good API and Why it Matters
> Here's to the crazy ones!
> New GPB-DA Poster (and Logo) for the Federal Elections 2011
> Evolution is not about the survival of the fittest, it is about the optimization of the synergies.
> Antwort auf offenen Brief von Tobias Sennhauser
> Alternative 1995
> Privacy is only needed to the extent that society is malfunctioning.
> The Creative Cloud, Elasticity, Touch and Context
> Libertär, EU-kritisch, ökologisch, sozial
> Consensus & Direct Democracy @ Occupy Everything
> Fortschritt statt schildbürgerliches Wachstum
> Hydrogen production from inexhaustible supplies of fresh and salt water using microbial reverse-electrodialysis electrolysis cells
> Will Not Follow by Gringo Star
> The Three Pillars of Democracy
> The Foundation of Democracy
> Bradley Manning by Cass McCombs
> Hochdemokratie
> Gamchi
> Whole Earth Catalog
> Supplement to the Whole Earth Catalog
> Neil Young
> O Freedom by Billy Bragg
> I believe I know what is true, but I know I don't know what is real.
> Zweites Eichhorn 2011 by michelo-ud
> Finish your Beer
> House Rules
> Late in the Night by Heartless Bastards
> Tim Anderson and Matthew Slater on Community Forge
> Journée: Coopératives & énergies renouvelables
> Summer 2012 will be the Woodstock of Anarchism
> Saturn Return by She Keeps Bees
> Lea & story-209 by michelo-ud
> Light Table - a new IDE concept
> Anno 1998: volksrat.ch
> Beim Denken sind Tiere auch nur Menschen
> Working on true, bottom up subsidiarity
> The Adobe Creative Cloud is coming!
> Jacob Appelbaum and National Security Agency whistleblower William Binne on growing state surveillance
> Out of Print: The 20th Century
> If what you are doing is not helpful, please stop doing it. Seriously.
> International Anarchism Gathering, St-Imier 2012
> Participate.ch macht Deliberative Demokratie mit Konsensforum
> Sixteen Saltines by Jack White
> Self-organisation as a powerful change agent
> Consensus is not something you either have or not. It is something you always have more or less of.
> Guggenheim by The Ting Tings
> The Definition of Love
> The axis of evil runs through our dining tables
> TerreVision - agriculture contractuelle
> Sophie's Choice in Bovine
> From Consumers to Citizens
> Deepening Democracy Days, June 2-12, 2012
> Surfing Democracy - Dynamic Facilitation and Wisdom Councils
> Radical Openness
> Plonk & Replonk
> Confirmation of the Higgs Boson and the Standard Model
> Declaration of Interdependence, Occupy Café and Occupy National Gathering
> Albert Streichs Mittnächtler
> A Guidebook of Alternative Nows
> The Story of Change
> Empowering Public Wisdom - The Manifesto
> The Transformation Project
> St-Imier 2012 Anarchism Gathering Program
> Du 8 au 12 août, les Imériens accueilleront les anarchistes du monde entier
> La Linea by Osvaldo Cavandoli
> Souper - Débat politique à Espace Noir
> Participate.ch brings Dynamic Facilitation Training to Zurich, March 4-6, 2013
> NEIN zum Tierseuchengesetz am 25.11.2012 - NON à la loi révisée sur les épizooties
> Weltformatplakat GPB-DA, Stadtratswahlen 2012
> Souper et débat politique - Round Three
> Fan traces "lost" singer Rodriguez
> RingoJS hits 0.9
> Jim Rough enjoying Hiltl...
> Gründungsversammlung Swiss Foodcoop Genossenschaft
> Ad-hoc Choice Creating
> Paddock cahier des charges choice creating session
> La Vélokaravane à Courtelary le 13.4.2013 au Toit des Saltimbanques
> Taste the Waste - about the worldwide destruction of food
> Governance Futures Lab for ReConstitutional Convention
> Simone Rebmann als Regierungsstatthalterin!
> Transition Town Bern am 25. April
> More than Honey by Markus Imhoof
> Occupy Love by Velcrow Ripper
> Overview & Continuum by Planetary Collective
> Zukunft säen – Vielfalt ernten
> Everyone is an exception. Let's try and catch each other.
> Art of Participatory Leadership 2013
> Social Capital World Forum 2013
> Reserve Ratio, Inter-Bank Lending and Equity Ratio
> Because *somebody* has to stand up for the people of the Internet
> The means are the way
> Original Black Bloc exhibited
> Dare to imagine: The grid that is us
> Collaborate locally, collaborate globally
> Edward Snowden, NSA PRISM wistleblower
> Installing Democracy
> Grüne NetzpolitikerInnen gegen BÜPF und NDG
> Nourrir la ville - Tagung für lokale und nachhaltige Strategien
> Leitideen des Anarchismus und EU-Kritik
> Green Phoenix Congress, September 25-29 2013, Schweibenalp, Switzerland
> Surfing Democracy November 25-26 2013
> Sommerfest von Transition Bern
> Open Air Filmvorführung in Bern am 11.8.: In Transition 2.0
> Es gibt kein Recht auf unethisches Verhalten.
> in-vitra Kulturen- und Kunstplattform in Biel-Bienne
> E-Voting: gesunde Skepsis und OpenSource ist nötig
> Virtual roundtable on governance
> Invitation to the 2013 "Beau-Sejour" gathering, October 25-27 in St-Imier, Switzerland
> Changelog for RingoJS 0.10
> Trends in Civic Tech
> Rolling Stone: In the Belly Of The Beast
> The Cryptosphere: decentralised, secure and open Web platform
> Zukunftsforum im Lorraine Quartier
> Polymoney Workshop
> Les idées principales de l'anarchisme et la critique de l'Union Européenne
> Culture of Collaboration
> La Décentrale Mont-Soleil
> Join the 2014 Beau-Sejour Gatherings, November 14-30
> RingoJS 0.11 is out!
> The New Decentralized Internet - MaidSafe