The World’s Leading Microsoft .NET Magazine
   
 
The .NET Addict's Blog

My Top Tags

                                                           

My RSS Feeds








I heart FeedBurner

Latest Diggs - Programming

Computers Blogs - Blog Top Sites

Site Hits

Total: 3,825,508
since: 19 Jan 2005

The Greener Pastures Effect on IDEs and Programming Environments

posted Mon 09 Apr 07

We've all heard the saying, The grass is always greener on the other side. Basically it refers to the entirely delusional situation where, once in a rut, you fool yourself into thinking that any situation other than the one you're currently in is better than your current situation.

Windows developers often suffer from "green grass syndrome" and go explore different pastures - Mac development and Linux development. Client-side developers explore server-side code, web programmers tinker with desktop application development. A lot of people dislike the "greener pastures" effect, but I think, when used properly, it is one of the single best forces in the world of programming today.

If people didn't seek greener pastures, people wouldn't learn to expand their current horizons, they wouldn't think out of the box, and they would never experiment with new and interesting technologies. Without the greener pasture effect, I'm afraid the world of developers would lack any real form of innovation.

The real issue, and the crux of this post, is this: How do you tell the difference? How do you know what what you are feeling is objective, or what you are feeling is the semi-euphoric glaze of the Greener Pasture effect? I'm not sure anyone knows... I sure don't.

What I do is I take a step back from the situation and try and look at it objectively. It's difficult, and often forces me to break my current workflow or even withdraw from the greener pasture and go back to the "old pasture" to re-evaluate things in a new perspective.

One such perspective that I evaluated was the IDE. I have been poking around with Cocoa and Objective-C at home in my spare time, partly because of the Greener Pasture effect, partly because it's something I don't currently know (and I am driven beyond the point of obsessive-compulsive with regard to learning). When I started working with Xcode and IB, I felt like a fish out of water. The experience was very strange, and I didn't know how to do anything. Now that I've been using it for a while, I find it very intuitive, very easy, and very natural. As I've mentioned before, I actually feel relaxed while using Xcode and IB (especially the ones that come with Leopard).

In the interest of being as fair and as objective as possible, I pulled back away from Xcode and IB and went back to spending my spare time writing .NET code. I wanted to see if my love for the Xcode and IB interfaces was influenced by the Greener Pasture effect, or if the interfaces really were that much better. After spending a lot of time with a really critical eye on the VS 2005 interface and on the Xcode interface, I've come to some conclusions.

  • Solution Explorer in VS 2005 is utterly worthless. I never used to think so, but having spent some time in the intrinsicly MVC world of Xcode/IB, I went back into VS 2005 and tried to create project folders called Views, Models, and Classes. Well, the models folder will work just fine. However, solution explorer will not let me separate the code-behind partial class (controller) from the XAML file partial class (view). I can hack this by deleting Window1.xaml.cs and creating a new class in the Controllers folder called Window1Controller.cs. Here's the rub: when I modify Window1.xaml so that it indicates its code-behind class is Window1Controller.cs, guess what type my View is? Window1Controller. In short - I cannot truly separate my view class from my controller class. Call me snobbish, but damn I think that sucks. Reality check - is the fact that I can no longer tolerate the lack of clear separation of concerns between View and Controller a Greener Pasture effect, or a sign of me growing and maturing as a coder, having had said growth inspired by Xcode/IB?
  • I miss control-dragging to rig outlets and actions
  • I miss outlets
  • I miss actions
  • I miss delegates (not C# delegates, but visually assigning a delegate from inside IB)
  • I dislike window management in Xcode and Interface Builder. The fact that they are two separate apps and not one makes switching from code to interface and back again somewhat clumsy.
    • However: The more I use Xcode and IB the more I realize that rapid context-switching from code to interface isn't really the way to go. If I do things "The Cocoa Way", I spend larger blocks of time in each app with very little alt-tabbing.
  • I miss solutions when working in Xcode. I'm probably missing something, but I can't see how to group a bunch of related projects (such as a client and a server) together in the same Xcode "thing". If anybody knows how this is done, please enlighten the poor newb.

In short, when I first started tinkering with Cocoa I found Xcode and IB to be intimidating and confusing. Now that I know a little bit more about Cocoa itself and the underlying frameworks, I am more aware of why IB and Xcode do what they do, and I am also more familiar with it and more comfortable with it.

When using Visual Studio 2005 I find myself missing the feeling I get when working with Xcode/IB. I have never before encountered a situation where I missed the visceral experience of a tool more than its raw feature set. I have taken a step back, gone back and forth between both IDEs and tried to compare on their own merits (since, because Cocoa is fundamentally different than .NET, a direct comparison won't mean much), and, to me, Xcode and Interface Builder seem to be more conducive to producing high-quality applications. I'm not saying you can't produce a high-quality app in VS 2005, I'm just saying that it feels like Xcode/IB steer you down the right path and occasionally VS 2005 actually prevents you from going down the path you want to go down.

I'd love to hear your thoughts, especially if you have used both IDEs yourself. What was your feeling switching between the two?

tags:              

links: digg this    del.icio.us    technorati    reddit

AddThis Social Bookmark Button




1. James Gregurich left...
Mon 09 Apr 07 10:48 am

I'm not sure exactly what you mean by "group a bunch of related projects", but a single xcode project can have multiple targets to build different things. So, you can build both a client and its server in the same xcode project by just switching the active target.

-James


2. Kevin Perry left...
Mon 09 Apr 07 10:48 am

Are Xcode targets not not sufficient for your multi-part project needs? I've recently discovered that there's a lot more power and flexibility there than I had imagined.


3. Kevin Hoffman left...
Mon 09 Apr 07 10:50 am

I'll have to check into Xcode targets. I may be stuck in "Visual Studio" mode where, when I think of multiple targets, I think of nothing but "Release" and "Debug". Building a client and server with 2 differentargets might be something I can explore next time I get a few spare minutes.


4. James Gregurich left...
Mon 09 Apr 07 10:57 am

each target in xcode is independent of the others and has a full set of compiler/linker setttings of its own as well as its own set of dependency lists.

Debug/release isn't done by target. it is done by "build configuration". a target has multiple build configurations. you usually start with debug/release, but you can add more.


5. Shawn left...
Mon 09 Apr 07 11:52 am

Also don't miss out on the power that .xcconfig files can give you... they can make large project sets easy to manage and keep in sync


6. Ken Anderson left...
Mon 09 Apr 07 12:42 pm

For me, double-clicking on a component in VS that has a text feature (like a button) and, instead of allowing me to edit that text inline, creates an action method for me - drives me nuts!


7. Kevin Hoffman left...
Mon 09 Apr 07 12:44 pm

I love being able to double-click a button and edit it's text. That's an incredibly quick and easy way to get a GUI up and running.


8. cjwl left...
Mon 09 Apr 07 12:45 pm :: http://www.objc.net

I find multiple targets are good if the products share a lot of code and you are basically working on these multiple targets at the same time. It is also possible to create target dependancies between entirely separate projects. Simply add another .xcodeproj to the files of your project and then edit your target dependancies, the targets in this other project will show up and you can build them as a dependancy in your current project. Combine inter-project dependancies with multiple targets and there are a ton of choices.


9. Jon Hendry left...

One example of a multi-project Xcode project is Jamie Zawinski's screensavers (see my URL for the link.)

Each screensaver is a target and subproject, and if I'm not mistaken there are targets that build just the OpenGL or non-OpenGL screensavers.


10. keith left...
Mon 09 Apr 07 4:09 pm :: http://www.afex2win.com

it seems like your major beef with vs2005 is that you can't seperate the partial classes for your view. the problem with that is you are a bit misguided with regards to the MVC pattern. the "code-behind" partial class IS the view. controllers should be implemented as seperate classes so that they are testable independent of the view. if you cant test them alone, doing any MVC-like pattern is a waste of time. read more about it here: ht tp://codebetter.com/blogs/raymond.lewallen/archive/2007/02/20/Controller-_2 1003D00_-code_2D00_behind.aspx

this applies to ASP.net apps as will as windows forms. my current project's CAB solution keeps my views and controllers in entirely seperate projects to ensure isolated testability


11. Kevin Hoffman left...
Tue 10 Apr 07 6:57 am

I'm not misguided in my interpretation of MVC. I realize that the code-behind class is the view. In knowing that, I put my .xaml AND my .xaml.cs file in my "Views" folder. The issue is that VS 2005 just makes it so bloody easy to blur the lines of concern. It takes a LOT of discipline to keep the view code in the view, especially when, realistically, you need something like Model-View-Presenter or you need an intermediate "ViewModel".


12. Clint left...
Wed 11 Apr 07 1:47 pm

step into xcode ( http://elfurl.com/m4vyh )is a good book for explaining multiple targets in one project and manage the dependencies. it focuses more on the in's and out's of xcode (hence the title) rather than cocoa, so things like this and build configurations and using SCM are talked about as well.


13. Grady Haynes left...
Thu 10 May 07 9:43 pm :: http://wordparts.com/

"When using Visual Studio 2005 I find myself missing the feeling I get when working with Xcode/IB. I have never before encountered a situation where I missed the visceral experience of a tool more than its raw feature set."

This is the entire Mac experience in a nutshell to me, expressed very succinctly. Well said.


Tag Related Posts

Upgrading your Leopard install to Java SE 6 64-Bit

Mon 12 Jan 09 1:38 P GMT-05
tags:            

So I'm in the LA Times ;)

Wed 27 Aug 08 2:51 P GMT-05
tags:                  

Building Model Classes in C# and Cocoa

Sun 15 Jun 08 3:13 P GMT-05
tags:            

MobileMe vs. Live Mesh - Round 1

Wed 11 Jun 08 12:20 A GMT-05

NYC SharePoint Developer Needed

Mon 12 May 08 12:09 P GMT-05

My Macbook Air is masculine, dammit!

Mon 17 Mar 08 6:59 P GMT-05
tags:          

My Macbook Air Review

Sun 02 Mar 08 4:20 P GMT-05

Video of the Macbook Air in Action

Wed 20 Feb 08 3:04 P GMT-05

Leopard Sample: A Bound NSCollectionView

Mon 29 Oct 07 1:41 A GMT-05

Leopard is out - let the code samples begin!

Fri 26 Oct 07 10:09 A GMT-05
tags:          

My life is complete : iPhone SDK is CONFIRMED.

Wed 17 Oct 07 6:38 P GMT-05
tags:          

Leopard Shipping October 26th!!

Tue 16 Oct 07 4:59 P GMT-05
tags:        

My iPhone Review

Mon 23 Jul 07 1:09 P GMT-05
tags:        

Microsoft Codename Acropolis - Unwrapped

Wed 20 Jun 07 3:22 P GMT-05
tags:              

Exploring the Delegate Design Pattern

Mon 14 May 07 6:30 P GMT-05

Installing Orcas Beta 1 - VMware Style

Mon 23 Apr 07 12:16 P GMT-05

Orcas Beta 1 Released

Fri 20 Apr 07 7:09 P GMT-05

Core Data - Almost too Easy?

Wed 18 Apr 07 2:23 P GMT-05

Will Silverlight be DOA?

Mon 16 Apr 07 8:02 P GMT-05

Exploring the MVC Pattern in WPF

Tue 10 Apr 07 12:51 P GMT-05
tags:                      

My Little Pony .NET Unleashed 2007

Fri 30 Mar 07 1:59 P GMT-05

An experience with the Leopard beta

Mon 26 Mar 07 7:45 P GMT-05
tags:                

Authorness

Thu 15 Mar 07 1:44 P GMT-05

WPF Bindings == WTF Bindings?

Mon 12 Mar 07 6:31 P GMT-05

Objective-C Categories vs C# 3.5 Language Extensions

Mon 26 Feb 07 1:05 P GMT-05
tags:                

Cocoa Programming vs. WPF : NIB vs XAML

Tue 20 Feb 07 2:09 P GMT-05

Cocoa Bindings vs. WPF Binding

Thu 15 Feb 07 5:41 P GMT-05
tags:                

Objective-C 2.0 - Programming for wimps?

Wed 31 Jan 07 6:18 P GMT-05
tags:              

Mac OS X Leopard Developer Preview

Tue 09 Jan 07 1:58 P GMT-05
tags: