The Artima Developer Community
Sponsored Link

Java Community News
Flip for Flapjax

3 replies on 1 page. Most recent reply: Feb 28, 2007 5:37 PM by John Zabroski

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 3 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Flip for Flapjax Posted: Feb 22, 2007 12:01 PM
Reply to this message Reply
Flapjax is a new functional language that runs in a web browser's JavaScript interpreter, effectively wrapping JavaScript and extending it with functionality useful for Ajax applications. Cameron Laird's recent IBM developerWorks article introduces Flapjax, and provides examples of its use.

Several approaches to mask JavaScript's darker corners have emerged in the past few years: the Google Toolkit (GWT) allows you to compile Java code to JavaScript; Ajax toolkits, such as Prototype, Dojo, and attempt to provide high-level components on top of JavaScript; and Flex lets you fast-forward to the strongly typed world of EcmaScript 4, the future-generation JavaScript.

It is also possible to take another tack and build a new, possibly nicer, language on top of JavaScript itself. If that new language can be evaluated by JavaScript, programs written in that language would run anywhere JavaScript runs. That latter path was taken by the Flapjax language project:

Because Flapjax is built entirely atop JavaScript, it runs on traditional Web browsers without the need for plug-ins or other downloads. In fact, you can (in exchange for a little more code) use Flapjax purely as a library in JavaScript rather than use the compiler from Flapjax to JavaScript, so you can integrate it into your existing programs.

A recent IBM developerWorks article by Cameron Laird, Flip for Flapjax introduces Flapjax, pointing out that:

[Flapjax] happens to have the same syntax as JavaScript, and the first implementations are tied to JavaScript in several other ways ... but its creators are affiliated with academic interest in programming language theory. They categorize Flapjax as a "functional reactive" language, one that supports functional programming in combination with declarative and imperatives forms...

Flapjax mainly defines and helps you express "reactions"—correspondence between such inputs as end-user movements and selections, and outputs such as the view in the browser window...

Along with improvements in traditional Ajax expressions, Flapjax implements a few capabilities that are not traditional for Ajax coding. One of these, crucial in collaborative applications, is server-side persistence. Flapjax makes it easy to store and retrieve information from a browser ... back to the server. From there, data is available to any client. This allows a team, for example, to work together on a document—its text is just a persistent Flapjax variable...

At the same time, Flapjax is compatible with existing JavaScript... It rests on the Dynamic HTML (DHTML) and Cascading Style Sheets (CSS) that JavaScript already uses, and does not currently add any new visible elements. In this perspective, Flapjax is purely algorithmic and contributes nothing "visual"-- it only makes programming the widgets you already know easier.

What do you think of Flapjax's viability as a language for Ajax application development?

Achilleas Margaritis

Posts: 674
Nickname: achilleas
Registered: Feb, 2005

Re: Flip for Flapjax Posted: Feb 23, 2007 5:30 AM
Reply to this message Reply
Why it is considered a language and not a library?

Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Re: Flip for Flapjax Posted: Feb 23, 2007 7:27 AM
Reply to this message Reply
> Why it is considered a language and not a library?

I think it's a language that you then compile into JavaScript. They provide a server-side compiler in Python. But its facilities can, apparently, be used as a library as well.

John Zabroski

Posts: 272
Nickname: zbo
Registered: Jan, 2007

Re: Flip for Flapjax Posted: Feb 28, 2007 5:37 PM
Reply to this message Reply
This is actually a really good idea, but it doesn't address what JS script writers are asking for (which is why the comments section here has probably gone ignored).

Still, the pain points of JavaScript mostly have to do with the ghosting / sluggish UI update issues you get, like from trying to update a table of data while executing a freeze pane (like freeze panes in Excel). The "Desktop WebOS" is a pipedream until you can do tasks like this.

Flat View: This topic has 3 replies on 1 page
Topic: Bill Venners on the Future of Java Previous Topic   Next Topic Topic: Apache Releases New Version of Commons IO

Sponsored Links


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