Using global variables in Node.js / JavaScript

JavaScript in Web Browsers window is the highest object in web browsers. window.foo = 'bar'; JavaScript in Node.js There is no window in Node.js but there is another highest object called global. global.foo = 'bar'; Process Environment Variables in Node.js All process environment variables are available in…

Should I use JavaScript MVC Frameworks?

Feel like everyone talks about... I feel like everyone is talking about JavaScript MVC frameworks like Backbone.js, Angular.js, Ember.js and React.js. Web applications like GMail, Google Maps has emerged since AJAX has been popular in mid 2000s. Text editors, office softwares, canban boards and monitoring dashboards…

Primus for Realtime Web Apps

Why Primus ? You may heard of Socket.io which is one of the most popular libraries in Node.js and it is used by many services that are using realtime features like push notification and realtime updated contents. The problem is that Socket.io is not being maintained actively and…

Getting oEmbed responses with content URLs

oEmbed According to oEmbed site, oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the…

AngularJS - When model changes do not apply to UI

Your ng-model is broken? When you use AngularJS, it is good to stick with angular way and use angular-* modules. Sometimes you need to tweak the use of Angular for better performance or some specific reasons. You will use other plugins like jQuery plugins. The problem occurs when your model…