Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

slooksterPSV

macrumors 68040
Apr 17, 2004
3,544
306
Nowheresville
iJed said:
I would like to see Apple release something to compete with C# and the .NET framework. While Cocoa is still a good framework the Objective-C language is looking more and more dated every year as C# and frameworks like .NET are becoming more and more advanced. I just hope this will not lead to much faster small application development on Windows where traditionally Cocoa allowed this on the Mac against MFC.
Is C# and .NET really that great?

EDIT: I see its syntax is Java-like, and the Frameworks (because of simplicity with Java and all that) would make C# and .NET a really good mix of Language and SDK's. Personally, I prefer Objective-C, but if I develop apps for Windoze I'll have to learn C# and .NET
 

DaveP

macrumors 6502a
Mar 18, 2005
506
433
slooksterPSV said:
Is C# and .NET really that great?

I think so. The number one greatest thing about XCode is that it is free. That can be an enormous advantage for just individual programmers that like to fool around with stuff. But the .NET 2005 IDE blows away XCode in my opinion.
 

iJed

macrumors 6502
Sep 4, 2001
264
10
West Sussex, UK
slooksterPSV said:
Is C# and .NET really that great?

EDIT: I see its syntax is Java-like, and the Frameworks (because of simplicity with Java and all that) would make C# and .NET a really good mix of Language and SDK's. Personally, I prefer Objective-C, but if I develop apps for Windoze I'll have to learn C# and .NET

Where Java is designed to be clean and simple C# is designed for writing software. M$ have not been afraid to allow the use of pointers (through the unsafe mode and compiler flag) and there is support for language level events which make GUI programming much easier. The .NET component model also makes it unbelievably easy to develop custom controls. I had no real understanding of just how powerful embedded metadata could be until I started developing controls in C#.

Ironically that other .NET language is probably the most horrific mess I've ever had the misfortune to code in.

Visual Studio 2005 is certainly better than Xcode is today but it definitely has more than its fair share of flaws and bugs. Coming from an Eclipse background I find it lacking in more advanced features that Eclipse users take for granted. Its refactoring is primitive and its class diagram support is just plain crappy. However its code editor is in some respects as good as Eclipse JDTs.
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
That Objective C 2.0 thingy seems great. Garbage collection sounds good, but I think Apple should give users the opportunity to choose wether they want automatic garbage collection on or off.

On the other hand, I don't see any other reason why they shouldn't implement it the way I hope. Apple says that Objective C 2.0 is backwards compatible with its predecessor, so how could this be done without supporting both modes (automatic garbage collection on or off)??

As for Visual Studio .NET, I think that we should look at ALL features that Apple provides. Apple provides with the developper tools many mechanisms for optimization (the CoreXXX thingies, remember?) that have come in very handy to developers around the world. Developing in Cocoa is sweet, and XCode 3.0 looks very promising. I also heard some essential optimizations in the Carbon Framework.

What I meant to say is that we should not relate the compiler we use with the whole programming experience on the Macintosh platform. Apart from the compiler, we should also consider the programmatic facilities that Apple gives to programmers, CoreXXX implementations, frameworks, documentations (although I haven't seen MS's one to judge if it's better), and the FACILITY in which those technologies are implemented in the programs. For me, XCode is a very nice IDE, but I think that the real work has been done by apple under the hood, in the frameworks they offer. And lets not forget that one thing Microsoft hasn't been able to do yet, is to keep things SIMPLE for the programmer, as apple has managed to do with the whole developper tools situation.
 

iJed

macrumors 6502
Sep 4, 2001
264
10
West Sussex, UK
Soulstorm said:
That Objective C 2.0 thingy seems great. Garbage collection sounds good, but I think Apple should give users the opportunity to choose wether they want automatic garbage collection on or off.

Yes I can't wait to take a look at Obj-C 2.0 when some examples of it finally materialise. I'm rather annoyed that Apple hasn't released any with the announcement.

On the other hand, I don't see any other reason why they shouldn't implement it the way I hope. Apple says that Objective C 2.0 is backwards compatible with its predecessor, so how could this be done without supporting both modes (automatic garbage collection on or off)??

I don't think there is much chance of them breaking standard Obj-C...

What I meant to say is that we should not relate the compiler we use with the whole programming experience on the Macintosh platform. Apart from the compiler, we should also consider the programmatic facilities that Apple gives to programmers, CoreXXX implementations, frameworks, documentations (although I haven't seen MS's one to judge if it's better), and the FACILITY in which those technologies are implemented in the programs. For me, XCode is a very nice IDE, but I think that the real work has been done by apple under the hood, in the frameworks they offer.

Yes, Apple have some great frameworks that do great things. Possibly the best set of frameworks for native application development in existence. Its just that, although not native, .NET is, for the most part, more complete and easier to work with than Cocoa is.

And lets not forget that one thing Microsoft hasn't been able to do yet, is to keep things SIMPLE for the programmer, as apple has managed to do with the whole developper tools situation.

I can't say I agree with that. VS 2005 is much easier to use than Xcode. I remember how confusing doing something as simple as setting up targets was in Xcode 1.0 was after doing the same thing in ProjectBuilder.
 

DavidLeblond

macrumors 68020
Original poster
Jan 6, 2004
2,351
695
Raleigh, NC
slooksterPSV said:
Is C# and .NET really that great?

I'm a .NET developer so I spend most of my time in it. I only use XCode at home, and then not much (I do more PHP at home.) The .NET IDE is very well laid out and very powerful, and the languages (either VB.NET or C#) are very easy to learn and work with.

That said, .NET has its drawbacks. Microsoft loves to cater to its third parties, so if you want to do anything fancy with a control or tool (such as put a combo box in a grid) you either have to a) spend money on a third party tool or b) code it yourself.

Plus (and I know people are going to jump on me for this) the IDE and the .NET framework itself are buggy as hell. And IMHO slow as hell too.

XCode is definitely not as user friendly and can be pretty hard to learn, especially for someone who is more use to .NET. Same goes with Objective-C. Still, I like the fact that there are a lot of "features" built into a Cocoa program that you would have to buy separately for .NET.
 

iJed

macrumors 6502
Sep 4, 2001
264
10
West Sussex, UK
DavidLeblond said:
Plus (and I know people are going to jump on me for this) the IDE and the .NET framework itself are buggy as hell. And IMHO slow as hell too.

I wouldn't say the .NET framework is any worse than the JDK but I agree with you on the IDE. VS2005 is incredibly buggy. Its of beta software quality.

I run on an Athlon 64x2 at work and Visual Studio is quite responsive. It was very sluggish on the P4 2.8GHz the Athlon replaced.
 

DavidLeblond

macrumors 68020
Original poster
Jan 6, 2004
2,351
695
Raleigh, NC
iJed said:
I wouldn't say the .NET framework is any worse than the JDK but I agree with you on the IDE. VS2005 is incredibly buggy. Its of beta software quality.

I hate the JDK just as much. :)
 

dernhelm

macrumors 68000
May 20, 2002
1,649
137
middle earth
DaveP said:
I think so. The number one greatest thing about XCode is that it is free. That can be an enormous advantage for just individual programmers that like to fool around with stuff. But the .NET 2005 IDE blows away XCode in my opinion.

I earn my living coding in both. The VS IDE (pre 2005) was ridiculously buggy, and would crash several times/day on me. VS 2005 it is only marginally buggy and often goes a full week without crashing.

The .NET development environment is rich, and actually kind of fun to code in, but it by no means all that perfect. For one, you are really running in a kind of VM (not unlike Java) and despite what you hear, there is a definite performance hit for that. Also, if you are trying to mix-and-match managed and unmanaged code you are in for a lot of head-scratching, canoodling, and highstepping around things that are outright bugs in my opinon.

Also, despite what you hear, C# is the only outright native .NET language. C++, VB, etc, while they can produce .NET runtime code, all feel like a bolt-on. In fact, prior to VS2005, the C++ syntax for producing managed code was so horrific that only the masochistic or terminally unfortunate would ever actually use it. (I was in the latter camp).

.NET is a great rapid prototype-driven development environment. I used to use VB a lot to slap together a prototype, and then use C++ to code the real thing. That was how most Microsoft programmers worked. Now, however, I can prototype in C# and simply build off the prototype to produce the final product. And the graphical development environment is extensible like nobodies business - it is easier than it has ever been to produce sophisticated UI widgets that ANYBODY can use in their product.

A lot of the .NET code originally produced by Microsoft was thin wrappers around Win32 APIs. In some cases this was a good thing, and in other cases a bad thing, but .NET 1.x was often slow an buggy - and most people doing anything sophisticated ended up looking for ways to get at the underlying Win32 world where they knew how to get things done. However, that is changing, and changing fast - Microsoft has figured out how to get the .NET runtime into their database, and on devices both large and small. And now more and more frameworks they are producing are native .NET.

For the 1990s, the NeXT environment was absolutely top dog. But it stood still while Microsoft did not. Hopefully Obj-C 2.0 is the start of Apple realizing that they also need a top-notch development environment as well. Garbage-collection is a start - and will help everyone (not just newbies) if it is done well (and done in a way the non-gc'd code and gc'd code can interact cleanly). But more important are the frameworks themselves - Apple needs to keep producing "Core" frameworks that are compelling - easy to use - and integrate seamlessly into their development environment. They need to beef up their interoperability frameworks as well - XML, SOAP, CORBA and Web services, are all necessary realities to enterprise developers, and they need to be easier to work with. They also need to make it dirt simple to produce UI controls that are my own, but become part of my development environment by getting added to the interface builder palette automagically.
 

dernhelm

macrumors 68000
May 20, 2002
1,649
137
middle earth
iJed said:
Yes I can't wait to take a look at Obj-C 2.0 when some examples of it finally materialise. I'm rather annoyed that Apple hasn't released any with the announcement.

I can't agree more. I want to know how they are doing this, what the GC implementation is, and how it affects what I've already done. Does anyone know if they are adding keywords and symbols (a la managed C++ in .NET) something like:

// non-gc'd
NewObject *newobject;
newobject = [[NewObject alloc] init];

// gc'd
GCNewObject ^newobject;
newobject = [[GCNewObject gcalloc] init];

What is the "gotcha" when a standard class wants to hold a reference to a garbage collected class? Or visa-versa?

How will all of this fit in with the current "pool/autorelease" pattern?

Will there be a language-enforced complementary concept to the "Dispose" pattern in .NET?
 

dernhelm

macrumors 68000
May 20, 2002
1,649
137
middle earth
iJed said:
I can't say I agree with that. VS 2005 is much easier to use than Xcode. I remember how confusing doing something as simple as setting up targets was in Xcode 1.0 was after doing the same thing in ProjectBuilder.

While I generally agree that VS 2005 is simple to understand - you can't really bring up project dependencies/targets as a strong suit of the product. If you work on anything of any complexity or size, VS .NET cannot actually ever figure out what needs to be built and what doesn't - and more times than not resorts to re-linking the entire product (even if you tell it not to) whenever you start up in debug mode.

I'm not a big fan of Make (or gmake) - but I can make it sit up and beg if I need it to. And in general it runs circles around the VS IDE in terms of getting project dependencies set up correctly. I understand Xcode's system is built on top of "jam" somehow - I'm a little fuzzier on this one. But I can generally say that this is an area that Xcode is leaps and bounds better than VS.
 

slooksterPSV

macrumors 68040
Apr 17, 2004
3,544
306
Nowheresville
iJed said:
Where Java is designed to be clean and simple C# is designed for writing software. M$ have not been afraid to allow the use of pointers (through the unsafe mode and compiler flag) and there is support for language level events which make GUI programming much easier. The .NET component model also makes it unbelievably easy to develop custom controls. I had no real understanding of just how powerful embedded metadata could be until I started developing controls in C#.

Ironically that other .NET language is probably the most horrific mess I've ever had the misfortune to code in.

Visual Studio 2005 is certainly better than Xcode is today but it definitely has more than its fair share of flaws and bugs. Coming from an Eclipse background I find it lacking in more advanced features that Eclipse users take for granted. Its refactoring is primitive and its class diagram support is just plain crappy. However its code editor is in some respects as good as Eclipse JDTs.

Well that explains it, no wonder you see so many threads on forums complaining about something .NET doesn't work. -- I haven't went on a Windows forum for years (wow I can honestly say that), but I remember seeing a lot of fuss - even if you google .NET it'll bring it up as well - about .NET's framework

XCode Developer package, does all that I need it to do. Which is great for me. Other's may like Visual Studio, but I haven't had a lot of experience with it.
 

live4ever

macrumors 6502a
Aug 13, 2003
728
5
I wonder if Apple will get an optimized Intel compiler for Objective-C (there's one for C++ and Xcode).
 

mbabauer

macrumors regular
Feb 14, 2006
105
0
DavidLeblond said:
The problems I've had with Java is it just not DOING the garbage collection randomly, even when it passes the max heap.

Java development is my primary job, so I speak from experience.

First, GC in Java works the same way GUI redraw in Java works. You can "suggest" it to occur, but its up to the individual vendor implementation whether or not it actually occurs. Also, it usually works byh setting a flag, indicating to the VM that the next cycle it needs to GC. In other words, telling the GC to garbage collect doesn't just stop everything and garbage collect.

Second, I have seen first-hand that the IBM JVMs, especially the 1.4.x ones for earlier AIX platforms, do not GC very effectively. There were indications of leaks in code that had no leaks under the Sun JVM, which tells me that its the JVM leaking, not my code.

Third, the GC is definately NOT random. It usually runs in a separate thread, which probably has a wait/sleep in it. It wakes up, and does some VERY rudamentary tests to see if it needs to run a garbage collect. Also, most JVMs implement a faster "quick" garbage collect and a more aggressive "full" garbage collect. The priliminary tests the GC does determines which one should run. You can see this first hand on the Sun JVMs by turning on verbose GC logs (I think the flag is -verbose:gc)

Last, for large applications, especially on application servers and such, I find it almost necessary to modify the GC's default behavior. There are LOADS of books, websites, etc that tell you how to tune GC for your JVM. The default settings work great for smaller applications, but for servers that typically allocate memory very aggressively, you should tune the GC accordingly.

As for .NET, I have done a little bit of development there, but not enough to be considered an "expert". From what I read, the same things that apply to Java VMs applies to C# VMs.

Hope that helps you out some...
 

wmmk

macrumors 68020
Mar 28, 2006
2,414
0
The Library.
kainjow said:
Already exists: REALbasic, AppleScript Studio, etc ;)
i'd disagree. applescript studio is for consumers, but it can't really do big applications. REALbasic actually requires knowledge of C++, which the casual consumer doesn't tend to have. when I say 'consumer targeted,' I mean super intuitive and requiring barely any knowledge of code. like the script assist mode in flash actionscript 2.0. along with IB. you click and drag actions from a list into a window and syntax is corrected automatically, then you drag and drop elements onto windows and toolbars and assign them functions from a list. a way for 'real' devs to create various functions and make them self installable into iCode. in other words, automator with more possible actions and actions not being related to only certain apps, but your app itself, then the result being a .app with a GUI, not just a script.
 

MadDoc

macrumors 6502
Apr 25, 2005
329
5
UK
i'd disagree. applescript studio is for consumers, but it can't really do big applications. REALbasic actually requires knowledge of C++, which the casual consumer doesn't tend to have. when I say 'consumer targeted,' I mean super intuitive and requiring barely any knowledge of code. like the script assist mode in flash actionscript 2.0. along with IB. you click and drag actions from a list into a window and syntax is corrected automatically, then you drag and drop elements onto windows and toolbars and assign them functions from a list. a way for 'real' devs to create various functions and make them self installable into iCode. in other words, automator with more possible actions and actions not being related to only certain apps, but your app itself, then the result being a .app with a GUI, not just a script.

Huh? REALbasic doesn't require any knowledge of C++ at all. Have you actually ever used REALbasic?

MadDoc,
 

bousozoku

Moderator emeritus
Jun 25, 2002
16,120
2,397
Lard
i'd disagree. applescript studio is for consumers, but it can't really do big applications. REALbasic actually requires knowledge of C++, which the casual consumer doesn't tend to have. when I say 'consumer targeted,' I mean super intuitive and requiring barely any knowledge of code. like the script assist mode in flash actionscript 2.0. along with IB. you click and drag actions from a list into a window and syntax is corrected automatically, then you drag and drop elements onto windows and toolbars and assign them functions from a list. a way for 'real' devs to create various functions and make them self installable into iCode. in other words, automator with more possible actions and actions not being related to only certain apps, but your app itself, then the result being a .app with a GUI, not just a script.

REALbasic is about as close to point-and-click programming as you can get on Mac OS X, though Borland's JBuilder still runs. On Windows, both Microsoft and Borland have products with this paradigm and REALbasic runs there too.

You don't need knowledge of C++ to make anything work. You do need to study APIs to make your simply drag-and-drop application more substantial.
 

GeeYouEye

macrumors 68000
Dec 9, 2001
1,669
10
State of Denial
Having done significant work Xcode, Eclipse, and VS, I've come to the conclusion that each have their strengths and weaknesses. Eclipse is fantastic for Java. Nothing more needs be said about it. For coding anything else, I much prefer Xcode. VS has fantastic debugger functionality though. Between the two, I'd rather be stuck with Xcode (especially 3.0!) for eternity than VS, though the biggest source of my aggravation with it is the changes between versions... Initialize a variable in a for-loop, for example: for(int i =0...). In 2002, the lifetime of i is rather longer than it is in 2005. I know what it's supposed to be, of course, but despite the fact that it's a bugfix in 2005 doesn't mean there weren't regressions; there were. So any time there's anything resembling ambiguity, you have to take the safest route (for fear of what the next IDE revision will do to your code), which in this case would be to put the initialization before the for loop completely, whether or not I need an i later, which leads to extra lines of code.

Also, Xcode 3, and IB 3, are terrific. :p IB3's even better than RealBASIC's interface creation.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.