SlideShare a Scribd company logo
1 of 18
Download to read offline
Developing GNOME Apps in
Javascript
Felipe Borges
<felipeborges@gnome.org>
Why talk about Gjs?
GNOME is....
Desktop environment
Development platform
GNOME Developer Platform
Javascript is pretty cool!
It has bad parts!
Globals
Unexpected behaviour
No block scope
But it also has good parts!
Closures are central
Functions are first-class objects
Prototypal inheritance
Is everywhere!
Gjs
First released in 2008
Well maintained
Main development language for
writing GNOME Apps
GNOME Apps in JS
Documents
Shell
Polari
gjs-console
Get started
Gjs and Gtk
Actions and signals
Run your application
const Lang = imports.lang;
const Gtk = imports.gi.Gtk;
const App = new Lang.Class({
Name: 'App',
Extends: Gtk.Application,
_init: function () {
this.parent({ application_id: 'org.example.App' });
this.connect('activate', Lang.bind(this, this._onActivate));
this.connect('startup', Lang.bind(this, this._onStartup));
},
_onActivate: function () {
this._window.show_all();
},
_onStartup: function () {
this._window = new Gtk.ApplicationWindow({
application: this,
title: "Hello World!" });
this._window.set_default_size(200, 200);
let label = new Gtk.Label({ label: "Hello World" });
this._window.add(label);
}
});
Run your application
let app = new App();
app.run(ARGV);
$ gjs helloWorld.js
http://developer.gnome.org/
Become a Friend of GNOME
Individual donation program
Donations support the
GNOME project
http://gnome.org/friends
Developing GNOME Apps in
Javascript
Felipe Borges
<felipeborges@gnome.org>

More Related Content

What's hot

GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17
siva ram
 
Gopenflow demo v1 (english)
Gopenflow demo v1 (english)Gopenflow demo v1 (english)
Gopenflow demo v1 (english)
Hiroaki Kawai
 
Python_Session
Python_SessionPython_Session
Python_Session
siva ram
 
Mp24: Python in gaming industry
Mp24: Python in gaming industryMp24: Python in gaming industry
Mp24: Python in gaming industry
Montreal Python
 
guadec-2015-developer-switch-dreams
guadec-2015-developer-switch-dreamsguadec-2015-developer-switch-dreams
guadec-2015-developer-switch-dreams
Christian Hergert
 

What's hot (20)

Continuous Delivery - FIT VUT
Continuous Delivery - FIT VUTContinuous Delivery - FIT VUT
Continuous Delivery - FIT VUT
 
Flutter - Pixel by Pixel
Flutter - Pixel by PixelFlutter - Pixel by Pixel
Flutter - Pixel by Pixel
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
 
Grok in Plone
Grok in PloneGrok in Plone
Grok in Plone
 
Writing native Linux desktop apps with JavaScript
Writing native Linux desktop apps with JavaScriptWriting native Linux desktop apps with JavaScript
Writing native Linux desktop apps with JavaScript
 
game project presentation
game project presentationgame project presentation
game project presentation
 
GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17
 
Latex with git
Latex with gitLatex with git
Latex with git
 
用 Kotlin 打造讀書會小幫手
用 Kotlin 打造讀書會小幫手用 Kotlin 打造讀書會小幫手
用 Kotlin 打造讀書會小幫手
 
Why use JavaScript in Hardware? GoTo Conf - Berlin
Why use JavaScript in Hardware? GoTo Conf - Berlin Why use JavaScript in Hardware? GoTo Conf - Berlin
Why use JavaScript in Hardware? GoTo Conf - Berlin
 
Real-time, collaborative applications in Plone
Real-time, collaborative applications in PloneReal-time, collaborative applications in Plone
Real-time, collaborative applications in Plone
 
Gopenflow demo v1 (english)
Gopenflow demo v1 (english)Gopenflow demo v1 (english)
Gopenflow demo v1 (english)
 
Rapid tests development
Rapid tests developmentRapid tests development
Rapid tests development
 
New Technologies demoed at the 2011 Plone Conference
New Technologies demoed at the 2011 Plone ConferenceNew Technologies demoed at the 2011 Plone Conference
New Technologies demoed at the 2011 Plone Conference
 
Python_Session
Python_SessionPython_Session
Python_Session
 
Python Django Basics
Python Django BasicsPython Django Basics
Python Django Basics
 
Mp24: Python in gaming industry
Mp24: Python in gaming industryMp24: Python in gaming industry
Mp24: Python in gaming industry
 
Geb+spock: let your functional tests live long and prosper
Geb+spock: let your functional tests live long and prosperGeb+spock: let your functional tests live long and prosper
Geb+spock: let your functional tests live long and prosper
 
MeteorJS - How to start
MeteorJS  -  How to startMeteorJS  -  How to start
MeteorJS - How to start
 
guadec-2015-developer-switch-dreams
guadec-2015-developer-switch-dreamsguadec-2015-developer-switch-dreams
guadec-2015-developer-switch-dreams
 

Viewers also liked

Full-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.jsFull-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.js
Michael Lehmann
 

Viewers also liked (11)

Building assets on the fly with Node.js
Building assets on the fly with Node.jsBuilding assets on the fly with Node.js
Building assets on the fly with Node.js
 
EY India Tax Insights
EY India Tax InsightsEY India Tax Insights
EY India Tax Insights
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
 
Gtk development-using-glade-3
Gtk development-using-glade-3Gtk development-using-glade-3
Gtk development-using-glade-3
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
 
The Delight and Difficulties of Universal Java Script with React
The Delight and Difficulties of Universal Java Script with ReactThe Delight and Difficulties of Universal Java Script with React
The Delight and Difficulties of Universal Java Script with React
 
Full-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.jsFull-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.js
 
Isomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the webIsomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the web
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.js
 
Customer Segmentation Principles
Customer Segmentation PrinciplesCustomer Segmentation Principles
Customer Segmentation Principles
 
React JS and why it's awesome
React JS and why it's awesomeReact JS and why it's awesome
React JS and why it's awesome
 

Similar to Developing GNOME Apps in Javascript

Similar to Developing GNOME Apps in Javascript (20)

Gomobile: gophers in the land of Android
Gomobile: gophers in the land of AndroidGomobile: gophers in the land of Android
Gomobile: gophers in the land of Android
 
Google GO
Google GOGoogle GO
Google GO
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming Language
 
Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language
 
Javascript, the GNOME way (JSConf EU 2011)
Javascript, the GNOME way (JSConf EU 2011)Javascript, the GNOME way (JSConf EU 2011)
Javascript, the GNOME way (JSConf EU 2011)
 
Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
 
Golang introduction
Golang introductionGolang introduction
Golang introduction
 
Opensource Software usability
Opensource Software usabilityOpensource Software usability
Opensource Software usability
 
G T K+ 101
G T K+ 101G T K+ 101
G T K+ 101
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Golang : A Hype or the Future?
Golang : A Hype or the Future?Golang : A Hype or the Future?
Golang : A Hype or the Future?
 
Fundamentals of Golang
Fundamentals of GolangFundamentals of Golang
Fundamentals of Golang
 
Android is going to Go! - Android and goland - Almog Baku
Android is going to Go! - Android and goland - Almog BakuAndroid is going to Go! - Android and goland - Almog Baku
Android is going to Go! - Android and goland - Almog Baku
 
Android is going to Go! Android and Golang
Android is going to Go! Android and GolangAndroid is going to Go! Android and Golang
Android is going to Go! Android and Golang
 
A gentle intro to Golang and the Go-universe
A gentle intro to Golang and the Go-universeA gentle intro to Golang and the Go-universe
A gentle intro to Golang and the Go-universe
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
 
PhoneGap
PhoneGapPhoneGap
PhoneGap
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Go programing language
Go programing languageGo programing language
Go programing language
 

Recently uploaded

Recently uploaded (20)

UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
What is a Recruitment Management Software?
What is a Recruitment Management Software?What is a Recruitment Management Software?
What is a Recruitment Management Software?
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdf
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024
 

Developing GNOME Apps in Javascript