hackergotchi

treitter

Let's Push Things Forward

Maximizing social utility for fun and (modest) profit


Previous Entry Add to Memories Share Next Entry
hackergotchi
treitter

Answering the question: "How do I develop an app for GNOME?"

During the GNOME Developer Experience Hackfest this week, one of the major goals we identified was the need to pick a single language to give a simple answer to "how do I write a GNOME app?".

Right now, if you ask that question, you'll get about 8 different personal-preference answers, which drives people away from our platform. Having to potentially evaluate several different languages and their stacks gives potential developers a lot of unneeded extra work.

There was broad consensus in the hackfest for this goal because it allows us to:
  • It allows us to focus when we write developer documentation, fixing bugs in the development environment and the development of tools. This reduces our maintanence costs and enables us to be vastly more efficient.

  • It enables code and knowledge sharing to occur, so that people can easily copy and paste code from existing applications, or find information about common problems and challenges.

  • It provide a coherent and easy-to-follow path for new developers.

  • It allows us to include the full GNOME framework within the language itself.

We spent a long time discussing the different options that are available to us, and there were a variety of opinions. However, at the end of the day, we had to recognize that no language is perfect and there will always be disagreement. The important thing was that we had to make a decision.

It's critical that everyone understands this decision as a plan to elevate the language, bindings, tools, and documentation to a level of quality we have not yet achieved. It is not a decision to abandon any other language bindings. We will continue to distribute other bindings and documentation as we do now and compatibility for the other languages will continue to be developed as they are today by the developers involved with those modules.

Our decision is to support JavaScript as the first class language for GNOME application development. This means:
  • We will continue to write documentation for other languages, but we will also prioritize JavaScript when deciding what to work on.

  • We will encourage new applications be written in JavaScript.

  • We will be working to optimize the developer workflow around JavaScript.

C will remain the recommended language for system libraries.

Why JavaScript?
  • Our language of choice needs to be dynamic and high level.

  • There is already momentum in the GNOME Project for JavaScript -- it's used in GNOME Shell and GNOME Documents.

  • There's a lot of work going into the language to make it especially fast, embeddable, and framework-agnostic.

  • JavaScript is increasingly being seen as a first class desktop programming language -- it us being used in Windows 8, mobile platforms, and for local web applications.

  • JavaScript is self-contained -- it doesn't come with its own set of core libraries, which makes it more convenient for us when integrating it into the platform.

This is the start of a process and there's obviously a lot of work ahead of us. However, prioritizing a single language will enable us to turn GNOME into a compelling platform for application developers in a much more effective and efficient manner.

SRSLY?

(Anonymous)

2013-02-02 03:30 pm (UTC)

JavaScript? Could you possibly have chosen a worse language?

Vala was specifically designed to work flawlessly with GObject and it's so close to Java and C# that any developer can learn it in a day. But you chose JavaScript, a language that uses a weird prototype object system that is inherently different from the object model of the GNOME libraries.

Seriously, what were you smoking?

By definition, JavaScript was decided to be the best choice. There's no need to be vitriolic.

The language syntax-level differences between Vala/C#/etc. and JavaScript really aren't as big as people like to make them out. JavaScript on top of GObject might not be quite as clean today as any of us would like (we certainly considered it a negative when evaluating our options), but it should improve significantly when ECMAScript 6 is finalized and the JavaScript world moves on to it.

Seriously, what were you smoking?


There's absolutely no excuse for this. You're putting down everyone who was involved with the hackfest who put a lot of effort and knowledge into this choice. I have no problem with you disagreeing but there's no reason to be so hateful (and it doesn't help your argument at all).

Re: SRSLY?

(Anonymous)

2013-02-03 07:36 am (UTC)

I don't mean to troll, I have to agree that vala would
have been the obvious choice.

GNOME needs a language that is *our own* much in the same way that the NextStep Objective-C implementation
belongs to Apple.

The reason I say this is that the usefulness of a high-level language like this; is that the language
is a window into our platform, and so can leverage
platform specific features (and by platform here I
mean the GObject/GIO/Clutter/GTK+/etc stack)

Vala *is* the obvious choice because it allows us to expand on the syntax and leverage features that are
specific to our platform, using vala will allow us
to leverage features in GtkBuilder more sensibly in
the same way that Objective-C leverages the NextStep
environment, and who knows where it will lead.

Microsoft also have their own syntactic sugar on
one of their newer C# implementations, possibly allowing the compiler to abstract/solve the threading
problem at the compiler level.

So what power does Java give us ?

Are we willing to expand on the Java specification
in order to actually develop the language *with* the
platform (as other big players have demonstrated is
the way to go) ?

And if we do, how will that be any different from
using Vala in the first place ?

Maybe I've misinterpreted something but it seems as
though people are pushing for javascript mostly because
people not familiar with GNOME already like javascript.

If the idea is to go with an "already popular"
formalism then I think it's a cowardly decision which
misses the point. People will use whatever tools we
give them to leverage the GNOME platform, our goal
should be to give them tools that work specifically
well with our platform. Not to give them tools that
have "pink handles", because "people already like
tools that have pink handles".

Best,
-Tristan Van Berkom

A large reason to prefer JavaScript over Vala is the huge installed base of people both already committed to using JavaScript (ie, it's the preferred language for Windows 8 development, Firefox OS, some mobile platforms) and particularly the wealth of people working to make JavaScript fast and stable.

Unfortunately, the only people developing Vala are a portion of our (already small) developer community. The tools are limited (mostly just the compiler and g-i-r integration) and there isn't a huge community working to add a streamlined debugger, making the documentation streamlined (valadoc still hasn't been officially released, yet my project written in Vala, libfolks, relies upon it).

I think Vala is a great language, but I still agree that JavaScript, on the balance, is a better choice long term.

If the idea is to go with an "already popular" formalism then I think it's a cowardly decision which misses the point. People will use whatever tools we give them to leverage the GNOME platform, our goal should be to give them tools that work specifically well with our platform.

Absolutely - people will use the tools they prefer, and that's great. If you already have tools you prefer, please keep using them. We won't be reducing support for those tools in Gnome. We're simply going to improve and streamline the JavaScript portion of our stack and infrastructure.

Re: SRSLY?

(Anonymous)

2013-02-05 12:05 am (UTC)

And this is not just an argumentum ad populum?

I wonder if Apple sat around thinking, "hey, we're the _only_ ones who use Objective C, maybe we should use the most popular language instead." when they unleashed iOS upon the world.

Clearly Java/Dalvik is the preferred Android language, and Objective C is the preferred iOS language. That covers just about 100% of the smartphone market. FirefoxOS is still vaporware, so what other mobile platforms are there pushing JavaScript?

Also, I just went over the the Microsoft site, and not only is JavaScript not presented as any sort of "preferred language" they actually appear to be treating _all_ of C++, C#, and JavaScript as first class citizens of the Windows 8 development story. They also give the impression that they will not be _favoring_ any particular language, but allowing the developer to choose the best language for their project.

Re: SRSLY?

(Anonymous)

2013-02-05 09:01 am (UTC)

> huge installed base of people both already committed to using JavaScript

Those are mainly web developers who believe in the superiority of web over desktop.

> it's the preferred language for Windows 8 development

It may be preferred but most Win devs are invested in c# and won't switch to JS just because.

> Firefox OS

Sorry for being polemic but: All 2 Firefox OS users/devs will be excited.

> some mobile platforms

You mentioned Windows 8 already. (Or do you mean WebOS?)

> and particularly the wealth of people working to make JavaScript fast and stable.

From what I understand they don't work on your GJS interpreter so it's the same as "We're building a car now because all the wealthy car manufacturers are pouring money into their RnD".

Re: SRSLY?

(Anonymous)

2013-02-05 04:48 pm (UTC)

A large reason to prefer JavaScript over Vala is the huge installed base of people both already committed to using JavaScript (ie, it's the preferred language for Windows 8 development, Firefox OS, some mobile platforms) and particularly the wealth of people working to make JavaScript fast and stable.

I seriously doubt firefox OS has a huge install base. Neither is there a huge Windows 8-Javascript community at this point. There are tons of web-app developers using the language, so I can buy that argument, even though the examples given seem poor to me.

How many of that wealth of people working on making Javascript fast and stable are hacking on GJS specifically? Having people working on other engines will not help Gnome after all.

Re: SRSLY?

(Anonymous)

2013-02-03 03:34 pm (UTC)

I stopped reading when you started referring to JavaScript as "Java". You do realize that Java is also a language, and quite different to JavaScript?

Re: SRSLY?

(Anonymous)

2013-02-03 10:41 pm (UTC)

GNOME needs a language that is *our own* much in the same way that the NextStep Objective-C implementation
belongs to Apple.


No. No, it really doesn't need it's own language. I can't think of a more effective way of killing interest in Gnome development, than to require developers to learn a new language that's unique to Gnome, and absolutely useless for anything else they might want to do.

Re: SRSLY?

(Anonymous)

2013-02-04 07:19 am (UTC)

No. No, it really doesn't need it's own language. I can't think of a more effective way of killing interest in Gnome development

Do I sense even a touch of sarcasm ?

This is precisely the type of cowardice I was referring to.

Do you really think it should take more than a couple of days for a programmer to learn a high-level language like python, actionscript... vala ? or javascript for that matter ?

We should not waste time with worries that others will not adapt, or that we will drive people away, instead we should strive to create something that is truly great... and when we're done and have something to show for it, then we can expect that others might follow the trend that _we_ set.

...than to require developers to learn a new language that's unique to Gnome, and absolutely useless for anything else they might want to do.

Let's take a pause here, and consider that there is a clear difference between what is the GNOME platform stack, and what is the GNOME desktop environment. This is useful to qualify what is meant by "unique to Gnome".

The stack is useful for many many things, we should be careful with our free-willed implementation of GNOME desktop specific APIs into core libraries such as GIO, that is where we are limiting ourselves in terms of where the stack will run (i.e. big warning signs already up... we don't want a repeat of libgnomeui all over again).

Yes so javascript has won the battle for this day, but I do hope that this current decision/trend is based on well founded technical reasoning, that vala has a long way to go before it can really shine, and that javascript bindings to our platform are generally more mature and stable. To think, on the other hand that we've made such a decision because we're afraid that we'll "kill interest in Gnome" is a sad thing to think (and that attitude is more likely to drive good developers away, I think).

But do our javascript bindings provide some native syntax for GSignal connections ? (this is something I would expect that vala already does).

Does javascript provide syntactic/declarative sugar, allowing one to define a variable which is automatically assigned to an internal child composite object defined in a GtkBuilder file ? (something that Objective-C does for .nib files, and is also naturally built into ActionScript) ... or syntactic sugar required to automatically declare an object method which responds to a GSignal emitted by an internal composite object ? (another thing Objective-C/NextStep has been doing forever... see how far we are behind ?).

These, IMO, are the virtues we should be looking for in a preferred language for Gnome, i.e. they make programming more efficient for practical reasons.

Regards,
-Tristan

NOTE: Yes I said "Java" and "JavaScript" probably in the same paragraph, I was under the impression that we are all a bit more mature than the current crowd on slashdot, my bad. I'm just trying to have a constructive conversation here, not trying to throw garbage around the room, please.

Re: SRSLY?

(Anonymous)

2013-02-04 07:22 am (UTC)

Eh... portions of the above were intended to be quoted, it seems the formatting did not do the cute italic thing, sorry for that.

"We should not waste time with worries that others will not adapt, or that we will drive people away, instead we should strive to create something that is truly great... and when we're done and have something to show for it, then we can expect that others might follow the trend that _we_ set."

Sometimes a person who is out in front is leading, sometimes that person is out for a lonely walk. You might not find out a long time down the road, after you've invested a lot of effort and time in a mistaken endeavor.

You have to expect that since the Gnome team is trying to increase it's visibility, it makes sense to use an imminently accessible language that people have heard of, not to intimidate them away with the specter of having to figure out new syntax along with all the bindings that are different from what they already know. At least that's how I'd feel.

And a lot of dislike for Javascript just comes from FUD of it. It's really very entertaining and challenging.

Re: SRSLY?

(Anonymous)

2013-02-03 03:25 pm (UTC)

Hi, I'm the author of that comment above, and I do apologize for using nonconstructive language. I shouldn't have. There was a valid argument in that post, though, and I stand by it. Besides, I strongly disagree that a statement like "What were you smoking?" is indicative of *hate*. That's an unusual conception of hate. It is indicative of utter disbelief, and nothing more. Anyway, I apologize for that.

Well said. You do not need to suffer vitriol merely because you made a difficult decision, regardless of how unpopular it may be.

Your moderation in your reply also shows your patience which further leads me to believe you were careful in your decision.

You are viewing treitter