Slashdot Mirror


Apple Releases JavaScriptCore Framework

ace writes "Apple has released the source to JavaScriptCore, a JavaScript framework based on KDE's kjs JavaScript engine. 'JavaScriptCore is a private API which may be used by future Mac OS X applications such as Sherlock, and is provided as Open Source as part of our partnership with the KDE community. JavaScriptCore will be used by Sherlock in an upcoming OS release, and possibly by other Apple software in the future. Apple chose kjs as the basis of its JavaScript technology for its simple and efficient code.'"

60 comments

  1. Kinda reptitive. by Leimy · · Score: 1

    might be used in sherlock or maybe even in Sherlock. "Hey why not use this in, oh... I don't know..... SHERLOCK!"

    I am very happy this occurred. If KDE is going to have a commercial partner working on/with its source base I am glad it is Apple. Apple has said that they will commit changes back to KDE. At least that's what the opendarwin.org email said when we got this announcement 3 or 4 days ago. :)

    Dave

    1. Re:Kinda reptitive. by fault0 · · Score: 2

      > If KDE is going to have a commercial partner working on/with its source base I am glad it is Apple.

      Yeah, hopefully it will continue a long history of companies contributing back. The last major company to work with/on KDE source I beleive was Corel.

  2. Re:Kinda [sic] reptitive. by Leimy · · Score: 0, Redundant

    Repetitive even... redundant... dejavuish

  3. so... um? by paradesign · · Score: 1

    what exactly is this going to do for Sherlock? Or maybe this is a better question, what could this possibly do for Sherlock? and would your average Mac user notice a diference?

    --
    I want 2D games back.
    1. Re:so... um? by Matthias+Wiesmann · · Score: 3, Interesting

      The next version of Sherlock should be much more like Watson, i.e offer an Aqua interface to many web services. For this, a javascript engin will come in handy.

    2. Re:so... um? by Anonymous Coward · · Score: 0

      The plan is to eventually morph Sherlock into a fully featured web browser and replace IE.

    3. Re:so... um? by Anonymous Coward · · Score: 1, Insightful

      I think the idea is to bring scripting exploits beyond the browser and into the OS'es file searching functionality.

      (/me misses good ol' FindFile)

      I'm glad to see apple working with the KDE guys, but I think Sherlock needs scripting about as much as an email client does (hint: not at all). Web services, web schmervices. Even if we needed web services in sherlock, we wouldn't need them to use javascript.

    4. Re:so... um? by mr100percent · · Score: 1

      I think the point of this would be that maybe you can use the Java frameworks to write your own Sherlock plugin, I don't think it could go far beyond that, and surely Apple will put some reasonable security restrictions in place.

    5. Re:so... um? by Anonymous Coward · · Score: 0

      Find File is pretty much back in Jaguar. And there was much rejoicing.

  4. Intersting by Matthias+Wiesmann · · Score: 4, Interesting
    I think this is good news, it shows that the KDE code is good, and that Apple is willing to contribute back.

    The interesting thing for me is that it shows a good trend, i.e that OS X is converging with other Unixes not only at low level (Jaguar should sync with a more recent version of BSD) but also at the component/framework level: beside this Javascript component, CUPS is scheduled to be included in Jaguar.

    An interesting question would be, what other open source components/framework would be good additions to Mac OS X? I suppose one obvious answer is a native version of GTK

  5. What does this mean to the rest of us? by frankie · · Score: 2, Interesting

    I've never used (or heard of) KJS until this article. What's so great about it?

    FWIW, I've used ordinary javascript, and also the OSA. Any relation?

    1. Re:What does this mean to the rest of us? by rdieter · · Score: 2, Informative

      I've never used (or heard of) KJS until this article. What's so great about it?

      KJS is the code that supplies JavaScript support the
      KDE desktop environment. The good part is that it is opensource (gpl) and works pretty well to boot.
    2. Re:What does this mean to the rest of us? by Anonymous Coward · · Score: 0

      Is this thing based on the Netscape (open source) JavaScript engine, or was it written from scratch?

    3. Re:What does this mean to the rest of us? by mbbac · · Score: 1, Informative

      It sounds like this allows you to use JavaScript in place of AppleScript to script your system and applications. But, that's just a WAG.

      --

      mbbac

    4. Re:What does this mean to the rest of us? by Anonymous Coward · · Score: 1

      use JavaScript in place of AppleScript

      That's exactly what Javascript OSA already does. This new thing clearly has to do somethine more than that, or it would be redundant. But apparently no one who understands it wants to bother explaining the "what else" part.

    5. Re:What does this mean to the rest of us? by fault0 · · Score: 2

      It was written from scratch.

      There is a little (outdated) bit of information on http://www.konqueror.org/konq-browser.html. Konqueror uses kjs for it's javascript/ecmascript support.

  6. Needs Developer Tools Beta by schwatoo · · Score: 3, Informative

    This framework needs the Mac OS X Developer Tools Beta to compile available from connect.apple.com.

    Interesting to see this library wrapped in a Framework despite Apple's recommendations for developers not to put 'legacy' unix code in a Framework.

    --
    I have trouble with passwords among other things.
    1. Re:Needs Developer Tools Beta by rdieter · · Score: 1

      Interesting to see this library wrapped in a Framework despite Apple's recommendations for developers not to put 'legacy' unix code in a Framework.

      Why do you consider a JavaScript library 'legacy' unix code?
    2. Re:Needs Developer Tools Beta by schwatoo · · Score: 1

      Legacy because it didn't already come bundled in a Framework. Apple is recommending that developers don't bundle code up in a Framework just for the sake of it. They've gone and ignored their own recommendations before - OpenGL.framework being a prime example.

      In fact OpenGL.framework is a really good example of why not to wrap things up in bundles - now all files that would include now have to be modified to include - annoying.

      --
      I have trouble with passwords among other things.
    3. Re:Needs Developer Tools Beta by dthable · · Score: 1

      I think the message isn't explained as well as it should be. Frameworks provide a necessary means to add functionality to an operating system. It's a Good Thing that Apple and other vendors can expand the functionality of the OS.

      They don't want developers to make frameworks for their individual applications. Instead of putting your code in a framework for Quicken, look at other means of code reuse. Why? Then you don't have a framework that only one application can use. It's like adding a million DLLs to Windows for a single application. Will anyone else use the DLL code? If not, why introduce the complexity.

    4. Re:Needs Developer Tools Beta by fdobbie · · Score: 2, Informative

      That's not what he was saying. If libraries are available and standard on other unices, then Apple recommends not packing them as frameworks because, say, if you had an app that depended on zlib then instead of adding "-lz" to the LDFLAGS, you'd have to add "-framework zlib", or similar, and you'd have to change all the includes from #include to #include . They did this because they used to package zlib and openssl as frameworks on the Public Beta, and people complained. Good thing, too.

  7. What's it for... by Anonymous Coward · · Score: 3, Insightful

    It seems to me Apple wants to support Javascript within Sherlock due to the addition of new internal HTML rendering capabilities within Sherlock 3. (vs. today's Sherlock, which requires linking to a Browser to reveal/show webpage search results.)
    My guess is that over time Apple wil make Javascript an equal MacOS X scripting system, alongside Applescript - and thus it's potential for us in other apps as well...

    1. Re:What's it for... by Anonymous Coward · · Score: 0

      By the way, JavaScript is already available as a peer of the AppleScript language, using JavaScript OSA. That's why it's called the Open Scripting Architecture :).

    2. Re:What's it for... by Corvus9 · · Score: 1
      My guess is that over time Apple wil make Javascript an equal MacOS X scripting system, alongside Applescript
      JavaScript has always been a Mac OS X scripting system, alongside AppleScript, but it has to be installed separately.

      you can download it from Late Night Software.

      O'Reilly Net had a tutorial on scripting applications with JavaScript.

  8. Apple contributes, but what about Redhat? by Offwhite98 · · Score: 2, Flamebait

    I have said it before and I will say it again, the big Linux companies do not seem to produce anything useful for the community. They package beta software into a distribution and sell it. They generally have not done much to raise the caliber of Open Source software like it seems Apple has started to do this year.

    They were not satified with X Windows so they created Aqua, which works quite well. And they also implemented a nice admin system which allows a regular Joe to maintain what is a a Unix system under the sheets.

    And now they are putting back a nice Javascript engine and releasing it as Open Source. I really hope all the IPO rich Linux companies would learn a lesson from this behavior. To improve Linux and to get it to take hold they need to polish several pieces and produce quality packages, not tons of RPMs of beta software.

    But will this happen?

    --
    Brennan Stehling - http://brennan.offwhite.net/blog/
    1. Re:Apple contributes, but what about Redhat? by Shisha · · Score: 3, Informative

      Was this meant to be ironical? I really can't tell, whether you were serious or just flaming. Have you ever heard of GCC? Both RH and SuSe support GCC quite a bit. Mandrake and SuSe support KDE (some full and part time developers).

      The KDE Java Script engine was developed by the KDE people not Apple, they are just saying that if they happen to improve it, they will make the changes available to KDE people. So they are not contributing a nice JScript engine.

      Can someone explain how Aqua contributes to the OSS community? I believe that that's as proprietary as it get.

    2. Re:Apple contributes, but what about Redhat? by anarkhos · · Score: 0, Offtopic

      ironical?

      English translation please?

      --
      >80 column hard wrapped e-mail is not a sign of intelligent
      >life
    3. Re:Apple contributes, but what about Redhat? by Anonymous Coward · · Score: 0

      Aqua contributes to the OSS community by generating revenue for the Apple publicity machine, which advertises to the world that UNIX is kool, thus making Linux more attractive to a wider audience. Except learning to manage MacOS X has little to do with managing Linux. Or UNIX for that matter. Gotta love NetInfo! ;-) Oh, well. What does Aqua have to do with OSS then?

    4. Re:Apple contributes, but what about Redhat? by Shisha · · Score: 1

      Quoting:
      WordNet (r) 1.7 [wn]

      ironical
      adj 1: characterized by often poignant difference or incongruity between what is expected and what actually is; "madness, an ironic fate for such a clear thinker";
      "it was ironical that the well-planned scheme failed so completely" [syn: ironic]

      2: humorously sarcastic or mocking; "dry humor"; "an ironic remark often conveys an intended meaning obliquely"; "an ironic novel"; "an ironical smile"; "with a wry Scottish wit" [syn: dry, ironic, wry]

    5. Re:Apple contributes, but what about Redhat? by Buskaatt · · Score: 1

      What big, IPO-rich Linux companies?? RH has a couple hundred employees or so. If you mean them, look to other replies.

      Or maybe you meant Linuxcare ... oh wait they bailed on their IPO because they couldn't make enough money. Despite that, you will see more names of the 30 or so employees left there (and the hundreds of ex-employees) contributing open source code than you ever will from Apple.

      Aqua, which works quite well?? On a G4 with 32 MB video card maybe. Whereas X-windows works on a PowerMac 7500 with its original video card juuust fine.

      Honestly, when you said 'big Linux companies' I immediately thought of IBM. That's how funny it is.

  9. Re:AIDS is divine punishment to the morally repugn by Anonymous Coward · · Score: 0

    i didnt know it either, but i now know, thank you for informing me :)

  10. Why is Microsoft scared of open source, Apple not? by edmundv · · Score: 2, Interesting

    I find it kind of interesting that Apple actually embraces open source software, while Microsoft is scared to hell about it.

    Both companies produce mostly closed source stuff. So why does Microsoft feel threatened by open source, while Apple obviously does not?

  11. Apple is not a software company. by iOrion · · Score: 2, Informative

    Apple = hardware
    Microsoft = software

    On top of that, Apple produces quality products, Microsoft does not.

  12. Re:Why is Microsoft scared of open source, Apple n by (startx) · · Score: 2, Informative

    Simple, because Apple has it's great line of hardware, and can co-exsist easily with open-source software, while (except for mice and keyboards) MS is strictly a software company. They make money by selling software, not giving it away.

    On that note, apple sells the big chunks of it's software for $$$, these little widgets like a JavaScript engine do make a good showing to the OS comunity though.

  13. ever heard of RPM? by Petronius · · Score: 1

    as in *RedHat* Package Manager?

    --
    there's no place like ~
    1. Re:ever heard of RPM? by Anonymous Coward · · Score: 1, Insightful

      as in *RedHat* Package Manager?

      Hmm. you must mean the package system that doesn't automatically do dependencies unless you use the restricted closed-source redhat up2date software...

      (free for one system, pay them money if you want more...)

      i'll take apt-get over that any day, thankyouverymuch

      (i use it through fink)

  14. Offtopic about GTK-Quartz by theolein · · Score: 2

    I have taken a look at the sourceforge page and it seems they haven't done anything on it for quite a while now, sadly. There is another poster here fdobbie who is one of the dvelopers. Perhaps you could ask him what's happening with it.

  15. Offtopic question about GTK-Quartz by theolein · · Score: 2

    Hallo Finlay. Could you perhaps let us know what is happening with the GTK-Quartz port. It seems according to the sourceforge page that nothing has been hapeenig for quite a while now.

    1. Re:Offtopic question about GTK-Quartz by Type-IIa · · Score: 0

      Also, is hardware accelerated Quarts in Jaguar going to make a difference to that project?

  16. Sounds good by theolein · · Score: 2

    I wonder if Apple is considering doing some modern HTML renderer embedding a la Explorer in OSX? I have read that Sherlock will have it's own HTML pane in future, as some others here have posted.

    1. Re:Sounds good by PythonOrRuby · · Score: 1

      Forgive me if I'm naive and this already exists, but an NSHTMLView class would be rather nice for developers.

    2. Re:Sounds good by Ster · · Score: 1

      I believe that this is the goal of Projects Chimera and Chim-Chim over at MozDev. Create a Gekko HTML rendering engine that can be made into an Interface Builder widget, and thus drag-drop-configure for modern, stable, standards-based HTML rendering.

      -Ster

    3. Re:Sounds good by Anonymous Coward · · Score: 0

      Another naive question. Doesn't the Help Viewer app offer an HTML engine? (or is it HTLM-like?) (or is it not-so-great?)

    4. Re:Sounds good by norwoodites · · Score: 1

      especially after ###Micro$oft### changing the homepage on people when upgrading to IE 5.2, also Microshit disallowing apple to have their homepage to be part of Netscape's network.

    5. Re:Sounds good by mr100percent · · Score: 1

      Yes, it does. It's not entirely standard, as the animations Apple uses in their pages, and the links to applescripts aren't regular HTML, but you can make your own Help files, and edit links in the other.

      Macworld covered editing them a while back, as you could have your IT make a standard Helpfile with what extension to call if you need help, then putting it in MacOS help.

    6. Re:Sounds good by Anonymous Coward · · Score: 0

      The standard text-editing facilities provided in AppKit can render, edit, opend and save plain text, RTF and HTML.

  17. Re:GNOME? by tupps · · Score: 2

    I believe that GNOME came out of RedHat originally. Also there is: http://www.labs.redhat.com/projects.html

    and

    http://www.labs.redhat.com/index.shtml

    Which explains what RedHat developers are giving back to the community.

    Thanks

    Luke

    --
    Go out and get sailing!
  18. scripting exploits / execution realms by valmont · · Score: 2
    While i do think this will be a very handy addition to the operating system thereby, exposing OS scripting to a far larger pool of developers with JavaScript experience, I'm hoping potential security issues will be kept in mind:

    Let's call those "scriptlets", should be identified by the operating system and to the user as full-blown application, which, when run, have just as much access to the system as the user does. I'm thinking obvious file extensions such as ".app" for scripts. After all they're interpreted apps.

    Realms of executions of such scripts should be clearly identified and separated, as in a "scriptlet" should never be allowed to run within a browser nor e-mail client context. If a scriptlet is to extend an application's functionality, it should only be executed via direct user interaction and possibly proper warning. Whatever solution is chosen in the end, it should be clear to the user that installing such a scriptlet onto their system is just like installing any other application which could have malicious effects. Every distinction should be made to make it clear to the user that "hey this thing is not something that slightly extends a web page's functionality, it runs straight out of your OS and could seriously fuck your shit up, just like any full-blown application out there".

    The nice thing about running OS X though is that even if a user inadvertently runs a malicious script, that script could in theory, provided every user was smart enuff to not use root, or admin user as their default, everyday user, (okay i can dream no?), only have access to a fairly restricted part of the system.

    If i was an IT director, i would mandate all corporate LAN machines to be iMacs running OS X. I would create a standard operating system installation script, with various additional scripts geared towards geeks, non-geeks, dumbasses, to allow various levels of protections against themselves. I for one would restrict users to only be able to write to their home directory, while the rest of the system would be restricted to root/admin users. I would have a central, networked /Users mount served off of an xserve with bazillion gigs of storage space.

    In fact, any network administrator who is not seriously considering progressively migrating all corporate machines to OS X boxes has got to be living in a hole.

    It is my firm belief OS X has an amazing potential to make the world a better place.

  19. Well, it could run even slower by Anonymous Coward · · Score: 0

    Sherlock started life as a slightly Apple-fied version of a piece of shareware called FindPro III -- which did what Sherlock originally did (search your hard disk for files based on multiple search criteria) really fast and efficiently. Over time this has bloated to the point where I, personally, dread launching it AND Apple is promising a new FindPro III like find facility in Jaguar's Finder.

    What Sherlock REALLY needs is a javascript engine so it can run even slower, consume even more RAM, and become even more irrelevant...

    Somehow Google manages to work without using Javascipt to produce animated search results...

  20. Re:Kinda [sic] reptitive. by MaxVlast · · Score: 1

    Good heaven, please tell me how the first post can be repetitive or redundant?

    --
    There should be a moratorium on the use of the apostrophe.
    Max V.
    NeXTMail/MIME Mail welcome
  21. PLEASE MOD PARENT UP AS THIS IS COMMON MISPERCEPTI by Anonymous Coward · · Score: 0

    -----see subject--------

  22. from the i-thought-java-was-dead dept. by larry+bagina · · Score: 2

    from the i-know-pudge-is-an-idiot dept.

    Java and Javascript are unrelated... Microsoft atually paid for ECMAScript (aka JavaScript) to be standardized, something that Netscape (initial developers of it) refused to do.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  23. Re:Kinda [sic] reptitive. by Anonymous Coward · · Score: 0
    please tell me how the first post can be repetitive or redundant?

    By restating what was already said in the original article.

  24. LGPL by Anonymous Coward · · Score: 0

    Not GPL. LGPL. Otherwise Apple would have to GPL Sherlock (or not use kjs).