admin管理员组

文章数量:1357134

With the arrival of the new GNOME Developer Center I stumbled across JavaScript bindings for the gobject libraries. Now I would love to read a ment from an expert if he (or she) would remend / consider using those for a desktop application. That involves consideration of aspects like

  • API simplicity and usability
  • developer documentation
  • stability
  • scalability
  • gjs or Seed?

At once: Are those APIs ready for usage or would it be better to wait a little until it is more established? Can you develop a whole application in JS or would you restrict usage to scripting purposes?

With the arrival of the new GNOME Developer Center I stumbled across JavaScript bindings for the gobject libraries. Now I would love to read a ment from an expert if he (or she) would remend / consider using those for a desktop application. That involves consideration of aspects like

  • API simplicity and usability
  • developer documentation
  • stability
  • scalability
  • gjs or Seed?

At once: Are those APIs ready for usage or would it be better to wait a little until it is more established? Can you develop a whole application in JS or would you restrict usage to scripting purposes?

Share Improve this question asked Apr 7, 2011 at 20:28 f4lcof4lco 3,8245 gold badges29 silver badges54 bronze badges 2
  • 1 I believe the majority of gnome-shell ui (the new window manager for gnome3) is written in javascript. Check out github./philn/gnome-shell-extensions for some examples. But from what I can see it's just a way of hooking functionality into the window manager, not a full app. – lucas1000001 Commented Apr 11, 2011 at 8:40
  • If your project is open source, I believe using JavaScript has one major advantage: more developer contribution. A project written in JS will have a much larger developer audience that is willing to contribute. Most in technology know JavaScript at some level. I personally haven't contributed much to open source desktop software even though I'd like to, mainly because I don't have much C/C++ or Python knowledge. Further, people who know C/C++ and are willing to contribute to OSS are mostly already involved in something; those assets are stretched thin. JS knowledge isn't. – Dan Commented Apr 13, 2011 at 16:19
Add a ment  | 

1 Answer 1

Reset to default 9

Through GObject Instrospection you have access to the same API provided by the libraries written in C (with the lingo for JavaScript).

The documentation needs to be improved. However, you can always use C documentation as fallback. Nevertheless, you can help with the documentation for JavaScript as you learn ;-)

gnome-shell is written in JavaScript and C, therefore JavaScript is a first class citizen in GNOME 3. It should not have performance penalties (if so, it should be improved).

There is a discussion about the future of JavaScript in GNOME (whether to use gjs or seed), you can read the thread here: https://mail.gnome/archives/desktop-devel-list/2011-April/msg00147.html

As I said previously, with GObject instrospection you can write a whole application in JavaScript. For instance, you can take a look to "The Board", a new application written in JavaScript https://live.gnome/TheBoardProject

本文标签: Would you recommend JavaScript for GNOME desktop appsStack Overflow