[aur-dev] [PATCH] Implemented typeahead suggest

Marcel Korpel marcel.lists at gmail.com
Mon Dec 17 13:06:57 EST 2012

On Sun, Dec 16, 2012 at 7:05 PM, canyonknight <canyonknight at gmail.com> wrote:
> So after thinking about this some more, what are your thoughts on
> adding a method to aurjson.class.php and having the JavaScript call
> rpc.php for the JSON data instead of a new suggest.php file?

Changing the function to a method in aurjson.class.php seems all right
to me, it's a logical place to put that function in. BTW, why is
aurjson.class.php the only OO PHP file in the AUR and the rest merely
procedural? Not that I'm in favor of one or the other (and my OOP
skills are limited to prototypal OOP in JavaScript).

However, it would imply quite a change of aurjson.class.php, as many
methods in it are specifically meant for the current RPC interface.
E.g., 'search' is not designed for this specific suggest search and
'json_results' produces an object rather than an array.

Or would you want to include a new public method called 'suggest_search'?

Regards, Marcel

More information about the aur-dev mailing list