 |
 |
Cocoa vs .NET
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status:
Offline
|
|
How do the Cocoa frameworks compare to Microsoft .NET? And how does Objective C compare to C#?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status:
Offline
|
|
No idea. Very few people have tried both of them - it's a matter of belief.
C#, if i remember correctly, is supposed to be cross-platform, compiling to a bytecode not dissimilar from Java (who they categorically did not steal the whole idea from, oh no, you could never say that). While Java can be used for Cocoa, Objective-C is an inherently more pure language
From my limited experience, Microsoft isn't much good at making intuitive APIs. Function calls are complex, intricate and hard to untangle. Cocoa has been praised, above not just COM and CORBA but also Carbon and the classic Mac Toolbox, for having extremely nice API calls.
There are then the big benefits of Objective-C - over C and C++ as much as C# - which is that it's naturally object-oriented. Most of the other languages compile down into non-object code. This makes them less dynamic, and less intuitive - in particular, API calls will make less use of objects and more use of straight C values.
In the end, I can only suggest that you try them. If you get good enough at both of them to give us all a definitive answer, come back and let us know!
|
|
All words are lies. Including these ones.
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Mar 2001
Status:
Offline
|
|
I don't think that Cocoa and .NET are really comparable. .NET is ostensibly designed to be language independent, while Cocoa relies pretty heavily on the features of Objective-C. It took a ton of work to expose Cocoa to Java, whereas .NET is supposedly easily accessible from lots of different languages. .NET is also a lot more ambitious and comprehensive than Cocoa: it's intended to revolutionize computing.
Despite the hype, one thing that .NET is not is cross platform. When pressed for examples of OSes it runs on, Microsoft says, "Windows 98, Windows ME, Windows 2000, Windows XP, Windows CE...." You get the idea.
C# is compiled to bytecode and interpreted. I don't understand why, since again, the only platforms it runs on is Windows. It's also likely to be slower because of its garbage collection, automatic initialization, and bounds checking, but those are all wonderful features for programmers. Another nice feature in C# that Obj-C lacks is automatic promotion of primitive types to objects, which is a great way to get the speed of primitives without sacrificing the consistency of the OO paradigm.
That said, I have a few complaints. I've only read a little about it, but I can tell that C# has lots of syntactical ambiguities. For example, you can write code that appears to be accessing an instance variable, but is instead calling a function. Another example is that the dot operator serves many different functions, making code even more ambiguous. C#, like C++, also requires you to explicitly make your methods virtual, which is a semantic detail that the compiler or runtime should handle for you...and they have the nerve to pretend that this extra work is a feature!
One more anecdote: there was a discussion of C# in a chat room, and we were able to write a program that broke C#'s garbage collection, causing it to silently fail...the worst result possible. So don't be surprised if the first few releases don't live up to the hype.
-Peter
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2001
Location: UK
Status:
Offline
|
|
c# is probably using bytecode as the Win CE devices do not use x86 processors

|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
You mean .NOT ???
.NOT
|
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Location: Malaysia
Status:
Offline
|
|
Originally posted by Wixar:
<STRONG>I don't think that Cocoa and .NET are really comparable. .NET is ostensibly designed to be language independent, while Cocoa relies pretty heavily on the features of Objective-C. It took a ton of work to expose Cocoa to Java, whereas .NET is supposedly easily accessible from lots of different languages. .NET is also a lot more ambitious and comprehensive than Cocoa: it's intended to revolutionize computing.
</STRONG>
I will agree that .NET is more ambitious than Cocoa, but it's real effect is yet to be seen. The fact that .NET is supposed to be "language independent" doesn't change the fact that around 50-75% of all software written for .NET will be Visual Basic. Some will be C#. Some will be C++. If you don't count the software for .NET directly written by Microsoft, we will see like 80-90% VB.
And 0% Java, I'd like to point out. (Another "language independant" lie). Although in theory Java should work just fine with .NET, Microsoft includes absolutely no Java connectivity in their .NET framework. They say that any third party can rewrite the CLM to interact with Java.
But .NET is a lot bigger than Cocoa. It's an entire web integrated service for handling everything would ever want its users to do (like not play any MP3s that .NET didn't actually facilitate the puchase of, regardless of whether or not you own the CD; it will also freely give out your name/address to anyone Microsoft wants to give it to). Whereas Cocoa is designed to do anything that the users want.
Interesting language, that C#. I don't really see why they didn't just call it MSJava. I'd love to see more than 5 important differences between C# and Java. It looks to me that MS took Sun's source code, ripped out primitive data types, changed the compiler keyword "import" to "using", and shipped.
---gralem
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
|
(Last edited by AirSluf; Nov 9, 2004 at 12:31 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jan 2001
Location: In a van down by the river
Status:
Offline
|
|
The fact that .NET is supposed to be "language independent" doesn't change the fact that around 50-75% of all software written for .NET will be Visual Basic.
As of 6/16/01, Visual Basic will not be updated for .NET. C# & C+ are Microsoft's future languanges. MSDN has all the gory details on this topic.
I wrote a couple of programs using .net and it was pretty cool. One program used a grid object which I referenced from a vendors web page. The grid control wasn't installed on my machine, I was just renting it out for my application through the Internet. The immediate value of .net is that all these controls are available for use (the downside of this method is that it is very internet dependent). The cool part is that when the vendor updates the grid control, all my applications referencing the grid control automatically get upgraded as well (without rebuilding). Vendors will love .net because it gives them a whole new revenue stream.
I would be more interested in Obj-C, but since Apple dropped Obj-C in favor of Java (in WO5) I will not be exposed to it much.
I'll probably learn C# only because that's where the high paying jobs will be (C# and Java).
|
|
respect mah athoritah!
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2008
Status:
Offline
|
|
If you look at wikipedia, Objective C is a strict superset of C, whereas C++ and C# are not. I believe this means, and this is coming from experience, that C code will compile in an Objective C compiler, but not the other way around, this is not possible in C++ and C#, and even less possible in C#.
There are quite a few differences between C# and the rest of the languages syntactically. Object declarations are different, members and field declarations are different, there are no pointers in C#, the list goes on. At the very most you can say C# was based on it and is fundamentally different.
Cranking out working application interfaces is amazingly fast and easy in C# due to its simplified memory management, GUI designer, and easy access to the API. IMO it is a great replacement for Visual Basic and provides better performance and compatibility.
Apple has different goals than Microsoft and a different developer base. Microsoft has to deal with a vastly larger number of developers, operating systems, and application needs/market. Having a fully managed runtime environment and programming language gives them the ability to provide a language that meets the needs of a wide variety of people and provide a tool that allows sloppy coders smaller room for errors that can be exploited by hackers and their ilk. Being that the average Apple software developer is more passionate(or zealous), loyal, and devoted to the platform (and probably has more time) than the average mom and pop's .NET database application developer, they can spend more time finely tuning their applications to work properly under Cocoa while the rest of Apple users can enjoy pretty, fully 3D accelerated, and GUI responsive applications. They also suffer a lot more virulent scrutiny and criticism for errors because of the small well connected community of Mac users that patrol the software that comes through.
The C# language is multiplatform and it's multiplatform variant is called mono, but as with .NET's gui abilities being a wrapper around Win32 for < .NET 3, Mono's gui API is a wrapper around whatever native OS GUI API, including Mac OS and Linux. Vista can use a thing called Windows Presentation Foundation, which is supposedly a replacement for Win32 as it is a fully accelerated GUI API without any fixed DPI settings.
.NET also includes a tremendous amount of tools for other aspects of computing, like a separate language for managing data called LINQ. Cocoa has some new data management offerings, but I don't think they're as comprehensive as Cocoa.
Overall, having developed a bit for both of them, I liked them both a lot. In the case of .NET, it has seriously raised the standards in application reliability on the Windows platform. Cocoa is nice because it is beautiful, elegant, and very snappy even on old Mac hardware.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Dec 1999
Status:
Offline
|
|
I keep hearing program independent, cross-platform, etc. with .NET, but I haven't even heard of an application written with .NET for something other than Windows.
|
|
"…I contend that we are both atheists. I just believe in one fewer god than
you do. When you understand why you dismiss all the other possible gods,
you will understand why I dismiss yours." - Stephen F. Roberts
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Holy cow, this thread is from before I registered here.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|