Slashdot Mirror


Developing Applications with KJSEmbed

Rich writes "Ian Geiser of SourceXtreme has released an interesting HOWTO showing how you can use KDE's embedded JavaScript tool to write quick-and-dirty apps. The apps can use the features of Qt and KDE to pack a lot of punch for a small amount of code. You can find it on his website."

10 of 25 comments (clear)

  1. Not trolling... by byolinux · · Score: 3, Interesting

    All this is fine, but really what Free Software needs is a tool like Visual Basic (the later versions) that

    a) works
    2) can take VB and convert
    d) can compile nicely to multiple architectures.

    As far as I know, nothing like this is available for GNU/Linux. The nearest thing I know like this, is RealBasic for Mac - now can produce binaries for X86, but it's not free.

    1. Re:Not trolling... by black+mariah · · Score: 3, Interesting

      Gambas (http://gambas.sf.net) is moving along at a nice clip. It's a VB-ish and simple enough that even a mega-lame coder wannabe like me can create some useful stuff. Currently compilation and running of programs is... iffy. Unless you have Gambas installed you're not going to be running any programs created by it on your computer, but it's a strong base for someone to jump in and add the features you're talking about.

      --
      'Standards' in computing only impress those who are impressed by things like 'standards'.
    2. Re:Not trolling... by mhesseltine · · Score: 4, Funny
      a) works
      2) can take VB and convert
      d) can compile nicely to multiple architectures.

      Does VB have an enumerator that counts a,2,d?

      --
      Overrated / Underrated : Moderation :: Anonymous Coward : Posting
  2. interface scripting by OmniVector · · Score: 4, Interesting

    I wish someone in linux would implement a system that mimics the functionality of apple script. before people go off flaming me, let me explain for those who don't know what it does. apple script basically lets you set hooks in the program in a standard way so that anyone can script an application by manipulating objects in the program. the program registers with the applescript by giving it a list of all the objects it has and the methods these objects have that you can call on them. it's a very clean interface, and requries little extra work from the developers (which is nice). even if this does exist for KDE/gnome.. it's under documented, or no one uses it!

    --
    - tristan
    1. Re:interface scripting by Rich · · Score: 4, Informative

      It's called DCOP and it's used a lot. Here's one of several tutorial on the subject: IBM tutorial. Note that Ian is planning a tutorial showing how you can use DCOP from KJSEmbed in this series too.

    2. Re:interface scripting by Anonymous Coward · · Score: 3, Informative

      And what's really nifty is that all of that is done via OSA, the Open Scripting Architecture. So if you don't feel like coding in applescript, you can access all those same hooks with any other scripting language that has an OSA implementation (javascript, perl, python, etc...)

    3. Re:interface scripting by Simon · · Score: 3, Insightful

      The current problems with using DCOP right now for scripting and macros type stuff are:

      * There is very little documentation about what DCOP interfaces programs like Kate have, and how they can be used for writing small scripts and macros.

      * The existing DCOP interfaces are not designed for the ease of use by scripters/powerusers. They are built directly on top of the C++ implementation.

      * The DCOP interfaces are often not complete enough to make it possible to script everything that can be done via the GUI.

      --
      Simon

  3. Re:KDE has embedded javascript? This explains a lo by stilborne · · Score: 3, Informative

    Javascript is not embedded in KDE. KJSEmbed is a set of Javascript bindings built on top of KDE Javascript implementation. this is no different than, say, Python or Java bindings. where it does deviate is that it is possible for an application to embed the KJS engine and thereby use KJSEmbed internally as a scripting option should it so choose. but it isn't like KJSEmbed is loaded whenever you start up KDE, or even the overwhelming majority of KDE apps for that matter.

    that said, one of the beautiful things about open source / Free software is choice. go crazy with your window manager only set up, and have fun with it! i'm glad you aren't forced to use something that doesn't fit your style and/or needs!

    all the same, it's only fair to be accurate. your viewpoint on "eye candy" derivative code trying to do "what you need" rather than the apps themselves is a rather inaccurate statement on how things work. desktop environments aren't for everyone (you being an example of that), but at least you could get your derision right ;-)

  4. Re:KDE has embedded javascript? This explains a lo by Jerk+City+Troll · · Score: 3, Insightful

    If you hate it so much, then don't use it.

    I can't stand it when people bitch and moan about a some technology being too <negative_adjective> when it comes to open source. (Especially when people like you make complaints and don't even bother to substantiate them in any way. What you offer is purely opinion.) If you're in a position to use KDE, then you are not using Windows. If you are not using Windows, then you are in a position of choice.

    And that's really the whole point, isn't it?

    KDE is a desktop environment, not a window manager like you are asking for. In this case, KDE is trying to provide a platform that is both easy to use and serves the needs of rapid application development. These are things that will help make it a more viable alternative to Windows and tools like VisualBASIC which can be great for quick prototyping. Of course, I don't know what the point is of defending it on these grounds. It's a tool, one of many, well suited to certain tasks and perhaps not so well suited to others.

  5. KDE isnt just a window manager by nurb432 · · Score: 3, Informative

    Its a complete desktop environment, with all the features, libraries, intercommunications, coding standards, and all bells and whistles that go along with an 'environment'.

    If you just want a window manager, then KDE isn't your best choice in the first place...

    Please try to compare apples to apples...

    --
    ---- Booth was a patriot ----