[ANN] Omni frameworks
[ANN] Omni frameworks
- Subject: [ANN] Omni frameworks
- From: Greg Titus <email@hidden>
- Date: Tue, 3 Jul 2001 13:19:53 -0700
As a consumer of such classes, I would certainly like to see
announcements
on this list. Preface the subject line with [ANN] to attract attention.
Well, given this ringing endorsement, I'll officially mention our
frameworks this once, since it looks like there are a bunch of new
people on this list that might not be aware of them. The source is
available for the vast majority of The Omni Group's framework code -
code which has been used in shipping applications for years now (and not
just by us) so it is generally fairly solid. It is distributed with our
own BSD-style license: you are free to use the code, including in
products you sell for money, and there is no viral component like the
GPL. However, the license does keep you from selling our code by itself,
and from redistributing modified copies.
(The redistribution section is because we are continually doing work on
them in-house and don't want to deal with code forks and such. Also,
because of the dynamic nature of Obj-C, almost anything you'd want to
modify you can do by just adding your own code and using our frameworks
as a base instead of modifying our code directly. The license is written
this way because we aren't really looking for a whole lot of community
development - we just want to make this stuff available to others if
they find it useful. That having been said, we do welcome bug fixes and
extensions.)
You'll find descriptions and download links at:
http://www.omnigroup.com/community/developer/sourcecode
The frameworks themselves have no overview documentation or class
documentation (we keep planning on writing it but it never quite
happens) so you are pretty much on your own. OmniNetworking and most of
OmniFoundation are the most stand-alone and easiest to use.
OmniNetworking provides a simple and extensible Objective-C wrapper to a
multitude of complex networking constructs. Communication over several
internet standard protocols is supported, including TCP, UDP and
Multicast. Writing a simple FTP client, or custom TCP/IP-based server
program becomes a trivial task using OmniNetworking.
OmniFoundation has a ton of stuff in it ranging from the easy to
understand and use to the very powerful but complicated. Among other
things it contains:
Formatters: capitalizing/uppercasing/length limiting strings, dates,
SSNs, telephone #s, U.S. states, time spans, zip codes
Many extensions to Foundation objects:
* NSCalendarDate additions: firstDayOfMonth, lastDayOfMonth,
numberOfDaysInMonth, weekOfMonth, isInSameWeekAsDate:
* NSData encodings: hex strings, ascii 85, base 64, sha1 signatures, md5
signatures
* NSFileManager temporary file names, scratch directories, file system
types, type and creator codes at path, file locking
* NSMutableArray maintaining sorted arrays
* NSMutableData bitwise and/or/xor
* About 50 different NSString additions for various operations
Data Structures: bit fields, b-trees, data buffers, heaps, queues,
multi-valued dictionaries, sparse arrays, stacks, tries, conditions,
read/write locks, efficient yielding spin locks
All sorts of other functionality:
* An implementation of Unicode aware regular expressions
* OFObject with an inline retain count for faster retain/release
* A vastly more efficient replacement for NSScanner: OFCharacterScanner
* An implementation of weak retains
* A bundle registry for finding and lazily loading bundles in a generic
way
* Thread-safe preference handling with a similar API to NSUserDefaults
* A simple method for inter-thread communication using message queues:
[object mainThreadPerformSelector:@selector(someMethod)]
This is pretty much in the order of most simple to most complicated. The
formatters can be just dropped in and used. The foundation extensions
are usually self-documenting by their method names. If you know the
computer science terminology for the data structures, they'll just work
as you expect.
So if you already know what a Trie is and why you would want one (to
take a single example), this framework could be very useful to you,
either to use directly, or as demonstration code for how you might want
to implement such a thing in an extensible, dynamic O-O way. If you
don't know what it is or why you'd want one, you probably won't learn it
here. (The dictionary of algorithms, data structures, and problems at
http://www.nist.gov/dads/ might help.)