Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are two ways to go around here, which one to take depends on how will your software behave. </p> <p>One way is the <a href="http://www.martinfowler.com/eaaCatalog/plugin.html" rel="nofollow noreferrer">plugin</a> <a href="http://www.google.com/search?q=creating+an+API+plugin" rel="nofollow noreferrer">route</a>, where people can <strong>install new code</strong> into the application modifying the relevant aspects. This route demands your application is installable and not only offered as a service (or else that you install and review code sent in by third parties, a nightmare).</p> <p>The other way is to offer an <a href="http://www.google.com/search?q=creating+web+API" rel="nofollow noreferrer">API</a>, which can <strong>be called by the relevant parties</strong> and make the application transfer control to code located elsewhere (a la Facebook apps) or make the application to do as the API commands enable the developer (a la Google Maps).</p> <p>Even though the mechanisms vary and how to actually implement them differ, you have to, in any case, define</p> <ul> <li>What freedom will I let the users have? </li> <li>What services will I offer for programmers to customize the application? </li> </ul> <p>and the most important thing:</p> <ul> <li>How to enable this in my code while remaining secure and robust. This is usually done by sandboxing the code, validating inputs and potentially offering limited capabilities to the users.</li> </ul> <p>In this context, hooks are predefined places in the code that call all the registered plugins' hook function, if defined, modifying the standard behavior of the application. For example, if you have a function that renders a background you can have</p> <pre><code>function renderBackground() { foreach (Plugin p in getRegisteredPlugins()) { if (p.rendersBackground) p.renderBackground(); } //Standard background code if nothing got executed (or it still runs, //according to needs) } </code></pre> <p>In this case you have the 'renderBackground' hook that plugins can implement to change the background. </p> <p>In an API way, the user application would call your service to get the background rendered</p> <pre><code>//other code Background b = Salesforce2.AjaxRequest('getBackground',RGB(255,10,0)); //the app now has the result of calling you </code></pre> <p>This is all also related to the <a href="http://en.wikipedia.org/wiki/Hollywood_Principle" rel="nofollow noreferrer">Hollywood principle</a>, which is a good thing to apply, but sometimes it's just not practical.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload