Are you a member? sign in or take a minute to sign up

Cancel
User Id: Password:
SyrinxLogo-beulah.png

Syrinx CS Web Service - a new breed


Here is a goodnews for everyone who loves consuming services via restful api. SyrinxCS (aka SCS) had just implemented a support for web services api.

What makes this implementation however is that instead of creating proxy classes for you client, you simply had to write jquery and jquery.tmpl type of code. The jQuery ui-widget is the latest feature of SCS which I believe would make this web app a one of its kind.

The code below will retrieve a list of artiles in an scs web site.


<ul id="out" class="scs-ui scs-articles"
    data-options='{"id": "FrontPageHeadlines", "details":
    "basicDetails", "template": "ArtTemplate1", "expireIn": "1 Days"}'>
</ul>
<script id="out-pager-page" type="text/x-jquery-tmpl">
  <li id="i${index}" class="page-selector">${index}</li>
</script>

 The data-options is what makes this code possible. Here we are asking the webservice to provide us with all articles under the FrontPageHeadlines category with a basic  details of information (that is Title, PrimaryImage, the author and summary of the article.) The expireIn param controls the caching of the result.

A simple implementation of this is found in this link: http://lins.syrinx.ph/LocalExample4.htm If you view its source you would find how simply it is build. And here is another link using a pagination for longer data list: http://lins.syrinx.ph/localexample5.htm

 

Below is the one liner code that initialize the scs service:

<script>
 $(document).ready(function () {
  $(".scs-ui").scsSetupUI({ serviceUrl: "http://lins.syrinx.ph" });
});
</script>

There is much to say on this feature. I am not sure with you but in my expeirence the very limiting capability of an IFrame is frustrating. For example there are times you would like to reuse your site's content to a new site, and sure one issue I always get into is the formatting and layout that I would like on my new site.

Now with scs jquery-ui widget i can have it on an html and since the data is right off on my page my css would then take over.

To prove that is feature is super easy to implement, we have setup a demo site using a set of html template. The html is requesting from lins.syrinx.ph for the data. It simply host those content. Killer huh!

Demo site using html tempates: http://test1.syrinxcs.com