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

Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.