API standardization

2 views
Skip to first unread message

ilial

unread,
Oct 7, 2007, 2:52:14 PM10/7/07
to Finance-Bank
I have written interfaces to 2 banks: CIBC and President's Choice
(PC). Both are canadian banks. The modules are named
Finance::Bank::CIBC and Finance::Bank::PC. I would like to publish
these to CPAN. However, I have a third module Finance::Bank::Generic
which is an abstract base class that the two other modules subclass.

The source is available at http://svn.nurey.com/byob/trunk/perllib/Finance/Bank/

Please look at the pod at the bottom of Generic.pm. I am looking for
comments regarding the Finance::Bank::Generic API.

ilia.

ja...@mastros.biz

unread,
Oct 7, 2007, 8:29:16 PM10/7/07
to Finance-Bank
I think there's a lot of good that could be had from a standardized
API to banking modules -- in purticular, it'd allow for the creation
of applications that can use the approprate module to talk to whatever
bank the user happens to use. However, if we're going to do so, we
need a good starting place, and a good cat-hearder.

Perhaps we should start with a, er, simple starting place,
namespacing.

I'd like to suggest a simple standard that banking modules are named
Finance::Bank::CC::BankName, since just Finance::Bank::BankName would
tend to create duplicate banknames. (I can think of several
"PostBank"s, for example, at least a Norisbank and a Norrisbank, and I
would be unsurprised if there are several banks called PC.) Sadly,
even that isn't so simple. In addition to the large number of
existing Finance::Bank modules that don't fit that scheme, there are
some banks that don't have a clearly identifiable home country.
Dispite having seen many ads for HSBC, for example, I'd have to check
wikipedia to know where to look for them (in fact, even afterwords,
good arguments could be made for GB or HK).
So, even that isn't all that simple.

In any case, it seems that while ::Generic makes a good base class for
those two banks, its API isn't terribly well-documented from a user
standpoint. Please, give documentation of the *user* API you'd like
to see supported, so we can poke holes in it. ;)

-=- James Mastros
Just another Finance::Bank hacker

Ilia

unread,
Oct 8, 2007, 9:44:59 PM10/8/07
to financ...@googlegroups.com
Thank you James for stepping up :)

I can see how adding country code to the module name would be helpful,
but what if there's a transnational bank?

I suggest the first come first served approach. Use the best available
name for your bank module. If there's a clash, then add the country
code.

As for Finance::Bank::Generic I agree my pod is lacking. I will work
on adding more docs. Stay tuned.

ilia.

Reply all
Reply to author
Forward
0 new messages