You Got A Question? Ask    GNOME Community!


Creating a Gnome App with Google’s Dart in 5′

I was reading an article about a new language from Google, called Dart. Google wants to add a virtual environment inside Chrome and execute Dart directly. Yeap, Dart is for creating Web Apps.

I doubt if other major browsers will follow Google on this, but Dart can also be compiled into JavaScript.

I went to Dart page, I downloaded the SDK and I tried it. I haven’t read not a single line of documentation, I just run it 5 minutes ago, but this is how it works..

1. Download SDK

dart-sdk

This looks like a modified Eclipse IDE. I choose Sunflower Demo. Nothing to install, everything is binary.

2. Run Demo

dart-sunflower

I run the application, and it seems that runs a server in 3030 port.

3. Export to JS

generate-javascript

I found this Option that generates a Javascript file

4. Create a Node Package

I placed all the files CSS, HTML, JS in a folder with a simple descriptor:

{
  "name": "sunflower",
  "main": "index.html",
  "window": {
    "toolbar": false,
    "width": 800,
    "height": 600
  }
}

And generated my NodePackage.

5. Run it

run-dart-node

There we go! We have a WebKit Gnome Desktop Application, with a nice animation, in less than 5 minutes!

0 Compiling, 0 Dependencies ;)


Dart initial stable release was around a month ago (at least this is what the article I red was saying!), and I thought why not try it.

Dart Lang

Node-WebKit


 
  We can't watch comments unless G+ provides an API or if you send a notification, e.g +World Of Gnome
     Sometimes is better to place your questions on GNOME Community
  • http://varemenos.com/ Adonis K. (Varemenos)

    node-webkit is just ★

  • Um Nontasuwan

    I really like this idea, I think this way, some how, can bring more apps to gnome desktop. :)

  • Eduard Gotwig

    No GNOME components => not GNOME

    • GNOME user

      Indeed. It’s just a webapp, that’s all.

  • sethladd

    Thanks for trying Dart!

    • alex285

      Wow, a Google engineer here? Just Wow!

      And what a coincidence, because right now I am trying to add Google comments with GPlus API ;)

  • Pingback: Visto nel Web – 111 | Ok, panico()