Re: [Gtk-osx-users] Question about programs portability




I whole heatedly agree with John. He speaks true words of wisdom. I wish I had (listened to) that advice 3 years ago, when I started down GTk for the expressed reason of cross compatibility. If you are starting from scratch, don't start with GTK. As a novice, I can attest to that. It is true, just cause you can do object oriented programming in C does not mean you should. In fact I would not even call it a C based interface it really isn't for all practical matter (personally I think it's worse for it).

I don't know about other cross platform tools, but I would seriously consider the audience, and if there is no need to be cross platform, there are many advantages of going native. I have started down that path myself, trying to separate enough of the logic (in C using just libc et al, which is very portable), to have minimum interface components, that if needed, can be re-written Native to the OS interface.

You can also always do an html via web, but I never see those as serious applications.

the whole get_object* set_object* stuff just does not work. I ended up writing a lot of bloat trying to follow the mantra only to realize having a structure with members is ultimately much easier to code than calling a bunch of get/set_Object*.



> From: jralls ceridwen us
> Date: Sun, 24 Apr 2011 09:00:24 -0700
> To: gtk-osx-users lists sourceforge net
> Subject: Re: [Gtk-osx-users] Question about programs portability
>
>
> On Apr 24, 2011, at 8:10 AM, Tommaso Ricci wrote:
>
> > I have a question about gtk, i'm a new programmer and i'm in trouble with the gtk portability..
> > My question is: to run my gtk compiled application written in c my computer must have gtk installed??? For example if i give my mac-compiled app to a friend that as the same mac will he be able to run that?
> >
>
> Well, on OSX you include Gtk (and all of the other libraries that your application requires) in the application bundle. MS Windows users will need to install those libraries, so for that platform you'll use an installer program. On Linux the user will have to install Gtk+ and the other dependencies via the package manager if she doesn't already have them installed. This is equally true of all cross-platform frameworks.
>
> As I've written in the wiki, though, Gtk+ is not a good choice for new work if cross-platform portability is important to you. Although much improved over the last two years, Gtk+ remains primarily a Unix toolkit that happens (through a lot of hard work by nowhere near enough people) to compile and run on OSX and MS Windows. Qt and wxWidgets, which are designed and built with the primary goal of being cross-platform, are much better toolkits.
>
> Since you're new to programming, I suggest that you avoid Gtk+ for another reason: It's weird. The underlying premise is that it's possible, and therefore desirable, to write object-oriented code in pure C. Well, it is possible, but it's a bad idea, and you will learn all manner of very bad habits from taking that path. Instead, learn Python or Java, learn how to decompose problems into objects, and learn how to separate your application into models, views, and controllers. After you've practiced that for a few years you can come back to C/C++/ObjectiveC if you want to, and you'll be on much firmer ground for learning to use them well.
>
> If you want to continue this conversation, you'll need to join the list. The URL is tacked on at the bottom of each message after Sourceforge's ad.
>
> Regards,
> John Ralls
>
>
> ------------------------------------------------------------------------------
> Fulfilling the Lean Software Promise
> Lean software platforms are now widely adopted and the benefits have been
> demonstrated beyond question. Learn why your peers are replacing JEE
> containers with lightweight application servers - and what you can gain
> from the move. http://p.sf.net/sfu/vmware-sfemails
> _______________________________________________
> Gtk-osx-users mailing list
> Gtk-osx-users lists sourceforge net
> https://lists.sourceforge.net/lists/listinfo/gtk-osx-users






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]