Jump to content

How Often do you people use Native API's ?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
13 replies to this topic

#1
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts
Hi all i have nth to do right now so thought i open up this thread to ask you people how often do you use or do you use at all Windows Native API's and what is your thinking of Native API at all

Edited by kresh7, 18 September 2009 - 05:57 AM.

Posted Image

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
I have not used the native APIs at all. Then again, half the time I'm not even in Windows :)
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
ZekeDragon

ZekeDragon

    Writes binary right handed and hex left handed

  • Moderators
  • 2,103 posts
I don't use Windows native API's, mostly because I don't use any native API's but also because I don't have Windows. XD

Using native API's is a one-way ticket to non-portability. Why learn API's that aren't standard or cross-platform when you can just as easily learn ones that are? O_o Even if you can't use standards, there are tons of cross-platform libraries out there. Widget Toolkits, 3D Graphics, physics, Networking, multithreading, etc. can all be found in cross-platform libs.
Wow I changed my sig!

#4
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts
xD cause some Native API are just realy handly when ur a windows platform programmer but its up to everyone to use or not use Windows API
Posted Image

#5
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
All my Windows GUIs in C and C++ are done using the Win32 API.. Not very portable, but I like it that way. I don't write many GUI based apps for linux anyway.
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#6
TkTech

TkTech

    The Crazy One

  • Moderators
  • 1,396 posts
@ZekeDragon: Why would you load extra libraries and increase dependencies when you don't need 99% of the stuff in it? It truly isn't hard to learn how to write portable code. Have a separate project that implements all the portable backend code, and then create your UI code (which is almost always the least portable code) individually for each platform. You end up with a portable, size and speed efficient application.

For example, I wrote a MIPS32 emulator that emulates most of the hardware on a Malta board. The project is called SimpleMIPS, the backend (which is almost 100% portable, with very little platform specific code) is called libmips. When I get around to adding a UI, it'll likely be written in plain xlib or SDL for linux, and the native API on Win32.

#7
robster

robster

    Newbie

  • Members
  • Pip
  • 5 posts
I agree with the opinion that using Native API's is a non starter for me. You'll spend more time trying to figure out someone else's work then being productive yourself. Write your own code, rule number one in my book.

#8
TkTech

TkTech

    The Crazy One

  • Moderators
  • 1,396 posts
@ZekeDragon part two:

Quote

Widget Toolkits, 3D Graphics, physics, Networking, multithreading, etc. can all be found in cross-platform libs.

Widget Toolkits, sure, if the platform doesn't support its own native set (bastard linux.) 3D Graphics? Welcome to OpenGL, which is present on all modern platforms. Physics? Basic string physics don't take long to do yourself, but yeah, this is one area where depending on the use I would float for a lightweight physics library that supports hardware acceleration. Networking and threading are both easy and simple to make cross platform. Basic networking between Windows and *NIX's is almost identical, usually just a WSAStartup() and linking in a library. Threading is also very similar, probably the trickiest thing for newbies is figuring out how to do pause/resume with pthreads (mutext & context)

*rant done*

#9
stykat

stykat

    Learning Programmer

  • Members
  • PipPipPip
  • 31 posts
I like using Api's, and i used Win32, Sdl and OpenGL because i thought that i need to use the standards, but i rather play with the dos console, so i don't use api's too often.

#10
carly

carly

    Learning Programmer

  • Members
  • PipPipPip
  • 34 posts

ZekeDragon said:

Using native API's is a one-way ticket to non-portability.

You don't care about "portability".
98% of client market inside enterprises is Windows !

#11
debtboy

debtboy

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 916 posts

carly said:

You don't care about "portability".
98% of client market inside enterprises is Windows !
I think you misunderstood, he avoids using any native api
because he does care about portability, I on the other hand
don't care at all about portability.
Everyone seems to go overboard with trying to make "swiss army knife"
(no offense, Norsemen) applications that are everything, for everyone
on every platform which usually makes a bloated over-functional
app that no one uses.

As for the enterprise market...
Most all development inside enterprises is WEB BASED anyway.

#12
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Many many enterprise servers are Linux. Non-portable code locks you out of market share. Whether being portable is worth the increased market share is another issue :)
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog