• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [ANN] JSKit - JavaScript Embedding Framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] JSKit - JavaScript Embedding Framework


  • Subject: Re: [ANN] JSKit - JavaScript Embedding Framework
  • From: glenn andreas <email@hidden>
  • Date: Tue, 15 Apr 2008 16:53:53 -0500


On Apr 15, 2008, at 4:13 PM, Jens Alfke wrote:


On 15 Apr '08, at 1:07 PM, glenn andreas wrote:

JSKit provides Objective-C wrappers around the lower level JavaScriptCore (available on 10.5 and 10.4 with Safari 3.0) and provides transparent two way bridging technologies, allowing you to call JavaScript objects from Objective-C and to write Objective-C that can be called from JavaScript

What are the pros and cons compared to the existing JS/Cocoa bridging found in <WebKit/WebScriptObject.h>?



Cons of WSO:

WSO are a bit trickier to work with if you want to expose Objective-C objects to JavaScript (especially with regards to what is exposed and what isn't - some places take C-string, for example), but the biggest difference is that WSO requires making a webview to get the frame to get the root WSO object. WSO then assumes that everything is inside of a web-page, and so the resulting JavaScript can do web-page related things you might not want (for example, installing a timer via setInterval that chews up all your CPU, or, if your WebView is not configured properly, calls external servers via XMLHTTPRequest or loads Java or Flash applets, etc...)

WSO also doesn't work well from command line tools (since it requires a webview and thus a connection to a window server). There is also no support for making new constructors (i.e, new "native types/classes" in Javascript), or simple (global) functions. No opportunity for "transparent" bridging.

Pros of WSO:

It is built in.

It works back to 10.4 with older versions of Safari (and may even work on 10.3.9, I don't remember for sure).



Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >[ANN] JSKit - JavaScript Embedding Framework (From: glenn andreas <email@hidden>)
 >Re: [ANN] JSKit - JavaScript Embedding Framework (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: [OT: security] smbclient
  • Next by Date: Re: binary search trees & binning
  • Previous by thread: Re: [ANN] JSKit - JavaScript Embedding Framework
  • Next by thread: Frameworks in bundles?
  • Index(es):
    • Date
    • Thread