Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Coder's Corner Lounge (http://www.programmingforums.org/forum11.html)
-   -   General programming question (http://www.programmingforums.org/showthread.php?t=15690)

Jabo Apr 24th, 2008 6:26 AM

General programming question
 
One of my teachers in college, who I would tend to respect her point of view because she had a job in the programming field, said that it shouldn't matter what Windows OS you made your program on, it should run on other Windows platforms. For example, this was during our capstone project, there were 2 of us, and he was using VB 6.0 on XP, and I was using VB 6.0 on Vista, and I brought up the question of compatibility issues with our code on the different OSes. She said it shouldn't matter from a develpment point of view which OS you use.

I guess the only difference would be in the compiled code, right? Wouldn't different OSes have different api's and such?

Narue Apr 24th, 2008 7:41 AM

Re: General programming question
 
>She said it shouldn't matter from a develpment point of view which OS you use.
In an ideal world it shouldn't matter, but portability is a tricky beast. For any non-trivial program, unless you code for the lowest common denominator and the OS is geared toward backward compatibility, you're going to have at least some portability issues.

>Wouldn't different OSes have different api's and such?
Yes, though let's say you use the Win32 API to write your program and you only use parts of the API that were available from Windows NT, you're solid all the way up to (and including) Vista. As long as you stick to a subset of the API that's available on all of the target systems, the differences aren't a problem. You simply don't introduce them.

So even though you're on Vista, you should program as if you were on XP and all will be well. Hopefully that's what your teacher was trying to summarize.

Ooble Apr 24th, 2008 7:24 PM

Re: General programming question
 
It's probably important to note that if you're just coding for class, the chances of you actually using any Vista-specific libraries are very low, even by accident. Your program just won't be complicated enough to need them.

lectricpharaoh Apr 25th, 2008 4:17 AM

Re: General programming question
 
It also depends on what programming language you're using, and whether you're writing native code or not. If you're writing native Win32 code in, say, C++, then you need to be careful which API functions you call. If you're using one of the .NET languages like Visual Basic or C#, you're unlikely to run afoul of portability issues unless a) the machines in question have different framework versions (targeting v2.0 seems a safe bet these days, and v3.0 is becoming more common) or b) you are calling into native code via p/invoke (in which case the native code functions must be supported on your target OS).

Jabo Apr 26th, 2008 11:58 AM

Re: General programming question
 
Thanks guys


All times are GMT -5. The time now is 7:42 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC