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

SEARCH KEYWORD -- CLient



   Move.Me Writing Your Own WebSocket Server

The WebSocket protocol has applications beyond plain vanilla web development.  I will explain how the protocol works, how to implement your own server and share some insights I had along the way. Before we get down and dirty, I will explain what I’ve been doing with it. At this point I expect many of you are saying “I’m not working on a web game this doesn’t seem relevant to me.” Well, neither am I. I embed a WebSocket server into my game engine and wit...

   Socket,NetWorking,WebSocket,Server development     2012-01-28 07:06:43

  JavaScript cross domain request solution

1. What is cross domain? We may often using AJAX to request data from other domain, now we will have cross domain request issues. It's because JavaScript only allows to request data from the same domain because of security consideration. In short, same domain strategy means a piece of code can read data from the same source, the same source here means the combination of the same domain, protocol and port number. For example: URLDescriptionAllow communication? http://www.a.com/a.js http:/...

   AJAX,cross domain,security     2013-03-13 20:04:52

  Format JSON data on Ubuntu

JSON now becomes a very popular data format because of its simplicity and light-weight. Nowadays many RESTful APIs will offer a choice of exchanging JSON data between the server and client. Sometimes the data may not be formatted and it cannot be easily read by human beings. It's frequently desired that the unformatted JSON data should be formatted before read. Today we will show a few ways to format JSON data on Ubuntu. Assume we have a json file test.json with below content. { "title": "Test"...

   RUBY,PYTHON,NODEJS,JSON,JQ,PERL,LINUX,UBUNTU,YAJL     2016-08-17 11:05:09

  Tips and tricks about JavaScript from Google

JavaScript is now a very popular client side language. It's flexible, powerful but easy to make mistakes. So good programming style is better for you to write efficient and readable JavaScript codes. Here are some tips and tricks about JavaScript from Google. True and False Boolean Expressions The following are all false in boolean expressions: null undefined '' the empty string 0 the number But be careful, because these are all true: '0' the string [] the empty array {}&n...

   JavaScript, Google, Coding standard     2013-02-26 23:11:03

  php://input in PHP

When using xml-rpc, server side will get the data from client with php://input method instead of $_POST. Hence today we will discuss php://input. PHP official manual has below explanation to php://input: “php://input allows you to read raw POST data. It is a less memory intensive alternative to $HTTP_RAW_POST_DATA and does not need any special php.ini directives. php://input is not available with enctype=”multipart/form-data”. Here we und...

   php://input, IO, input     2013-02-25 20:43:00

  Benefits and Drawback of a Layered Architecture

Most enterprises today are application centric. But the problem with the application is that their database schemas, user interfaces, programming interfaces and object models are tightly coupled and difficult to change. If you want to add a new field to a database table and you’re lucky, the change will reflect through the entire system. But often the change needs to be replicated manually across the entire system. And as applications are difficult to change, adding business rules or proce...

   JAVA, PROGRAMMING,WEB DEVELOPMENT,ENTERPRISE APPLICATION     2017-05-04 08:19:34

  How key-based cache expiration works

There are only two hard things in Computer Science: cache invalidation and naming things — Phil Karlton Doing cache invalidation by hand is an incredibly frustrating and error-prone process. You’re very likely to forget a spot and let stale data get served. That’s enough to turn most people off russian-doll caching structures, like the one we’re using for Basecamp Next. Thankfully there’s a better way. A much better way. It’s called key-based cac...

   Cache,Expiration,Key-base cache,Work     2012-02-20 05:32:40

  Why Javascript is a Joy

I’m probably a bit biased – being a front-end web developer for a few years will do that – but I really enjoy writing Javascript. I’ve recently retreated from pure coding the last few months, but I got an opportunity this past week to jump back into some tasks, and it has reminded me how fun it is to dive into our[1] front-end codebase. Yes, Javascript can be surprisingly elegant yet completely infuriating, and all on the same line of code; for a long time, ...

   JavaScript,Speed,Simplicity,Malleable     2012-03-26 15:00:31

  What you may not know about PHP session

When we access one website, the site usually should have a mechanism to keep track of the status of the user on the site. There are a few mechanisms supported by many server side languages to help track user status such as session and cookie. Today we will talk about session, when creating a session, we need to keep track of many data, besides user data, we also need to tell the server what is the timeout of the session so that we can garbage collect the session data which should not be stored a...

   PHP session,session timeout,example     2013-07-06 08:44:18

  Kubernetes Authentication & Authorization 101

If we want to build a system with user modules, Authentication and Authorization are something that we can never ignore, though they could be fuzzy to understand. Authentication (from Greek: αὐθεντικÏŒς authentikos, “real, genuine”, from αὐθέντης authentes, “author”) is the act of proving an assertion, such as the identity of a computer s...

   RBAC,AUTHORIZATION,AUTHENTICATION,KUBERNETES     2021-06-05 23:19:18