Discussion:
what is porting?
mkbo2000
2006-01-27 11:17:13 UTC
Permalink
I am new to programming world plz tell me
what is porting?
how it is done?









Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/bcslug/

<*> To unsubscribe from this group, send an email to:
bcslug-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Archis Gore
2006-01-27 12:35:02 UTC
Permalink
Porting is, simply put, the process of moving code
from one platform to another (while making sure that
it works on the target platform also :).

The idea is simple. Take, for instance, code of
Firefox (due to the recent thread), and simply copy it
on a Linux box and compile it. Then move the same
source tarball onto Solarix and compile it
(configure+make). It should work fine.

How is it done? The simplest bare-bones extreme
programmer's approach:

1. Take the code.
2. Copy it onto the target.
3. Compile
4. Find compiler errors
5. Fix them
7. Goto step 3

A more methodical approach involves first identifying
system-dependent modules before coding and keeping a
clean separation between them and the
platform-independent code. Then, when you have to port
it from say, a Linux box to a Solarix box, you simply
write the system-dependent modules for a Solarix box
and the code will recompile with ease.

What makes Java so popular apart from its binaries
being platform-independent is that it is also
late-binded. This means that porting from one library
to another library is simply changing the classpath.
This means that whether you're using IBM's Swing or
Sun's Swing, the program needs no modification.

Another interpretation of moving from one platform to
another platform is moving from one environment to
another. For instance, porting may not necessarily
mean moving between processors or operating systems.
It may also mean moving between databases on the same
platform (although this is generally called
Migration). Here again, the database-dependent modules
are encapsulated and isolated in the form of JDBC/ODBC
drivers called middleware. This helps porting a lot.
You simply port the middle-ware and stuff works out of
the box (not literally though).

Porting in a more business environment (we learnt this
recently in MIS) may also mean social acceptance. We
studied cases where a great product in Europe was not
accepted in the US due to social differences in
interfaces. This is also another form of porting. This
is the real money-making porting. If you can write
code whose core doesn't have to be changed every time
the on-site customer demands a change in the
interface, you've hit upon a goldmine. That's what the
FOSS companies mostly do. They have a core knowledge
base in Banking, Accounting, Credit Cards, etc. They
use this knowledge and code and port the stuff. Note
here that the closed source companies lose out on this
advantage. They cannot port the code from one client
to another because of a bunch of non-disclosure
agreements and the fact that each client "owns" the
codebase. This means increased maintenance costs,
multiple patches, etc. The FOSS-based porting service
providers can apply a common security patch across all
their customers.

All this social stuff apart, when we use the word
porting on LUG mailing lists or FOSS websites, it
generally will mean the former one
(platform-to-platform).

One of the good sides of portability combined with
free software is the speed with which it reaches the
masses. When stuff like Itaniums or the new
much-publicised Machintosh with Intel chips come, MS
or Apple will have a hard time porting their code
where as once the assembly-language system-dependent
module of the Linux kernel is ported and a C cross
compiler is written, Linux and all the stuff on it may
just be a matter of a week's worth of recompile.

I hope this helps.


Yours sincerely,
Archis
Post by mkbo2000
I am new to programming world plz tell me
what is porting?
how it is done?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/bcslug/

<*> To unsubscribe from this group, send an email to:
bcslug-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Loading...