Author: admin

  • Running jQuery Mobile as an Android App

    In this section, we are going to wrap a jQuery Mobile app with PhoneGap and run it on the native Android platform. To set up PhoneGap on the Android platform, we will reference PhoneGap’s “Getting Started Guide with Android”7. Installation of Eclipse, the IDE for Android development, is a prerequisite. After your Android platform is…

  • Running jQuery Mobile as an iOS App

    In this section, we are going to wrap a jQuery Mobile app with PhoneGap and run it on the native iOS platform. To set up PhoneGap for the iOS platform, we can reference PhoneGap’s “Getting Started Guide with iOS.”3 PhoneGap has step-by-step instructions for installing PhoneGap on every platform and their instructions are very detailed with…

  • What is PhoneGap?

    PhoneGap1 is an open-source development framework that allows you to build cross-platform native apps with web technologies like jQuery Mobile. For instance, we can take an existing jQuery Mobile web app, wrap it with the PhoneGap framework and distribute it to all native platforms that PhoneGap supports. Currently, PhoneGap supports the native iOS, Android, BlackBerry, webOS,…

  • Google Maps Integration

    In a recent Mobile Web survey, nearly 75% of Web developers use Geolocation, making it the most popular HTML5 API.13 When building applications that are location aware, it is common to have a map view displaying points of interest or directions. On the Web, Geolocation14 in conjunction with Google Maps15 provide a very useful API for building map…

  • Server-side versus Client-side

    Deciding which service access strategy to implement depends on several factors. If you are already building Web applications today you may already have an established pattern for data access on the Web. If so, you may want to continue with this strategy for consistency purposes. Fortunately, when implemented correctly, jQuery Mobile will integrate very well…

  • Server-side Data Access with MVC

    In our prior example we saw how to POST form data to the server. In this example, we will use a GET request to fetch data from the server. This example will retrieve a listing of movies from the server and display the results within a jQuery Mobile JSP page (see Figure 9–7). Figure 9–7. Movies fetched…

  • Server-side Form POST with MVC

    For comparison purposes, it will be valuable to see a server-side implementation of our registration use case. Again, we will have a registration form that allows users to opt-in to receive discounted or free movie tickets (see Figure 9–5). Figure 9–5. Registration form for server-side POST with MVC The page markup for our registration page is very…

  • Server-side Integration with MVC

    In this section, we are going to focus our attention on server-side access strategies. On the Web, a very common strategy is integrating with a model-view-controller (MVC) framework. We will see two MVC examples that will be very similar in style to our client-side examples. In our first example, we will convert our client-side registration…

  • Client-side Form POST with Ajax

    The previous example was a use case that sent a GET request to Twitter’s API. GET requests are very common when reading from an API and the $.ajax method will default to this type when none is specified. In our next example, we will create our own RESTful API that allows our users to send POST requests. Let’s create…

  • Client-side Twitter Integration with Ajax

    In our first client-side example we are going to integrate jQuery Mobile with Twitter’s RESTful API. Twitter is a very popular social media site which allows users to send out, or “tweet” brief messages about topics, events, or random opinions. In our movie app, it may be valuable to allow users to search Twitter in…