Differences between Promise and Observable in Angular

Code examples and video tutorials about Promise and Observable in Angular.js
05 September 2017   9707


Promise handles a single event when an async operation completes or fails.

Note: There are Promise libraries out there that support cancellation, but ES6 Promise doesn't so far.


An Observable is like a Stream (in many languages) and allows to pass zero or more events where the callback is called for each event.

Often Observable is preferred over Promise because it provides the features of Promise and more. With Observable it doesn't matter if you want to handle 0, 1, or multiple events. You can utilize the same API in each case.

Observable also has the advantage over Promise to be cancelable. If the result of an HTTP request to a server or some other expensive async operation isn't needed anymore, the Subscription of an Observable allows to cancel the subscription, while a Promise will eventually call the success or failed callback even when you don't need the notification or the result it provides anymore.

Observable provides operators like mapforEachreduce, ... similar to an array

There are also powerful operators like retry(), or replay().

TIOBE Index for July 2018 Released

Top programming lanuages for July 2018 index released: TypeScript continues to gain popularity 
09 July 2018   198

TypeScript entered the top 50 of the TIOBE index. A month earlier it appeared for the first time in the top 100 on line 93. TS is slowly catching up on the popularity of its competitor Dart from Google and behind it by 26 positions. TIOBE attribute this success to TypeScript with the popularity of the Angular framework, the latest versions of which are written in TS.

Objective-C returned to the top ten, Haskell - in the top 50. The scripting language Lua rose from 36 to 25 places. But F #, flew to the 36th line, losing 19 positions.

TIOBE July 2018 top 20
TIOBE July 2018 top 20

Since this month, two new programming languages have been added to the rating: Chapel and Pony. They took 97 and 173 places respectively.

TIOBE Index July 2018 Trends
TIOBE Index July 2018 Trends

The popularity of JavaScript is still high. All first half of 2018, the language spent in the top 10 and lost only 2 positions in February.

It is important to note that the rating does not show the "best" programming language, but only reflects the interest of IT industry representatives. The authors of TIOBE take into account the number of specialists around the world using a certain language, the number of language courses on educational resources, analyze the popularity of the AP with the help of the search engines of Google, Bing, Wikipedia, Amazon, YouTube, Baidu and others.