All blog articles by Darshan Chauhan

We've couple of Android and IOS apps which was made using Cordova. After upgrading our cordova-ios and cordova-android versions we were facing some issues with native status-bar.

The status-bar content and page content were getting mixed up, making user unable to perform any operations provided in the header.

enter image description here

While looking for solution we found cordova plugin cordova-plugin-statusbar which provides some functions to customize the iOS and Android StatusBar. To use this plugin we need to add...

Read complete blog post

79142437285789d633a198d6740f8731
Darshan Chauhan

We've couple of Ember apps which communicates to single rails API. We were working on making our API more robust for data related operations so we added couple of checks and validations which led us to a thought that it would be even better if we can add validations on our front-end Ember applications.

But Ember.js framework doesn't provide validations for models. So we investigated further and we found couple of packages that we can use for model level validations. Ember-model-validator is...

Read complete blog post

I was facing an issue while working on one of my Ember Apps. Issue was like, Ember data store was not updating the record after receiving the response from backend.

So whenever user visit the page, it was showing the old data of that record from Ember-Data store. After some searching I found that Ember-data by default doesn't re-request data that is already present in Ember-data store.

If parent route's model has loaded an array of objects then the child route that requires specific object...

Read complete blog post

Currently I've been working on writing acceptance test cases for my project in which there were lot of scenarios where I'd to use mocking/stubbing for which I used MockJax plugin of jquery.

So I'm sharing some examples which might be useful to someone.

A simple mock request using mockjax plugin can be written as

$.mockjax({
 url: '/posts/1',
 responseTime: 500,
 responseText: {
 status: 'success',
 post: 'Mockjax Plugin for mocking or simulating ajax...

Read complete blog post

Side Loading

Ember Data supports “sideloading” of data; i.e., indicating that data should be retrieved (along with the primary data requested) so as to help multiple related HTTP requests.

A common use case is sideloading associated models. For example, each Shop has many groceries, so we can include all related groceries in /shops response:

GET /shops
{
 "shops": [
 {
 "id": "14",
 "groceries": ["98", "99", "112"]
 }
 ]
}

When...

Read complete blog post

79142437285789d633a198d6740f8731
Darshan Chauhan

Ember-Data is a library for managing model data in Ember.js applications. It provides many of the facilities you’d find in server-side object relational mappings (ORMs) like ActiveRecord, but is designed specifically for the unique environment of JavaScript in the browser.

When an API is represented using Ember Data models, adapters and serializers, each association simply becomes a field name. This encapsulates the internal details of each association, thereby insulating the rest of your...

Read complete blog post

We've one Blogging application and whenever User post a new Article we wanted to show that to whom his/her post is delivered, who has opened a post or clicked.. events like that. So that User will know how many people are reading his/her post and also how often.

We were already using services of Sendgrid. Now Sendgrid provides different APIs for different purposes. Some of them I'm listing below.

1) SMTP API, 2) WEB API, 3) EVENT WEBHOOK, 4) PARSE API.

Now, We needed EVENT WEBHOOK API for...

Read complete blog post