Pull JSON data from your website to your mobile application with Ajax and PHP

Hello! Making mobile applications is much easier than it used to be. As with previous posts, we have been experimenting with Apache Cordova Framework for easily building mobile applications, leveraging web frameworks like AngularJS. Many mobile applications communicate with a centralized “server” or website that retains all the data that may be useful for the mobile app. For example you might want to have a mobile application that retains a centralized “friends list” that the end-user can modify. You can store this friends list in a database, and access that data by making an Ajax request to pull the data in json format. For the website that retains and manages this data, we have decided (for this example) to use the PHP Slim Framework. We mainly chose this because it makes rolling out a web based application API with a database backend very simple (in under 30-50 lines of code). […]

Load testing your web application

Hello! These days with so many (buzzword) cloud services, the standard vanilla LAMP stack is slowly becoming a thing of the past. Or at least more obfuscated / confusing. Its important when building your web application to consider things like analytics, metrics, reporting, capacity planning and scaling. You need to be able to scale your web application outwards, but you also need to be able to have a methodical system in place through which you can identify the weak points or bottlenecks in your stack. Identifying the bottlenecks are important because they help you determine what your “ceiling” for the maximum number of requests your web stack can handle before it buckles under the load. Typically these types of bottlenecks appear in the classic or common end points within a standard web stack : web and database services. Identifying bottlenecks With apache or nginx , there are many tools available […]

Drupal Problem : An AJAX HTTP request terminated abnormally

Hello! Recently we had a tricky problem with Drupal 7 and manipulating content. Our content types and content in general for a particular Drupal site has grown significantly. Ajax queries in Drupal Adding and removing content such as images or gallery items requires an Ajax query that polls the database. These queries, once your database grows on a drupal site, can also grow. You might not notice much of a difference (when its working) but it does require more overhead when manipulating data via Drupal’s administration area. When attempting to add or delete an item within a content type , we received this error : When investigating further, we saw this in the DBLog within Drupal : Why Ajax was returning an error Further investigation provided some evidence of this error. What we found was that many different elements , configuration settings or permissions could be causing these types of […]