Best compiled language for Mac OS X and Linux compatibility [closed] - objective-c

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
We need to write some software that will compile and run on both an Mac OS X server and Ubuntu. We would love to use Objective-C with all of its Cocoa goodness, however the GNUstep implementations of the parts we are using are broken (in the latest Ubuntu package anyway.)
In light of this should we use C++ (I would really rather not), C or something else that we have not thought of?
It is a server/back-end process that is very resource intensive, Java and other interpreted versions of this software perform much worse than the Objective-C proof of concept we have written, hence we now wish to re-write in a "compiled[1]" language.
(NB: Some people might consider this subjective, however at the end of the day we do need to get a job done, there has to be a reasonably appropriate correct answer here).
[1] Compiled to native CPU instructions, not compiled into "byte codes" that then have to be run by an interpreter.

I would implement the core business logic in C and take the time to write GUI wrappers native To each platform's code -- Objective-C /Cocoa and GTK/gnome or whatever.

What sort of software are you trying to create?
The most likely answer is C/C++.

I would recommend Objective-C for portability and ease of use. You don't get to use Cocoa if you want to run on Linux, but Objective-C is a really nice language and it let's you easily interface with regular C code.

Consider using Python. You can write applications that are native in appearance on both platforms with wxPython.
Python comes with Max OS X and Ubuntu desktop and your application can be packaged to look and behave like any other native application on either platform.

How about java?
And if you need some really native thing, you can always use JNI.

How about FreePascal maybe with Lazarus if you're interested in GUI development?

Assuming that you want to create an application with a graphical user interface, I think that C++/QT is the most likely candidate. I'm not aware of any other compiled[1] language with mature toolkit support on OSX and Linux.
By 'compiled' I'm making the assumption that you mean 'produces a native executable'.

I would vote for ANSI C or C++ coupled with POSIX.

Given the other answers below I think you need to make two choices
1) If you need a GUI not you need to choose the UI library either a cross platform one ee.g QT, wx etc or write different ones for OSX and Linux - Apples preferred way and I think gettting you the best look and feel on each platform
2) whether your application needs fast calculations as that could drive your language choice e.g. C++/C/Objective-C vs python
The two choices are separate as you can mix most GUI choices with different languages.

I would hazard a guess that C/C++ would be the most obvious platform independent languages.
(I would really rather not)
Why not? What sort of software do you plan on developing?

It depends on what you want to do. If you are looking for very high performance application, your options are C/C++. If you are looking for quick development, your options are Java/Python.

Related

MacRuby+IronRuby or JRuby for Desktop Applications? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
For Web Applications I use Ruby on Rails. And now it's time to see if I can code Desktop Applications with Ruby.
So I wonder which one I should choose.
The way I see it is MacRuby+IronRuby vs JRuby.
The former lets me have desktop applications for both Mac and Windows while the latter lets be have in both, but only learning one tool.
Is there strong arguments to use the former than the latter?
Will JRuby Desktop Applications be as native (or near-enough-native) as MacRuby+IronRuby Desktop Applications?
What are the pros and cons for each solution?
Im very new too Desktop development. Share your thoughts and experience!
MacRuby uses the native Apple Objective C stack.
Pros: Its class library is basically a wrapper for the Objective C GUI classes. You get fast native applications.
Cons: Only runs on Macs. They are not portable to the iPad or iPhone either (none of the Ruby solutions are).
IronRuby uses the native Windows .NET framework.
Pros: Use native WinForms to create rich native applications. It has access to the full .NET ecosystem of libraries.
Cons: Only runs on Windows.
JRuby uses the Java abstraction layer (JVM).
Pros: Multiple GUI libraries available. The most common ones are SWT and Swing. SWT uses native widgets and is faster and more native like. Swing is purely Java (emulated widgets) and is more portable. There are further libraries abstracting SWT and Swing to make them more Ruby friendly. Look at Profligacy for Swing for instance.
Cons: A layer above a layer above a layer. Swing and SWT are very mature but the Ruby layers above them are less so.
There is also another option
Ruby with the Qt library.
Qt is cross platform, uses native widgets and is written in C++. It is fairly fast but the library is complex and big.
My rule of thumb is the more complex your GUI is, the closer you should be to the native platform. You need to also evaluate the learning curve for each of these graphical libraries and the effort needed to port between platforms.
IronRuby just lots its main developer, so you may want to consider that one carefully. https://en.wikibooks.org/wiki/Ruby_Programming/GUI_Toolkit_Modules might help

cross platform development [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have questions on true cross platform development and if it is possible to use ONE platform to develop software.
I have a few applications that I write that work on OS X, Windows and Linux. They all use native platform toolkits with some shared source across platforms. I have to boot to each platform, checkout, compile, etc.
I have in the past tried GUI toolkits like QT (I bought a commercial license for Win, mac, Linus, but very expensive and paying it year after year became hard). I have tried WxWidgets, development moves slow.
So what I am thinking about is there a way to run a single platform and cross compile for other platforms so I can build my products from a single platform.
I favor OS X, is there a way to write apps for OS X, Windows, Linux from OS X where I just need to test on each platform respectively. I have found information on cross compilers, stub compiling, etc, etc.
Does anyone have any thoughts? Is this even possible? Would someone make a killing creating such a beast?
In my company, we use the Mozilla Framework to develop cross platform dictionary products. These applications are based on the Gecko/Necko Browser and most of the development is done via Javascript, HTML, CSS, XSL, XUL,... Of course, our homebrew Search engine had to be cross compiled to the three platforms (with some other code which was first done in JS and then ported to moz' C++ for speed reasons).
In the end, we have a reasonnably cross-platform solution: Our developers mostly work like power web-developers (think client and server side at the same time). Because the Gecko is the same on the three platform, we know it will predictably look and behave the same way (except when there are bugs, but the platform is now quite mature on this point of view).
Our R&D knows how to port slow javascript code to rather quick portable C++ code (you do Mozilla code using the NSPR library, a cross-platform lib). Testing has always to be done on the three platform however, although with time and experience, you get to know what will break where (Font support, Audio support, Flash Support)...
Today, you should probably have a look at XULRunner which is really the Mozilla without any real browser interface (in 2002, we had to dismantle the Mozilla Browser to repaint it in our first product colour). Of course, it works well for simple applications but if you wish to make OpenGL, 3D Audio and other nifty things, XULRunner will appear too limited.
I believe Blizzard has some cross-platform framework for that kind of thing... :)
Good luck!
Pierre.
Trying to develop applications on a single platform that will be used on many platforms isn't a good approach. At best you'll make applications which feel alien to users of the platforms that you didn't develop for.
More likely, you'll run into subtle compatibility problems in areas which you never forsaw. Java is probably the best way to go if you want to go down this route. Cross compiling will lead to autogenerated code that will be a nightmare to debug and maintain.
Certainly, you may be able to use tools for porting in some cases, but I don't think that this is a problem that you can just provide an automated solution for in general.
Well, to be honest, the only guaranteed way to build an app to be cross platform in one go is to use Java, but it requires a rather large runtime to be installed first.
However, if that's not an option, I would recommend keeping an eye on recent developments in Qt - it is now available (or should be soon) under the LGPL, which presumably means you don't need to pay for it anymore. Using GCC with Qt, I've found, works perfectly when cross-compiling on different platforms, as long as you only use Qt's classes/code/objects and make sure that any non-Qt code you create or use is capable of being compiled cross-platform.
You don't mention any specific programming language (but I'm guessing C or C++ because of the GUI toolkits), so it's kinda hard to give a good answer to what you are actually asking.
If you want "true" cross platform, I would first consider if it is possible to solve your problem using a language that is less platform bound. Python, Java and plenty of others allow you to write on one platform, and run on many.
If you still want to use C/C++, GCC gives you the option of cross-compiling, and if you combine that with QT (which will soon be available under the LGPL) you should be able to get something working.
Java has tried to do the write once, run anywhere. It works well in some situations, but there are too many "unique" things in an OS. GCC provided the ability to cross-compile applications, but you run into the same sort of problems. The code will just have better performance. The RIA approach seems to work, but it doesn't feel like a native application.
Even using a cross platform GUI toolkit will not remove all your cross platform problems. There's more to an app than GUI, after all. Cross compiling will never be able to catch all the issues that a native build will catch, either. If you're going to support multiple platforms, you're going to have to at least test on each platform. But hopefully you can perform native builds with all warnings turned on, in addition to testing.
In the past few months, I found a few great videos exploring this topic of cross platform development. I hope you find them useful as well.
QTCreator
http://www.youtube.com/watch?v=aYiPvM7ZRHA&feature=channel
FlexBuilder
http://www.youtube.com/watch?v=_O_xDXRsh3Y&feature=channel
Mono / MonoDevelop
http://www.youtube.com/watch?v=U6VG_Z0aRek
I've personally had success using Silverlight / MacOS X
http://screencast.com/t/if8xenkt
RealBasic
http://www.youtube.com/watch?v=GWipoBeKSRk
For Cross Platform Development you can use Phone Gap, Appcelerator (Titanium), Corona... This all provides a framework based on JavaScript and finally able to run on different platforms. What I am using is Titanium for Mobile Development which allows us to develop applications with Native Codes.... (which is very good advantage). Phone Gap is giving a web app which is not native in general... This softwares are used for development of cross platform supports... with support on Windows, Linux and Mac OS.
Based upon my personal experience, I believe you should adopt Java: you will avoid many headaches.
You develop in whatever platform you like and you deploy in all other platforms with no need of compiling for each target platform, as you mentioned.
For example, I develop under linux, I hit "compile" only once and the resulting file is ready to be run anywhere (windows, mac, solaris, z/OS, you name it). A double click will run it on any platform (Java runtime must me installed, but most users have it installed already and if not, it's a matter of downloading, installing, "Next>", "Next>", "OK").
If you choose the "Java Web Start" deployment method, it gets even easier: the user just clicks the launch button on a webpage and the application runs (if the proper JVM is installed according to what specified in the JNLP descriptor) or the user gets redirected to the Java download page (if no suitable JVM is found).
GUI development (with Swing toolkit) is easy and powerful, especially if you use the right tool (i.e. Netbeans IDE).

Good language & framework for cross platform (windows & mac) desktop application [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
The last cross platform desktop development I did was Java/Swing. What about flex?
Don't do it. If you need to go cross-platform, write the main guts of your application in a business logic layer that doesn't depend on any GUI framework and then use the native platform API to finish each app.
Your users will thank you.
I'd choose an open alternative and I'd try to avoid vendor lock-in.
As Richard said, "if you've mastered Java/Swing why not use it again?"
I've used RealBasic from RealSoftware for a few things just to play with it. It can get expensive if you need the pro version. It will allow you to build a stand alone binary for Linux, MacOS X, or Windows. I'm more of a server side guy but it was pretty straight forward to create the few tools I wanted to try making with it.
Qt
I'm a big fan of wxWidgets. My only experience with it is with C++.
A combination of Python, wxPython, py2exe and py2app is what I typically fall back on. I've recently had a run with AIR, and it isn't that bad.. so Flex might work for you.
Flex/AIR is a platform with a lot of potential.
It's also a lot prettier than anything Java or .NET.
I personally use Tcl/Tk because it is remarkably powerful and because deployment is a non-issue (with starkits and starpacks you can wrap all program resources -- images, sounds, dll/.so files, etc -- into a single executable file).
Tcl's not for everyone though -- some people find its simplicity a little hard to grok.
Ignore Flex it's not programming IMO. If you can code Java I'm pretty certain that FLex will be a disappointment. Flex has a place, I don't really consider it a proper programming environment.
If you've mastered Java/Swing why not use it again? I would.
.NET can be portable - but IME it's not quite as easy to move stuff about as it is with Java (although it is better than it used to be).
Also, does it have to be desktop - I would seriously consider (a properly architected) rowser based desktop application.
Eclipse RCP works. The result is decent on Windows and acceptable on Mac. It tends to be sluggish on Mac because of the high memory requirements though.
C# with Framework .Net can be good not only for Windows but for Linux with Mono.
Microsoft have a CLI that work on MAC OSX10.2.

Portable Programming IDE [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
Frequently I'm brainstormed with programming ideas that I would like to directly code. More or less like "Wow, that algorithm will rock! I need to write it now!".
For this kind of "impulse" to write, I use http://www.jarte.com/ that is a cool portable text editor. If I'm near a cybecafe or a friend computer, I just plug the usb pen drive and start to write...
So, I would like:
1) a portable minimalist IDE
2) with minimal OS requirement (ie.: I want run from XP, Vista, etc...)
3) any modern language (I can learn a new language if needed. I just want write/test the algoritm)
4) Syntax Highlight/intellisense is good, but not required
5) Free
Is there something like this?
Eclipse isn't "minimalist", but it does work installation-less. So as long as your USB key, or whatever, is large enough, you can put Eclipse in there and be ready to go.
alt text http://sts.bkukr.de/l-davoss/blog/Lists/Blog/Attachments/21/SharpdevelopPortable.jpg
Sharp Develop Portable:
Dave blogged all you need to know to get you started!
C# support on the run, and much, much more.
Please have a look at ideone.com - supports 40+ langugages
Well, IDEs are often better suited depending on the programming language you want to use. I'm not really sure if you're looking for a text editor or an IDE, but:
As far as I'm concerned, I'd use:
Java: Eclipse (though not very minimalist)
C/C++: vim and g++, Code::Blocks
Ruby/Python/Perl: vim + interpreter
TextMate (best editor ever) on Mac OS X ($39.99) and e editor (Windows' TextMate equivalent)
I also find NotePad++ to be a decent text editor, very minimalist.
Some people are crazy in love with emacs, you might want to check it out.
You can also carry NetBeans on your USB drives: http://nbide.blogspot.com/2008/03/portable-netbeans.html and http://nbide.blogspot.com/2008/04/portable-netbeans-part-ii.html
I'm late to the game, but a something worth mentioning is Squeak Smalltalk, or one of its derivatives like Pharo or Croquet. No changes to the registry or OS, no installers, no Services, no Admin rights needed, and only a few files needed- a full install in half a dozen files.
1) binary and source portable code; nice IDE, but with a minimalist disk footprint (5-50 MB)
2) Runs on almost any OS- one cross-platform binary image and a small virtual machine executable for each platform- one for 95/98/ME/XP/2k/XP/Vista/7/2003/2008; one for WinCE, one for OS X, one for Linux x86, etc.; (0.5-2 MB) for each platform. You can even boot onto bare metal, if you're hardcore.
3) It's Smalltalk. Birthplace of most buzz-worthy Ruby features...
4) Syntax Highlight and some level of intellisense is good built-in.
5) Free as in speech and beer.
Smalltalk isn't for everyone, but it's my personal fave. The fact that I can use the same binary image on my XP desktop, Linux server, iPhone and WinCE PDA without recompilation is a great bonus.
Emacs + a compiler/interpreter sounds like what you want.
For C/C++, DevC++ works off of a usb drive. It runs off of XP, and I believe Vista as well (never tried that). It also has syntax highlighting.
Only problem is (I'm assuming this) is that it doesn't work for other languages.
I frequently use Firefox + Firebug when I want to quickly hack together something.
You may be looking for vim. Now, it won't be easy to learn how to use vim, but I'd count it time well spent. This is an unix utility that has been ported to basically every architecture and operating system see Portable GVim for the portable version. For info on using vim as an IDE, see here and here
i use Instant rails with netbeans from my stik
(source: bluej.org)
Try BlueJ (Running BlueJ from a USB (thumb) drive).
Other alternatives;
Snippet Compiler
(source: sliver.com)
CodeIDE an online IDE.

Most rapid RAD environment for prototyping [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What do you consider the most rapid RAD environment for a working prototype? Not for debate.
language
platform
IDE
DB
(personal note)
Thank you.
P.S.1 I was pretty happy with PERL for back-end prototyping... I get stuck when dealing with the UI... it doesn't seem to come as easy...
It's all pretty subjective I guess, but as you asked 'what do you consider', so...
Delphi 7 onwards (technically object pascal or Delphi language, I guess)
Windows 2003/XP
version 7 is the classic, newer ones don't seem as easy to prototype stuff in (to me)
SQL Express
in comparison I've used VB6, MS VC++ (from a long time ago), FoxPro/Windows and Visual FoxPro, and a very small smattering of VS2005 (C#). For me, Delphi is the all-round king every time. :-)
For prototypes on Windows, Visual Basic is hard to beat. If you need to suppoort another platform (or multiple platforms), then Tcl/Tk is fairly productive, as well.
I've always considered Perl to be my prototyping language of choice, for a few reasons:
CPAN - There's a module for just about anything.
It's easy to create hacks to mimic, fake or do something quick and dirty.
It works everywhere.
I think "most rapid" is heavily subjective. A developer with many years in VB will likely be fastest at prototyping in VB. A Java developer in Java. Ruby in Ruby. The "most rapid", then, is going to be heavily skewed by the assets (code libraries, developer experience and tools) you already have in house.
What you define as a "prototype" also heavily affects things. Is a set of pseudo-working screen shots mocked up in Flash to have some clickability for navigation enough? What is the required feature set and what is the target audience for the prototype?
As you can see "best" is going to vary pretty widely. It's probably close to certain that the language will be high-level and the IDE tools are going to have nice UI designers (assuming the prototype has a UI). If you have a lot of DB work, then database wizards that do the SQL grunt work for you will save time and generate reasonable, if not optimized, objects. The platform would likely be whatever platform the prototype should be for - after all prototyping a Windows app under Linux or a Symbian app under Palm OS probably won't give you too much benefit.
VFP is great for prototyping. I've seen posts (sorry, don't have links) from Microsoft teams where they say WPF allows fast prototyping for them.
Enthought Python Distribution. You create the model of your problem in python and then you say "create a UI for that" in one line of code. If you don't like some parts of the UI, you override the defaults for those parts (and nothing else).
Doesn't get faster than that if you're doing a Desktop app.
The resulting prototype will work on Windows, Linux and Mac.
If you're looking for a web RAD, I suggest to give Grails or TurboGears a try. TurboGears is easier to use, Grails gives you access to the vast space of Java web frameworks (hard to beat).
I'd say Python with wxPython
I find that prototyping using the Netbeans GUI builder gives me a great start. I'm a Java programmer mostly though.
Try out Axure RP Pro.
We did give it a try and found that it to be really very good. It generates the whole prototype in HTML with a few JavaScripts so it becomes easy to distribute prototypes.
Do check it out.
Handcraft
When you prototype any GUI interactively in the browser, you can go from as low or high fidelity as you want. Handcraft is focused exactly on prototyping, so it does a whole lot less than IDE's intentionally.
For working prototype:
non-gui: python
gui: ruby on rails
For mockups don't use IDE but some specialized mockup tool, read this here on SO: Whats the best way to create interactive application prototypes?
For hybrid approach (mockups then code): QT designer is the only viable option I found, due to it's specific architecture
There you go.