Of course, all these things _can_ be done with only client-side
javascript API. To my perspective, it is quite a bit more complex to do
it that way. And complexity is the enemy of maintainability, especially
in my limited staff resources library environment.

But perhaps my perspective is not sufficiently "2.0" (or "3.0"); I've
been a software developer for a long time, but doing client side
javascript stuff for less. Maybe I'm wrong. I dunno. To me, it looks
quite a bit more complex to try and provide these services with the same
level of control and customization in a "don't repeat yourself" modular
way accross all my various display systems that need this functionality,
using client side javascript services.  Other developers, do you think
I'm wrong?

Jonathan

Godmar Back wrote:
On Mon, Mar 17, 2008 at 10:41 AM, Jonathan Rochkind <[EMAIL PROTECTED]> wrote:

Well, the SFX architecture has a feature called "display logic" that
 let's you on the server side determine how the menu will display based
 on what services are available. This is more obviously relevant to
 "digitized text availability" from Google Books than just cover images.
 You might want to suppress ILL links if there is digitized text (in
 fact, you probably wouldn't in that particular case, but that gives you
 the idea of what things you might want to do. At least my library
 wouldn't, maybe others with especially small ILL budgets might).  Or
 just give a pre-ILL warning message ("are you sure the Google text isn't
 sufficient?), that might be more realistic.

 Anyway, you obviously couldn't do this using the existing SFX display
 logic feature if the Google Books info is only client side.
 Now, "impossible?"  In the world of software development, few things are
 actually impossible. You could try to duplicate that feature using only
 client-side Javascript hiding and showing various DIVs.  The SFX HTML
 currently isn't that clean, it woudl be hard. But you have the
 capability to customize the SFX HTML however you want to. (And your
 customizations will likely break with a future SFX release).   So
 nothings impossible, but I wouldn't want to go down that road.



Your particular requirement (hide the ILL link if Google has text) is
easily implemented using the gbs classes: simply wrap the ILL link in
a <span class="gbs-if-noview">...</span> and you're done. SFX will
likely preserve such <span> tags across releases since it doesn't know
what style you're applying.

If I were you, I'd probably look for a server-side solution first,
too, but let's discuss the architectural differences a bit more.

You mentioned modularity and maintainability - I'd say that a
client-side solution can be kept modular and maintainable as well - in
particular if you minimize the actual JavaScript code you embed in
your output page.

In addition, client-side has significant advantages in both latency
and scalability, in particular when mashing in data from a provider
with a distributed architecture that has a degree of redundancy, and
therefore availability, that is as high Google's.

 - Godmar



--
Jonathan Rochkind
Digital Services Software Engineer
The Sheridan Libraries
Johns Hopkins University
410.516.8886
rochkind (at) jhu.edu

Reply via email to