Skip to main content

Posts

Showing posts with the label jQuery

Front End Technologies for Enterprise Applications : Things to Consider

 Front-End technologies and frameworks rapidly come and go from the market. It is very challenging to select the correct front-end technology for a new enterprise application. Many people only consider the technological capabilities of the technology. Though it is important to consider technology aspects, it is also important to consider the sustainability of the enterprise applications. Human talents are a crucial component for the sustainability of the application. This is very important to consider developer adaption and industry trends while you are choosing your front-end technology. Why it is important to consider human talents? Human Talent Availability - Employees move all the time. This technology which we are choosing should be popular or in demand in the market, so this organization can acquire resources easily. Human Talent Cost - When a new technology introduces it will be hard to find talent with the skill. This demand for talent will be high. so the cost is. Communit...

Recursively call Asynchronous function and wait for finish all before proceeding in JavaScript

In recently i have to work with problem which recursively call asynchronous methods. I tried with differed object $.when.appy ; but with large number of calls this method didn't show any constant result. Therefore i used some call back function with to archive this task. Here I'm a keeping a TrackCalls object to track async calls and their returns. If  any error occurred loop will be stopped and  notify.   var TrackCalls = { "callCount" : 0 , "receivedCount" :0 , "errorCount" :0};   function callBack() { setTimeout( function () {   if (TrackCalls.callCount == TrackCalls.receivedCount) { // all async call received } else if (TrackCalls.errorCount > 0) { // Error occurred in one of async call } else { callback(); } }, 2000); }   function AsyncCall( finised , failed) { TrackCalls.callCount++; $.ajax({url: "test.html" }) ...

Iterate (Loop) Object (Key value pair) in JavaScript and JQuery

Let assume y is our object which has following data and you need to iterate it in native JavaScript var y = {1: "2" , name: "value" , sN: "sV" } $.each(y,function(k,v){alert(k + v)}); in jQuery you can do the same thing like below var Y = {1: "2" , name: "value" , sN: "sV" } for (var k in Y) { if (y.hasOwnProperty(k)) { alert(y[k]) ; // value alert(k) ; // key } }

SharePoint 2013 List Operations in REST– Retrieve List Fields Basics

How to make a REST call in SharePoint App and SharePoint Provider Hosted App – Part 1 SharePoint 2013 List Operations in REST– Retrieve List  Fields Basics – Part 2 You can use the function specified in the first post to call the REST URLs. You can use the appropriate function depending on the App type you are developing. Get selected fields in SharePoint List using SELECT REST operation. Getting single value fields /* List Name : listname Columns: Title => Text , ID => Number */   var url = "/_api/web/lists/getbytitle('listname')/items?$select=Title,ID" ;   function s(data){   // get the data and convert to JSON Objects var d = JSON.parse(data.body).d.results[0]; alert(d.ID); alert(d.Title); }   function f(data){ alert(data); }   getREST(url,s,f); Getting Single value Lookup fields /* List Name : listname Columns: ID => Number , CountryLookup => List LooukUp */   var url = "/_api/web/lists/get...

REST operations in SharePoint 2013

REST operations are essential in any SharePoint development. This series explain available REST endpoints in SharePoint 2013. First article shows how we can made a REST call in both SharePoint Hosted and Provider Hosted app. How to make a REST call in SharePoint App and SharePoint Provider Hosted App – Part One SharePoint 2013 List Operations in REST– Retrieve List  Fields Basics – Part 2 Executing a REST GET call from SharePoint Provider Hosted App First you need to refer related JavaScript related. <script src= "http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" ></script> <script type= "text/javascript" src= "#SPWeb/_layouts/15/MicrosoftAjax.js" ></script> <script type= "text/javascript" src= "#SPWeb/_layouts/1033/init.js" ></script> <script type= "text/javascript" src= "#SPWeb/_layouts/15/sp.core.js" ></script> <script type= "text/j...