Re: State of Cocoa Adoption
Re: State of Cocoa Adoption
- Subject: Re: State of Cocoa Adoption
- From: Sheehan Olver <email@hidden>
- Date: Thu, 13 Mar 2003 22:52:28 -0600
I wanted to suggest that a good way around these limitations is the
fact that you can mix java objects with Objective-C objects very
conveniently (though with the cost of using java, which isn't too bad
if you aren't using java for the gui side). For example, to do XML
parsing you could do something like (untested, based on
http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html):
id factory = [[Class
forName:@"javax.xml.parsers.DocumnetBuilderFactory"] newInstance];
id builder = [factory newDocumentBuilder];
id document = [builder parser:@"foo.xml"];
id root = [document getDocumentElement];
id nodeList = [document getElementsByTagName:@"coffee"];
int i;
for(i = 0; i < [nodeList getLength]; i++) {
id thisCoffeeNode = [list item:i];
}
Keep in mind I haven't played around much with the java bridge too
much, but from what I've read its this easy . If you are unfamiliar
with java, there are plenty of APIs do just about anything, including
ODBC. Though java has a bad rep for being slow, thats really only gui
side. In fact, java is used a lot for server side stuff, which requires
speed. As for VM memory footprint issues, I believe OS X shares the VM
between all java apps. So if any other program running is using java,
there isn't much of an issue.
In my opinion, this is one of the coolest aspects of Cocoa, the fact
that there is no barrier to using Java, Objective-C, Carbon, Unix C
API, C++, AppleScript, etc. in one program. As for C#, that will
probably work somewhat without effort as soon as gcc supports it,
depending on runtime issues. As C# is very similar to Java, thus
similar to Objective-C, you'll probably see bridges popping up by
either apple or as opensource. Just look at how many perl/python/etc.
cocoa bridges exist. As C# requires a VM (it compiles to a
crossplatform bytecode, similar to what java does), I wouldn't keep my
hopes up in it performing better than java.
Finally, CoreFoundation also has some functionality like XML parsing.
Though CoreFoundation is not Objective-C, its still somewhat object
oriented and very easy to work with. The other nice thing about it is
that you can cast CFString's to NSString's, as well as other CF types.
On Thursday, March 13, 2003, at 08:17 PM,
email@hidden wrote:
While I'm still learning Cocoa, I'm fairly happy with the language,
but I'm
frustrated by the lack of some of the foundation tools that I'm used
to in
the Windows world. (Yeah, let the flames come)
I'm certain I'm not the only Windows developer that is trying to
migrate to
Cocoa. I love having Unix and a clean GUI on the same system.
Now to the things I miss.
(1) A Cocoa framework for Data Access. Having the ODBC Manager is a
step in
the right direction, but gimme a framework to use it with. There are a
couple of third party tools for this, but in this instance, it really
needs
to be an NSObject style framework (IMO)
(2) A Cocoa framework for XML and XSLT. Let's be honest, the business
world
is enamored with XML, and I rather doubt that's going to change for a
couple
of years.
(3) Some UI Tool goodies that I can live without, but boy would they
be nice
and ease the RSI symptoms in my wrists. Code Insight, Code
Completion, and
tooltips with the current method parameters. I know this argument was
just
shouted here on the list.
Those are probably my "big 3" items, but there are a number of little
things
that continue to plague me, but I believe those are remnants of a life
spent
doing things the Windows Way.
I'd love to see a fully interoperable SOAP and XML-RPC toolkit,
preferably
Cocoa style, rather than having to mix Carbon API's, that took into
account
that the Microsoft implementation is broken, and still works. Of
course, I
also wish that Apple would actively get involved with the Mono project
to
bring C# and the .NET runtimes to OS X, as it would pave the way for
an even
broader developer base.
Unfortunately, I don't see any of that coming, I see a continued focus
on
the consumer, while today's Mac's and OS X are, IMO the best
foundation for
a business platform out there, and that's coming from someone that has
spent
a lot of time with several Unix varieties, OS/2, BeOS, and more than
my fair
share with Windows.
I keep plugging though, and I've now implemented a couple of my
internal
business needs in Cocoa, instead of using Delphi or C++ (ATL VS.NET)
with
great success. These tasks are limited though, since the only path to
my
Oracle and SQL server databases is via the Java bridge and JDBC, and
the
performance impact of that. So for the moment, I use the tools that
suit a
job best, and that means that a lot of what I do remains on Windows,
because
of the lack of tools.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.