TweetFollow Us on Twitter

March 93 - MADACON Madness

MADACON Madness

Steve Mann

The conference title was almost as long as the opening address-Microsoft Windows™ Programming Conference for Macintosh® Developers. Just to make it easier to reference, I'll shorten it to a convenient TLA-WPC (Windows Programming Conference). When the people at Microsoft decide to do something, they usually do an excellent job. WPC was no exception. There was one lame presentation, there was very little marketing dreck (even their marketing speakers are pretty technical), there was good food, and there was humor (thanks to James Plamondon, MADA's own standup comic and creator of this conference). And there was lots of meaty detail.

Microsoft has decided to target Macintosh programmers as a market niche (as if the first 45,000 people who bought the Windows System Development Kit were not enough). WPC focused on three areas: programming in Windows, porting strategies, and how Windows is similar to and differs from the Macintosh. There was also a session by Apple and Symantec about Apple's cross-platform strategies (more about that later), and a spiffy presentation by the Microsoft Developer Network. The overall impression that I came away with was this-Microsoft has a very good idea of what it's doing and where it's going (and they have the resources and savvy to deliver). Oh, and Windows looks like a good development environment.

Programming in Windows

James P. delivered the bulk of the detailed programming sessions, acting as a translator between Mac and Windows concepts and vocabulary. Overall, Windows has many similarities to the Mac. There is a large complex API, lots of documentation to wade through (much of it obsolete), resources, event handling, multitasking, and so on. C is the preferred programming language.

Microsoft has a tough time clarifying all the different versions of Windows currently out there. I'll give it a try (note: the first three versions run on top of MS-DOS):

  • Windows 3.0 - 16-bit addressing, rapidly becoming obsolete.
  • Windows 3.1 - TrueType, OLE (more about this later), multimedia, performance improvements.
  • Windows for Workgroups 3.1 - peer-to-peer networking and bundled workgroup applications.
  • Windows NT (New Technology) 3.1 - new (non-DOS) kernel, real 32-bit addressing, high-end system.

In addition, there are three addressing modes-real, standard, and 386 enhanced. Real mode is becoming obsolete, standard and 386 enhanced are hardware dependent. On top of that, there's a backward-compatible runtime environment called Win32s that let's you run 32-bit Windows NT applications in a 16-bit environment like plain Windows 3.1 in 386 enhanced mode. Got that?

Other than having an identity crisis, however, Windows looks very good as a programming environment. James walked the audience through several examples, pointing out the similarities to and differences from the equivalent Mac code. Other than the fact that there are probably 10 times more Windows machines as Macs, on the surface Windows looks like a better environment to program. Here are a few reasons.

Windows architecture is based on object-oriented principles. For instance, window controls are subclasses of windows, and windows are subclasses of applications. A Windows event is handled like an object message, passed up through the subclass hierarchy until someone intercepts it. This is done automatically. Each class of object has its own default behavior which only needs to be overridden if you want to change the defaults. Sounds suspiciously familiar doesn't it? James pointed out that it's easier to port a Think Class Library (TCL)-based application than a typical Mac program with one big event loop because the TCL event handling is similar to Windows.

Windows is based on Dynamic-loaded Libraries (DLLs), reentrant code chunks that can be used by multiple tasks simultaneously, reducing memory requirements, and eliminating code redundancy. Because the bulk of a program's code is in DLLs, Windows resources have no code, just data. This makes Windows resources simpler.

Finally, because of the underlying architecture, the Windows API is simpler and more robust than the Mac toolbox interfaces, and Windows validates all parameters before a toolbox routine is executed. That can save you a lot of development time early on by eliminating parameter-based bugs. The proof that all these architectural differences create an advantage for a programmer is shown in the code-the Windows examples were straightforward and understandable. A basic "Hello Windows" program takes about 80 lines of code.

But Wait, There's More

One top of the basic architecture, Windows has some excellent additions. The most impressive one is Object Linking and Embedding (OLE, pronounced olay). On the surface, OLE is an extended Publish and Subscribe with in-place editing of shared objects. When you double-click on an embedded object in a container document, the application used to create the object is automatically launched, and the primary app's menu bar is replaced with the creator's menu bar. You can then edit the contained object in place in its native environment. When you're finished, you click outside the region of the object and the container application's menu bar reappears. OLE makes for a great demo (let me rephrase that-Macintosh Common Lisp makes for a great OLE demo). Users will love it.

OLE is much more than a fancy Publish and Subscribe however. Based on an underlying object messaging model (different from the one that drives Windows), OLE supports such features as unlimited nesting of objects, object-sensitive verb lists, automatic object type conversions, alternate display formats, and client-server negotiation for inplace editing. It's a very robust, sophisticated model that seems suited to a lot of different tasks.

OLE looks and feels like Publish and Subscribe and Apple Events and more. It's only going to be useful if lots of applications support it. Microsoft intends to include inplace editing based on OLE in the next release of all its major applications, including the Mac versions. They're going to accomplish this by providing an OLE library for the Mac (much like Apple is providing QuickTime for Windows).

Apple Cross-Platform Strategy

Surprisingly, Apple was in attendance to talk about their cross-platform strategy. As you might guess, much of it has been heard before-DAL, TrueType, QuickTime for Windows, OCE, and so on. And there was the usual Bedrock presentation, but with a few more details.

For instance, they actually showed a class hierarchy diagram for a window with components. It looked suspiciously like a TCL class hierarchy. Also, they mentioned that the Bedrock command hierarchy is based on TCL which uses what are called bureaucrats and supervisors. Resources are an extension of the Apple Rez language, uniform across all platforms. Finally, they actually showed some code for a sample program that opens a nonscrolling window with zoom and close boxes.

I'm not going to try to regurgitate the explanation that went along with the code fragments. I'll let you ponder them yourself and draw your own conclusions. A few things seem pretty sure-the more C++, MacApp, and TCL you know, the easier it's going to be to get up to speed with Bedrock.

Basic App-Resource File

resource STRTABLE
BEGIN
    1, "Basic Application"    // the title
    IDS_APPNAME, "wind.exe"
    IDS_DOCTITLE, "Basic Document Window"
END
resource bclmenu (IDS_APPNAME)
{
    MenuBar
    {
        TextMenu ("File")
        {
            MenuItem (cmdNew, "New"),
            MenuItem (cmdQuit, "Quit")
        }
    }
};

resource ICON   IDS_APPNAME, "wind.ico";
resource CURSOR IDS_APPNAME, "wind.cur";

Basic App-Subclass cDocument

// Constructor, just call superclass constructor

cBasicDoc::cBasicDoc (cApplication& supervisor) :
cDocument (supervisor, FALSE)
{
}

// NewWindow, create new document window

void cBasicDoc::NewWindow (void)
{
    cStr32 winTitle;
    cApplication&  app := GetApplication ();

    cDocWindow *pDW = new cDocWindow (app.GetAppDesktop (),
                                      *this, 0);

    app.LoadString (IDS_DOCTITLE, winTitle);
    pDW -> SetText (winTitle);
    pDW -> Show ();
}

Basic App - Subclass Application

// Constructor, just call superclass constructor

cBasicApp::cBasicApp (cSystem& system, HANDLE hInst,
                      HANDLE hPrevInst):
cApplication (system, NULLOBJECT (cModule), IDS_APPNAME, hInst,
              hPrevInst);
{
}

// CreatDocument, create a new doc and open window for it

cBasicApp::CreateDocument (void)
{
    cBasicDoc *newDoc = new cBasicDoc (GetApplication ());

    newDoc -> NewWindow ();
    return *newDoc;
}

Basic App-Main ()

int Pascal WinMain (Handle hInst,
            Handle hPrevInst,
            LPSTR lpszCmdLine,
            int CmdShow)
{
    cSystem *pSystem = new cSystem;
    cApplication *pApp = new BasicApp (*pSystem, hInst, hPrevInst);
    pApp -> MakeAppDesktop ();
    oApp -> Run;
    delete pApp;
    delete pSystem;
    return 0;
}

Porting from Mac to Windows

As James pointed out in "Postcard from WindowsLand" in the last issue of FrameWorks, there were also presentations about porting Mac applications to Windows. The three case studies highlighted three different approaches: rewriting from scratch and maintaining two sets of code, developing core code that works on both platforms, and using source code porting technology. Unfortunately, I missed Aldus' presentation on developing core code (it's rumored they used MacApp as a basis for their framework). I heard it was the best of the three presentations.

Software Ventures talked about maintaining two sets of source code. They basically said it was tough to do, tough to maintain, and they might not do it that way if they could start all over today. Altura software talked about their porting tools which appear to do a pretty good job. They claim they can port a complex Mac application to Windows in a few months. Altura only does this as a consulting engagement-you can't buy their tools outright.

Microsoft Developer Network

Finally, there was a closing presentation about Microsoft Developer Network, a rough equivalent to Apple's certified Developer Program. The differences are that Microsoft learned from Apple's mistakes, they're not trying to make this program a profit center, they did a lot of research before finalizing the program, and they are putting more resources into it.

It costs $195 to joint the developer network. For that you get a quarterly CD (and a bimonthly tabloid) with a huge quantity of stuff, including on-line documentation for all Microsoft's developer tools, white papers and specifications, independent articles about Windows programming, sample code, the complete text of several Microsoft press books, and Developer Knowledge Base articles from Microsoft's Product Support Services. But they didn't just throw all this information on a CD-they developed a custom navigation front end, and they licensed some very sophisticated search technology from a third party.

The end result is an information-packed CD with very intelligent access tools. You can find just about anything very quickly. Much of the material is cross-referenced and hyperlinked. There are several indexes you can browse linearly, and a most recent reference stack. The CD is an excellent value, and Microsoft is working hard to improve it all the time.

There's Some Good Stuff Here

If this conference is any indication, Microsoft's OS technology is rapidly approaching parity with the Mac OS. They appear to be poised to beat the Mac in many areas as well, and have already done so in some respects. If the Developer Network is any indication, Microsoft has the resources to do a very good job of supporting and encouraging developers. And they have the know-how to develop a great operating system.

At the risk of sounding like James, Microsoft is doing a good job. They make it sound easy and attractive to develop for Windows (of course the truth may be different). And they make Windows sound like a better alternative than the Mac, both market-wise and from a technology point of view. As James said toward the end of the conference-Microsoft is not the evil empire you might think, and there's some good stuff here. He's right about both.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.