Forum OpenACS Development: What's the status of address book?

Collapse
Posted by John Mileham on
Hi all, In my previous life at aD I wrote Places and Address Book. The design of Places got completely out of hand, as I'm sure most of you are aware, and that experience led me to a new (vastly simpler) model for generalized storage of addresses/geographic locations that I'm implementing under OpenACS for Berklee College of Music, where we're working on some interesting web services. The new package is fully integrated with acs-reference, and I forsee a similar distribution mechanism to that of acs-reference itself, packaging up country- specific widgets seperately from the core:
  • address package
    • provides: geo_location object, address object, universal address widget and validator procs/templates
    • requires: acs-ref countries package
  • address-US package
    • provides: US widget/validator/latitude-longitude calculator procs
    • requires: address, acs-ref states and zipcodes
The key selling points of the package are:
  1. No US-cetrism
  2. generalized address storage and display
  3. radius searches on any address or geographic location in the database (e.g. if you've got code to calculate latitude and longitude of addresses in both France and in Switzerland, international search results can be returned).
Berklee is committed to contributing as many general-use packages from our development as possible. Is there any interest in this stuff given the current state of OACS address-book? The new "address" service that I'm working on, when complete, should serve as a good replacement for places. Address-book would be a relatively trivial port from that point, and one that I'd gladly take over in my free time. If there's interest, I'd be happy to post some design documentation and/or the code as it stands currently.
Collapse
Posted by Don Baccus on
<a href="/directory/lookup.tcl?last_name=heis&email=">Hal  Heisler</a> is looking into Address Book, and yeah, the places package is on the soon-to-be-extinct list.
<p>
I'm sure he'd be willing to work with you.  I know he's been looking first at the contacts stuff in address and hasn't really started looking into a replacement for places, so maybe your stuff would dovetail nicely?
<p>
I'd appreciate it if you'd e-mail him and look into coordination and a cooperative effort on this stuff.  It would be good to post your design docs for starters so we can all take a look at what you intend to do, too.
Collapse
Posted by Don Baccus on
Ohh ... and thanks for posting information on what you're up to, and it's great that Berklee's interested in contributing stuff.  Are you guys strictly Oracle-based or dabbling in PostgreSQL, too?
Collapse
Posted by John Mileham on
Thanks, Don.  I'm revising the docs, but will post them soon. I'll get in touch with Hal ASAP.  BTW, Berklee is running PG for now, though the flexibility of being able to change our minds is reassuring.  It also seems like it'd be easier to port from PG to Oracle than vice versa.
Collapse
Posted by Don Baccus on
Hey, good, another PG site, glad to hear it.  Actually I think the porting effort's about equivalent as long as you think in terms of portability from the beginning.  But you do have to think about it from the beginning.
Collapse
Posted by Ben Koot on
In an effort to cut down on design comments in my userguide, I am checking the bboard on subjects like this. Is there any news about implementation of the upgrades sugested in this topic?
Collapse
Posted by Don Baccus on
You probably want to ping John Mileham directly to see if Berkelee's done anything with address book.
Collapse
Posted by John Mileham on
Sorry for the lag... I've been out of town for a few days.

I haven't written an address book replacement as things have just been too hectic here, but the implementation of addresses, geographic locations and contact info that I described briefly in this post are complete and pretty well-tested.  For the Berklee project, I've integrated the ability to keep a reference to a contact info object directly into parties.  Also, persons or subtypes thereof automatically instantiate a contact info object for themselves upon creation.

A nice feature of the system is "swappable" address widgets, that will reload the form that the user is working with to display a different address widget depending upon the country that they select from the dropdown list at the top.  This required changes to the templating system's form generator (none that break backward compatability) to create an explicit is_invalid state because we used to use ![form is_valid form_name] to display an error banner at the top of forms asking the user to correct the errors contained in the form below, and clearly is_valid is used to imply that the form is complete and ready to be acted upon by the application, so changing the semantics of is_valid (by adding an is_valid_and_ready_to_go state) seemed ludicrous.

The one problem with the swappable widget is that it (of course) requires javascript on the part of the client (albeit very simple and cross-browser compatable), and I wasn't sure how palatable such a concept would be to the community here.  Though I haven't played with them recently in my code base (because our site requires them), non-swappable widgets have always been an alternative, and any developer with an aversion to the JS widgets could stick to just using  the static versions (though defaulting the country in a useful way becomes nearly impossible unless you ask them what country they live in prior to displaying the widget).

Anyway, I'd really like to help get this into the core, as we've found it to be easy to code with, and it provides clean ways to do radius searching against all sorts of geographic data.  The address system at least requires a number of acs-reference packages, and as such is a little unwieldy on the install -- not too bad, mind you, but I can see people without a need to use contact info not wanting to put up with the hassle.  I suppose it could be cut along the line between contact-info and addresses... Contact info has no external reqs to speak of as it is just a holder for telephone numbers, etc, and keeps a reference handy to an address object.  Contact info could be core and addresses an aftermarket option, and you'd still get a lot of advantages (like not needing to do DDL upgrades and overloading plpgsql functions on the core data model to install contact info after the fact).

Oh yeah... did i mention it's still PG-only? :)  Shouldn't be too painful to port, though.

Collapse
Posted by Jon Griffin on
John,

What format are you using for people? I have a package using the HR-XML standards for both people and addresses and was going to split that out (it was a client project). It maps to all known standards and is pretty lightweight, of course I had no need for geospatial data so it doesn't directly support that.

Maybe we should combine our efforts? My stuff works on both Oracle and PG as it was originally written for ACS classic and has since been ported.

I don't see a need for two similar packages and a combined acs-person would be a great start at getting rid of the junky core person stuff.

Collapse
Posted by John Mileham on
My req's for the people part of contact info were slim, so i just modeled the contact info data model after the PalmOS fields, as they seem to get the job done pretty well.  For now, the contact_info object type duplicates first and last name so that it can be used outside of the context of an ACS Person, as acs persons are a bit unwieldy for use on the level of an address book or something like that (how do you deal with many non-unique copies of a person in different peoples' address books, etc).  So when the contact info object was used in the context of being an offshoot of a person, the first_name and last_name fields were just left null, preferring to use the persons table for that info.  How does your model differ from the classic persons concept?  Or is your concept of a person similar to my contact_info?
Collapse
Posted by Peter Marklund on
I am working on a bid for a customer who needs to maintain a list
of contacts on a subsite level. Their site will be running on
Postgres but for demo purposes I can use Oracle. Does somebody have
an address book application available for download? If not, when is
it expected to be available? I tried installing the Address Book
on the latest OpenACS CVS tree both on Postgres and Oracle and
the APM kept saying "Address Book" doesn't support Oracle/Postgres.

What is the status of Palm OS / Outlook / Notes synchronization?

Thanks!