in reply to Re: Perl, Android web app, AJAX, JSON
in thread Perl, Android web app, AJAX, JSON

Hi Rolf and thanks for your input. The mobile app is being built in HTML5 but the various drop-down boxes need to be populated with data from the CMS.

Regarding the extendibility of the CMS it can be thought of as "infinite". :p

The CMS was written by myself and weights more than 1Mb of object oriented Perl code, with certain modules already exposing web methods that accept POSTs/GETs, provided that the POST/GET request is accompanied by the authentication session cookie.

My question was, shall I write the API using AJAX or only stick with JSON for the data interchange?

Cheers,

Konstantinos

  • Comment on Re^2: Perl, Android web app, AJAX, JSON

Replies are listed 'Best First'.
Re^3: Perl, Android web app, AJAX, JSON
by LanX (Saint) on Nov 21, 2017 at 12:01 UTC
    > My question was, shall I write the API using AJAX or only stick with JSON for the data interchange?

    This is not an XOR question, a XMLHttpRequest can perfectly interact with REST and process JSON and/or XML.

    What do you mean with AJAX ? ? ?

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Wikisyntax for the Monastery

      As I understand it, my CMS could expose an AJAX layer to the mobile app, which would make RP calls to AJAX methods in the CMS, possibly using jQuery.
        I'm not sure what you mean with "AJAX layer" and "AJAX methods" in the CMS.

        AJAX is primarily JS interacting with a XMLHttpRequest:

        Particularly, retrieval of data from XHR for the purpose of continually modifying a loaded web page is the underlying concept of Ajax design. Despite the name, XHR can be used with protocols other than HTTP and data can be in the form of not only XML, but also JSON, HTML or plain text

        This is mostly off topic here, maybe try to get informed and reiterate your question.

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Wikisyntax for the Monastery