<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What Javascript framework is this line? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/What-Javascript-framework-is-this-line/m-p/138288#M8320</link>
    <description>&lt;P&gt;Unfortunately, I can't point you to some hard evidence in the form of comprehensive documentation. From experience however I can tell you what this is used for: when you create components in Simple XML on a dashboard and you want to do something with it in javascript (e.g. add a custom table cell renderer to a table, change the options of a multiselect, listen to changes on inputs and much more). See &lt;A href="http://dev.splunk.com/view/SP-CAAAES3"&gt;here&lt;/A&gt; for a simple example, &lt;A href="http://dev.splunk.com/view/SP-CAAAEVY"&gt;here&lt;/A&gt; for a more comprehensive one, and &lt;A href="http://docs.splunk.com/Documentation/WebFramework"&gt;here&lt;/A&gt; for the (mostly) complete reference of this web framework.&lt;BR /&gt;
There are two such methods: &lt;CODE&gt;mvc.Components.get()&lt;/CODE&gt;, which will only work when the object is already there and throw an error if it isn't, and &lt;CODE&gt;mvc.Components.getInstance()&lt;/CODE&gt; will create the object if it doesn't already exist - see &lt;A href="https://answers.splunk.com/answers/204813/splunkjs-whats-the-difference-between-get-and-geti.html"&gt;this question here&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Generally, the frameworks used are listed &lt;A href="http://dev.splunk.com/view/webframework-splunkjsstack/SP-CAAAESV"&gt;here&lt;/A&gt;, so you will have to find most of the methods described within those (most importantly to you as a developer, backbone.js and jquery.js). However I have to admit that it can be frustrating sometimes, because for instance both backbone.js and jquery.js provide a method to listen to events with &lt;CODE&gt;.on("change", someHandler)&lt;/CODE&gt;, but their functions use slightly different syntax and you're left to figure out which one to use.&lt;/P&gt;

&lt;P&gt;In the case of the &lt;CODE&gt;get()&lt;/CODE&gt; you mentioned, I'd say it comes from backbone.js because it is in the class &lt;CODE&gt;mvc&lt;/CODE&gt; which is also from backbone.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jul 2015 08:01:40 GMT</pubDate>
    <dc:creator>jeffland</dc:creator>
    <dc:date>2015-07-27T08:01:40Z</dc:date>
    <item>
      <title>What Javascript framework is this line?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/What-Javascript-framework-is-this-line/m-p/138287#M8319</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;mvc.Components.get('highlight').getVisualization(function(tableView)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've been searching a lot on where do I find this line of code on many frameworks but unfortunately I can't find any. Can you point me to the right direction? Because I really want to know what the code really does and I want to utilize it to what I want to do. Thank you so much. Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2015 06:12:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/What-Javascript-framework-is-this-line/m-p/138287#M8319</guid>
      <dc:creator>josefa123</dc:creator>
      <dc:date>2015-07-27T06:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: What Javascript framework is this line?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/What-Javascript-framework-is-this-line/m-p/138288#M8320</link>
      <description>&lt;P&gt;Unfortunately, I can't point you to some hard evidence in the form of comprehensive documentation. From experience however I can tell you what this is used for: when you create components in Simple XML on a dashboard and you want to do something with it in javascript (e.g. add a custom table cell renderer to a table, change the options of a multiselect, listen to changes on inputs and much more). See &lt;A href="http://dev.splunk.com/view/SP-CAAAES3"&gt;here&lt;/A&gt; for a simple example, &lt;A href="http://dev.splunk.com/view/SP-CAAAEVY"&gt;here&lt;/A&gt; for a more comprehensive one, and &lt;A href="http://docs.splunk.com/Documentation/WebFramework"&gt;here&lt;/A&gt; for the (mostly) complete reference of this web framework.&lt;BR /&gt;
There are two such methods: &lt;CODE&gt;mvc.Components.get()&lt;/CODE&gt;, which will only work when the object is already there and throw an error if it isn't, and &lt;CODE&gt;mvc.Components.getInstance()&lt;/CODE&gt; will create the object if it doesn't already exist - see &lt;A href="https://answers.splunk.com/answers/204813/splunkjs-whats-the-difference-between-get-and-geti.html"&gt;this question here&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Generally, the frameworks used are listed &lt;A href="http://dev.splunk.com/view/webframework-splunkjsstack/SP-CAAAESV"&gt;here&lt;/A&gt;, so you will have to find most of the methods described within those (most importantly to you as a developer, backbone.js and jquery.js). However I have to admit that it can be frustrating sometimes, because for instance both backbone.js and jquery.js provide a method to listen to events with &lt;CODE&gt;.on("change", someHandler)&lt;/CODE&gt;, but their functions use slightly different syntax and you're left to figure out which one to use.&lt;/P&gt;

&lt;P&gt;In the case of the &lt;CODE&gt;get()&lt;/CODE&gt; you mentioned, I'd say it comes from backbone.js because it is in the class &lt;CODE&gt;mvc&lt;/CODE&gt; which is also from backbone.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2015 08:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/What-Javascript-framework-is-this-line/m-p/138288#M8320</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-07-27T08:01:40Z</dc:date>
    </item>
  </channel>
</rss>

