Cross platform development: Was: Deprecated methods in NSDocument
Cross platform development: Was: Deprecated methods in NSDocument
- Subject: Cross platform development: Was: Deprecated methods in NSDocument
- From: email@hidden
- Date: Thu, 24 Nov 2005 15:17:57 -0000 (GMT)
- Importance: Normal
Shawn wrote;
> You may want to note the following ...
>
> Important: Cocoa-Java technology is only a learning tool. Applications
> targeted for release to customers must be developed using Objective-C
> to take advantage of all the programming interfaces available in
> Cocoa. Programming interfaces added to Cocoa in Mac OS X versions
> later than 10.4 will not be available to Cocoa-Java applications.
>
> ...from the following page...
>
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaObjects/Articles/JavaCocoa.html>
First off; thanks for the pointer Shawn.
Second; Sorry if this sounds ranty; its not supposed to be; I genuinely
want to find an answer to this! Also; if this is off-topic (I don't think
it is really), I apologise; please point me to the right forum.
We have a project which will eventually be cross-platform (Mac, Windows,
possibly Linux, but unlikely). We are programming it on Macs to start
with and for the first release, because that's what we mostly use and it
allows us to set a high standard for the user interface. (Though we have
extensive experience of C++ on Windows as well)
To make it cross platform we want to design it for high code reusability
where possible. The MVC paradigm works perfectly for this. Strip off the
GUI and write it in another framework, et voila!
So; there are two ways we could get reusability; code reuse or binary
reuse. If we wrote the models in Java we could get binary resusability
across all three platforms (great for deployment; we'll probably have a
plug-in architecture). If we wrote it in C++ we could get code reuse
across all platforms but have significantly less library support for
things like networking (an important point for this app), and would have
to recompile for each platform. We could write it in ObjC, but apologies;
GNUStep still doesn't look like a real possibility to me, and I want to
depend on something with solid backing, just like I'm not sure about
writing it for .NET and using Mono on the Mac. So it looks like Java or
C++ for the model, with Java winning on Library support and binary
reusability, although C++ would probably be faster for some of our
processor intensive stuff.
The flip side to this is GUI and frameworks; on Mac, Cocoa seems the
obvious solution, on Windows, .NET is flavour of the month. I have looked
at cross-platform solutions over the years (inc. wxWindows, Swing etc.)
and frankly they are not up to scratch - basically because OS's
differentiate in part in their UI, so to support them properly its a good
idea to write the UI, views, etc specifically for the merits of each
platform.
So, when we started the project it looked like a good fit would be; Java
for the models, with Java and Cocoa on the Mac and J# and .NET on Windows
for the GUI (particularly as some of the view code will be very similar
and there's a small possibility of reuse with some clever coding here too)
However; from the above mentioned article it looks like Apple are
gradually ditching Java support for Cocoa (a bit strong maybe - but
certainly the direction). Now I guess we could write our UI layers in
ObjC to keep up to date and keep Java in the model, but I was hoping to
get some reuse in the views at least - the basic way of drawing stuff
would be the same on each platform, only the primitives would change.
I detect a worrying trend here (Horrible memories of the time and effort I
put into OpenDoc suddenly came back to me!)
What do people think; once again I am looking for a solution not a rant or
flame war. And I'm not interested in half measures - the GUI has got to
look good on, and built for, each platform. Also; I would love to be able
to code for just Mac, but the reality is that I would be cutting out a
huge proportion of my potential market if I did; now if it turned out that
the Mac version of my product is better because of the OS's advantages -
that's great, and I would like to allow for that in our architecture.
Steve.
PS: Some would say that a Web app would be a potential cross platform
solution; however, I can completely discount this - its got to work
off-line, and needs to store data locally.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden