Easiest way to integrate Quartz drawing into WO apps?
Easiest way to integrate Quartz drawing into WO apps?
- Subject: Easiest way to integrate Quartz drawing into WO apps?
- From: Ken Tabb <email@hidden>
- Date: Wed, 14 Mar 2007 16:56:38 +0000
Hi again folks,
I have some Objective-C code that draws pretty graphs using Quartz.
All looks lovely in Cocoa apps. I'd like to re-use this same code (or
at least the "pretty Quartz" technology within it) in a WebObjects
component, so that these same graphs appear in a web page (as a JPEG).
What's the best way to get to Cocoa/Obj-C code from WO/Java apps?
First one to say "Cocoa/Java bridge" gets a slap :)
I'm thinking the options are:
[1] Cocoa app turns into web service, and somehow get at that from
the WO app. I'm new to web services (although it's something I'll be
needing to get into at some point, albeit not specifically from a
Cocoa angle), both in terms of publishing and consuming them.
[2] Run Cocoa app as-is on the server (same Mac OS X Server as the WO
app) and get some sort of inter-process communication going -
suggestions for the best route welcome (it's been some years since I
did any Java IPC stuff so I'm sure it's all changed). Bearing in mind
it's all running on the same server though, I could at the worst send
data from WO -> Cocoa via XML file / stream, and get Cocoa app to
save the image (with session ID etc. preceding filename) in a known
subdirectory of the web server - the session could then remove all
images whose filename begins with the session's sessionID, at the
time the session is destroyed. I guess that would work (even though
it gets zero for elegance / scalability!)
[3] Re-write the Quartz code in a Python / Ruby script - I don't know
Python or Ruby yet, but wouldn't be against learning this if it was
necessary; I believe both have routes to Quartz. I still have the
issue of needing to call it from, and send data back to, the WO app -
all suggestions welcome!
And secondly, how long is a piece of string?
Thanks in advance for any tips you can give,
Ken
- - - - - - - - - -
Dr. Ken Tabb
Mac & UNIX Developer - Health & Human Sciences
Machine Vision & Neural Network researcher - School of Computer Science
University of Hertfordshire, UK
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden