[Koha-devel] Review on Koha Order Module/plugin API

Arthur Suzuki arthur.suzuki at biblibre.com
Tue Sep 8 16:02:28 CEST 2020


Hi again Ola,

By seeing the email from David (and previous one from Martin), I just
realize I focused on the "API matter" , and "Plugin matter" went
completely out of my scope :)

I guess you know already but plugins could be a great way to expand Koha
API current capabilities by providing "contrib" routes (api extensions
provided by plugins).

Then, you could use plugin to leverage your developments from the
"hassle" of submitting your changes to the community.

Work done for the plugin could then maybe be reused at a later time to
get integrated to koha with much less effort.

Also about authentication, Koha Api also support "Basic Auth", which
might help you get rid of user having to log in (again?), given the
consumer app holds the koha user password in its data.

Good luck!

On 08/09/2020 15:27, dcook at prosentient.com.au wrote:
>
> Hi again Ola,
>
>  
>
> Apologies if my previous email came across as rude or aggressive. That
> certainly wasn’t my intention. I can be overly enthusiastic about
> technology and overly focus on details. I am very excited by the work
> you have in mind.
>
>  
>
> I think that it’s great that the Swedish Koha User Group has created a
> task group for creating a Order module/plugin for Koha. That use case
> seems like a good candidate for a Koha plugin. I do have critical
> feedback for the proposed design, but one of the advantages of Koha
> plugins is that it is easy to iteratively develop them.
>
>  
>
> Actually, I also have a few more questions. You mention that you
> haven’t hired a contractor yet, but you’ve proposed a particular
> design. I’m guessing that design is coming from the Vendor? I wonder
> if it would be worthwhile having that vendor get in touch with us. I
> suspect that the Koha community would be able to give the best advice
> if we knew more about the Vendor service.
>
>  
>
> Going back to the proposed design, if I understand correctly, I think
> you may run into issues doing the HTTP POST with the base64 encoded
> JSON data to Koha when unauthenticated, as the user will be prompted
> with a login screen that will perform another HTTP request to Koha,
> which means your “order” field will be lost. But maybe I’m missing
> something.
>
>  
>
> Thanks for posting to the listserv, and looking forward to hearing more.
>
>  
>
> David Cook
>
> Software Engineer
>
> Prosentient Systems
>
> 72/330 Wattle St
>
> Ultimo, NSW 2007
>
> Australia
>
>  
>
> Office: 02 9212 0899
>
> Online: 02 8005 0595
>
>  
>
> *From:*Koha-devel <koha-devel-bounces at lists.koha-community.org> *On
> Behalf Of *dcook at prosentient.com.au
> *Sent:* Tuesday, 8 September 2020 11:44 AM
> *To:* 'Ola Andersson' <ola.andersson at ltu.se>;
> koha-devel at lists.koha-community.org
> *Subject:* Re: [Koha-devel] Review on Koha Order Module/plugin API
>
>  
>
> Hi Ola,
>
>  
>
> I’ve only skimmed the document, but I really dislike the proposal.
> It’s not really describing an API. It’s describing a non-standard
> workaround. I’ve seen integrations like this before, but I wouldn’t
> recommend them, especially not for a new development.
>
>  
>
> I’d suggest that the Koha plugin provides an API where the Vendor
> Service can send the JSON in the body of a background POST request
> using AJAX. Once that POST request is complete, they could then offer
> a link to navigate to Koha. That link would be to the Koha plugin and
> include an identifier returned by the earlier AJAX POST request.
>
>  
>
> In Koha, the user logs in and sees the Vendor Service order as shown
> by the Koha plugin, and then you can action that order from there
> however you like. Easy.
>
>  
>
> You would need to provide authentication credentials to the Vendor
> Service, but that’s a reasonable thing to do when consuming an API.
>
>  
>
> I hope that helps.
>
>  
>
> David Cook
>
> Software Engineer
>
> Prosentient Systems
>
> 72/330 Wattle St
>
> Ultimo, NSW 2007
>
> Australia
>
>  
>
> Office: 02 9212 0899
>
> Online: 02 8005 0595
>
>  
>
> *From:*Koha-devel <koha-devel-bounces at lists.koha-community.org
> <mailto:koha-devel-bounces at lists.koha-community.org>> *On Behalf Of
> *Ola Andersson
> *Sent:* Tuesday, 8 September 2020 12:41 AM
> *To:* koha-devel at lists.koha-community.org
> <mailto:koha-devel at lists.koha-community.org>
> *Subject:* [Koha-devel] Review on Koha Order Module/plugin API
> *Importance:* High
>
>  
>
> Dear Koha Developers,
>
>  
>
> Here in Sweden we have started a task group in the Swedish Koha User
> Group to build a Order module/plugin to Koha that allow automatic
> influx of order data directly from a book vendor into Koha.
>
>  
>
> The APIdraft is described here:
> https://docs.google.com/document/d/13EIWxTlN3Wo-8OtJuwu5serQu-dl-zdpK1qY5BNs0dk/edit#heading=h.jtxo4681sgpr
>
>  
>
> We have had it posted for review in the Swedish user group – but we
> are thinking it would be valuable to get the larger Koha community to
> give feedback before we hire contractors to build the module/plugin.
>
>  
>
> Pleaseshare thoughts on the API and how to best implement it in Koha
> from a developer/QA perspective. All comments are appreciated and
> anyone looking at the Google docs above can send comments/suggestions
> into the document.
>
>  
>
> When the API is becoming more stable and comments have been looked at
> we could move it into the Koha wiki site.
>
>  
>
> Please leave comments before 21 September 2020.
>
>  
>
> /Swedish Koha User Group – the book vendor module/plugin task group
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200908/15ef5b05/attachment.htm>


More information about the Koha-devel mailing list