We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

portability issues

aeigo
aeigo asked
on
Medium Priority
361 Views
Last Modified: 2010-04-21
What are the issues of portability on Unix and NT?
 I want to make a my code portable on Unix as well as windows platform.
Comment
Watch Question

Commented:
None, you can write code in UNIX and just recompile it in NT and it will run immediately and viceversa.

Author

Commented:
one line answer
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Actually i didnt had any points I lost all in my first question

Commented:
Now about portability, well they are the obvious things:

The GUI is different, so you should isolate in different functions the routines to handle the user interface from whatever your program does.

The calls to the OS should be kept at a minimum, and when needed you have to isolate them, so you can include the adequate one.

Any possible hardware dependant functions should be treated similarly.

Be careful with the lenght of the word (32 bits? 64 bits?).


I could write a book on this topic.

Before we can help you, you will have to give us some details of the type of applications you are thinking of porting:

Which language(s) are you using?
Is it a single program or a complex system of intercommunicating modules?
Does it consist of lots of different components written in different languages or integrating lots of different tools?
Do you use a GUI?
Do you use an RDBMS?
Client/server architecture?
Will it have to run in a heterogeneous (mixed NT/UNIX) network?
Is it a single program or are their lots of communicating modules?
Is it single or multi-user?
Do you have any porting tools available?
Do you have any emulation libraries?
What platforms does your application(s) currently run on?
What platforms do you wish to port it to?
Do you have lots of money to spend?
Do you have lots of porting experience in house?

Well, those will do for starters.

Author

Commented:
to
braveheart
I could write a book on this topic.

Here is some Information

language(s) used is  c++
Its a complex system of intercommunicating modules
Do you use a GUI?  No gui


Client/server architecture?  yes

Will it have to run in a heterogeneous (mixed NT/UNIX) network?
yes It has to run on Heterogenous Network.
Is it a single program or are their lots of communicating modules? Lots of communicating module
Is it single or multi-user?  Multiuser.
we are not porting previously built code. deeloping portable code
but we are developing a portable code.
Do you have any emulation libraries? no.
Do you have lots of money to spend? no .
Do you have lots of porting experience in house?no experience.


When designing an application that has to be portable between NT and UNIX, probably the most important consideration is the availability of equivalent libraries on both platforms. This is particularly true in the communications area.

Having no GUI makes porting easier as I presume that any communication with a user/controller will be via a text-only interface which will require very little massaging.

However, all your communication stuff is likely to be non-portable. You might like to look at the remote procedure call and external data representation functions on UNIX (man rpc, man xdr), assuming that there is an equivalent library available on NT (you may have to search the public domain for this). Note that these are not trivial to use but they will simplify problems of different sizes or byte order (endian-ness) of different data types on different machines.

If you are using raw TCP there may be libraries to help you. Perhaps GNU have something appropriate.

If you communicate by, or store information in files perhaps your network has shared disks, using "samba" or "PC-NFS" or something similar.  Is file locking between different processes or users an issue?

Your application sounds quite complex for people with no porting experience to tackle, especially if you have no money. Let's hope you have lots of time.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.