Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- API



  HTTP is not a transport protocol, HTTP is not RPC

Recently there was a question on the forums asking why we encourage usage of HttpRequestMessage<T> / HttpResponseMessage<T> in the signature of a web api implementation. The point made in the post is that if you have an ICalculator contract which your API implements, then it’s violating SOC / inappropriate to have those messages as params and in the contract. The argument is valid when looking at HTTP from the standpoint of an RPC mechanism, which is actually a quite co...

   HTTP,Transport protocol,RPC     2012-01-19 10:14:26

  Different ways to pass query parameters in EmberJS

In EmberJS, one could pass query parameters when retrieving resources with store.query() method. But what if there is a requirement that one wants to pass query parameters when calling store.findRecord()? Or there is a requirement that one wants to pass query parameters to a relationship when calling model.get('hasManyAttribute') in a RESTful style? In this post, we will explain how these can be achieved. In the store.query() case, one could easily pass the query parameters by passing ...

   RELATIONSHIP,EMBERJS,QUERY PARAMETERS     2018-05-18 10:47:56

  Bytes Matter

I love to profile applications, because I always learn something that surprises me. Initial Profiler Surprise: Client Side Case in point, I was recently profiling our Android application, the Famigo Sandbox. This app sends a lot of data back and forth with our API, as we try to determine which of the apps on your phone are safe for your kids. I always assumed that, if app performance suffered during some of the ...

   Byte,Low level,Operation,Importance     2012-02-28 08:07:22

  Mastering Async/Await in JavaScript: A Comprehensive Guide with Examples

As a veteran JavaScript developer, I have seen the evolution of JavaScript's asynchronous programming landscape. From callbacks to promises and now async/await, JavaScript has come a long way in making it easier to handle asynchronous operations in a clean and readable manner. In this article, we will delve into the world of async/await and explore why it has become a popular choice for handling asynchronous operations in JavaScript. We will cover the basics of async/await, its syntax, and how i...

   JAVASCRIPT,COMPARISON,PROMISE,ASYNC AWAIT     2023-02-12 07:26:15

  What we still can’t do client-side

With the rise of all these APIs and the browser race to implement them, you’d think that currently we can do pretty much everything in JavaScript and even if we currently can’t due to browser support issues, we will once the specs are implemented. Unfortunately, that’s not true. There are still things we can’t do, and there’s no specification to address them at the time of this writing and no way to do them with the APIs we already have (or if there is a ...

   Chanllenge,Client side,Server side     2012-01-10 07:22:31

  Java SynchronizedList and Iterator

While reading some material about concurrency, I come up with some writing about using SynchronizedList wrap about normal List to enable synchronization.   But one interesting thing is http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList%28java.util.List%29   It says     It is imperative that the user manually synchronize on the returned list when iterating over it:     1   List list = Collections.synchronizedList(new A...

       2015-12-03 03:04:08

  The several flavors of random in Java

Random number generation is one of most basic features in any programming language. The basic utilization is always the same: generate a random number between 0 and 1. With such a simple resource at hand we sometimes overlook some interesting features. What do we learn from the books? The most obvious and maybe intuitive way to generate random numbers in Java is simply calling: java.lang.Math.random() Random generation is in the Math utility class with abs, pow, floor...

   Java,Random,Thread,Math,Type     2012-03-22 14:17:44

  Sending message to Slack Incoming Webhook using PHP

Slack is a popular work collaboration tool and it provides many features which help teams collaborate. It has one function which allows sending messages to channels from external source such as your own web service -- Incoming Webhook. This is extremely useful when want to monitor something and get notified when some event occurs and it doesn't require complicated setup. To send messages using Incoming Webhook, a service URL has to be generated on Slack and then the message can be posted to this...

   PHP,CURL,SLACK,INCOMING WEBHOOK     2017-03-11 21:32:28

  jQuery to check whether checkbox is checked

In Vanilla JavaScript, the correct way of checking whether a checkbox is checked is to get the property checked of the checkbox. Assuming there is an checkbox with id "checkbox1", below line will return true if the checkbox is checked while it will return false if the checkbox is unchecked: document.getElementById("checkbox1").checked In jQuery, there are a few ways to check this. The first one is to using the corresponding counterpart of the Vanilla JavaScript, it is to check the checked proper...

   jQuery,checked,checkbox,attr,prop     2015-07-25 08:49:54

  New features in Java 9

Java 9 is planned to be released in March 2017. It will be 3 years since Java 8 was released. Are you still excited about the new features introduced in Java 8 such as Lambda, new Date APIs etc? Now Java 9 is to be released and there are also quite a few fantastic new features to be introduced. Below is a list of major new features in Java 9. Modular system. Java 9 will introduce a brand new modular system to organize Java codes. The modular system will divide different packages into diffe...

   JAVA,NEW FEATURE,JAVA 9     2016-04-05 09:56:01