What happens if the Context becomes a hierarchy? How do you keep track of the real type of the TaxPayer inside TaxStrategy without downcasting? You'll find several answers here from a Generic Programming perspective.
More articles by Radu Braniste
Learn how dispatchers can be stacked in layers and how events can be selectively sent to certain levels only or broadcasted. Two illustrative implementations are presented: a basic one introducing the main concepts, later refactored in a more refined implementation.
Discover the possible implementations of a type safe event dispatching mechanism, based on the Multicast pattern, in the context of single-layered and multilayered receptors.
Explore a flexible, compile-time safe way of generating WML and WML-like dialects code. Two contrasting solutions are discussed—one relying on C# without generics and the other one on C++.
Analyze the concepts behind using "switch" statements in C++ and the patterns associated with them. Then review possible designs of a more generic "switch" together with a way of extending classes based on versioning.
Interfaces are apparently a simple subject, already well supported by the core language via the pure virtual construct. But, as you will see, when thriving for efficiency, 'classic' interfaces might be a drag.
Discover a simple XML parser fully configurable at compile time. Type safe techniques for selecting properties and enforcing behavior are presented as part of the policies support.
Find answers to puzzling questions such as How can two or more processes exchange information in BREW?, When should you use IAC? What are the design considerations?, and How does one create and use services in BREW?
For the sake of simplicity, BREW doesn't hide all the details of the operating system; developers are forced to take additional responsibility. Take advantage of a key BREW design pattern to help you work through this.
Explore idioms (low-level patterns specific to one language) such as 'Stack Starvation', 'EverLoad', and 'Static Is Dynamic' to build your BREW applications.
Review Reference Counting and other useful memory-related patterns.
Focus on memory deallocation and memory exhaustion, testing useful techniques such as smart pointers [2, 3, 5]. Also see where POD and non-POD smart pointers get involved.
Both heap and stack memory are scarce resources in BREW, thus memory allocation is of paramount importance. Review the main techniques and some of the 'usual suspects' and possible solutions to memory fragmentation, access speed, and exhaustion issues.
Develop BREW applications using an API that provides automatic memory management and that is similar to the J2ME development model.
Discover how to narrow the gap between BREW and J2ME as well as learn insight into the design process for using these technologies.
Learn the virtues of cooperative multithreading — you will learn to find, wait, and notify.
Learn the value and limitations of BREW's new cooperatively scheduled multithreading support as well BREW's new interface capable of controlling the lifetime of associated resources.
Learn how to handle file I/O and network resources on BREW from a Generic Connection Framework (GCF) perspective.
Examine the intricacies of the asynchronous programming model and develop tools to help establish a common ground for I/O and network operations on BREW. See how to encapsulate this commonality into a framework.
Discover a String implementation for BREW that freely uses both char and AECHAR data types. This is actually a generalization of BrewString that allows strings, wide strings, char and AECHAR arrays to be mixed together.
Learn how to avoid possible problems you can encounter when compiling the BREW utility library using ARM ADS1.x. An ADS1.0.1 conformant library is included for downloading.
Delve into the implementation of a hash table together with an XML parser using BREW.
Analyze the intricacies of a vector class in BREW while focusing on efficiency, safety, and other special features. Also examine how to avoid the code bloat usually associated with general purpose containers.
Examine the string library in the BREW SDK. This article is the first in a series that will present possible implementations of utility libraries in BREW.
BREW is an event-based execution environment with no support for multithreading. This article introduces an implementation of cooperative multitasking in the BREW environment to get around this complicated, non-trivial problem.