sensei icon indicating copy to clipboard operation
sensei copied to clipboard

multiple javascript clients on tree

Open dbuthay opened this issue 12 years ago • 3 comments

I'm trying to build some UI components to interact with sensei, similar to those I built on https://github.com/flaptor/indextank-jquery/

I noticed there are 2 clients on sensei's tree:

  • clients/javascript/sensei-client-1.0.0.js
  • sensei-core/src/main/webapp/js/sensei-client.js

It seems the latter is the good one, but I want to make sure that's the case before extending it and contributing back. Maybe someone already started doing related work

dbuthay avatar Mar 14 '12 03:03 dbuthay

For the new json-api, we actually do not have a js client, because the use can just simply use

$.post(url, request, function(res){/* do something */})

that js clent is for the old parameter based http api. mostly not used.

I'm trying to build some UI components to interact with sensei, similar to those I built on https://github.com/flaptor/indextank-jquery/

I noticed there are 2 clients on sensei's tree:

  • clients/javascript/sensei-client-1.0.0.js
  • sensei-core/src/main/webapp/js/sensei-client.js

It seems the latter is the good one, but I want to make sure that's the case before extending it and contributing back. Maybe someone already started doing related work


Reply to this email directly or view it on GitHub: https://github.com/linkedin/sensei/issues/32

wonlay avatar Mar 14 '12 04:03 wonlay

HI Diego:

You are right, the later is the right one.

THe first one was left there for legacy reasons. There was a dependency

in Signal build to it. I think it is fixed out.

Lei, please confirm.

Thanks

-John

On Tue, Mar 13, 2012 at 8:58 PM, Diego Buthay < [email protected]

wrote:

I'm trying to build some UI components to interact with sensei, similar to those I built on https://github.com/flaptor/indextank-jquery/

I noticed there are 2 clients on sensei's tree:

  • clients/javascript/sensei-client-1.0.0.js
  • sensei-core/src/main/webapp/js/sensei-client.js

It seems the latter is the good one, but I want to make sure that's the case before extending it and contributing back. Maybe someone already started doing related work


Reply to this email directly or view it on GitHub: https://github.com/linkedin/sensei/issues/32

javasoze avatar Mar 14 '12 04:03 javasoze

yes, the later are newer, what it does, is just the $.post.

An jquery plugin for sensei is a good idea. if you are trying to use the js client to do the query, the later one should be used.

wonlay avatar Mar 15 '12 00:03 wonlay