I just read
"
Ruby on Rails and J2EE: Is there room for both?
" where
Aaron Rustad compares Rails and Struts in three steps:
- The front controller
- The action and the model
- 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
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
|
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 thats 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
|
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
|
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
|
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
|
|
|
> What is Mocha?
|
|
> E4X presentation by Brendan Eich
|
|
> OpenMocha 0.6 available for download
|
|
> Rhinola - Mocha reduced to the minimum
|
|
> Anno 1996: CZV
|
|
> Anno 1997: Xmedia
|
|
> Mont-Soleil Open Air Lineup
|
|
> Savety vs Freedom and other recent ramblings
|
|
> "Who am I?", asks Helma
|
|
> Tasting the OpenMocha Console
|
|
> Mighty and Beastie Licenses
|
|
> Catching up to Continuations
|
|
> JSEclipse Javascript plug-in for Eclipse
|
|
> Finding Java Packages
|
|
> Helma Trivia
|
|
> Spidermonkey Javascript 1.5 finally final
|
|
> Moving beyond Java
|
|
> Yeah, why not Javascript?
|
|
> Homo Oxymora
|
|
> Javascript Diagnosis & Testing
|
|
> Stronger types in Javascript 2
|
|
> Logging and other antimatters
|
|
> E4X Mocha Objects
|
|
> Stop bashing Java
|
|
> Tutorial D, Industrial D and the relational model
|
|
> I love E4X
|
|
> ECMAScript - The Switzerland of development environments
|
|
> Sketching image queries and reinventing email
|
|
> Track your comments
|
|
> coComment Roundup
|
|
> A (Re)-Introduction to JavaScript
|
|
> A candidate for CSCSJS or a Mocha Fetchlet
|
|
> Consensus vs Direct Democracy
|
|
> Rails' greatest contribution
|
|
> trackAllComments
|
|
> Anno 2003: deployZone
|
|
> Anno 1998: crossnet
|
|
> Anno 1999: Der Oberhasler
|
|
> No Rough Cut :-(
|
|
> 40th Montreux Jazz Festival
|
|
> Welcome to Helma!
|
|
> Frodo takes on chapter 3
|
|
> Javascript 2 and the Future of the Web
|
|
> FreeBSD Jails the brand new easy way
|
|
> Helma 1.5.0 Release Candidate 1 available for download
|
|
> Helma 1.5 RC2 is ready
|
|
> Helma 1.5.0 has been released!
|
|
> Drosera steps in to debug Safari
|
|
> Building the Conversational Web
|
|
> Aptana - Eclipse reincarnated as a Javascript IDE
|
|
> Helma 1.5.1 ready to download
|
|
> RFC 4329 application-ecmascript
|
|
> Helma 1.5.2
|
|
> Truly Hooverphonic!
|
|
> Fresh Rhino on Safari
|
|
> "The meaning of life is to improve the quality of all life"
|
|
> Mocha Inheritance
|
|
> Helma 1.5.3
|
|
> More on Javascript Inheritance
|
|
> See you at Lift'07
|
|
> The war against terror
|
|
> The war against terror (continued)
|
|
> Jala for Helma
|
|
> Making Higgs where the Web was born
|
|
> Upcoming Helma 1.6, new reference docs and IRC channel
|
|
> Shutdown-Day the Helma way
|
|
> Fixing Javascript inheritance
|
|
> Helma ante portas
|
|
> Introducing Planet Helma
|
|
> Helma 1.6.0-rc1
|
|
> The last mention of Microsoft
|
|
> Bootstrap is out of the bag
|
|
> Rocket the Super Rabbit
|
|
> Helma warped around existing db schemas
|
|
> Using H2 with Helma
|
|
> Helma 1.6.0-rc2
|
|
> Antville Summer Of Code 2007
|
|
> ECMAScript 4 Reference Implementation
|
|
> Release Candidate 3 of Helma 1.6.0
|
|
> Rhino on Rails
|
|
> John Resig on Javascript as a language
|
|
> The server-side advantage
|
|
> Javascript for Java programmers
|
|
> Junction brings Rhino on Rails to Helma
|
|
> Helma 1.6 is ready!
|
|
> Rhino 1.6R6 with E4X fix and patches for Helma
|
|
> Keeping track of localhost:8080
|
|
> Hold the whole program in your head, and you can manipulate it at will
|
|
> JSONPath and CouchDB
|
|
> Helma Conspiracy Theory
|
|
> So, what's up with World Radio Switzerland?
|
|
> Javascript as Universal Scripting Language
|
|
> More praise for Helma
|
|
> Helmablog and an article in Linux Pro Magazine
|
|
> Evolving ES4 as the universal scripting language
|
|
> Bubble bursting friendship bracelets
|
|
> CouchDB for Helma
|
|
> Helma powered AppJet - Takeoff!
|
|
> SimpleDB vs CouchDB
|
|
> Netscape, the browser, to live one more month
|
|
> Update to Helma 1.6.1
|
|
> Additional Filename Conventions
|
|
> e4xd and jhino - javascript server-side soft-coding
|
|
> Even more Server-side Javascript with Jaxer
|
|
> Openmocha and Jhino updated to 0.8
|
|
> Asynchronous Beer and Geeking and other opportunities to talk about Helma, Rhino and Javascript on the server-side
|
|
> Solar cell directly splits water for hydrogen
|
|
> Adobe's position on ES4 features, plus the Flex 3 SDK source code is now available under the MPL
|
|
> 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
|