How AngularJS communicates with web services

Few posts ago I have created a simple open source AngularJS project named Angular Starter. The structure and overview of Angular Starter is covered in one of HTMLCenter blog posts.

This time, I’m going to introduce the example of http communication to Angular Starter application in order for the web app to communicate with cloud-based services. APIs and web services are usually the main sources of data for Angular.js applications and a good example always helps.

Angular Starter Update

Recent Angular Starter source update has introduced example communication with httpbin.org web service in order to retrieve users IP address before proceeding with login. httpbin.org web service is great for testing various API requests. It can mock many example API responses, including but not limited to xml, json, html and it even supports streaming response examples. Angular Starter project uses this service for receiving IP address of the client application.

What is 2 way binding in Angular.js

Many developers name 2 way binding as the main advantage of Angular.js framework. So what 2 way binding actually is and how it helps Angular.js framework to deliver better experience?

1 way data binding

The below images explain the difference quite well.

In MVC (model, view & controller) world 1 way data binding happens when controller generates view by merging model and view template. This process happens once and generated view is then sent to the client application. Once client application receives rendered view there is no easy way to automatically update this view if model data changes.

View is only regenerated once user refreshes the the app screen / page with current view. Or navigates to another application page.

How to Speed Up Your WordPress Site

I haven’t had the best relationship with the issue of site speed over the years, if I’m honest. I mean, even though I knew that it’s obviously important, I wasn’t doing much testing to find out how fast my site was for its actual audiences.

After all, the site loaded just fine for me (when doing administrative tasks, publishing content and so on), so it’s probably the same for my audience too, right?

Well, not quite. As it turned out, the average visitor had to wait around eight seconds (that’s 8) for my site to load. I was quite shocked to see that number, and that’s probably why I remember it so clearly.

A Few UX Suggestions for Windows Phone 7

Windows Phone 7Having used my HTC Surround Windows Phone 7 handset for a few months, now, I’ve come up with a few items to add to a user experience wishlist. If you have any other serious suggestions (i.e. not “make it an iPhone” or something like that), I’d be glad to hear them.

Some Handy Windows Keyboard Shortcuts

The other day on Friendfeed, I noticed Matt Mastracci posted a link to an article explaining how and why additional keys were added to and removed from Mac (and PC) keyboards. It is an interesting read, but I found something even more interesting to me in the comments at the end of the article.

One commenter posted a handful of keyboard shortcuts you can use in Windows. Before reading the comment, I always thought that the “Windows” key on my keyboards did nothing more than open and close the “Start” menu (as did the author of the article, it seems). The commenter, however, pointed out that it also can be used to perform some pretty handy actions in Windows (I have only tested them on Windows 7, so I can’t comment as to how far back they are compatible with Windows or whether or not they are compatible with Linux in any way).

Following are the shortcuts he pointed out:

Advent Calendars for Geeks on the Web

advent-calendar
Photo found on PaperLadyInvite’s Flickr stream (Creative Commons attribution at the bottom of this post).

Those of you familiar with religious Christmas-season (at least in the western hemisphere) traditions have probably heard of (and possibly even enjoyed) an Advent calendar a few times in your life. For those of you that don’t know about Advent or Advent calendars, here is a quick history, so you’ll understand the concept:

Advent is the season immediately prior to Christmas. It is a four-week event that begins on the Sunday that occurs four weeks before Christmas Day (so, this year, it began last Sunday, Nov. 29, 2009). Traditionally, there is a wreath that includes four candles (one for each Sunday between the start of Advent and Christmas Day). On the first Sunday of Advent, you light the first candle in the wreath. On the second Sunday, you light the first and second candles, etc.

Pages: