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
Related
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
With the recent updates to Sencha Touch, it's looking more and more like a native app for iPhone and even iPad. There are still many differences and the documentation is a little lacking at the moment.
My question is, given that I am already fully capable of creating native app in Objective C, should I switch to Sencha Touch and PhoneGap, or start integrating those tools?
What are the pros and cons?
EDIT:
Thanks for the insightful points. One of my partners wrote up their opinion over the weekend with some ideas that haven't been mentioned here: Web vs Native: How Should You Write Your App?
Pros:
Easier to port to other platforms.
You can distribute outside the App Store if the app doesn't require any native APIs.
Cons:
Scrolling still doesn't feel quite right with any of the web-based touch frameworks.
Slower (hardware-accelerated CSS animations help, but it's not nearly as flexible as Core Animation).
Lacks full access to native hardware and OS-integration (PhoneGap provides some, but not everything), such as:
Push notifications.
Local notifications.
Background location updates (including significant location monitoring).
This is debatable, but in my opinion Cocoa Touch is easier to develop in than JavaScript + Sencha/XUI/etc.
Questions leading to your own answer:
Do you need the raw performance of a native ARM app? Or do you need an API that's only available to Objective C? (For instance, for real-time audio synthesis, etc.) Do you want to use Apple's latest APIs without waiting for some tool or library vendor?
Do you mind that your javascript source code in visible unencrypted inside every customer's .ipa file?
Or do you want to easily port a simpler app cross-platform?
Pros: None
Cons: It will never be as native as a
native app. And you depend on an API
that isn't yours, eg. all your apps
will be useless once they stop
maintaining their API.
However, if you were unexperienced and only needed to make a App for a short event (upcoming movie promotion, etc), this would be perfect as it would save you time. But well, if you want a App with a longer lifecycle, go native.
Forget the details of comparing these frameworks to native apps, native will always win. If your app needs to run on "multiple" platforms, then you are better off using PhoneGap and a javascript framework. These frameworks are going to take awhile to mature, so you'll have to figure out if you can get by on what they offer now. PhoneGap is also open source, so if there is something native that you want to expose, contribute to the project.
I'm trying to build a dual platform application for a company of my own I'm trying to start at night.
I have the .NET version done, but have not finished the UI part. I'm thinking of buying some 3rd party controls.
If I buy these controls, however, they clearly will only work in my Windows version. I'm wondering if I should try to do the UI in GTK# and use Mono with CocoaSharp or just build the thing in MS technology and teach myself the Mac side?
I'm just really unfamiliar with the Mac world and am wondering how much of a learning curve there might be.
I've thought perhaps of rewriting my core logic in Ruby or Python. This why I could use the .NET version with .NET controls and presumably hook the same code up on the Mac.
It's an educational app targeted at consumers. As such, it shouldn't require a lot of technical sophistication to install.
If the non-visual part of the .NET application is quite big compared to the UI, then you can go full .NET and adopt the following two-steps strategy:
Non-Visual Part
Develop the non-visual .NET part to be the most platform independent.
Platform dependent code for non-visual code should be isolated in small classes that provide the same interface so they could be plugged according to the platform.
User Interface
Use System.Windows.Forms (or your favorite toolkit) for Windows
Use a Cocoa bridge (see this page for the choices) for Mac OS X.
You still can benefit from learning Objective-C: as the Cocoa bridges are usually heavily based on the Apple's API, you will find a lot of help in the Apple's sample code (which are in Objective-C).
On Windows, the application will run with the Microsoft .NET runtime and on Mac OS X, the application will run with the Mono runtime.
The DeepMeta application uses this strategy. As you can see the user experience is quite good on both platforms.
Avoid using cross platform UI tools; the result will never be as good as a native implementation, which is especially bad on the OS X where most customers expect a certain level of polish in their applications. Implementing the core logic in a platform independent language like C++ and maintaining a different code base for the interface on each platform can be a good solution, especially if you have a very complex model.
Anyway, you shouldn't have too much difficulty learning Cocoa if you're a good .NET programmer; I did the reverse several years ago and didn't have much trouble. Objective-C is more C oriented than C#, but if you know the basics about pointers and such you're going to be okay. Cocoa and .NET definitely have their differences in certain areas, but they're both high level frameworks which you shouldn't have too much trouble understanding. Get a good book (Hillegass is the go-to author) and go through it so you understand how the two APIs use different design patterns in certain areas, and don't try to fight the framework if it's different than what you're used to.
In my experience this will make you a better programmer in the long run by expanding your knowledge, even if you don't write any more Cocoa applications.
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.
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).
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.