Slashdot Mirror


Microsoft Simplifies API for Longhorn

zzxc writes "InternetWeek.com reports that Microsoft is cleaning up its API and integrating its XML Application Markup Language for its anticipated Longhorn release. An unnamed source says that Microsoft will be slashing the number of API calls from 76k to 8k. In addition, the new graphics device interface, codename Avalon, will use XAML-based scripts instead of a complicated API. Microsoft is planning on including XAML design in the next Visual Studio.net release. CRN is also reporting on this."

61 comments

  1. Just one more thing and I will be happy. by bonsai_kitty · · Score: 1

    While fewer APIs is good, I would like to know if anyone has heard if Longhorn is going to be open sourced like MS did with CE.

    --
    Computer science is a grab bag of tenuously related areas thrown together by an accident of history, like Yugoslavia.
    1. Re:Just one more thing and I will be happy. by MonTemplar · · Score: 1

      While fewer APIs is good, I would like to know if anyone has heard if Longhorn is going to be open sourced like MS did with CE

      Do you really need to ask that question?

      Windows (x86, Win32) is one of their cash cows. CE most definitely ain't - yet. You figure out the rest.

      --
      -MT.
  2. What happens to compatibility? by Hanashi · · Score: 2, Insightful
    I'm all for slimming down the Win32 API. It's monsterous, and a simplification would be of great benefit in the long run. But what will happen to application compatibility in the short term? I guess executable code that calls the "old" API won't run on Longhorn? If that's true, how will users know in advance which of their programs will run?

    Comments from anyone with insight on this are very welcome.

    --
    Check out my eclectic infosec blog at InfoSecPotpou
    1. Re:What happens to compatibility? by MonTemplar · · Score: 1

      I have a feeling that they'll use some of the stuff they acquired from Connectix to provide a Compatibility box to run older Win32 apps in. Let's face it, they won't shift many copies if customers can't run their existing applications on it...

      --
      -MT.
    2. Re:What happens to compatibility? by etherlad · · Score: 1

      While I'm all for backwards compatibility, you can only keep it up for so long. Backwards compatibility is probably one reason the current API is so freakin' huge.

      I can't run my old Sierra games, either, but thanks to efforts like DosBox and FreeSCI, that doesn't matter.

      'Sides, I'm sure someone'll come up with a Win95 emulator somewhere along the line.

      --
      Soylens viridis homines es
    3. Re:What happens to compatibility? by RevAaron · · Score: 1

      I really doubt that. Connectix's technology would require running a virtualized machine on top of the regular PC running another version of Windows with the full API. Yes, there could be modifications, like with Classic on Mac OS X, to streamline and integrate this, but it seems a bit excessive...

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    4. Re:What happens to compatibility? by Joe+U · · Score: 1

      I don't see why Microsoft can't just run win32 and this new api together, that's part of the kernel. (Remember, Win16, Win32, OS/2 and Posix support were done this way)

    5. Re:What happens to compatibility? by mrlpz · · Score: 1
      It'll be deprecated. Consider that in the move to Win32 ( O those 11 years ago !! Has it been that long ? ) there were many API's that were lost along the way, and then there were those who were "left for compatibility" purposes.

      My guess is that the API will still be there, but that it will remain for "Unmanaged code" to utilize. After all, over 99.9% of applications today are "unmanaged", and it took a few years for all that 16-bit code to be "unthunked" ( remember that phrase ? ) into running strictly 32-bit, so I suppose it'll take a few years for most "unmanaged" code to be ported a managed environment (if it is AT ALL!). And it is for those, that the API will remain as it is today.

      What I suspect is that despite only 8000 "managed" API's will exist, the actual functionality will migrate from being an API function to a glut of scripting instructions.

      It's like my Dad always said...if it goes in...it's gotta come out sometime...and SOMEWHERE.

    6. Re:What happens to compatibility? by spitzak · · Score: 1
      If they are smart, they will emulate the old interface atop the new one, and release the code that does it. By putting it above the new interface they guarantee to the software developers that they are not losing any functionality or speed by switching to the new interface. And by releasing the code they provide a trusted source for instructions on how to convert their programs to the new system, and this code is enormously more useful than any documentation in showing how the new interface works.

      I expect they will screw it up however. They probably won't release the source to the emulation layer, which means lots of software will use the old API for a LONG time. The real problem is that some program will fail with the emulated API and they will decide to do it "beside" the new API, rather than on top. Then everybody will discover that if you use the old api, or some weird combination, it works better (or at all) and then they will be stuck with not 8K calls or 76K calls but 76K+8K or 84K calls.

    7. Re:What happens to compatibility? by hargettp · · Score: 1

      Is it excessive? That's exactly what Microsoft did when it moved the industry from DOS to Windows 3.0: DOS became just another application running in it's own VM. Of course, in those early versions, one VM could still actually screw up another VM, but with NT, they got it right and wrapped all of 16 bit Windows in a VM. Both users and developers had the option of launching each 16-bit app in it's own VM (i.e., its own copy of Windows 3.x) or in a single system-wide VM shared with other 16-bit apps.

    8. Re:What happens to compatibility? by RevAaron · · Score: 1

      Except DOS in tiny. Win95 is not. A virtualized DOS machine takes up very few resources, disk space, RAM, and CPU. Even when running a number of them in one windows sessions. A Win95 session would double (or more) the requirement for RAM for Longhorn and have other effects.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  3. How much to learn? by ClosedSource · · Score: 2, Interesting

    "Win32 has like 76,000 APIs, and they're taking it down to 8,000 with Longhorn technology"

    The question is will they be adding 100,000 new things to learn in AXML in order to replace the 68,000 lost APIs?

    1. Re:How much to learn? by superdoo · · Score: 2, Funny

      No, they'll only be adding 65536 new things. After that they get an overflow in MSAPIOBF.DLL, the Microsoft API Obfuscator API.

  4. Re:Oops? by ClosedSource · · Score: 1

    Make that "XAML" not "AXML". One down, 99,999 to go.

  5. Re:Cool. by borgboy · · Score: 1, Funny

    Gosh it's so cool to bash MS. I bet you even have a leg to stand on. I bet you can name over 10 Win32 APIs, huh? Hmmmmm.

    --
    meh.
  6. Nice Step by 4of12 · · Score: 3, Insightful

    OK, so are they really doing away with those old interfaces, or just pretending they're not there, not documenting them, etc?

    I'd be impressed if the API was condensed into 8k well-documented routines that completely spanned win32 functionality. Like, if another company were to provide the same 8k routines they could, albeit with less performance, run any and all win32 applications (on different hardware, under different OS, etc.).

    --
    "Provided by the management for your protection."
    1. Re:Nice Step by MonTemplar · · Score: 0

      Like, if another company were to provide the same 8k routines they could, albeit with less performance, run any and all win32 applications (on different hardware, under different OS, etc.).

      Something tells me that the cost of getting access to the source code will rise in inverse proportion to its decrease in size... *grin*

      --
      -MT.
    2. Re:Nice Step by MORTAR_COMBAT! · · Score: 1

      You don't need the source code to implement a set of clean, well-documented API.

      --
      MORTAR COMBAT!
  7. Codenames? by etherlad · · Score: 1

    Somewhat offtopic, but...

    Why does Microsoft feel the need to code-name everything before its official release? I mean, we know the OS will be called Windows 2003 or Windows QF or something. Why does it matter to them that we don't know exactly what it'll be called?

    Ditto with their GDI and such. I just don't get why they have to play sekrit agent.

    --
    Soylens viridis homines es
    1. Re:Codenames? by MonTemplar · · Score: 1

      Why does Microsoft feel the need to code-name everything before its official release? I mean, we know the OS will be called Windows 2003 or Windows QF or something. Why does it matter to them that we don't know exactly what it'll be called?

      Probably because Management are paranoid about Developers talking about their work to one another outside of the office, and others picking up on the conversations if the words 'Microsoft' and 'Windows' crop up.

      --
      -MT.
    2. Re:Codenames? by SteveX · · Score: 1

      Codenames make it so developers can work on (and talk about) a product without it continually changing names during it's development cycle. When they say Everett they mean "whatever the next version of Visual Studio is going to be called when it's released" (well it's released already).

      - Steve

    3. Re:Codenames? by Anonymous Coward · · Score: 0

      Ever hear of Debian??

    4. Re:Codenames? by Anonymous Coward · · Score: 1, Interesting

      This practice is not limited to Microsoft. Sun, Red Hat, Apple, IBM and many others do the exact same thing.

  8. Just when you thought you'd learned it by DrSkwid · · Score: 1

    As usual they come along and pull the rug from under you.

    Give me a 30 yo Api any day

    in fact just give me "everything is a file" and mean it

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:Just when you thought you'd learned it by Anonymous Coward · · Score: 0

      Yeah, creat is so well named.

    2. Re:Just when you thought you'd learned it by spitzak · · Score: 1
      in fact just give me "everything is a file" and mean it

      Plan 9 has I believe 17 calls in their interface. Compared to this, MicroSoft's new 8000, or Linux's several hundred, is pretty bad.

    3. Re:Just when you thought you'd learned it by andrewski · · Score: 1

      Just like with NextStep! Oh, wait, that not right at all!

  9. Microsoft formula for simplification. by duffbeer703 · · Score: 1

    Replace 60,000+ API calls with a multi-gigabyte unintelligible MS-XML compatability transformation layer, force everyone to either code the Dot-Net way or suffer awful performance.

    Sounds more like a move dictated by MS lawyers to undo the leftover damage from the antitrust lawsuits than a decision with technical motivations.

    --
    Conformity is the jailer of freedom and enemy of growth. -JFK
    1. Re:Microsoft formula for simplification. by Anonymous Coward · · Score: 2, Insightful

      From a technical standpoint, slimming down the APIs makes some sense. The current APIs have so much redundancy and useless code that it makes it very difficult to learn and manage.

      Yes, compatibility will take a hit, but sometimes you have cut losses and move on. Apple did the same thing when they developed Carbon. Their job was a bit easier because Apple only had to remove 2000 APIs. Apple realized that those APIs were hindering their advancement.

      One smart thing that Apple did do was ease the transition by designing both Classic and Carbon to work together in the same box.

      While I have no doubt that reasons other than technical helped MS make the decision, I can't say there was no technical merit.

    2. Re:Microsoft formula for simplification. by Tsali · · Score: 2, Insightful

      Considering the file system will render all pre-Longhorn windows applications obsolete, why not knock the tires on the API's as well?

      Maybe it's to frustrate Mono some more... who knows....

      --
      This space for rent.
    3. Re:Microsoft formula for simplification. by duffbeer703 · · Score: 1

      I doubt the SQLServer as a Fileserver scheme will actually work out. That feature was supposed to be in Windows 2000 according to MS PR-flaks in 1998.

      Look at times in the past where vendors have decided to break compatability with "better" tecnology. Companies like Commodore, Atari, Coleco, etc who did that no longer exist.

      --
      Conformity is the jailer of freedom and enemy of growth. -JFK
    4. Re:Microsoft formula for simplification. by Alizarin+Erythrosin · · Score: 1

      I still have my doubts about this SQL-type file system... One would figure that the file system should be fast, and to me, a sql server running in the background to translate all this stuff seems slow... horrendously slow in fact. At least I hope they strip it down so it runs fast and efficient... or something.

      I dunno, I guess maybe I'm missing something

      --
      There are only 10 kinds of people in this world... those who understand binary and those who don't
  10. I'll reduce it to one function by oliverthered · · Score: 1

    UpdateObject(XAML** object);

    XAML looks somthing like this

    etc.........

    --
    thank God the internet isn't a human right.
  11. Re:Cool. by torpor · · Score: 3, Funny

    Sure ... lets see ... theres ummm ... LoadLibrary(), then there's LoadLibraryEx(), then there's LoadLibrary32(), then there's LoadLibrary32Ex(), then theres MS_LoadLibrary(), then theres MS_LoadLibrary32(), then theres MS_LoadLibraryEx() ...

    Oh, okay, I give up. I only ever used LoadLibrary() a couple hundred times, personally, and even then, only to get incompatible API functions loaded from various copies of the same .DLL found all over C:\WINDOWS, C:\WINDOWS\SYSTEM, C:\WINDOWS\SYSTEM32, C:\WINDOWS\WINNT, etc.

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  12. oppps XAML looks like.... by Anonymous Coward · · Score: 0


    <class name="textbox" GUID="12345">
    <text value="hello" colour="red" bgcolour="blue"/>
    etc......
    </class>

  13. Re:Cool. by MonTemplar · · Score: 1

    Oh, okay, I give up. I only ever used LoadLibrary() a couple hundred times, personally, and even then, only to get incompatible API functions loaded from various copies of the same .DLL found all over C:\WINDOWS, C:\WINDOWS\SYSTEM, C:\WINDOWS\SYSTEM32, C:\WINDOWS\WINNT, etc.

    Sounds to me like the problem actually resides between the chair and the computer. There is a reason for things like MFC and ATL in Visual C++, and VCL and CLX in Borland Delphi/Kylix...

    --
    -MT.
  14. Great... by Whatchamacallit · · Score: 1

    Now you can buy all new software as nothing from prior to Longhorn will run as it will be missing all it's API calls.

    Sure maybe they can fix the bloat and evil API clutter by simply stripping it all out and redoing it. Then all applications need to be re-written for no reason just so they can run on Longhorn.

    That's one way to fix the economy. Or at least force people to seriously consider an Apple Switch. Heck, as long as they have to rebuy everything anyway might as well go all the way and jump ship while they're at it.

    1. Re:Great... by ggambett · · Score: 1

      Not to support MS, but from a developer's point of view, I doubt we'll have to rewrite all our apps. They're simplifying the Win32 API, not everything on top. If most of your app is MFC, you'll just need to recompile and link to a new MFC that uses the new Win32 API. Granted, there will be some manual changes, but I don't think they'll get as far as a full rewrite.

    2. Re:Great... by Anonymous Coward · · Score: 0

      This is why Microsoft purchased Connectix Virtual Server.

    3. Re:Great... by koh · · Score: 1

      Now you can buy all new software as nothing from prior to Longhorn will run as it will be missing all it's API calls.

      Hmm, I don't think so, but you almost got it. I propose "nothing prior to W2K will run" instead.

      Just look in the MSDN docs, and you'll find that many API functions fall into two categories:

      * For compatibility only, use xxxEx (or xxx32, etc) in new applications, or

      * This functions supports 437 state flags, 32 of which go back to W3.1, 12 available on NT4, 42 if you have IE4, but 10 more if you have IE5, 120 more on W2K, lather, rinse, repeat.

      By cleaning these APIs only, they will reach their goal. Of course "old" W31 and maybe NT4 (since they seem to have abandoned support ahead of schedule) apps that rely on non-Ex, non-32 APIs won't run anymore.

      I don't think there are many. When was the last time you used a LoadLibrary() or a Sleep() that wasn't #defined to LoadLibrary32W() or SleepEx() ?

      So the first category is easy to remove quasi-seemlessly. The second category is tougher, though, and the XAML thingie is an answer as good as another, mainly putting the messaging and various (state, style, capabilities) flags into XML form so they can be supported (or not) without harm on platforms to come. This would allow future developers to use the TVIS_EXTRANEWCOOL state flag without breaking the app on a customer site which runs a lower version.

      And be sure they will provide a "compatibility" mode, which requires no XAML. In fact, they already had it for years : today in the MS world you can access most of the APIs with only 4 (four) functions :

      - CoCreateInstanceEx()
      - IUnknown::QueryInterface()
      - IDispatch::GetIdsOfNames()
      - IDispatch::Invoke()

      Yes, it is a pity. Yes, even DirectX works that way, and they can hide the whole DirectX API (which is huge) under those 4 functions if they want to.

      I can't see how they can't succeed. However if the MSDN docs get thinner afterwards I'll consider myself happy :)

      --
      Karma cannot be described by words alone.
    4. Re:Great... by andrewski · · Score: 1

      Naw, in the future you'll 'rent' applications from over the internet for a per-use fee. If you need Norton Utilities (god knows why you'd think you would, but this is the hypethetical Joe Everyman I'm referencing here) you use MS Passport to pay for an encrypted binary, to which you don't have any of the keys, which gets downloaded into your hard drive and then runs with Palladium and the net effect is probably a lot of money will go to companies for questionable binaries. Like at the carnival, once you go for a ride you con't get your ticket refunded, even if the motor grinds to a halt and you are stuck upside-down for six hours. Bill and Steve B. will be laughing all the way to the bank. If you think your nice open-source programs on Windows are whizzy now (MAME here people) wait till Bill and Steve B. Disallow you from running anything that isn't 'secure!'

      Windows is going straight to hell, and has been since the 80's. It's a word for getting fucking in the ass under the guise of 'computing.'

  15. when I was your age... by Anonymous Coward · · Score: 1, Funny

    When I was your age we had 0x128e0 non consistant
    API calls and we LOVED it.

  16. Removing the Win16 subsystem? by SteveX · · Score: 1

    If so it's about time the Win16 subsystem, which also includes DOS emulation, went away.. and if that's what they're doing that would account for an awful lot of APIs (especially all the DOS interrupt calls).

    - Steve

  17. Re:Cool. by torpor · · Score: 1

    Oh yeah, hah hah, right. The system is broken so just pile on even more crap to fix it (MFC).

    Go ahead, flounder in your nonsensical API goodness! Revel in 3rd-party hacks to shitty OS design! Bask in the glory that is MFC42.dll! Roll in the ecstascy of monthly MSDN update CD's!

    Sheesh. I dunno, seems to me like the 'new generation' of computer nerds just don't get it ... If you can't guess half the API after having read 10% of it, then it's NOT A GOOD DESIGN!

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  18. Re:Cool. by MonTemplar · · Score: 1

    Oh yeah, hah hah, right. The system is broken so just pile on even more crap to fix it (MFC).

    Go ahead, flounder in your nonsensical API goodness! Revel in 3rd-party hacks to shitty OS design! Bask in the glory that is MFC42.dll! Roll in the ecstascy of monthly MSDN update CD's!


    Not me. I use Borland Delphi for all my code, so I don't have to worry about making the right Win32 API calls - the VCL does all that for me.

    Sheesh. I dunno, seems to me like the 'new generation' of computer nerds just don't get it ... If you can't guess half the API after having read 10% of it, then it's NOT A GOOD DESIGN!

    Well, as I'm approaching 35 this year I don't think that I really qualify for the 'new generation'. I can still remember reading up the Advanced User Guide for the BBC Micro way back in the early 80's. But back then such knowledge was the only way to get at most of the non-trivial functions of the machine. Nowadays we have frameworks and suchlike to enable us to spend less time grapling with the OS and more time writing our applications. Of course, if you want to code directly to the Win32 API, that is your choice, but if you don't actually need to do so, why go down that route?

    --
    -MT.
  19. Re:Cool. by JukkaO · · Score: 1

    Blah. I know how they'll get rid of these APIs. See, instead of 7 *LoadLibrary* calls we'll have BigLoadLibrary(DWORD dwLltype, ...) multiplexers all over the place :).

    Presto! 7 API functions down to one!

    What? Not cleanup?...

    --
    .SIGSEGV
  20. Undocumented APIs by aled · · Score: 1

    So we will have less things to worry, like: What is the API to close dialin RAS calls. Previously it was just undocumented...

    --

    "I think this line is mostly filler"
  21. Re:Cool. by borgboy · · Score: 1

    Yeaaaaaah. C:\windows\winnt. Uh huh. You DO have a lot of Win32 experience. Maybe you were joking.

    I've never seen a library/module/class loader method (or function or API or whatever) that wasn't overloaded. Overloading an API doesn't make it bad, per se. And a general lack of configuration management for .DLLs doesn't either. The darn things have no versioning information that LoadLibrary_ad infinitum could reliably depend upon.

    --
    meh.
  22. the alternative already exists by HungWeiLo · · Score: 2, Informative

    For simple GUI apps, the WTL (a stripped-down ATL) framework provides all the GUI elements, sans the MFC nastiness and bulkiness. Of course, when I tried to use it last, it was nicely undocumented. (That could be changed by now)

    --
    There are a huge number of yeast infections in this county. Probably because we're downriver from the bread factory.
  23. Re:Cool. by The+Bungi · · Score: 1
    Because EVERY API ever released from Redmond has SUCKED ASS

    And POSIX is beautiful? Yeah, fork() is waaay better than CreateProcess(). pthreads are much better than CreateThread(). Sure.

    At least they document their APIs in a human-readable form, unlike other operating systems that assume you've been writing for their API every day over the last 20 years.

  24. 2 words by torpor · · Score: 0, Offtopic

    Piss. Take.

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  25. close - 48, but still by DrSkwid · · Score: 1

    As Russ said :

    "Plan 9 has 48 system calls these days,
    10 of which are deprecated. So 38. That's still a lot."

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:close - 48, but still by spitzak · · Score: 1

      You are right, I think the number 17 that I quoted are the number of calls having to do with manipulating files. There are other calls are for process and memory management.

  26. Re:Cool. by torpor · · Score: 1

    Oh, well then, you're a bit (2 years) older than me, so ... umm ... sorry there grandpa.

    Yeah, I (quite fondly) remember the days when Microsoft only shipped a BASIC interpreter, and thats it.

    Which is why I find their current scenario so laughable!! HAH HAH Microsoft!!!

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  27. Re:Cool. by MonTemplar · · Score: 1

    Not so laughable, if you consider how they got from MS BASIC to Windows XP. Pick up a copy of 'Barbarians Led By Bill Gates' (Jennifer Edstrom, Marlin Eller, 1999) if you're interested in (some of) the gory details...

    --
    -MT.
  28. it's such a win by DrSkwid · · Score: 1

    because once you've got your program working *any* other entity that knows about files can use your program.

    For instance, I wrote a google searching tool that presented itself as a file system. To do a google search now all any program has to do is to open a file, write to it, read it, change directory and read the files. It doesn't have to wait for someone to add support for it.

    Unix and it's POSIX progeny do the right thing but never quite cross the finish line. Corba, DCOM, XMLPRC, SOAP I mean, come on we're assaulted with so much change no wonder there's so many exploits.

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  29. Re:Cool. by Anonymous Coward · · Score: 0

    fork() is way better than CreateProcess(). And linux clone() is even better than fork() - if you ask me, clone() should be the standard threading API, not pthreads (which does suck...)

  30. Mod parent up by Anonymous Coward · · Score: 0
    Why was it modded troll???

    Looks about right to me...I think he was too kind about the older APIs though.

  31. Reducing APIs by epsalon · · Score: 1

    You should read that as: M$ is going to reduce the number of documented APIs from 76k to 8k, meanwhile adding more undocumented 'features' to old routines, which are misteriously used by M$ software.

    WineLH anyone?

  32. Open Windows GUI by solman · · Score: 1

    Won't this new GDI make it far easier to create applications that run on Windows and on other platforms?

    At first glance, this looks like a major improvement in openness.