PHP, MySQL, Ajax, Infinite Scroll with PhoneGap | Cordova

About PhoneGap:

Adobe PhoneGap is used to develop hybrid mobile applications. PhoneGap allows create app using web-development languages like HTML, CSS, and JQuery. You doesn’t require to have knowledge of mobile application languages like Java, Objective C, or Swift. PhoneGap extends the features of of HTML and JavaScript to work with the device.

Let’s start how to make simple infinite scroll application with MySQL database in phonegap.

Steps to follow:

  1. Create MySQL Database and Table
  2. Write PHP code on Server Side for handling request
  3. Write JQuery(Ajax) code on PhoneGap or Cordova side

Create MySQL Database and Table:

First, create MySQL database with table (user_details) with fields such as id, name, contact_number, address.

Connect to Database Server:

Display/Retrieve Data:

Get data from MySQL table with date filter and limit for enabling infinite scroll:

HTML code for PhoneGap / Apache Cordova Side:

Here we write simple HTML code with help of bootstrap classes.

First we showcase some filters elements then we listed data in list format:

Writing Jquery code for PhoneGap / Apache Cordova Side:

Using this code, on page load run Ajax to get data from MySQL table. For Infinite scroll when page scroll down same Ajax run again with incremented page number to get next set of data.

 

If you have any query or suggestion, So i’ll be happy to help you.

Thank you

My First WordCamp Experience

I’d like to share my experience of WordCamp Udaipur which took placed on 28th Jan 2017. First of all, I would like to thank @Vajrasar to inform me about the WordCamp in first place. I have been a WordPress developer but never had the opportunity to attend a WordCamp. It was educational, inspiring, and I enjoyed the overall experience.

WordCamp Udaipur
WordCamp Udaipur

The venue was very good. Special thanks to  @Puneet and  #WCUdaipur organizers for awesome setup and management.

Following are some sessions which I liked the most.

  • Why we Indian Developers Fail… – Nirav Mehta
  • Hiring WP Devs – Rahul Bansal
  • Exploring the REST API V2 – Ayushdeep Singh
  • Templating with Underscore.js in WordPress – Achal Jain

Also Panel Discussion – Building a Successful WordPress Business was very helpful.

In #WCudaipur food was very delicious and also my thanks to sponsors for lots of #swag from WordCamp team and @resellerclub @buddyboss @ideabox @kitsune

 

Image courtesy: Anonymous
Image courtesy: Anonymous

My overall experience was very good. I’m glad that this WordCamp turned out to be a good experience, can’t wait for next WordCamp.

From this WordCamp, I learned that we need to step out from our comfort zone. When we come out of our comfort zone there are too many challenges in front of us, and we should face them, we may fail sometimes but if we don’t take those risks, you will never know the opportunities that you could be missing.

!!! IF YOU DON’T TAKE RISKS, YOU WILL ALWAYS WORK FOR SOMEONE WHO DOES !!!

Welcome to my blog!!!

Hello, welcome to my blog.I am hoping to make this place interactive where you come and share your knowledge. You can let me know, what you like or what you didn’t. I never thought I’d be doing blogging, but trying challenging things is a good thing, right? And this blog has a purpose: to share my knowledge about development, programming.

For those who don’t know me, here is a rapid introduction.

I was raised in Udaipur, Rajasthan and live here still today. I am a developer by profession. Every day needs something new to know, so I am connected all time with friends and social market. I love reading about new technology, IT startup-up.

As I am a developer, I will share my knowledge with you in near future. In meantime, happy reading, KEEP CALM and READ ON.

See you soon!!!

Rahul Dadhich.