Programming under GNUstep—An Introduction
When porting an application from GNUstep to Mac OS X (or the other way around), some important things must be considered. For example, when porting to Mac OS X, you have to redo the user interface using Interface Builder under Mac OS X. The following steps are needed to port the application to Mac OS X:
From the File menu of Project Builder, select New Project... and select Cocoa Application. Click on the Next button.
Specify the project name (Tiff Viewer) and the project location. Click on the Finish button.
Now, select the Classes node and add the files AppController.m and ImageModel.m from the Project menu.
Expand the Other Sources node and delete the main.m file.
Expand the Resources node and double-click on the MainMenu.nib node. This will start Interface Builder.
Much like you did under Gorm, drag and drop the NSImageView in the empty window and the Load Image menu item in the File menu.
Because the controller class (AppController) was created in the previous section, you simply can reuse it under Mac OS X. In Interface Builder, from the Classes menu, choose Read Files.. and select AppController.h.
From the File window, click on the Classes tab, select AppController and from the Classes menu, choose Instantiate AppController.
Now, connect the outlets and the action like we did under Gorm.
Save the modified interface, and quit Interface Builder.
From the Build menu in Project Builder, choose Build and run. This will compile and launch the application.
Once the application is launched, choose Load Image from the file menu and select a picture to show. The final result should look like Figure 10.

Figure 10. The Same Application Running under Mac OS X
As you can see, we have ported the application without rewriting a single line of code. Even if the application is quite simple, complex applications can be developed under GNUstep and easily ported to Mac OS X. Affiche and GNUMail.app are good examples of applications that are portable between GNUstep and Mac OS X.
Going the other way, more care should be taken when porting applications from Mac OS X to GNUstep. First, you have to redo the user interface of the application using Gorm. Secondly, GNUstep currently does not provide an implementation of some Cocoa classes like NSToolbar, NSDrawer or any core foundation services. To avoid problems when porting a Mac OS X application using those unimplemented functionalities to GNUstep, you will need to use conditional compilation. Finally, one or more GNU Makefiles must be created in order to compile the application under GNUstep.
As we have seen in this article, developing a GNUstep application is relatively easy. GNUstep offers a rich, clean and consistent API for developing true cross-platform applications in the Objective-C language.
New application kit back ends are being developed for Microsoft Windows, DirectFB and Ghostscript, thus allowing support for a wider range of computing environments. Also, OpenGL support has recently been added through the implementation of the NSOpenGLView class.
Finally, GNUstep-based distributions are emerging. For example, the LinuxSTEP Project aims to create a fully integrated, desktop Linux operating environment that is not bound by some of the more traditional approaches of common Linux distributions.
All listings referred in this article are available by anonymous download at ftp.linuxjournal.com/pub/lj/listings/issue108/6418.tgz.
email: ludovic@Sophos.ca
Ludovic Marcotte (ludovic@inverse.ca) holds a Bachelor degree in Computer Science from the University of Montréal. He is currently a software architect for Inverse inc., a small IT consulting company located in downtown Montréal.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Favorite (and easily brute-forced) pw's
55 min 16 sec ago - Have you tried Boxen? It's a
6 hours 47 min ago - seo services in india
11 hours 18 min ago - For KDE install kio-mtp
11 hours 19 min ago - Evernote is much more...
13 hours 19 min ago - Reply to comment | Linux Journal
22 hours 4 min ago - Dynamic DNS
22 hours 38 min ago - Reply to comment | Linux Journal
23 hours 37 min ago - Reply to comment | Linux Journal
1 day 27 min ago - Not free anymore
1 day 4 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
GNUstep.sh location
Took me a while to figure out where GNUstep.sh is located for Ubuntu. In fact, it seems some people get so frustrated with this that they uninstall all their gnustep packages and build it from source. However, I finally found this file in /usr/share/GNUstep/Makefiles.