Developer Area Developer Area
www.be.com

Becoming A Be Developer

Becoming A Be Developer

Join Registered Developer Program

Registered Developer Area

Developer Library

Developer Library

Developer Events

Search Contact


Making Programming Fun Again
By Scot Hacker

Once upon a time, developing applications was a blast. But as time moved along, operating systems became more complex, and the size of the codebase behind them seemed to increase exponentially. Along with this complexity came more work for you, as you tried to bring modern features to your application even while the operating system behind it began to show signs of age. You started spending less time implementing the features your users wanted, and more time digging through shelves full of documentation. Trying to do magic tricks with software on top of a 25-year-old foundation isn't fun. In fact, it's downright frustrating at times.

Modern consumer hardware is incredibly fast. But most users aren't even aware of how fast their computers really are, because the applications they're running can't take full advantage of that hardware -- mainstream operating systems are soaking up too much of the available horsepower. Applications have to talk through layers and layers of accreted "OS baggage" to do the tasks they were designed to do. And visionary ideas can be almost impossible to implement on mainstream operating systems, due to unacceptable latencies and a lack of emphasis on real-time processing.

At Be, we have a motto: "Make simple things simple...and complex things possible."

A Clean, Unencumbered API

Unlike other operating systems, BeOS isn't the product of a long and winding evolution. Every aspect of BeOS has been carefully considered before-hand for optimum performance, ease of use, power features, and clean architecture (more on that in a minute). Object-oriented through-and-through, the API is simple to learn and pleasant to work with. BeOS programmers don't need to learn separate functions to implement features such as inter-application messaging, cut-and-paste, drag-and-drop, or client-server communication -- all of these things are accomplished through a single, straightforward object called the BMessage.

BeOS is based on a client-server model, where system services such as networking, media handling, filesystem access, input methods, interface elements, the application framework, and so on are handled by centralized, shared objects called servers. BeOS applications are clients of the system servers. The interaction between applications and the servers they lean on is accomplished by invoking functions living in Be-provided software "Kits."

This object-based, cleanly designed architecture means developers are able to comprehend the internals of the system as a whole quite easily in comparison to other operating systems. Rather than a shelf full of books, the BeOS API is compact enough to fit into a single manual, while still offering tremendous power and flexibility.

"The most impressive thing about the BeOS API and architecture is how clean and modular the design is. APIs are never more complex then they should be, and the messaging model takes object orientation to the next level where active objects communicate with each other crossing application boundaries. There is so much potential inherent in the design that we will see a new breed of software coming out for BeOS in the years to come."

-- Hans Speijer, CEO Mangus Software & Consultancy

Modern Assumptions

One thing that contributes heavily to the inner complexity of mainstream operating systems is the fact each new generation of the OS must remain backwards-compatible -- the fact that Windows 98 must still be capable of running 16-bit DOS applications means that consumer versions of Windows have to toggle in and out of pre-emptive multitasking mode, a fact which also contributes to system instability. Be believes that the only way to truly move forward into the realm of modern computing is to ditch all the baggage and start over from scratch. And that's exactly what we've done.

BeOS isn't backwards-compatible with anything. It runs only BeOS-native software, designed in and for the modern age of high-bandwidth, resource-intensive computing. Because Be focuses completely on the future, programmers enjoy the performance benefits of pervasive multithreading, the grace of the object-oriented API, the microsecond timing and synchronization controls they'll get from their media applications, the flexibility of fully re-entrant code, the multiple advantages of running apps on top of a database-like filesystem, and the knowledge that their applications will scale perfectly on any number of processors with zero additional programming effort. Meanwhile, they can assume their users are running on relatively recent hardware, that they can store files thousands of petabytes in size, that the operating system won't crash when a misbehaving application does, and that they're getting a lot more performance from their stock consumer hardware than they would get with other operating systems running on the same hardware.

Rapid Development Cycles

Due to the comparative simplicity of BeOS development, vendors often find they can bring a product to market more quickly than they can on other operating systems. Rather than tracking down or inventing work-arounds for difficult problems, Be developers spend their time implementing the features their users demand. And because Be works closely with 1st and 2nd-tier developers, you're guaranteed rapid response to issues in need of resolution.

The compactness of the BeOS architecture and rapid development cycles go hand-in-hand: An OS that's easy to program for means you can get your product or update out the door more quickly. And you don't have to pull out your hair trying.

A Modern Foundation

It's sometimes said that BeOS actually stands for "Buzzword-Enabled Operating System," because the system encapsulates so many modern computing buzzwords. Taken together, they add up to what some developers have called "the promised land" of operating system design.

Pervasive Multithreading

BeOS can't make your processor run any faster, but it will seem like it does when you start running multiple CPU-intensive apps simultaneously. Every BeOS application is automatically assigned two threads -- one to communicate with the Application Server and another to handle the application itself. Developers can attach additional threads to application components with relative ease. Because BeOS threads are inexpensive from a resource standpoint, and because the operating system is designed to handle very large numbers of simultaneous threads efficiently, BeOS continues to operate smoothly even when playing four or more QuickTime movies, CD audio, a few MP3 files, and using the Internet. As load on the system increases, performance degrades gracefully and smoothly -- users won't find the system grinding to a sudden halt as resources are maxed out. Developers not only get better performance from their own applications due to the pervasively multithreaded nature of BeOS, they also get applications that cooperate better with others, and share resources intelligently.

Symmetric Multiprocessing

A corollary to pervasive multithreading is the fact that BeOS and its applications automatically take full advantage of any number of processors detected in the host machine. Developers don't have to do anything special to optimize their applications for multiple processors -- it all "just works," with 1-8 processors. Similarly, users who have multiple-processor machines don't need to worry about whether their applications are taking full advantage of them. Of course, BeOS runs just fine on single-processor boxes as well.

Protected Memory

Naturally, BeOS employs strictly implemented memory protection barriers between application address spaces. Result? When a BeOS application goes down, it doesn't take the system down with it. Instead, the user gets a simple alert dialog, which can be dismissed with a single click. The rest of the system keeps on humming, and the application can be restarted.

Media-Optimized

As you'll see in the Performance Advantages section below, Be puts a very high priority on making sure BeOS is optimized for audio/video content creation and playback. With very low hardware latencies, precise timing and synchronization controls in the Media Kit, and an object-oriented system of "media nodes" which enable all media applications to read and write supported A/V formats and to communicate with one another, Be is committed to helping users and developers enjoy a workstation-quality media experience from ordinary consumer hardware.

"As a developer, I'm sick of working around sluggish and unstable environments where you're constantly being hampered in what you are trying to accomplish. Programming for BeOS is a pleasure because there's no concept of slowdown or interruption. Everything about the Be API is clean and well-thought out -- you're never stuck wondering why the Be engineers choose a certain approach. With awesome media capabilities, BeOS really provides the developer and user the experience they've been waiting for."

--Simon Clarke, Adamation's personalStudio development team

64-Bit Journaling Filesystem

The Be filesystem, a.k.a. BFS, uses a 64-bit addressing space, meaning users can store files of up to 18 million gigabytes in size (assuming they can find a drive that large!). Because BFS is fully journaled, data integrity is ensured even after catastrophic power failures. Reboot a BeOS machine after pulling the plug and it will come right back up in around 15 seconds -- no need for a lengthy fschk or ScanDisk operation. Finally, BFS lets users attach "attributes" to filetypes, then organize, sift, sort, and query on these attributes through the Tracker. In essence, the Be filesystem doubles as a database, which can be manipulated both by applications and by users.

Customizable User Interface

Be provides a suite of "hooks" into the user interface enabling developers to load new appearances for application and/or operating system widgets, scrollbars, title tabs and window borders through optional resource modules. This means you can deliver your application with non-rectangular windows, or with completely customizable buttons and UI elements. If you're an OEM delivering custom solutions to your customers, you can completely take over the look and feel of BeOS, making it your own. More on that in the Web Appliances section below.

Modularity

Because BeOS is so thoroughly object-oriented, the system can be disassembled and re-assembled like a set of Tinker Toys, allowing vendors to deliver custom versions of the OS with unnecessary components removed. For example, a dedicated email and Web browsing machine running BeOS doesn't need OpenGL, nor does an airport kiosk need drivers for video cards it will never run. Similarly, BeOS running in "headless" implementations without monitor or keyboard doesn't need to be running the Tracker or the Deskbar. BeOS is designed modularly so developers and vendors can deliver just the components they need, and nothing more. Taking advantage of this modularity can make your custom solution even more streamlined and efficient.

Rock-Solid Stability

Be puts a very high priority on delivering world-class stability to its customers, and takes memory protection seriously. Heavily-taxed systems running in our own labs have been up for months at a time, and our users report uptimes parallel to those of their Linux systems, while using their machines as 24x7 Web servers and general productivity/media machines simultaneously.

Performance Advantages

Be's commitment to the future of computing shows in nearly every aspect of the system, from the programming process to the end-user's experience at the helm of a BeOS machine.

Do It in Real Time

Due to pervasive multithreading and the ability to address audio and video hardware directly, there are many areas in which BeOS is able to achieve real-time effects which are either impossible or very difficult to achieve on other platforms. For example, users of Adamation's personalStudio can apply effects and transitions to video clips while they're playing -- without having to render them first, as they do on other platforms. A popular imaging application called ArtPaint lets users flow gradients over the canvas in real time until the perfect effect is achieved, rather than having to undo and re-do repeatedly. Fonts in Gobe's Productive can be scaled smoothly and rapidly directly in the document, without having to click OK, undo, OK, etc. Users can do attribute-based data mining on their hard drives with virtually instantaneous results, due to the indexed filesystem. BeOS developers are limited only by the scopes of their imaginations, not by arbitrary constraints imposed by the operating system.

Very Low Latencies

BeOS applications are capable of addressing audio hardware as much as seven times faster than Windows applications running on the exact same hardware. In-to-out latency of 8 milliseconds (3 to 4 times better than Windows). This means developers are able to create audio applications that can be manipulated in real time, in ways that would be nearly impossible to implement on other platforms. A great example of a real-world application taking advantage of this capability is N2IT's FinalScratch, which lets club DJs control multiple MP3 audio streams in the SoundPlay application. Because the scratching hardware communicates so efficiently with the operating system, DJs using FinalScratch get the flexibility of digital audio, but can still work with the intuitive interface of vinyl LPs. See http://www.n2it.net/finalscratch/ for more information.

Additionally, Be provides the BDirectWindow API to allow developers to access a video card's framebuffer directly, so games and video applications are able to generate much higher frames-per-second while simultaneously lowering the impact on the system CPU.

Market Opportunities

As developers begin to discover the benefits of faster development cycles, more efficient applications, and a more enjoyable programming experience, they want to know about the potential market for BeOS applications.

"Green Fields"

What would you give to have been one of the original developers on the Adobe Photoshop or VisiCalc teams? When a vendor creates a killer app on an up-and-coming platform, they redefine the computing field for that genre, and reap rewards in the long run. But the fields of competition are so thick on the mainstream platforms now that getting a leg up is next to impossible. Imagine trying to introduce a new e-mail application on the Windows platform at this point in history, for example. With Outlook Express being bundled with every copy of Windows, and a wide field of additional mature email applications out there, the prospect sounds almost insane. Not so on BeOS. While Be has been around for a while, most BeOS applications are "in their teens," and there's still plenty of room for new developers to come on board, fill a need for users, and strike gold as the platform takes hold in the market.

The Growing Buzz

The tech media is awakening to the appeal of a new OS designed to handle digital media needs. And while Linux is raising awareness for alternative operating systems in general, users are discovering that Linux leaves a lot to be desired on the installation, configuration, and usability fronts. Geeks and questioning users alike are discovering that BeOS gives them the grace and elegance traditionally associated with the Mac, the power of Unix, and the speed and responsiveness of a truly modern approach to operating system design. Scarcely a week goes by without a technical publication publishing major BeOS coverage.

"I program for BeOS because, in many ways, it encapsulates the best of both MacOS and Windows NT. Like MacOS, the BeOS has a wonderful API, is easy to use and maintain, and has a comfortable programming environment. Like Windows NT, BeOS is a stable, multitasking, multithreaded OS with protected memory.

"I program BeOS because it never frustrates me.

"Because BeOS is so new, there's still the potential for a single developer to produce something that will make a difference on the platform. To do the same thing on Windows or the MacOS requires a much larger team, producing a much larger application. Another nice thing is the freedom -- there are no preconceived notions about what's right and what's wrong on BeOS. This means that developers can experiment with new ways of solving problems and not be penalized in the marketplace for trying something non-mainstream."

-- Geoffrey Clements, Bald Mountain Software

Web Appliances and the Desktop

Is the PC on its way out, soon to be replaced with "ubiquitous computing" in the form of intelligent doorknobs? We don't think the PC is ever going to go away, but it's clear that the age of inexpensive, dedicated computing devices optimized for tasks as diverse as high-bandwidth Web browsing, assembly line product modeling, home shopping, scientific analysis, and airport ticketing terminals is upon us.

Two Birds with One Stone

Be's Web Appliance division has been created to address the burgeoning market for Web Appliances and dedicated devices, where vendors require a stable, lightweight, scalable operating system capable of handling multiple simultaneous media streams smoothly, and which can be manipulated to provide customized interfaces appropriate to the task at hand.

Be is pursuing the emerging Web Appliance market aggressively, and offers software developers the ability to target the BeOS desktop and appliance markets simultaneously. Be is working closely with device manufacturers and distributors for BeOS in specialized implementations on dedicated devices.

Interface Flexibility

Because appliance vendors want to show their own face -- not the operating system vendor's -- Be provides developers the ability to completely customize the user interface of the solutions they provide. BeOS apps can load UI elements such as widgets, scrollbars, window borders, and all the rest of the "chrome" from resource files, completely defining the look and feel of the application sitting atop the BeOS infrastructure. In fact, BeOS itself can be completely hidden, replaced with a UI of the vendor's choosing. Advanced features can optionally hidden away or exposed to the world.

While our own Web Appliance prototype defines the UI through a C++ framework, at least one of our top-tier vendors has chosen to create their entire UI in HTML. A BeOS-based Web appliance can show as much or as little of the underlying operating system as the vendor chooses.

Task-Specific, Not Application-Specific

A key difference between the general-purpose operating system and the Appliance is that appliances are centered around tasks, not applications. The user of the simplified PC shouldn't need to know that their email application is called "Eudora" or "Outlook" -- they need big fat buttons labeled "Check E-Mail," "Browse the Web," "Listen to Music," "Get Recipes," or "Watch the Baby Sleeping."

Be offers simple construction methods for creating a user interface blanketing the entire OS, exposing just the tasks your users need to accomplish. They'll never need to worry about understanding the filesystem hierarchy, or struggle to locate shortcuts to important applications. In non-consumer-oriented implementations, the same principles can be applied to "lock down" the system from prying eyes, so you can make sure your appliance stations are doing the job they were meant to do, not browsing the Web when the boss isn't looking.

Interface flexibility for developers means optional control over the user experience, whether that means limited access or total freedom for the user.

The Be Support Network

Be's dedicated Developer Relations staff and partners programs mean that serious developers get priority Developer Technical Support attention, and all developers have access to our library of documentation, tutorials, and sample code. In contrast to developing for major OS vendors, BeOS programmers can subscribe to mailing lists populated by key Be engineers and product managers, and enjoy a close rapport with other developers in the tightly knit BeOS community.

Developer Support

Be offers a three-tiered support network for application developers. The no-cost Enthusiast Developer Program is for developers interested in getting their feet wet with BeOS programming. Developers in this program rely on information available on the Be Web site and mailing lists. The Small Commercial Developer Program is aimed at individuals who require direct online help from our Developer Technical Support staff. Our Corporate Program offers pretty much the same benefits as the Small Commercial Developer Program and is ideal for groups because you can purchase extra seats at a discount rate.

Focused, Free Development Tools

Every copy of BeOS includes a complete set of free development tools based on the egcs toolchain. Nearly all binary development is done in C++, using the open-source gcc compiler. Be provides a native IDE inspired by the popular Metroworks IDE, though developers can of course use third-party editors, the bash command line, and makefiles if they choose. Finally, Be includes a command-line debugging tool which is in rapid evolution. Third parties have created free graphical interface-creation tools, and class libraries of all kinds are downloadable from BeOS software sites such as http://www.be.com/beware/ and http://www.bebits.com/.

Myriad additional languages are available for alternative development initiatives, including perl, Python, Squeak, Squirrel, REBOL, Prolog, Guile, and Tcl.

The upshot is that Be developers don't need to spend extra money to get started programming BeOS applications. All the tools you need are included with the OS, and all of the information and resources you'll require are freely available on the Internet, both through Be and through third-parties.

Oh yeah -- and did we mention that BeOS programming is fun?


The BeOS News and Events Developers User Groups Support BeStore BeWare
Copyright ©1998 Be, Inc. Be is a registered trademark, and BeOS, BeBox, BeWare, GeekPort, the Be logo and the BeOS logo are trademarks of Be, Inc. All other trademarks mentioned are the property of their respective owners. Comments about this site? Please write us at webmaster@be.com. Icons used herein are the property of Be Inc. All rights reserved.