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

"Here it is : the website of the newly formed DOM Scripting Task Force, set up under the auspices of the Web Standards Project ." Along with a manifesto for cleaning up the last ten years of client side javascript.

And since I've been busy with the OpenMocha release, I have some additional catching up to do:

But there is more... For example, I just found Behaviour : To add an onclick event to every list item <li> in a page - you would write something like this:

Behaviour.register({

    'li' : function(element){

        element.onclick = function(){

            // Your onclick event goes here

        }

    }

});

18.07.2005, 18:28


OpenMocha is ready for a spin

OpenMocha is an open source Internet and Website application development framework for Mocha developers. Quick soft-coding and clean hard-coding in Javascript on the client-side AND the server-side.

The goal of OpenMocha is to maximize the fun and productivity of Javascript development by blending the gap between browser and server based scripting.

With OpenMocha, a new project can be quickly soft-coded by creating custom Mocha Objects using the web browser. As the project matures, these Mocha Objects can be re-factored and hard-coded in separate code files. The two approaches can be mixed at any time, patching hard-coded applications through soft-coding even during runtime.

OpenMocha intends to stretch and scale between fast all-in-one deployment and complex integration in best-of-breed environments.

14.07.2005, 17:06

The limits of harmonization

My response to Richard on his " How does harmonisation work? " post:

As I mentioned before, I certainly see harmonization as a crucial factor in a direct democracy. The two concepts are directly linked. The more harmonization, the more democracy.

However, I fear the system you are describing could in the real world manifest itself as an incubator for technocracy. Breeding an elite of people that are willing to involve themselves in the process. Specially if you start to stack this process through various levels of "hierarchy", like you have described in a comment to a previous post , this "danger" becomes more and more significant.

I believe your system suppresses some factors that contradict with the concept of harmonization but are also important factors in a direct democracy.

Should "emotional disagreement" be ignored? The harmonization process requires involvement and reasoning that not everybody will be willing or able to contribute. The wisdom of instinct is an integral factor in a direct democracy. People must have the right to vote on an issue even if they can not articulate their concern and their vote is based more on a gut feeling than on facts. This is a feature, not a bug.

What about the interests of those not interested? Harmonization can't be mandatory. Or even if you think it can be, I don't think it should be. Even in your ideal scenario where the outcome of the harmonization process at higher levels would in theory still reflect every individuals consent, I believe that a safety mechanism that allows the people to force an issue to a vote should be a requirement. Those that didn't participate in the process for whatever reason get a chance to veto its outcome.

Harmonization is about reaching a consensus for "change" but "change" is only half of the story. There is also an already existing consensus for "no change", the result of a previous harmonization process, the status quo. The decision between "change" and "no change" should happen outside of the harmonization process. This is where the direct vote of the people controls the process.

When individuals involve themselves in different interest groups and the system forces these interest groups through harmonization in order to reach a consensus then that outcome will likely be accepted by the people in a vote. There is no need to eliminate the direct vote from the process. It does not contradict with harmonization but it makes the process safer and allows it to be designed more efficient.

While harmonization in my opinion shouldn't replace referendum and initiative, it does make the concept of political parties obsolete. A direct democracy does not have a "governing party" and would never have an "opposition". In a direct democracy interest groups form around specific topics and work together to achieve concordance. The composition of the executive and the government then reflects that concordance.

I like your description of harmonization and I do know that it works. But I see it as a puzzle piece in a larger concept. Harmonization as the "best practice" for building consensus and achieving "governance in concordance" between all the different interest groups. At any level where policies are discussed and rules are drafted, the harmonization process should be applied to develop consensus. But the direct vote by the people should keep that process under control.

02.07.2005, 22:06

Le Conseil fédéral au Mont-Soleil

Les Sept Sages dans le Jura bernois.

Le Conseil fédéral a entamé ce matin sa course d'école de deux jours dans le canton de Berne. Après une excursion en bateau sur le lac de Bienne , les Sept Sages se sont rendus en hélicoptère au Mont-Soleil, au-dessus de St-Imier .

Les conseillers fédéraux sont ensuite montés à bord d'un char attelé pour rejoindre la centrale éolienne et solaire . Ils visiteront le bâtiment ainsi que l'obervatoire astronomique .

Ils découvriront ensuite le musée et la fabrique de montres Longines à Saint-Imier. Une rencontre d'une heure aura lieu avec la population. L'événement sera convivial et sans protocole.

30.06.2005, 18:37

Amiga History Guide

I'm glad I do not have to read it because I remember it :-)

10.06.2005, 09:05

The people must lead the executive, control the legislature and be the military

In response to Richard :

I agree with you that a representative democracy can not at the same time be a direct democracy.

I agree with you that a representative democracy will always erode.

I claim that the system I'm describing is not a representative democracy.

I claim that it is possible to create a system that delegates the work over various levels from local to global without delegating power .

You say direct democracy means that the people themselves make the laws and decisions, not legislatures . I say it depends on your definition of "make". The system has to put the people in "control". The members of the legislature should be delegatees and not representatives. They should have no power to decide. They receive drafts of legislation from the people, they should then "harmonize" these different drafts and forward the results for decisions by the people. These decisions by the people are then executed by the executive.

In representative democracies, it is the executives that lead and drive the legislative agenda and it is the legislatures that control that process - and they have the military at their disposal as the ultimate reinforcement.

These powers have to be taken away from executives and legislatures. The people must lead the executive, control the legislature and be the military.

If we can come up with a system that truly enforces these principles, then direct democracy can coexist with hierarchy !

You say that you... very much disagree with the claim that "every people have the government they deserve." . I said ultimately they will.

Do the people of Iraq deserve what is being currently imposed on them? No, they don't. The situation in Irak is one where seven wrongs still do not make a right. But ultimately, they will have the government they deserve. If they do not find a way of building a strong understanding for the need of harmonization that is deeply rooted in their local communities then it will not be the one we would like them to have.

If people have a perfect system in place that ensures their direct democratic control, they will also have the power to destroy it, should they choose to do so. Ultimately, they have the system they deserve. That means we have to educate people and people have to be willing to make their contribution for the system to work. Do the people deserve a perfect system if they are not willing to make their contribution?

Richard wrote: We are born into a system, and seldom is there an opportunity to change it. Many of the world's governments have been imposed from the outside, by either conquest or intrigue.

You are correct that in these cases it is unfair to say that they have the government that they deserve. I meant the statement in a way that looks at the big picture without focusing on any specific point in time. If we would say "We the people" have the government we deserve then that would mean several things:
  • It would include the advantages and disadvantages that we inherited from our ancestors.
  • It would mean that it is worth while to work towards improvements even if we as individuals might not be able to see much of the benefits during our life time.
  • But it also would mean that any achievements gained will be quickly lost if "We the people" become complacent.
  • And it would mean that it will require the hard work of the people and is not something that can be handed to them by some charismatic individual.
Richard wrote: <i>You give no reason to expect that your suggested system would not erode toward greater centralization as all of our current sytems have done. I believe that it would so erode. We've had referenda, initiatives, and recall in California for years, and it has made no significant difference as regards democratic governance.</i>

Direct democracy is only sustainable in its absolut form. If the sovereignty of the people is compromised then it will erode - and by definition, it would no longer be a truly direct democracy.

There can be no compromises. The sovereignty must stay with the individual and through the individual with the people. All current systems make compromises that turn their democracy into a farce.

Here in Switzerland we call our system a half-direct democracy. We have made compromises that mix the concepts of direct and representative democracy. The same is true for the system in California. Even if California would have a system that sustains direct democracy to the top it would be a farce because California itself has no sovereignty.

I believe that the basic unit of sovereignty is the individual and not the community. In a direct democracy the individual can not delegate this responsibility to the community.

If an individual in a certain situation believes that the right thing to do is to break the law, then it is ok do so, as long as that individual is willing to accept the consequences. Sometimes breaking the law might be the only honorable thing to do.
Even in the military, individuals should be responsible for there actions and follow their conscience - but still suffer the punishment if they decide to go against the rules.

Only free individuals will be good community members. The community is the first and most important level of "hierarchy" but not the basic unit of sovereignty, in my opinion.

"Can democracy coexist with hierarchy?" ...Probably not, because when I described a direct democracy  working over several hierarchical levels, I should probably have dropped the word hierarchy, since I believe that there should be direct interaction between the individual and any level and not just an indirect structure where the individual is only involved on the local level.

So, hierarchy is probably an inherently bad thing and not compatible with democracy. But I think direct democracy can work at various levels from local to global.

26.06.2005, 16:14

Copyback License

Copyback License (Draft)



 Redistribution, use, public performance, sublicencing and 

 selling with or without modification (the "Deployment") of  

 works (the "Work") referencing this license in their copyright  

 notices (the "Copyright Notice"), are permitted provided that  

 the following conditions are met:

 

 1. Deployment must retain any Copyright Notice, the above 

    grant, this list of conditions and the following disclaimer.



 2. The name of the Work must not be used to endorse, promote

    or name works derived from the Work without prior written

    permission, which may be obtained by contacting the contact 

    address provided in the Copyright Notice (the "Project").



 3. Reasonable efforts to support the Work must be made by 

    contributing any modifications and additions, enabling the 

    Project to easily obtain such contributions and granting 

    the Project rights for Deployment of such contributions.



 4. Alternative license terms may be negotiated by contacting

    the Project and must be obtained in writing.



 The Work is provided "as is" and without warranty of any 

 kind, expressed or implied, to the maximum extent permitted by 

 applicable law, but with the warranty of being written without 

 malicious intent or gross negligence; in no event shall the 

 Project, a distributor, author or contributor be held liable 

 for any damage, direct, indirect or other, however caused, 

 arising in any way out of the usage of the Work, even if 

 advised of the possibility of such damage.
25.06.2005, 13:20

>>> 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
> 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
> 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
> More >>>