Security, cost-savings, performance and innovation are the primary reasons to move to Linux, says Novell Linux developer evangelist Darren R. Davis, stating what is to him the obvious. Rather than dillydallying with that question, he’d rather help IT shops and developers get moving to Linux. Davis explains how to port Unix and Windows applications to Linux and how to make those Linux apps support multiple distributions in this interview.
1->Port to standard APIs
2 ->Compile and package for distribution 2
3 ->Compile and package for distribution 3
4 ->Compile and package for distribution 4
5 ->Compile and package for distribution 5
6 ->Compile and package for distribution 6
7 ->Compile and package for distribution 7
8 ->Compile and package for distribution 8
9 ->Compile and package for distribution 9
10 ->Compile and package for distribution 10
11 ->Compile and package for distribution 11
12 ->Compile and package for distribution 12
13 ->Compile and package for distribution 13
14 ->Compile and package for distribution 14
15 ->Compile and package for distribution 15
16 ->Compile and package for distribution 16
17 ->Compile and package for distribution 17
18 ->Compile and package for distribution 18
19 ->Compile and package for distribution 19
20 ->Compile and package for distribution 20
21 ->Compile and package for distribution 21
22 ->Compile and package for distribution 22
23 ->Compile and package for distribution 23
24 ->Compile and package for distribution 24
25 ->Compile and package for distribution 25
26 ->Compile and package for distribution 26
27 ->Compile and package for distribution 27
28 ->Compile and package for distribution 28
29 ->Compile and package for distribution 29
30 ->Compile and package for distribution 30
31 ->Compile and package for distribution 31
32 ->Compile and package for distribution 32
33 ->Compile and package for distribution 33
34 ->Compile and package for distribution 34
35 ->Compile and package for distribution 35
36 ->Compile and package for distribution 36
37 ->Compile and package for distribution 37
38 ->Compile and package for distribution 38
39 ->Compile and package for distribution 39
40 ->Compile and package for distribution 40
41 ->Compile and package for distribution 41
42 ->Compile and package for distribution 42
43 ->Compile and package for distribution 43
44 ->Compile and package for distribution 44
45 ->Compile and package for distribution 45
46 ->Compile and package for distribution 46
47 ->Compile and package for distribution 47
48 ->Compile and package for distribution 48
49 ->Compile and package for distribution 49
50 ->Compile and package for distribution 50
51 ->Compile and package for distribution 51
52 ->Compile and package for distribution 52
53 ->Compile and package for distribution 53
54 ->Compile and package for distribution 54
55 ->Compile and package for distribution 55
56 ->Compile and package for distribution 56
57 ->Compile and package for distribution 57
58 ->Compile and package for distribution 58
59 ->Compile and package for distribution 59
60 ->Compile and package for distribution 60
61 ->Compile and package for distribution 61
62 ->Compile and package for distribution 62
63 ->Compile and package for distribution 63
64 ->Compile and package for distribution 64
65 ->Compile and package for distribution 65
66 ->Compile and package for distribution 66
67 ->Compile and package for distribution 67
68 ->Compile and package for distribution 68
69 ->Compile and package for distribution 69
70 ->Compile and package for distribution 70
71 ->Compile and package for distribution 71
72 ->Compile and package for distribution 72
73 ->Compile and package for distribution 73
74 ->Compile and package for distribution 74
75 ->Compile and package for distribution 75
76 ->Compile and package for distribution 76
77 ->Compile and package for distribution 77
78 ->Compile and package for distribution 78
79 ->Compile and package for distribution 79
80 ->Compile and package for distribution 80
81 ->Compile and package for distribution 81
82 ->Compile and package for distribution 82
83 ->Compile and package for distribution 83
84 ->Compile and package for distribution 84
85 ->Compile and package for distribution 85
86 ->Compile and package for distribution 86
87 ->Compile and package for distribution 87
88 ->Compile and package for distribution 88
89 ->Compile and package for distribution 89
90 ->Compile and package for distribution 90
91 ->Compile and package for distribution 91
92 ->Compile and package for distribution 92
93 ->Compile and package for distribution 93
94 ->Compile and package for distribution 94
95 ->Compile and package for distribution 95
96 ->Compile and package for distribution 96
97 ->Compile and package for distribution 97
98 ->Compile and package for distribution 98
99 ->Compile and package for distribution 99
And you’re almost done porting to the 30,000 Linux distributions!! Good job champ
1->Port software to standard APIs
2 ->Compile and package for distribution 2
3 ->Compile and package for distribution 3
4 ->Compile and package for distribution 4
5 ->Compile and package for distribution 5
6 ->Compile and package for distribution 6
7 ->Compile and package for distribution 7
8 ->Compile and package for distribution 8
9 ->Compile and package for distribution 9
10 ->Compile and package for distribution 10
11 ->Compile and package for distribution 11
12 ->Compile and package for distribution 12
13 ->Compile and package for distribution 13
14 ->Compile and package for distribution 14
15 ->Compile and package for distribution 15
16 ->Compile and package for distribution 16
17 ->Compile and package for distribution 17
18 ->Compile and package for distribution 18
19 ->Compile and package for distribution 19
20 ->Compile and package for distribution 20
21 ->Compile and package for distribution 21
22 ->Compile and package for distribution 22
23 ->Compile and package for distribution 23
24 ->Compile and package for distribution 24
25 ->Compile and package for distribution 25
26 ->Compile and package for distribution 26
27 ->Compile and package for distribution 27
28 ->Compile and package for distribution 28
29 ->Compile and package for distribution 29
30 ->Compile and package for distribution 30
31 ->Compile and package for distribution 31
32 ->Compile and package for distribution 32
33 ->Compile and package for distribution 33
34 ->Compile and package for distribution 34
35 ->Compile and package for distribution 35
36 ->Compile and package for distribution 36
37 ->Compile and package for distribution 37
38 ->Compile and package for distribution 38
39 ->Compile and package for distribution 39
40 ->Compile and package for distribution 40
41 ->Compile and package for distribution 41
42 ->Compile and package for distribution 42
43 ->Compile and package for distribution 43
44 ->Compile and package for distribution 44
45 ->Compile and package for distribution 45
46 ->Compile and package for distribution 46
47 ->Compile and package for distribution 47
48 ->Compile and package for distribution 48
49 ->Compile and package for distribution 49
50 ->Compile and package for distribution 50
51 ->Compile and package for distribution 51
52 ->Compile and package for distribution 52
53 ->Compile and package for distribution 53
54 ->Compile and package for distribution 54
55 ->Compile and package for distribution 55
56 ->Compile and package for distribution 56
57 ->Compile and package for distribution 57
58 ->Compile and package for distribution 58
59 ->Compile and package for distribution 59
60 ->Compile and package for distribution 60
61 ->Compile and package for distribution 61
62 ->Compile and package for distribution 62
63 ->Compile and package for distribution 63
64 ->Compile and package for distribution 64
65 ->Compile and package for distribution 65
66 ->Compile and package for distribution 66
67 ->Compile and package for distribution 67
68 ->Compile and package for distribution 68
69 ->Compile and package for distribution 69
70 ->Compile and package for distribution 70
71 ->Compile and package for distribution 71
72 ->Compile and package for distribution 72
73 ->Compile and package for distribution 73
74 ->Compile and package for distribution 74
75 ->Compile and package for distribution 75
76 ->Compile and package for distribution 76
77 ->Compile and package for distribution 77
78 ->Compile and package for distribution 78
79 ->Compile and package for distribution 79
80 ->Compile and package for distribution 80
81 ->Compile and package for distribution 81
82 ->Compile and package for distribution 82
83 ->Compile and package for distribution 83
84 ->Compile and package for distribution 84
85 ->Compile and package for distribution 85
86 ->Compile and package for distribution 86
87 ->Compile and package for distribution 87
88 ->Compile and package for distribution 88
89 ->Compile and package for distribution 89
90 ->Compile and package for distribution 90
91 ->Compile and package for distribution 91
92 ->Compile and package for distribution 92
93 ->Compile and package for distribution 93
94 ->Compile and package for distribution 94
95 ->Compile and package for distribution 95
96 ->Compile and package for distribution 96
97 ->Compile and package for distribution 97
98 ->Compile and package for distribution 98
99 ->Compile and package for distribution 99
[etc]
And you’re almost done porting to the 30,000 Linux distributions!! Good job champ
Or just do a static build and don’t worry about about it.
Or….write it in Java….run application anywhere…
If you believe that, then Sun has marketed correctly.
Or….write it in (any other emulator)….run applications anywhere.
KDE or Gnome or whatever. I don’t even know why they bring up the desktop. Linux on the desktop has failed and will always be a failure because there is no Linux operating system.
You’ve got Linux, the BSDs, and Solaris for servers and that’s fine. Novell needs to concentrate on where they can make money, and the desktop isn’t one of them. People that want Unix on the desktop have already moved on to OSX.
You are absolutely right. You know, there are individual packages for each distro for OpenOffice, Mozilla Suite and applications, Adobe Acorobat Reader, Real Player…..erm…wait a second….
Write your code to ONLY use call that are supported on ALL the platforms you want to run on.
wrt Windows, install Services for Unix as their posix interface seems to have gone from their default install.
I do this all the time in C. 98% of my code runs unaltered on Windows, Solaris, Linux & VMS. I expect other platforms would be not a great problem to port to.
The big problems lie in the area of the GUI. Pretty well, the only language that has this ability on different platforms is JAVA even though its performance sucks when using Swing or SWT as your GUI interface..
My starting point with any S/W development is to think outside the box that it is initially aimed at and in all cases, try to write the application in a way that it can be ported to several different platforms without difficulty.
thats my 0.2rbl take on the subject.
Use a GUI library like Qt or wxWidgets
Security, cost-savings, performance and innovation
Every reason listed is going to depend on the application.
A couple of them are kinda funny.
Cost savings? If you consider porting to be cheap I guess.
Innovation ? I’m not sure I’d call porting a program to another platform to be innovtation.
The article is well written however and does provide some basics for people interested in porting, at least the basics on where to look for more answers.
Too bad Kylix is dead. Although Borland really got it wrong from the start: way too expensive, binary compatibility issues, no real static linking, etc.
I heard Kylix build applications have problems running under current Linux distros – if binary abi problems are that prevalent, I’d rather not invest in Borland too…
“Too bad Kylix is dead.”
I too love Pascal, Delphi and related languages… And now, we have Lazarus!
It’s a very nice RAD based on FreePascal (if you know Pascal and or Delphi you will not have difficulties in using it) to build cross platform application (win, lin, bsds, darwin) using native graphic systems (so, quite performing and coherent with the rest of the GUI).
For low level programming, FreePascal performances are good, for the GUI work Lazarus is a nice environment and is reasonably similar in look to the Delpi/Kylix RAD, without (too bad) graphic libraries issues that plagued those environments!
The website is http://www.lazarus.freepascal.org/
definitely worth a try, and it’s still growing!
“Write your code to ONLY use call that are supported on ALL the platforms you want to run on.”
You are right until you have not to deal with system objects.
In example, you make a number crunching program using libraries implemented on all systems supported by your developing environment. You will not have problem regardless the language you chose (ehm… excepting for thikdifferntness… excuse me, endianness, but only for few months only thanking macintel switch!).
Now, save the file configuration to… wait! Register? Nice, but will work only on Windows. File? Maybe you want the file to be not accessible by all users, so you must place the file here in Win, there in that *x, here in that other *x, there in Amiga and so on…
Or, think to case sensitiveness issues, or if you program have to deal with filesystem at low level, or if it should launch shell scripts that does more securely and more efficently what you shold rewrite from scratch…
In many cases you must rely on conditional compilation or seriously downgrade your program features to a minimum common between different systems or seriously make your program more complex to reinvent a “system independent” weel…
Generally this is possible but it’s not trivial to make a program platform independent also if written with languages with libraries supported on different platforms.
Kylix is that, all hail the new king, Lazarus.
See http://www.lazarus.freepascal.org
It runs on windows/linux/osX and the motto is write once and compile everywhere. Not perfect yet, but then again it’s beta.
Does anyone else see an article about porting software to the “innovative” linux to be a little ironic?
Linux has always been a Frankensten-system of pieces ported from elsewhere.
> Does anyone else see an article about porting
> software to the “innovative” linux to be a little
> ironic?
Knowing that both comments will not be there for a long time: You are right and the Linux platform is not innovative. The Linux platform has its advantages, but it is not innovative. It is much harder to develop for because tools like Visual Studio are still missing, and many innovations from other platforms take months, if not even years to be copied to Linux. There is no innovation in the Linux platform, but still, Linux has its advantages.
Linux has always been a Frankensten-system of pieces ported from elsewhere.
Which is innovative in and of itself.
“Does anyone else see an article about porting software to the “innovative” linux to be a little ironic?
Linux has always been a Frankensten-system of pieces ported from elsewhere.”
So what’s not innovative about that? It’s true that Linux and Linux apps and utilities are written by people from all over the world, and that’s where it gets its strength from — a huge pool of programming talent, an environment where changes, bug fixes and improvements happen in a relative split second…not just a homogeneous, stagnant corporation that hasn’t innovated anything in years.
“The big problems lie in the area of the GUI.”
That’s why WxWidgets is your friend!
“Now, save the file configuration to… wait! Register? Nice, but will work only on Windows. File? Maybe you want the file to be not accessible by all users, so you must place the file here in”
Wx takes care of more than just GUI crossplatform stuff. Wx has a configuration object that encapsulates the registry on Windows and a file on unix. Wx also has objects for DDE servers, threads, and a number of other areas of crossplatorm incongruity.
Also since Wx is wrapping native stuff with a common API, your stuff runs natively fast as it compiles on multiple architectures, unlike java.
“Wx has a configuration object that encapsulates the registry on Windows and a file on unix.”
And Wx can understand if the file or the registry key should be public or root-private or user private?
And does it test if exists and what is the more fit between various analogous paths that may exist in different *x flavours?
I don’t think so… neither does authors:
“An open source C++ GUI framework to make cross-platform programming child’s play. Well, almost.”
Cross platform programming is certainly feasible but it’s not trivial, at least the programmer should carefully consider to make a little of experience on target system if the program deal in some way with privacy or security.
Wx is certainly a good product but i’ll not scream to the miracle, it just works (very well) as a “API replicator” a’la wine (more or less), adding to a system Wx API, that you will call with your program.
It’s a clever and performance wise thing, but it assumes that the users will install the API since the program will be compiled for that API, that’s different to compile a binary that will work on a plain user’s sistem without asking it to install.
(btw, I’m strongly oriented to an utopistic real API unification and I think Wx is really a good example of how things should be in the IT world).
Wx is certainly a good product but i’ll not scream to the miracle, it just works (very well) as a “API replicator” a’la wine (more or less), adding to a system Wx API, that you will call with your program.
It’s a clever and performance wise thing, but it assumes that the users will install the API since the program will be compiled for that API, that’s different to compile a binary that will work on a plain user’s sistem without asking it to install.
You can easily fix that by simply linking statically. The binary will get a bit bulky, but nowadays people don’t really care.
wx rocks – I can even compile windows executables of my applications on my development machine (which runs linux) using the mingw cross-compiler.
“You can easily fix that by simply linking statically.”
Well, you have to link statically a lot of things if you want the application to contain everithing it need without installing the framework and to run without a single call to the sitem’s API!
At this point, if someone have a lot of Wx applications, it worts to install the framework in order to not have any single Wx application to be statically linked to everithing it need!
And it doesn’t resolve the problem of privacy and security (i.e. paths, temp files, conf files, std in and std out): if your software have to deal with it (you will not install everithing as root or admin, I hope!) you shuold study the targhet system’s architecture and build a conditional compiling code that will proprly fit in the targhet system’s. You won’t suppose that Wx replace the system’s user right and memory protection management!?
And, more, it does not prevent the problem of reinventing the weel, you may find useful to launch platform specifical shell scripts, commands, access the browser and ports… repeat, don’t expect the application layer to replace the system layer of security management, don’t expect Wx convert a shell script in a language fit for all existing shell of all possible target system…
“wx rocks – I can even compile windows executables of my applications on my development machine (which runs linux) using the mingw cross-compiler.”
I agree, it rock. But you are compiling for Wx, not for the target system.
And that leaves forementioned problems open:
– you have the user to install the API, or it will not work, or you have to link everithing that the application will call, that’s huge (well, if desktop user’s doesn’t care it’s quite infeasible for embedded environment with limited resources, also if we don’t think to extreme like smartcards, or S40 cellphones with 64KB limit for binaries and few megs of main memory);
– Wx cannot replace system layer security model, for a nontrivial application you will probably still need the system to protect ports, files, paths, so you should carefully study the target system to undertand how it woks keeping users information protected and separated;
– even at application layer level Wx cannot replicate everithing platform specifical that you may find useful like shells, browsers, utilities, firewall etc and you should write platform conditional code in order to mimic the functionalities.
Wx is a great thing, if used properly (or, right, for applications that doesn’t have those issues), but if you use an hammer for cutting a tree instead for hammering nails, it would work poorly.
access the browser
In fact, wx includes a `wxLaunchDefaultBrowser’ function .
you have the user to install the API, or you have to link everithing that the application will call, that’s huge.
Actually, it’s not that huge: a small wxWidgets application I wrote (http://pathalizer.sf.net ) is linked statically and the binary is only 2.4MB – that is possible because when statically linking, only the parts that you actually use are included. But I can imagine if you’re working on embedded systems and have a lot of wx applications you’re better of linking dynamically.
And of course you’re right: if you want to use platform-specific features, you’ll have to write some conditional code (which is a matter of some #ifdef’s).
There are lot’s of options available. Of course, it all depends what the project is about.
For GUIs I personally go with wxWidgets or Qt, both are excellent toolkits. Swing isn’t so bad as well, but Java can be difficult to deploy depending on the target audience.
For non-GUI stuff, good old C mostly works, and there are Python, Perl, Ruby, Java etc.
Finally we got OpenGL, SDL, OpenAL etc. for the gaming needs.
When selecting the right tool for the job, cross-platform development actually is not overly difficult. The real problem is that the majority of Windows-only programmers are mostly unaware of and unfamiliar with these tools. Hence, they often keep rolling out Win32-only software. It isn’t about the lack of available cross-platform toolkits, it’s about getting out of old habits.
small correction:
1.) Linux is perhaps not as innovative as it should be but it is still more innovative than any version of Windows that has been released so far.
2.) Linux does need better development tools but IDEs like Anjuta or kdevelop already rival the tools available for Windows such as Visual Studio and tools like Glade don’t even exist for Windows.
yes, Linux does need to become more innovative and, yes, it does have its advantages.
> 1.) Linux is perhaps not as innovative as it should be
> but it is still more innovative than any version of
> Windows that has been released so far.
LOL.
Geeez, I don’t really see how porting an application from unix (let’s say FreeBSD) to Linux would make things cheaper?
In fact I’d say moving applications to Unix is the way of costs, compatibility and efficiency assuming all distros need their own version of the software.
Another hype article perhaps? Did IBM sponsor it?
I am not sure how much you can actually save by porting from UNIX to Linux but there are likely some saving associated with it.
On the other hand porting from Windows to Linux can lead to tremendous savings e.g. our company was depending on one particular application that was only available for Windows. We decided to port it to Linux rather than keep running it in an emulator or VMware and it turned out a great investment. Since we have moved to Linux on all of the desktops last year we’ve already saved thousands in licensing fees and maintainance expenses and the only larger exspense was porting one piece of software.
Why would you need to migrate your applications from one platform to the other? You don’t gain anything porting a Unix application to Linux and you won’t get the same appearance or behavior moving from Windows to Linux. Its simple keep applications on the native platform they were written for or perform the best on.
Yeah, why would anyone want to jump ship? Proprietary UNIX isn’t expensive and not doomed at all in the long run, right? And if Windows was a house the needed security-measures wouldn’t be the equivalent of massive searchlights lightening up the whole block, and an armed guard every square-meter? Why would anyone want to leave that?
“Why would you need to migrate your applications from one platform to the other?”
– Merging with a company with different machines and systems;
– Ceased or insufficient or costly or otherwise disvantageous support for commercial systems (DOS, Win9x, Netware, Mac OS Classic, old proprietary *x) without rewriting the application from scratch;
– Consolidation in less new machines with new hw and s.o. without having to rewrite from scratch, cutting licensing and maintenance costs;
– Consolidation of IT knowledges porting as many application as possible (and as reasonable) on the same hw and s.o. cutting support cost;
– Eradicate the nightmare of sudden supplier failure since it’s possible to jump on a new hw or s.o. supplyer;
– Eradicate the nightmare of bad organization: “Haven’t I told you to port the application from y to x last mont? Gee, we are switching to x right now!”
I.e. the IBM itself made AS/400 (now i5) a virtual system over any hw (decided by IBM, since it’s closed).
This is a good example of advantages of thinking in a platform independent way, IBM write low level layer for new hw i can switch to more powerful hw and continue to run the same application that calls the highest level layer. I was, and is, a success, so consider that is a fact that an user doesn’t like to lose his software and really wants a s.o. or a kind of support or a programming made thinking to portability that allows him, not the vendor, to decide when cease to use a sw.
And more, for swhouses point of view, programming cross platform is a desiderable way, in order to reach more possible customers using different systems, and have ready products if market become oriented in a different way or if new niches open (ie handhelds, cellphones, embedded devices…).
No, this should be “Porting Applications From Windows and Unix to … Unix”
Seriously. Linux, BSD, Solaris all largely share the same APIs, X Window System, etc. Just write to UNIX, like back in the old days before Windows. It’s better, though, as there are fewer UNIX systems to target, now.
Hell, even OpenGL works across all these platforms (Mesa, at least) and OpenAL, too, so, games developers, where are you?
Well, it’s not all so simple!
Many compilers (rightly!) see Linux, Darwin, each BSD and other single *x like different target… that should say you something about binary compatibility of *xes!
Moreover, programming for the same *x you can also encounter other problems:
basically if i do something not self-contained:
– had the user/root customized paths?
– had the user/root customized libraries?
– had the vendor or the distro packager boy customzed something?
if i do something with GUI interface:
– what desktop environment i’ll find?
– how does the d.e. resolves path and autocomplete strings? (KDE and Gnome are hilariously different in those things!)
and if i don’t want to reinvent the weel each time:
– if i launch complex shell scripts, what shells will be available on the target system?
– if my program calls networking features, what standard browser, mail client, firewall… should i expect?
– and so on
So, it’s not so simple…