The Artima Developer Community
Sponsored Link

Java Buzz Forum
JavaScript in all of the tiers

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
JavaScript in all of the tiers Posted: Sep 4, 2007 7:32 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: JavaScript in all of the tiers
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

CouchDb is the Next Hot Thing in databases, created by Damien Katz of Lotus Notes infamy, and now MySQL hacker.

CouchDb is a distributed document database system with bi-directional replication. It makes it simple to build collaborative applications that can be replicated offline by users, with full interactivity (query, add, update, delete), and later "synced up" with everyone else's changes when back online.

There have been some exciting updates which now mean that JSON is the data representation of choice, and for views, you can simply use JavaScript functions:

CouchDb now internally uses the JSON representation to handle documents. We got rid of a whole lot of XML-related boilerplate code in the process — and less code is always good. JSON then allowed us to get rid of Fabric too, the advantage being that people interested in CouchDb didn't have to learn yet another language. Javascript is pretty well known by now and easy to pick up, too. At last, we even added another buzzword to the ever growing list of CouchDb's features. Views are now created using a map-reduce architecture. An architecture that has already been proven to be massively scalable.

The views are simple functions that you write, that gets handed a document that you can work on. Below we test that the doc is a Person, and return the name. So, it is kinda like select name from people:

function(doc) {
    if ("Person" == doc.type) {
        return doc.name;
    }
}

This means that if you were so inclined, you could do JavaScript/JSON throughout your architecture. From building the Ajax client, to running JavaScript on the server, to pushing right back to the datastore.

Read: JavaScript in all of the tiers

Topic: Running a small software company, sharing IP, and the US banking market from PeopleOverProcess.com Previous Topic   Next Topic Topic: links for 2007-08-29 from PeopleOverProcess.com

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use