Cross Platform Tips, Tricks & Gotchas [closed] - cross-platform

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
If you've worked on a cross platform development project what advice do you have for someone (like myself) considering starting one? Examples:
What worked?
What didn't?
What problems did you run into and
how did you solve them?
Did you aim for consistent appearance
and functionality across all platforms
or try to take advantage of each platform's strengths?
What language and cross platform libraries did you
use and did they live up to their claims?
Was it a desktop, mobile or web-based application?

I worked on a small cross-platform project. The app was a desktop app, distributed directly as an executable on USB.
Did some research initially - you might be able to trace my stackoverflow questions - and settled with Mozilla's XULRunner.
It worked really well in terms of being cross platform - you're basically running off a well cross-tested platform that runs firefox and thunderbird, so the crossability (is that a word?) is pretty bullet proof.
Its first flaw I thought was the documentation - there is a lot out there, but it's a bit obscure at first.
But then, the mozilla forums community is awesome, really friendly and helpful.
In terms of development, it's all javascript and a bit of html-like marker language called xul and styling using css (you can also build extensions in c++ if you need, but the core is pretty powerful as it), so it's pretty familiar right away and pretty flexible too.
XUL gives a good platform-specific native feel to the apps (IMO), or you can re-do entirely your chrome elements and make a custom ui.
One major gotcha with XUL is that because of the way XULRunner works, your source code will be more or less pretty much viewable by anyone. If you have proprietary code this may not be ideal for you - or you will need to isolate in a separate library written in c++ (XPCom components in Xul terms).
I'd highly recommend it. I had a pretty short turn around time frame to build the project and it really saved my ass. I did the development on a Mac, and it worked right away on PC without any major change.
Additionally, there was other platforms that I reviewed for this project.
I've seen some strong support for cross platform UI kits & languages like QT (with PyQT for instance), or tcl/tk and such. I wasn't too taken by it but you might want to look into it.
Some people suggested AIR, JavaFX and .NET/Mono. For me this wasn't viable as it's too much of a dependency on some systems (XP doesn't come with Java, Mac doesn't come with .NET/Mono, neither come with AIR). If you want something that will just work out of the box, that doesn't fit the bill. But your requirements may be different.
Titanium (from Appcellerator) is probably the closest contestant to XULRunner. It seemed great, quite powerful but the desktop development edition has pretty awful debugging features compared to XULRunner. Their agenda is more toward the mobile dev edition, which I can understand, but I wish they'd care more for the desktop edition. However, if cross-platform mobile development is what you're after this may be good - though I haven't tested it for that purpose.
Hope this helps.

Related

pragmatic cross platform (and very fast to make it - actually - work) "throwaway" code: which language/tools? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
my development style brings me to write a lot of throw-away "assisting" code,
whether for automatic generation of code parts, semi-automated testing, and generally to build dummies, prototypes or temporary "sparring partners" for the main development; I know I'm not the only one...
since I frequently work both under windows and Unicies, I'd like to non-exclusively focus on a single "swiss army knife" tool that can work in both the environments with limited differences, that would allow me to do usual stuff like text parsing, db access, sockets, nontrivial filesystem and process manipulation
until now under unix I've used a bit of perl and massive amounts of shell scripts, but the latter are a bit limited and perl... despite being very capable and having modules for an incredible array of duties, sincerely I find it too "hostile" for me for something that goes beyond 100 lines of code.
what would you suggest?
scripting is not a requirement, it would be ok to use more static-styled languages IF it makes development faster (getting programs to actually do their work and possibly in a human readable state) and if it doesn't become nightmarish to handle errors/exception and to adapt to dynamic environments (e.g. I don't like to hardwire data /db table structure in my code, especially by hand).
I've been intrigued by python, ruby, but maybe groovy (with its ability to access the huge class library and his compact syntax) or something else is better suited
thanks a lot in advance!
(meanwhile, on a completely different note, scala looks really tempting just for the cleanliness of it, but that's - probably - a completely different story, unless you tell me the opposite...?)
Python is arguably one of the best choices. Its biggest benefit is that it has a huge built-in library for doing all sorts of stuff. It is also mature, very cross-platform, actively developed, and has many support options (mailing lists, newsgroups, etc).
In addition, it has a built-in GUI toolkit (tkinter) for those times when you need to write a quick GUI to get input from a user or display output from a running process. And if you don't like tkinter, there are other cross-platform GUI toolkits available.
I suggest Python.
For me it has a sweet spot of good libraries, documentation, community, cross-platform functionality, and ease of writing/reading.
It fills a similar niche to Perl's, but if you find Perl to be 'hostile' for longer scripts, you will probably like Python, especially when compared to Ruby, which feels more Perl-y, IMHO.
As an aside, all of these are quite easy to just try out - why not do that?
Then you can decide for yourself instead of trusting the questionable wisdom of an online forum (:
I think that Python and Ruby are your best bets, depending on exactly how you think and code.
I personally find Python EXTREMELY readable and its syntax is highly intuitive. I've heard Python described as "pseudo-code plus colons."
On the other hand, once you get around its slightly bizarre syntax, Ruby makes for high-speed development. It's built around DRY principles and convention-before-configuration, which is great for rapid prototyping.
There are other languages--especially Haskell and the Lisp dialects--that can make for super-rapid prototyping, but they don't have as large a supportive community, so there's a shortage in library and discussion supply.

What technology should I use to write my game? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have a great idea for a 3D network game, and I've concluded that it is possible to write it in Java as an applet which will live under the web browser, just like a full software in C++. And it will look and feel the same.
The main advantage of Java on C++ is that with Java you can play without downloading any software. I have already thought about the download of the graphics, sound, etc but I found a solution for it. RuneScape just proves that it is possible.
So my first question is, should my game live on a web browser or on the operating system? I think that in a web browser it is much more portable, although you need install Java and stuff. But the fact is, that most MMO games are currently not in the web. If you suggest in a software so please suggest a language either - C++ or something more productive like Python or C#?
So after choosing a language, I need a graphics solution. Should I write directly with OpenGL/DirectX or use a game engine? What game engine should I use? Ogre? jMonkeyEngine?
What's your opinion?
Thank you!
P.S: Please don't use answers like "Use what you know".
Despite your last point, use whatever you can, and what will provide the biggest user base possible.
Applets are old, and no longer used as extensively as they used to. Flash or Silverlight are the "standard" for web games now. It may be worth checking out JavaFX based your interest in using Java, it's supposedly a replacement for what applets should have been. I've not actually used JavaFX, nor do I hear much about it, take that as you wish. The biggest benefit of deploying to the web is as you've said, the user base is larger and people are more likely to give your game a play. The downside is that you end up using the likes of Flash or equivalent for the development process.
If you go down the route of building a standalone application, you can use whatever you want. C++, Java, C#, Python and so on are all viable options. You can make games in most languages. C++ is the industry standard but ignore this fact. You can make amazing looking and performing games in any language if you are a hobbyist developer. What I'm trying to say is that unless you are building the next big hit, using C++ can be avoided. In contrast to web applications, your users will require a framework/API that you use. For example, they'll need OpenGL/DirectX/XNA and so forth. As for XNA vs DirectX vs OpenGL? It matters not, your language choice will most likely dictate your choice of graphics API/Framework. So I'll leave this point up to yourself for research.
As for should you use an engine? It depends.
Are you making a game which is complex enough to warrant an engine?
Do you wish to just focus on the game, rather than the engine?
Do you feel comfortable learning an existing engine?
Do you feel comfortable producing the required components (collision etc..) on your own?
Other factors come into this, but it may be worth just focusing on the game at hand. You can easily write a simple enough engine for what you require. By doing this, you'll avoid licensing and deployment issues.
One option to consider is the Unity 3D game engine - in addition to being a fairly powerful development tool, it has several cross-platform deployment options. You can build both a stand-alone executable (for Windows and Mac, not yet Linux), and a web-browser version, which answers your first question about deploying on the web versus OS. You can do both.
It also uses both Javascript and C# (and Boo, a variant of Python) for scripting languages. These are based on Mono, the Open-Source version of .NET, so it's not just a gaming platform, but has access to all of .NET's abilities (well, those implemented in Mono anyway).
See the Licensing page for a long list of Unity's features (the Basic version is free). And check out the list of Unity-based games, of which the first is Tiger Woods PGA Tour Online, by Electronic Arts.
A game that just runs as an applet will not be percieved as a real game to most hardcore gamers.
If you want a game that is played only by noobs, the java might be an option, otherwise drop it and stick to a language that allows to actually produce executables.
Talking about the library, there are not so many you can't try them all and chose the one you like the most, so... do just that.

What was the most advanced stuff you did with compact framework [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
At work I use mostly the .NET Compact Framework 3.5 for developing applications that run on smart devices. Our devices are not phones or handhelds - they are measurement instruments which you get with a whole punch of features. Our application is pretty advanced - we are even using a N-Layer architecture, a self-made GUI framework and even dependency injection (we built our own as the ones other there are not lightweight enough).
So what's the most advanced things you did with the compact framework?
What's currently missing (for example a mocking framework, as there is no Reflection.Emit on compact framework)?
How are you developing your applications? Are you deploying your application every time to the device. In our case this is very slow, as the solution consists of 30 projects so we have a Win32 Version which runs on the PC.
We've done a plant-floor monitoring system that acts as a data server and a web server collecting data from PLCs and creating dynamic web-based reports all in the CF. We've created a peer-to-peer notification and file sharing system. We've done vehicle tracking and dispatching systems. We've done smart-farming applications that monitor loads of data from a tractor and couple that with location and previous year data, plus quite a few others. So I guess you could say de've written several highly-complex things using the CF.
There are lots of "missing" pieces, but most can be worked around. The most obvious missing piece that can't be worked around is the lack of EE Hosting. Reflection pieces for mocking would be nice, but we can live without - it just makes test more of a bear. The lack of Hosting makes several things simply impossible.
As for deployment, it's all about configuration. The Smart Device Framework itself, when coupled with all of the unit test stuff, is something like 45 projects. Deploying isn't bad as it only recompiled and deploys changes, and I often adjust the configuration of test applications to not deploy all projects, but only the main one. That should auto-deploy all references (eliminating the double-deploys you're probably getting). Also having all projects output to one common directory and setting "Copy Local" to false improves things quite a bit too.
One of the most useful things we do with our .net cf application is work hard to make sure that they can be re-targeted to the full framework. This means you have a second desktop project or a unit test that actually runs your entire application on the desktop. There is a bit of work to do if you are using device specific functionality via pinvokes or device only APIs, but the effort usually pays off because:
You can quickly run/debug your application without having to wait for an emulator or device to spin up
You are forced to architect your code in a way that device specific functionality can be mocked and tested
In many cases you are part way to having a desktop version of your application as well as the device version
It probably goes without saying that in the end, testing will need to be done specifically on the device, but during development and the quick code/debug cycles it is really nice to not wait on the emulator. I remember Daniel Moth posting something about how to actually create a device deployment target that is your desktop computer to achieve this same effect. Maybe someone else can find a link?
I have done Win CE app for industrial PDAs for route sales from pre-loaded inventory and clients list. It gets GPS coordinates, uses scanner to collect data, transmits data over GPRS/EDGE of sales made in the device. The app also prints a receipt (linked to protable printer ober BT).
I wrote an app that monitors the statistics on my self-made blog by interfacing with a WebService.
I have developed a multi-language dictionary. Using one code base on Windows, PDA and via MONO on unix and MAC.
Basically the application is complicated because we use multiple databases that are large. We were able to tweak the data access performance and lookups on large tables are almost instantaenous.
Small devices are not very powerful, but if you design for the way they work you can get good performance out of them.
I made an app to collect measures of any magnitude (for weather), using an n tier app, with MVC and using db4o as a database... Pretty impresive

Are open source automated testing tools and frameworks better than commercial products? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
About three years ago I switched from using commercial testing tools to using an open source testing framework (WatiN), and a UI automation framework I developed myself.
Since doing this I think life is much better using these libraries and Visual Studio, than expensive dedicated testing tools with either their own languages, or VBA.
Are open source automated testing tools and frameworks better than commercial products
Or do expensive commercial automated testing tools such as WinRunner, QuickTest Pro, Testpartner etc ... still have a future?
It's hard to make that sort of determination for a generic category like "testing tools". Usually, it's best to evaluate both the commercial solution and the open source solution on a case-by-case basis. From the wording of your question, it sounds like you've found the open source solution a better fit for your needs.
However, there are some points you can use in your decision making process:
Commercial Tool Benefits:
Support - usually, the company is paying people to support the product. In addition, many commercial companies offer support contracts for various levels of support. If you need support in a crunch, commercial support is the way to go.
Open Source Tool Benefits
Price - pretty obvious...it's hard to compete against free
Openness - open source projects tend to adapt open standards more readily than commercial products (a lot of commercial products also adapt open standards, but open source software tends to do so more frequently).
Self-support - If your company allows it, you can fix the bugs you find in the tools yourself. No need to wait for a third party to get around to fixing them.
It's also worth mentioning that a lot of the commercial testing tools are built on their open source counterparts. If that is the case, then you might be better off going with the open source versions, unless you need the added support.
I think you'll find that commercial products and Open Source products tend to have similar feature sets. In other cases, they may solve the problem with completely different approaches. Again, you'll probably want to make the evaluation for every case.
PyWinAuto is a great open source tool to automate thick client or windows based standalone apps.
I got the experience, that tools for developers are the first and best class of software adopted in open-source. So you can see a big amount of great testing-tools in OS. So I think in most common environments you have test-frameworks in OS that work very well. But I do not code in every environment, so maybe you want to say which language/technology you use, and we can mention some good tools (OS or commercial).
All commercial tools have some +s's and -s's.
Not all of them can be considered as an exact fit in an automation environment which an AUT requires.
I have worked with all the big names it all depends on the automation Engineer how well He/She understands the concept and leverages the tool to the fullest.
Last 5 years I came to the conclusion it is high time we divorce these Commercial tools and go after Open Source Why?
I can customize the Open source to my needs.
I know where and what went wrong and at the same time know how to fix it.
I can customize things to the extent required write from planning to the execution to Reporting is in our control as automation engineers so creativity plays a role to implement the needs of the organization and the individuals who are affected by the automation testing.

Best tool for Software System Diagramming [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Over the years, I have tried many times to find a good, easy to use, cross platform tool for some basic software system diagramming. The UML tools I have tried seemed to get in my way more than help. So far, the solution I keep returning to is Visio, which is both Windows-only and expensive. Although its far from ideal, it does provide some basic building block and allows things like grid placement and zooming. I wanted to see if there is a great tool out there that I'm just missing that fits at least some of the criteria mentioned.
Graphviz FTW!
What could be more hardcore than writing a text file to convert into a diagram etc...
GUI, we don't need no stinkin' GUI!
You could try DIA, though it is a bit basic it will keep out of your way when doing pure diagrams.
http://www.gnome.org/projects/dia/
Well, I guess you mean for Windows. Otherwise for the Mac, nothing I know can beat OmniGraffle. Not only it is so easy my grandmother could use it, it can actually make really "beautiful" diagrams. It is really not too expensive (version 5 is now $99, but older ones used to be less than $40; still got a cheap one) and it can do it all, network diagrams, flow charts, UML digrams, UI mockups, etc. The app is clever, it thinks for you in a way, e.g. it will detect that you try to align objects on a line or have equal spaces between them and offer you hinted drag'n drop to make sure these criteria are met. As I said, it's really easy to work with OG.
And it can even also existing Xcode project (the standard Mac IDE for programmers) and automatically generate graphs from your source code. A complete UML chart by just pulling your Xcode project onto the icon :-) I guess it would be great if they could port that to Linux or Windows, but I'm afraid it will never happen.
Enterprise Architect (http://sparxsystems.com) is the best and very affordable.
I've used Edge Diagrammer... It does what you want simply and quickly. Supports grid placement and zooming. It's Windows-only, and it's gotten more expensive than I remember, but still cheaper than Visio.
I like Visio
If you have to use software, Visio is my favorite. (I get it for free through my school's CS program)
But... I find the best tool out there is a 17" x 11" sketchpad, sure it's made for artists but nothing beats a massive piece of paper for figuring out design problems.
The most productive diagramming, in my experience, is done on the whiteboard.
I capture in Visio, though, it has more tools and shapes than anyone else, and you can extend it to do code generation.
Sometimes I use yEd. It is a Graph Editor, but it is perfectly able to be used as a diagramming tool.
MagicDraw is quite good IMHO.
The best free solution that I'm aware of is Dia. It's marketed as a casual Visio replacement.
There's also Kivio, which I've heard good things about but haven't personally used. That one's multi-platform and free.
I use Violet UML Editor for most of my diagrams. It's not cluttered with code reverse engineering and code generation features and makes creating elegant simple diagrams very easy. Best of all it's free.
TopCased http://www.topcased.org/index.php
BOUML: http://bouml.free.fr/index.html