cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2666
Views
10
Helpful
8
Replies

Cisco Finesse JS lib documentation? and I don't mean this [https://developer.cisco.com/site/finesse/docs/guides/javascript-library/]

I have been trying to understand the Cisco Finesse JS Library to implement a Gadget for Finesse. But I am unable to find any reasonable document which can make me understand what is actually going on behind the scene. let me share what I found


Cisco Finesse Webservice Guide Chapter 9

Cisco Finesse JS Lib (Doesn't make any sense)

I have downloaded a sample gadget and I am actually able to get the events on Start of a call and at the end of the call, But I don't know how it is happening for example (I'll be putting comments in code )

<code>

   /**
  * Handler for additions to the Dialogs collection object. This will occur when a new
  * Dialog is created on the Finesse server for this user.
  */
   handleNewDialog = function(dialog) {

   render(dialog);
   numDialogs++;

   },

   /**
  * Handler for deletions from the Dialogs collection object for this user. This will occur
  * when a Dialog is removed from this user's collection (example, end call)
  */
   handleEndDialog = function(dialog) {

  callvars = dialog.getMediaProperties();
   var userId = user.getId();
   //alert ("value modified" +callvars["callVariable1"]);
  // decrement the number of dialogs
   numDialogs--;

   PushWrapUpCode(userId);
   //render(dialog);
   },

</code>

This code has handleNewDialog and handEndDialog, There is absolutely no information about these two methods how and why these are working in any kind of document I have ever come across. I found author of the finesse.js written in the file

* Simple JavaScript Inheritance
* By John Resig http://ejohn.org/
* MIT Licensed.
*/
// Inspired by base2 and Prototype

Searched through his website John Resig - and found nothing actually I did find a word "finesse" but that wasn't cisco finesse.

I would really appreciate if someone has any document link or can explain the flow.

8 Replies 8

dekwan
Cisco Employee
Cisco Employee

Hi,

Which sample gadget did you use? I suggest looking at the LearningSampleGadget if you weren't already. That sample gadget starts with a fairly empty gadget and walks through step by step to initiate the appropriate classes and (hopefully) explains it all. Also, have you seen the latest Finesse overview on the Finesse page?

There isn't any documentation on what happens behind the scenes on the Finesse desktop, but the learning sample gadget should be the instructions on how to build gadgets. If this information in that sample gadget is not sufficient, please let me know and I can try to incorporate your feedback into it.

As far as the handleNewDialog and handleEndDialog, they are onCollectionAdd and onCollectionDelete handlers for the user.getDialogs. This means that when the /Dialogs collection gets a new dialog (new call), it will call handleNewDialog and when a dialog gets deleted (end call), it will call handleEndDialog

// Get an instance of the dialogs collection and register handlers for dialog additions and // removals
dialogs = user.getDialogs( {

onCollectionAdd : handleNewDialog,

onCollectionDelete : handleEndDialog });

JohnResig is actually not the author of finesse.js. There is no one author of the library as it was written by multiple people on the Finesse team.

Thanx,

Denise

yes , this is right i did exactly like what Rana did

I am Searched about anything related to this without any result , about (finesse.js) understanding , concepts ,,, even i viewed some java script videos to can understand what is written ,no result ,

it was funny because i also searched about the name in finesse.js John Resig and hoped to can find anything ......but nothing

Cisco only published Code , but there isn't any documentation about classes ,code itself , how to use it .... etc

even they didn't mention which skills needed to can understand this code .....

i saw all finesse sessions in cisco live to can find anything related to this topic , they are only talk about finesse features ,, functionality , etc ...

Sample Gadget only contain instructions about how to install gadget , run it ( not to understand which part needed for which function ,

Hope that someone can help use in understanding this code

BR

Hi,

Have you taken a look at the JavaScript library doc: Cisco DevNet: Finesse - Guides - JavaScript Library This documentation is the classes and methods in the finesse.js. I will agree that it isn't the best documentation and it doesn't fully explain everything as hoped. I have been pushing to get this fixed and updated. What would you like to see in the documentation? This would be good feedback to try to send to the team.

Funny you mention Cisco Live because I actually do two workshops at the DevNet zone @ Cisco Live US around the REST API and JavaScript API: Session Catalog - Cisco Live US Unfortunately though, since it is a hands on workshop, it isn't in the on demand PPT. If you are coming to Cisco Live at the end of June, feel free to come to my session. What type of content would you like to see?

Have you taken a look at the LearningSampleGadget like i suggested to Rana? That one has a 26 PDF walking you through how to use the User object and the Dialog object. I know it isn't everything you would need, but I think it is a good first step.

Thanx,

Denise

I think intro for Gadget Development will be needed :

Skills required for the one who will need to develop , because I think , and i am talking about my self

as IPCC engineer , i need to learn this , not to bring up developer to do things like that as

in the near future , a lot of things like integration with any other system will be based on Gadget development

so i think its mandatory for any Cisco IPCC to have robust knowledge about that.

and Originally we are not developers , but i can learn anything needed in my work

just i am missing the important Part , how to start ?, which study material needed ? which skills is needed ?

and if there are more info and explanation about the code itself , i think it will be useful and handy  for IPCC to start play using this Code and do whatever is needed  , I am Talking to the system its great thing and deserve efforts

about Sample Gadget , I read it , Bu i am still convinced , its like installation or deployment guide, but not for understanding the core elements and the core it self

Thanks for your replay and your time Denise

BR

Thank you for your feedback. You have very good points. I will take it and bring it to the Finesse team. I will try to add some of this information in the DevNet Finesse microsite when I get a chance. I appreciate you taking the time and letting us know.

Thanx,

Denise

Unfortunately , i will not be able to attend your sessions in Cisco Live , 

So, if you can provide me with any info , skills required to start this way
as I am not programmer , but i wanna learn this
i will be thankful

BR

Hi,

I would recommend some HTML/JavaScript courses. There are a lot of free ones from Coursera, Udacity, etc. Also, since you are not a programmer, you might benefit from basic programming courses. This way, you can learn about if/else statements and the logic used.

Looking at Coursera as an example, I see the following based off of the course title and description:

Some of the above courses are geared to people with absolutely no programming experience so it might help you avoid the basic programming courses.

I will put a huge disclaimer that I haven't taken these courses in particular. I have taken courses from Coursera though.

Thanx,

Denise

Really , I appreciate your time and efforts

I asked a friend who is programmer to have a look on Finesse.JS Code and he told me that :

the Code level is advanced , and

contain Node.js coding which is under  java script umbrella as new technology to be used in Server side as normal JavaScript code initially was client side , also contain ajax


my question , i will need to learn all this technologies to start understanding this Code , or Basic will put me on the road ?