Tuesday 28 June 2011

Eclipse vs Netbeans

Oh yes... another (in)famous deathmatch between two developers tools. Eclipse is supported by IBM and uses a custom library to give an GUI, the famous Standard Widget Toolkit (SWT). Netbeans is based on Swing and is sponsored by Oracle.
Two years ago I switched from Eclipse to Netbeans, just for Netbeans' GUI editor (Metisse), a program I waited for long.
Soon, I discovered some things I liked of Netbeas:

  1. An easy way to install plugins
  2. A powerful refractor tool

Despite it's written using Swing, Netbeans works well. I still have doubts on developing applications using Swing, but Netbeans demonstrates it's possible. It's well integrated with desktop (Mac OS X, Windows 2000 and Ubuntu).

BUT (and it's a recent news), Eclipse Foundation releases a new version of its IDE, Indigo. Indigo has very interesting features, and seems it's going to be very near to Netbeans.
I'll examine it better next days. I'm very curious about it.
Meanwhile, I continue using Netbeans, because I'm used to work with it and because (as I learned some weeks ago), it's better to wait a bit before start using a new major version.

Monday 6 June 2011

A look to XCode 4


«Boss, we update to XCode 4...»


If you're an iPhone developer (or a Mac OS X one), then you're using XCode. Recently, Apple released XCode new version (4), introducing a lot of improvements. I list just the more "impressive" and useful.

Refactor

Refactor is one feature I loved in Netbeans and I'm happy to have (finally) on XCode. Select a class name or a class property, right-click and choose "Refactor": XCode will search that word, how and where is used and will replace it, saving a lot of time and boring debug sessions.

New Interface

XCode 4 comes with a new user interface. Still based on Aqua, it looks like iTunes and it's more "rational" and ordered. Even targetoptions are subdivided with a drop-down interface, making easy searching a specific option.

Embeded Interface Builder

The interface builder is no more a stand-alone program: now it's a "feature" of XCode. Clicking on a interface file it will open inside the SDK, showing all informations (connectors, widgets, ecc.) on right side.

Drawbacks - Heavyweight

Obviously, there aren't just good things: XCode 4 is an heavyweight program: on my Mac Book Pro it eats 173MB and slows down my system. It's no a so drammatic, but it's boring.


Drawbacks - New Configuration

Do you remember how you sign your App to submit it to App Store? Well, forget it. Now the procedure is totally changed. Somebody says there's from a long time, but I seriously don't remember it. I don't like the new way to configure build and distribution. Maybe it's better, but it's certanly very different: a "soft" way to learn it would be useful. A good step-by-step guide was written on Stack Overflow.

Drawbacks - Immaturity

XCode 4 comes with a lot of new features. New features means less tests. Less tests mean more problems. I have many examples: with XCode 4.0 was impossibile to upload new binary with the embeded Application Loader. It gives an error related to com.apple.transporter.util.StreamUtil.readBytes(Ljava/io/InputStream;)[B.
I downgraded it to 1.3 version (as you can see here).
Another one was some crashes. Another one is when you "delete" a file from class tree: it's really deleted. No hopes to recover it, neither looking in trash can.
Another one is the mysterious "removed references" in a project. I can't understand why, but almost all references were deleted on a project. VERY boring!


Drawbacks - Slow

Finally (and more important), XCode 4 is slow. Damn slow! And heavy as an elephant. It makes slow my Mac Book Pro 2009 easly. All system suffers this memory-and-cpu hungry program.

Conclusions

XCode 4 has some interesting features, but suffers its youth. Probably this is the main reason for maintain a link to XCode 3.x on Apple Developers site. I hope XCode will be optimized, because its slowness is its main drawback.

Wednesday 1 June 2011

iPhone Tutorials - "Duplicate Symbol _OBJ_IVAR_"

I am working on a personal review about XCode 4. Please, be patient!

XCode 4 gives me many troubles. The last one was a linker error

Duplicate Symbol _OBJ_IVAR_ a class

What happens?

  • Maybe you declare #import "Classname.m" (with a .m instead than .h)
  • XCode lists "Classname.h" and "Classname.m" two times. You have to "remove reference" for a copy from XCode.

It seems XCode4 gives many problems to iOS developers. I'll talk better in another post.