<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:remialcxesans;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:windowtext'>Testing is always an interesting one. <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>I’d say unit tests for the API functions and unit tests for the controller functions. You could mock the API for the latter. For integration tests, you could use selenium to test the integration between the two. Alternatively, manual integration tests. <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Personally, I’m hugely in favour of using the API for all business logic for OPAC functionality. The Koha OPAC could be a reference implementation and out-of-the-box solution, but then third party apps and library websites could opt out of using the Koha OPAC and instead just integrate with the API directly. I think a lot of my clients would actually prefer to integrate a Koha OPAC API into their own websites rather than using the Koha OPAC website. <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>I suppose one downside could be the Koha OPAC website could become neglected, if everyone was just maintaining their own user interfaces. But I imagine a lot of people would still want to use the Koha OPAC website too. (After all, integrating with third-party APIs can be very challenging too!)<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='color:windowtext'>David Cook<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Systems Librarian<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Prosentient Systems<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>72/330 Wattle St<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Ultimo, NSW 2007<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Australia<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Office: 02 9212 0899<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Direct: 02 8005 0595<o:p></o:p></span></p></div><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='color:windowtext'>From:</span></b><span lang=EN-US style='color:windowtext'> Arthur Suzuki <arthur.suzuki@biblibre.com> <br><b>Sent:</b> Tuesday, 8 October 2019 11:17 AM<br><b>To:</b> koha-devel@lists.koha-community.org; dcook@prosentient.com.au; 'Katrin Fischer' <katrin.fischer.83@web.de><br><b>Subject:</b> Re: [Koha-devel] API use in intranet and OPAC<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:windowtext'>One but not least issue with JavaScript, how do we test this?<br><br>I mean it's easy to test the API itself, making requests to it and monitoring the change in the koha db or mock objects.<br><br>It's also easy to check if the Intranet or Opac page returned by the server contains some strings in the html code (I guess, didn't try though).<br><br>How do we execute the Javascript in the test and verify it has the expected behavior?<br><br>Overall I have to say I'm very happy with this change (using more API) though, since it will raise interest for this further and can bring Koha to a whole new level within libraries app,<br>Koha being at the core of other third parties apps to interact with (not to mention them: Coral ERMS and Bokeh Library Frontend).<br>\o/<br><br><o:p></o:p></span></p><div><p class=MsoNormal><span style='color:windowtext'>Le 8 octobre 2019 01:53:59 GMT+02:00, <a href="mailto:dcook@prosentient.com.au">dcook@prosentient.com.au</a> a écrit :<o:p></o:p></span></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal><span style='color:windowtext'>I agree with Katrin. I think we need to be careful to think as developers in the open source GLAM space rather than the less accountable corporate space. While I’m a few years out of date when it comes to accessibility, I do still have some friends who are experts in that area and could get their opinion on the matter. From what I remember, Javascript != accessible. I think it was because screenreaders, at least historically, didn’t render the Javascript and that caused the lack of functionality for people with accessibility needs.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>I’d also add that we can use the API without using Javascript. We could build a lightweight controller which does the API call on the server backend rather than from the client browser, so the user could POST to a CGI .pl script (or a PSGI route), and the API handles all the real business logic. <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>If we wanted to be modern, we could use Javascript to call the API, but fail gracefully by POSTing the form instead if Javascript turns off. I know that would be a lot more work, but that could way we could keep the modernity while also maintaining accessibility. <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Just my 2 cents. <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='color:windowtext'>David Cook<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Systems Librarian<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Prosentient Systems<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>72/330 Wattle St<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Ultimo, NSW 2007<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Australia<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Office: 02 9212 0899<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Direct: 02 8005 0595<o:p></o:p></span></p></div><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='color:windowtext'>From:</span></b><span lang=EN-US style='color:windowtext'> Koha-devel <<a href="mailto:koha-devel-bounces@lists.koha-community.org">koha-devel-bounces@lists.koha-community.org</a>> <b>On Behalf Of </b>Katrin Fischer<br><b>Sent:</b> Tuesday, 8 October 2019 7:31 AM<br><b>To:</b> <a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a><br><b>Subject:</b> Re: [Koha-devel] API use in intranet and OPAC<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>If we decide to require JavaScript for the OPAC we should be careful to do it in a way that is accessible. Accessibility can even be a legal requirement in some countries for websites of public institutions like libraries.<o:p></o:p></p><p>Katrin<o:p></o:p></p><div><p class=MsoNormal>On 07.10.19 13:28, Kyle Hall wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>I think it's pretty practical at this point in time to agree that if we are to continue making a modern web app, we need to require javascript.<br clear=all><o:p></o:p></p><div><div><div><div><div><div><div><div><div><div><p class=MsoNormal><span style='font-size:12.0pt'>---<o:p></o:p></span></p></div></div><div><p class=MsoNormal><a href="http://www.kylehall.info" target="_blank">http://www.kylehall.info</a><br>ByWater Solutions ( <a href="http://bywatersolutions.com" target="_blank">http://bywatersolutions.com</a> )<br>Meadville Public Library ( <a href="http://www.meadvillelibrary.org" target="_blank">http://www.meadvillelibrary.org</a> )<br>Crawford County Federated Library System ( <a href="http://www.ccfls.org" target="_blank">http://www.ccfls.org</a> )<o:p></o:p></p></div></div></div></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Mon, Oct 7, 2019 at 7:16 AM Marcel de Rooy <<a href="mailto:M.de.Rooy@rijksmuseum.nl">M.de.Rooy@rijksmuseum.nl</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div><div><p class=MsoNormal><span style='font-size:12.0pt'>Yeah I guess we reached the point that we just need javascript in OPAC ?<o:p></o:p></span></p></div><div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-family:"Verdana",sans-serif;color:#000001'> </span><span style='font-size:1.0pt;font-family:"remialcxesans",serif;color:white'>​</span><span style='font-family:"Verdana",sans-serif;color:#000001'><o:p></o:p></span></p></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'> <o:p></o:p></span></p></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:5.25pt 0cm 0cm 0cm'><p class=MsoNormal><a href="http://www.rijksmuseum.nl/" target="_blank" id="gmail-m_-923015649500538976LPlnk689713"><span style='font-size:1.0pt;text-decoration:none'><img border=0 width=185 height=23 style='width:1.927in;height:.2395in' id="_x0000_i1025" src="cid:image001.png@01D57DC6.ABD75430"></span></a><span style='font-size:1.0pt'><o:p></o:p></span></p></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='line-height:15.0pt'><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'>Museumstraat 1<br>Postbus 74888<br>1070 DN Amsterdam<br><a href="http://www.rijksmuseum.nl/" target="_blank" title="http://www.rijksmuseum.nl" id="gmail-m_-923015649500538976LPlnk689713"><strong><span style='font-family:"Verdana",sans-serif;color:#000001;text-decoration:none'>Rijksmuseum.nl</span></strong></a><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'>Nu te zien:<br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><a href="https://www.rijksmuseum.nl/nl/louise-bourgeois-in-de-rijksmuseumtuinen" target="_blank" title="https://www.rijksmuseum.nl/nl/louise-bourgeois-in-de-rijksmuseumtuinen" id="gmail-m_-923015649500538976LPlnk689713"><strong><span style='font-family:"Arial",sans-serif;color:#000001;text-decoration:none'>​</span></strong><strong><span style='font-family:"Verdana",sans-serif;color:#000001'>Louise Bourgeois in de Rijksmuseumtuinen</span></strong></a><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><a href="https://www.rijksmuseum.nl/nl/nachtwacht" target="_blank" title="https://www.rijksmuseum.nl/nl/nachtwacht" id="gmail-m_-923015649500538976LPlnk689713"><strong><span style='font-family:"Verdana",sans-serif;color:#000001'>Operatie Nachtwacht</span></strong></a><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'>Verwacht:<br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><a href="https://www.rijksmuseum.nl/nl/nu-in-het-museum/tentoonstellingen-verwacht" target="_blank" title="https://www.rijksmuseum.nl/nl/nu-in-het-museum/tentoonstellingen-verwacht" id="gmail-m_-923015649500538976LPlnk689713"><strong><span style='font-family:"Verdana",sans-serif;color:#000001;text-decoration:none'>Rembrandt-Velázquez. Nederlandse & Spaanse meesters</span></strong></a><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><br></span></b><b><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#000001'>​</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'>T/m 18 jaar gratis<br>  <br> </span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#00B050'>Please think before you print</span></b><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#000001'><o:p></o:p></span></b></p></td></tr></table></td></tr></table></td></tr></table></div></div><p class=MsoNormal>_______________________________________________<br>Koha-devel mailing list<br><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br><a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><o:p></o:p></p></blockquote></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>Koha-devel mailing list<o:p></o:p></pre><pre><a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><o:p></o:p></pre><pre><a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><o:p></o:p></pre><pre>website : <a href="http://www.koha-community.org/">http://www.koha-community.org/</a><o:p></o:p></pre><pre>git : <a href="http://git.koha-community.org/">http://git.koha-community.org/</a><o:p></o:p></pre><pre>bugs : <a href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a><o:p></o:p></pre></blockquote></blockquote></div><p class=MsoNormal><span style='color:windowtext'><br>Arthur Suzuki<br>Développeur Support chez BibLibre<br>+33 6 37 94 13 53<o:p></o:p></span></p></div></body></html>