All articles by Ganesh
Apple Pay vs Google Wallet : Lost and Stolen Scenario
Note: You can read all articles in this series by visiting the Table of Contents Both ApplePay and Google Wallet give very good attention to security. In fact we can even make a blanket statement that almost all mobile wallet services are at least slightly more secure than the traditional Magnetic Stripe cards, but to be honest, that is not a correct comparison. Today, we are trying to disrupt the payment industry through innovation and modern technology. In the process we should strive to achieve unprecedented levels of revolutionary security, not just an evolutionary next step. ApplePay and Google Wallet are...
Continue reading...
Mobile Payments: What is Apple Pay?
What is Apple Pay? ApplePay is a mobile payment service developed by Apple and is scheduled to be operative starting October 20, 2014. It offers two different services and we will discuss them briefly here. Service 1 – Pay in-store: With this service you can use your NFC enabled iPhone 6 or iPhone 6 Plus or Apple Watch to purchase in-store by just tapping your phone against a contactless terminal and placing your fingers on the Touch ID. The contactless terminals are not Apple specific; they already exist in the wild and support contactless cards from Visa (PayWave) and MasterCard (PayPass). Apple just uses the same standard protocols used by...
Continue reading...
Mobile Payments: What is Google Wallet?
What is Google Wallet? Google Wallet is a mobile/digital wallet developed by Google. Their grand vision probably is to replace the complete physical wallet with its virtual counterpart. They are not there yet, but in the process of marching towards their grand vision, they have created a few important services. We will discuss them one by one in a moment. Google Wallet has been around since 2011 and has seen at least 3 major revisions. Each version had a very different technical approach to mobile payments mostly because of the politically difficult landscape that surrounds it. We will discuss each version, challenges faced and...
Continue reading...
jCarouselLite version 1.1 released !
It has been quite a while since I worked on updating the jCarouselLite project. Meanwhile, the community has shown its love by actively contributing features and defect fixes. It is always a pleasant experience to see such active participation by the community, but there is also a challenge. Many of the mods were spread around different websites, GitHub forks, Stack Overflow answers and comments. Consequently, it was not easy for a new user to start using it. So, I thought I should give some order to this by collecting them all back into the original project and that is exactly what I have done here… and much...
Continue reading...
Apple Pay vs Google Wallet : The Secure Element
Note: You can read all articles in this series by visiting the Table of Contents Both Google Wallet and ApplePay are trying to solve the same set of problems – mobile payments at the physical POS and inside apps. They have many characteristics that are very similar, but they also differ in significant ways when it comes to implementation and user experience. In this series of blog posts, we will analyze a few similarities and differences one by one. We will start by talking about the Secure Element today. A Secure Element (SE) securely stores card/cardholder data and does cryptographic processing. During a...
Continue reading...
Apple Pay – An attempt to demystify
Update as of Jan 3, 2015 This post was written in the early days after ApplePay’s announcement, when most of us didn’t have access to enough information on its inner workings. Even with such limited information, many parts of the post turned out to be correct, but some turned out to be wrong too. Consequently, I have taken a second attempt at demystifying ApplePay in this other post based on what we know at this time. The rest of this post is not modified. When Apple announced ApplePay as a service on September 9th, 2014 and subsequently in their press...
Continue reading...
Mobile Payments: What is HCE?
What is HCE? Previously, we discussed about Secure Element and how it enables payment transactions in card-emulation mode. We also briefly discussed that SE is not the only choice available. Today, we also have HCE as an alternative. HCE stands for Host-based Card Emulation. As its name suggests, it has something to do with card-emulation mode. But what does host-based mean? Before we talk about what host-based means, let’s review how things were before HCE. Prior to HCE, the only way to emulate a card using a mobile NFC device was to use a Secure Element. Let’s take the Android platform as an example. Here,...
Continue reading...
Mobile Payments: What is a Secure Element?
What is a Secure Element (SE)? GlobalPlatform defines Secure Element (SE) as a tamper-resistant platform capable of securely hosting applications and their confidential and cryptographic data in accordance with the rules and security requirements set forth by a set of well-identified trusted authorities. Put simply, a Secure Element can be considered to be a chip that offers a dynamic environment to store data securely, process data securely and perform communication with external entities securely. If you try to mess with it by tampering in any form, it may self-destruct, but will not allow you to gain unauthorized access. While not all NFC...
Continue reading...
Mobile Payments: What is NFC Card Emulation Mode?
What is NFC Card Emulation Mode? An NFC enabled device can operate in three different modes – reader/writer mode, peer-to-peer mode and the all important card-emulation mode. In Reader/Writer mode, an NFC device behaves as a reader for NFC tags, such as the contactless smart cards and RFID tags. It detects a tag immediately in close proximity by using collision avoidance mechanism. Once detected, it can either read data from or write data to the detected tag. Smart posters are an important application for this mode. In Peer-to-Peer mode, two NFC enabled devices can exchange information between each other. This is...
Continue reading...
Mobile Payments: What is NFC?
What is NFC? NFC stands for Near Field Communication. It is a standard defined by the NFC Forum, a global consortium of hardware, software, credit-card, banking, network-providers and others who are interested in the advancement and standardizing this technology. As the name implies, it’s a set of short-range wireless communication standards used in mobile phones and other electronic devices. It operates on the frequency of 13.56 MHz with data transfer of up to 424 kilobits per second. NFC and RFID (Radio Frequency Identification) are sometimes used interchangeably, but NFC is really a newer version or extension of RFID. RFID waves can have very...
Continue reading...
Mobile Payments: What is a Mobile Wallet?
What is a Mobile Wallet? Mobile Wallet, like Mobile Payments, is an overloaded phrase. It means different things to different people. For the sake of simplicity, let’s define the mobile wallet as an app or a set of apps that helps us to get rid of the physical wallet. That was a pretty slick definition, wasn’t it? To make the above definition a reality, what items should the mobile wallet hold? Let’s make a list. Credit cards & Debit cards Gift Cards Loyalty Cards Driver’s License or any Identity proof Receipts Cash Business Cards Coupons, Offers Transit passes / tickets Movie tickets A mechanism to use...
Continue reading...
Mobile Payments: What is Mobile Payment?
What is Mobile Payment? Mobile Payment is one the overly hyped phrases in the industry today. It could mean a lot of different things in different contexts. In general, Mobile Payment means that as a consumer you can use your mobile device to make payments instead of paying by Cash, Check, Credit Card, Debit Card or any other payment mechanism. It could also mean that you could use your mobile device to accept payments from others; or, it could mean that you can use your mobile to pay a friend back; or just pay a bill. You get the idea. Let’s start a list of...
Continue reading...
Mobile Payments: What is EMV?
What is a EMV? EMV is defined by EMVCo as, “a global standard for credit and debit payment cards based on chip card technology”. It was named after its original developers – Europay, MasterCard and Visa. EMVCo is the organization that manages, maintains and enhances the EMV specifications. Today, EMVCo is owned by American Express, Discover, JCB, MasterCard, UnionPay, and Visa. Other organizations from the payments industry also participate as technical and business associates from time to time. EMV chip cards contain embedded microprocessors that provide strong authentication, security and cryptography features not possible with traditional magnetic stripe cards. In addition to storing payment information...
Continue reading...
Bring Your Own Wallet
Today, the mobile wallet is an overused buzzword discussed and debated by a variety of industries. Payment companies, financial institutions and merchants of all sizes are all vying for consumer attention. Technology companies, mobile network operators (MNOs), start-ups and even marketing companies are joining forces to innovate in this space. Though many are talking about it, asking a simple question like what is a mobile-wallet? brings surprisingly different answers depending who you ask. The competition heats up A question often asked is who could win the ‘wallet wars’ in the years to come? Isis Wallet was launched just a few weeks...
Continue reading...
Mobile Payments: What is Tap & Pay?
What is Tap & Pay? When we use a Contactless Card to tap on the Contactless reader to make a payment, instead of swiping a magstripe card, we are essentially using Tap & Pay technology. The same goes for any NFC enabled mobile device that support Card Emulation Mode – like Android and Blackberry. Tap & Pay is just a marketing terminology. You may also see it referred to as Tap-n-Pay, Tap to Pay, Tap & Go, Wave & Pay and so on. Mobile Payments Blog Series Welcome to the Mobile payments FAQ and not so FAQ series and you are on FAQ #8. The...
Continue reading...
Mobile Payments: What is a Contactless Chip Card?
What is a Contactless Chip Card? Contactless chip cards are standard credit cards with an embedded contactless chip. Optionally, a MagStripe is also provided for backwards compatibility. These cards require no physical contact with the point-of-sale (POS) terminal. To make a payment, the consumer holds the contactless card in close proximity (less than 2-4 inches) to the merchant POS terminal and the payment account information is communicated wirelessly via Radio Frequency (RF). Radio frequency waves are the frequencies within the electromagnetic spectrum associated with radio wave propagation. Many wireless communications technologies are based on RF, including radio, television, mobile phones, wireless networks and now, contactless...
Continue reading...
Mobile Payments: What is a Contact Chip Card?
What is a Contact Chip Card? Chip cards are standard bank cards that are embedded with a micro computer chip instead of or in addition to a Magstripe. It is an evolution in our payment system that will help increase security and reduce fraud in a card-present environment. A cardholder’s confidential account data is more secure on a chip-enabled payment card than on a MagStripe card, as the former supports dynamic authentication, while the latter does not. This prevents fraudsters from easily copying account information and creating counterfeit cards. In United States, MagStripe cards are more common-place although a migration towards...
Continue reading...
Mobile Payments: What is a Magnetic Stripe Card?
What is a Magnetic Stripe Card? The most commonly available type of credit and debit card in the United States is a Magnetic Stripe or MagStripe card. As shown below, the black band on the back of your card is the magnetic stripe. It stores information by modifying the magnetism of tiny iron-based magnetic particles. The stored data can be read by swiping past a magnetic reading head, which is what you do when you swipe your credit card in a point of sale terminal. The MagStripe holds your account information encoded in the form of Tracks – Track 1 and Track 2. They both hold similar...
Continue reading...
Mobile Payments: Who is a Payment Network?
Who is a Payment Network? If credit card payments was a software project, then payment network is the project manager. The logo that you see on your credit card that says Visa or MasterCard is nothing but the name of a Payment Network. They are also otherwise called as card network or payment brand or just network. It is important to remember that card networks do not issue cards to the layman. Issuers issue cards. When we discussed about Acquirers, I mentioned that the Acquirers don’t directly maintain a link to every other Issuer under the sun; instead they maintain...
Continue reading...
Mobile Payments: Who is a Merchant?
Who is a Merchant? The retailer store that you walk-in to shop is called a Merchant in payment speak. You can broadly categorize them into two types based on channel. Brick & Mortar merchants, also called as physical merchants, have a physical store. You would walk in to the store and purchase items by swiping a card at the physical point of sale (POS) device. In the context of mobile payments, they may also allow you to Tap & Pay using your mobile NFC device. In a restaurant kind of setup, you would typically hand over your card to the...
Continue reading...
Mobile Payments: Who is an Acquirer?
Who is an Acquirer? A merchant or a retailer store cannot just accept cash. They have to accept credit cards and debit cards to get your business. In order for them to get paid for a credit card transaction, they have to first authorize your transaction with the corresponding Issuer bank every time you swipe. But there are just thousands of such Issuer banks. You may be holding a credit card from any one of the thousands of banks. If every merchant had to establish a direct link and relationship with every other Issuer bank in the country, the system...
Continue reading...
Mobile Payments: Who is an Issuer?
Who is an issuer? An Issuer is the bank who issues you the credit card, debit card or any payment card for that matter. They are sometimes referred to as the Issuing Bank as well. For example, if you have a Chase Freedom card, then your Issuer is Chase bank. If you own a Capital One Platinum card, then your Issuer is Capital One bank. What if you have a Marriott Rewards credit card? No, Marriott is not your issuing bank. In general, when you get a credit card from an establishment other than a bank, maybe from a merchant...
Continue reading...
Mobile Payments: FAQ and not so FAQ
I have been working in the field of payments, specifically mobile payments for quite sometime now. If you haven’t noticed, a lot is happening in that area. The players in this field keep coming up with new stuff all the time; the field keeps coming up with new players all the time. Some of them just make sense, but some just don’t regardless of how hard we think. It is not their mistake. They are trying out new and innovative ideas hoping that one of them will click. Mobile payments come with a lot of variables and not everyone has...
Continue reading...
SQLite Auto Increment
In SQLite, the primary key column get auto-incremented by default. So, my thought was that there was no necessity to set the autoincrement flag explicitly in the create table DDL. Then I discovered a hard truth. When I don’t set the autoincrement flag explicitly, it does auto-increment, but there is a minor issue. It so happens that SQLite has two algorithms to perform auto-increment in primary keys – a default one where you don’t explicitly set the flag and an other one where you explicitly set the flag. To understand the glitch, let’s consider an example. Assume that you have a table with 5 rows with IDs 1, 2, 3, 4 and 5. The default algorithm...
Continue reading...
Android: Remove activity from history stack
In most Android REST-Client applications, the first screen a user sees is either a Login or Registration screen. Once the user logs in, the user is generally taken to a Dashboard screen or to some other Home screen. Now, What do you think will happen if the user presses the back button? Won’t they be taken back to the Login Screen? That is not good design, Is it? The issue is no different even when we show a Blank/Splash screen while automatically logging the user in based on their saved credentials. In fact in the second case it is worse....
Continue reading...
Tomcat & IntelliJ – Deploy war files outside webapps folder
At present I am working on developing an Android application that needs to be supported by a slew of REST services hosted in the cloud. I chose Google App Engine based on its support for Java, Groovy and most importantly Spring. I developed a Spring MVC based REST application and used ContentNegotiatingViewResolver to negotiate content based on request URL extensions. For example, an XML response will be returned if the request URL ends with .xml, a JSON response for .json and an HTML response if he URL doesn’t have any extension. Don’t get me started on Accept Header versus URL...
Continue reading...
No hadoop-env.sh in Hadoop 0.23
The first thing to do after downloading and extracting Hadoop is to set JAVA_HOME in the $HADOOP_HOME/conf/hadoop-env.sh file. Almost all documentation on Hadoop site expects the above configuration but I guess that was for version 0.20. When I downloaded Hadoop 0.23 today and looked for the hadoop-env.sh file, I could not find it anywhere in the extracted archive. After a bit of Googling I realized that things have changed in 0.23 version and now I will have to look for the file in the $HADOOP_HOME/etc/hadoop directory instead. Unfortunately I couldn’t find the file there either. As a last resort I...
Continue reading...
jQuery UI: Calling widget methods directly
A typical jQuery plugin is just another function attached to the jQuery object. As a plugin developer you write a function, attach it to jQuery.fn (just an alias for its prototype) and your plugin method is magically available to all jQuery instances. As a plugin user, you normally execute the plugin by calling a method on the jQuery object. Something like // jCarouselLite is the plugin in this case $(“#carousel”).jCarouselLite(options); The above call returns the jQuery object on which the plugin was originally invoked. That way you can chain method calls and marvel at the beauty of our wide one-liner...
Continue reading...
JQuery: Wait for multiple animations to Complete – Take 2
In an earlier blog post, I stated the need for a technique that helps determine when multiple animations have completed running, so that we can execute some code at that point. I also examined a technique using a combination of setInterval() based polling and checking for the :animated pseudo-class to achieve the result. With the release of version 1.5, jQuery introduced the concept of Deferred Objects. It’s a pretty useful beast. You can find the full explanation here. In jQuery 1.5, the $.ajax() was enhanced to return a Deferred Object, but $.animate() was cheated without being given that honor. That...
Continue reading...
Blackberry: Code signing for Tablet and Smartphone
As all experienced Blackberry developers will know, to use the restricted BB APIs, you will have to code sign your application. The registration process used to be 20 bucks. Now it is free though. Actually what is the point of code signing, that too when it is free? Maybe there is a real valid reason… Anyways, that is another story, for another day… Coming back to topic; I went to the now familiar BB developer site to get the code signing keys one more time. This time I was greeted with a new combo box that asked me if i...
Continue reading...
Blackberry – Issue with Installing to a device using Javaloader
After I successfully finished developing the first part of my new Blackberry application, I code-signed it so that I can see it on an actual device. There are many ways to deploy your under-development application to the device. You can directly use the “Debug” menu in eclipse and select Debug As -> Blackberry Device. With your device connected to the USB port, eclipse will automatically deploy your application. Behind the scenes eclipse uses a command line tool called JavaLoader to deploy the application. Consequently, you can use “JavaLoader” directly from the command-line as well. There are a few other ways...
Continue reading...
Install Blackberry SDK 6.0 to your existing Eclipse Helios
Blackberry provides a “Java plugin for Eclipse” that can be downloaded and used for eclipse-based blackberry development. But beware, what you download is not an eclipse plugin. Instead, it is a full eclipse download with the plugins pre-installed. I didn’t want a new copy of eclipse just for Blackberry development. I wanted to use my already well configured Helios installation to be used for Blackberry development as well. So, i chose to use the provided update site – http://www.blackberry.com/go/eclipseUpdate/3.6/java – to install the plugin to my existing Helios installation. The issue is that, I was unable to install the plugin...
Continue reading...
Heroku – Trouble with Windows and SSH Keys
Heroku, one of my favorite cloud platforms, is a hosted platform built specifically for deploying Rails and other Ruby based web applications. Heroku makes deploying Rails applications to cloud ridiculously easy – as long as your source code is under version control with Git. The general process of installing and using Heroku on Windows is fairly simple. You should already have Ruby, Rails and Git for Windows (msysgit) installed. Once you have them, go to Heroku.com and sign up for an account. After signing up, install the Heroku gem with the following command. $ gem install heroku Typically, as in...
Continue reading...
GWT – Pros and Cons
I love JavaScript. With the advent of jQuery and Mootools, my love for JavaScript has only increased plenty-fold. Given a choice I would use either of the aforementioned frameworks for any web application I develop. But being in the service industry, time and again I have to succumb to the client’s pressure and work in their choice of technology – whether or not it is the right one (The one who pays the piper calls the tune. Isn’t it?). One such client exposed me to the world of GWT. I have given GWT a shot couple of years back on...
Continue reading...
GWT – Not enough methods, expecting 3 saw 2
In my current project we use GWT extensively. I also develop prototypes and POCs for clients using GWT when I am in presales mode. During one such prototype, when I was using GWT RPC to perform an AJAX call from the client to the server, I hit a road block. GWT was throwing me an error I couldn’t comprehend. java.lang.AssertionError: Not enough methods, expecting 3 saw 2 After a bit of fiddling and googling around, I realized that this was happening because I recently upgraded from version 2.0.3 to version 2.2. I guess the protocol GWT uses to serialize the...
Continue reading...
Shelfari is Down – Wants me to finish my next book
Today, After successfully completing reading yet another book, I wanted to add that to my shelfari account but it shows me the following message. It wants me to finish another book in the meantime. Does that mean the service is going to be down for another couple of days? I don’t know, maybe others are able to complete a book in a couple of hours....
Continue reading...
Ceylon – Yet Another JVM Language (YAJL)
It is all too familiar, yet surprising; it is all too common, yet shocking; to see yet another JVM language created to scratch an itch that countless other languages are already trying to solve. Of course Java is not expressive enough, it doesn’t have higher order functions, it doesn’t have modularity as a language feature, it doesn’t have clean way to do meta-programming, it does NOT have so many more features we love and does have so many more features we hate. These are most of what has frustrated Gavin King (the creator of Hibernate) as well and made him...
Continue reading...
Twitter moves from Rails to Java
A colorful feather up Rails’ cap is on the ground now. Twitter has decided to go away from RoR in favor of Java, this time for their entire search stack. Earlier in 2008-09, they decided to move their message queue back-end from ruby to Scala (a Java Platform) and now it is the time for their front-end to move to Java as well. They have built a scalable platform called Blender that uses Java NIO based server (Netty) to be efficient in the face of heavy incoming traffic, replaced MySQL with a Java based Lucene search engine, created an engine...
Continue reading...
Android: List View alternating between 1px and 2px dividers
Have you faced a problem with Android ListView where the dividers alternate between 1 pixel and 2 pixel thickness although you have specifically styled it to 1px? I am sure many have, but for some reason they seem to ignore it. I say this because I noticed this problem in quite a few apps in the market. When I found the same problem in one of my apps, I decided to fix it although it was not at the top of my priority list. The first solution I came up with was more of a work-around. Instead of using a...
Continue reading...
iPhone SDK – Initial Thoughts
I have been following iPhone since its inception. Initially, when Steve Jobs revealed that there was not going to be any developer SDK, I was just one of the millions to be really upset. Then, one fine day the iPhone SDK was released, the now infamous App Store was released, all are happy and the rest is history. I did try out some examples immediately after the SDK was released but then got busy with other interesting stuff (like trying out a startup) and didn’t focus much on it – until recently. A few months ago, my company picked me...
Continue reading...
Intellij IDEA key map for Eclipse
It is not the least easy to switch to Eclipse after years of addiction to Intellij IDEA. IDEA is the best IDE I have worked with until now and will continue to remain that way until there is another visionary who attempts to improve the developer pleasure instead of just technical modularity. Eclipse may (or may not) have a better architecture, better design, better modularity, incomparable number of plug-ins and better written code than IDEA, but that doesn’t seem to attract the end developers like me. I just love IDEA for the way it understands me, knows what I am...
Continue reading...
Android: My HTC Desire
I bought an HTC Desire few months back and I am loving it. It is powerful, has froyo, Wifi Hotspot, Voice to Text, a powerful Swype Keyboard (I bought it), AMOLED display, excellent applications and looks pretty cool too. I even bought an expensive Piel Frama case for it. Got a few gripes though. It’s battery doesn’t last a whole day with 3G or WiFi switched on. So, initially I had to manually switch back and forth a couple of times to get through the day. After I bought another USB charger, exclusively for office, that problem is kind of...
Continue reading...
Tomcat 5.5 and above doesn’t need the JDK
Most of us who install Tomcat on our development machines wouldn’t have noticed that Tomcat versions before 5.5 required the full blown Java Development Kit (JDK) to be installed on the machine. Just installing the Java Runtime Environment (JRE) wasn’t enough. The JDK is meant for developers to be able to compile Java programs, and has the development tools such as the compiler, debugger and other development libraries. Tomcat versions prior to 5.5 used the Java compiler that comes with the JDK to compile JSP pages at runtime and consequently required a full blown JDK. Tomcat versions 5.5 and above...
Continue reading...
Groovy: List Operations
Anybody who has programmed in Java for sometime would attest to how frustrated they could get while operating on the Collection API. Even simple operations demand unnecessary lines of code increasing the LOC and reducing expressiveness of the intended logic. Fortunately, Java has noticed the pain and has been adding utility classes to the Collections API to improve readability of the code since Java 5. Even better, there are a couple of libraries, Lambdaj and op4j, that implement the powerful Fluent interface that takes readability to the next higher plane. Libraries and utilities are good for Java, but we are...
Continue reading...
Groovy: No-arg constructor is always there
Do you usually write a no-arg constructor for your Java classes? You don’t have to – unless you need to initialize something in that constructor. Behind the scenes, the Java compiler adds the no-arg constructor directly into the byte-code if none is provided. But when one or more overloaded constructors are provided for that class, the compiler doesn’t add the default no-arg constructor to the byte-code. This has been part of Java since the beginning. Fast forward to today. I was doing some work with Groovy. All of a sudden, i realized that i forgot to add a no-arg constructor...
Continue reading...
Hibernate never stops surprising me
I have a simple form in my web application where a user can fill in his personal details and address details. User specific fields include firstName, middleName and lastName while Address specific fields include street, city and zip. On the server side, I have POJOs for User and Address. Finally I use Hibernate to map these POJOs to the database. Since, the Address will not be used outside the context of the User, I decided to map it as a Component of the User class. The User class and its corresponding mapping is given below: @Entity @Table(name = “user”) public...
Continue reading...
Final Modifier for method arguments. What do you think?
The IT industry today is sodden with TLAs like SOA, ESB… and FLAs like AJAX, SOAP and JUNK. i was thinking about refreshing myself with some fundamentals again. Blogging about a basic concept may not be cool, but refreshing – don’t you think? I know what you are thinking. You are thinking that i am digressing too much. Ok, lets cut to the chase. One of the best practices i follow religiously is to use final modifiers for method arguments where applicable. This is “supposedly” a best-practice written by somebody somewhere. Regardless of whether it is documented as a best-practice...
Continue reading...
Hibernate: Why should I Force Discriminator?
Hibernate is an ambitious project that aims to be a complete solution to the problem of managing persistent data in java. Even with such an arduous task before them, the hibernate team tries very hard to expose a simple API for developers like us. Still, the complexity behind the API shows its ugly face time and again and I believe it is unavoidable as long as the mismatch between Object and Relational world exists. That said, although I have worked with hibernate for many years and have been its advocate in all my organizations, I keep facing newer issues and...
Continue reading...
Happy Friendship Day!
Imagine you are attending a party along with your friend! He plays all kind of foolish pranks and cracks stupid jokes. All along you are with him, quite enjoying his playing the fool. You come home with not a thought troubling you. Now imagine the same scenario with your brother! Even as the party progresses, you ask yourself a hundred times, “why is he behaving so silly? Why can’t he behave a bit more mature? What will my friends think of me now?” Today is a day that celebrates friendship. So it is only proper that we contemplate a little...
Continue reading...
Is it an AJAX Request or a Normal Request?
In modern web application development, many a times you would want to know if the incoming HTTP Request is an AJAX request or just a Normal request. Have you come across this requirement? I have, and the solution that I found turned out to be pretty straight-forward and I will be sharing it with you here. Whenever an AJAX request is sent to the server, a special header named X-Requested-With with a value of XMLHttpRequest is attached to the request. So, a simple check to see whether the X-Requested-With header has a value of XMLHttpRequest solves the challenge. An example...
Continue reading...