Being a Technical Reviewer

I was contacted last month by UK publishing house Packt Publishing about being a Technical Reviewer for their recently-published book WordPress Mobile Applications with PhoneGap (ISBN: 1849519862). I accepted even though I did not know a lot about the subject. However, the whole experience was a learning process for me in terms of both how the publishing world works and about the technologies I was reviewing.

WordPress Mobile Applications with PhoneGap book coverThe book is positioned as a way to:

  • Discover how we can leverage WordPress as a content management system and serve content to mobile apps by exposing its API
  • Learn how to build geolocation mobile applications using WordPress and PhoneGap
  • Step-by-step instructions on how you can make use of jQuery and jQuery mobile to provide an interface between WordPress and your PhoneGap app

The reviewing process is pretty straightforward. The chapters are sent to you by email as the book is being written and they are usually in Microsoft Word format. The chapters are early drafts and usually contain typos and formatting errors. Eventually those will be corrected by the book’s editors. Your job is to review the code and text for technical accuracy. You also make sure the chapter structure is logical and easy to follow for readers. Any corrections/clarifications/notes you make are placed in Comment tags as you do not edit the text directly. After you finish your review you then fill out an opinion questionnaire about the chapter you just read. The editors want to know what you would like to see more of, less of, if there were important topics that were missed and your overall score out of 10.

If you are interested in being a Technical Reviewer for Packt you can check out their Reviewing for Packt information page. Although you do not get paid to be a reviewer you will receive acknowledgement on both the “Credits” page and the “About The Reviewers” page where they will include a short biography about you. This is a great promotional tool for you as you can mention your blog/website address and Twitter accounts if you wish. As well, you will receive both a paper copy and an eBook copy of the book you reviewed. You will also get an eBook copy of any other book in their catalogue.

Being a Technical Reviewer is a great way to learn more about a topic and to see how the publishing industry works. It is also a neat way to see how books are put together and you can learn many useful writing tips which will help your writing in other areas including making you a better blogger. It will also especially help if you are interested in writing a technical book in the future. As a Technical Reviewer you will gain a publishing credit and it might just make your book proposal that much more enticing to prospective editors.

Advertisements

Building Android apps with the Nomad extension for Visual Studio 2010

UPDATE: Nomad has been retired by Red Gate and is no longer available for download. See their announcement here.

 

Last week I posted an article entitled Extending PhoneGap for Visual Studio to Android devices. In it I talked about how we can use the Visual Studio 2010 PhoneGap templates to create a Windows Phone 7 app and deploy it to an Android mobile device using the PhoneGap:Build service.

Well there is another piece of technology that I have been playing with lately that goes beyond PhoneGap:Build by baking the compilation service right into the Visual Studio IDE. The product is called Nomad and it is made by Red Gate Software in England. Right now it is in free private beta but anyone can request a copy of the product.

Much like the PhoneGap templates you will build apps using HTML5 and CSS. You can use the PhoneGap libraries to access items like the camera and accelerometer. You can even use things like jQuery Mobile. All of this will get compiled down to an application that can be deployed to a mobile device. You cannot as yet deploy a Nomad project to the Google Play store though. (See the comments below for an update.)

Right now Nomad only supports builds for Android and iOS. As with the PhoneGap templates you will need to have a membership with the iOS Developer Program before you can build an app for iOS. As well Nomad is limited to Visual Studio 2010 but not available for the Express editions as they do not allow extensions. Finally, Nomad only targets iOS 4.2 or later and Android 2.2 (Froyo) or later.

In the remainder of this post I will demonstrate how to use Nomad to build and deploy an app to an Android mobile device.

Once you send a request to Nomad you will get an email response with a download link. Download the Visual Studio extension and save it to your computer. Run the .visx file and follow the instructions to install the extension into Visual Studio. You may need to restart it if it was running during installation.

Nomad Extension Installer

With the extension now installed open Visual Studio and select File | New Project. Find the VS Nomad Project within the Installed Templates. Enter a Name and Location. Click OK.

Nomad New Project

Nomad will raise a message box on first use asking you to sign in with the account details from the email that contained your download link. Your user name is the email address you signed up with.

Nomad Sign In

Once you are in the solution you will see that Nomad provides a default project to begin with. The project contains an index.html file that contains some HTML and JavaScript, Hit F5 to view the project.

Nomad Project Default

You will see the default project is set up to use PhoneGap services like the compass and geolocation. However since we are running in the localhost we cannot access these items and thus the page shows an “n/a” beside these properties.

To start building your project you would want to clean out the index.html and start laying in your own code. However for this demonstration I want to use the provided demo code to show you how the PhoneGap tools in use on this page will actually work once compiled and placed on a mobile device.

To build your Nomad project find the Nomad build button on your toolbar. Click the drop down arrow beside the build button and select Build for Android. You can also select Build configured platforms if you want packages for both iOS and Android (provided you have the requisite iOS developer account).

Nomad Build Dropdown

After you select the Build button the code gets packaged up and sent to the Nomad cloud build service on Nomad’s servers. This means that you do not need additional SDKs or any other software to compile your app.

Once you click the Build button you will see a processing message.

Nomad Cloud Build Dialog Start

And once it is completed you should get a success message if everything compiles correctly.

Nomad Cloud Build Dialog Success

Clicking the Show in Windows Explorer button on the dialog box will take you to your project folder. The build process creates a “distrib” folder and your compiled app is placed in there. Since I built an Android app I received a .apk file back.

Once the item is saved to my computer I can then move the app to an Android mobile device for installation. To deploy the .apk file to my Samsung Galaxy Tab 2 10.1 Android tablet I will copy the file from my computer to my Dropbox folder. If you do not have one you can create a Dropbox account here. (Full disclosure: this is my referral link).

To install the app click your file on Dropbox to begin downloading it to the Download folder on your device. Once the .apk file is in your folder click it to begin the installation process.

Nomad Hello World App Install

Note: To install apps that do not come from a recognized Android marketplace you will need to make sure that you allow installation of non-Market applications. To do this go to Settings | Applications and click the Unknown Sources checkbox.

Samsung Tablet Settings

Once the app is installed you will see it in your list of Apps. Here is my Nomad Hello World app. You can see that once the device is loaded onto my tablet that the Compass, Connection, Device and Geolocation properties all present working data.

Nomad Hello World App Running

As you can see from this demonstration the Nomad extension for Visual Studio 2010 allows you to create a working Android application within a Microsoft environment. Although the Android app is only available for private use once they allow deploys to the Google Play store you are well on your way to creating Android apps within the Visual Studio 2010 IDE.

Leave a comment below and let me know what types of projects you would use the Nomad extension for.

Extending PhoneGap for Visual Studio to Android devices

PhoneGap templates for Visual Studio 2010 have been around for almost a year. The templates allow you create a working Windows Phone 7 app using the PhoneGap SDK without having to learn XAML or C#.

There are plenty of examples on how to create a WP7 app with PhoneGap templates so I will not be repeating the steps here. If you are looking for some good tutorials though check out the following links:

Windows Phone App Porting: Bridging the PhoneGap

How to create HTML5 apps on Windows Phone with PhoneGap

Developing Windows Phone 7 HTML5 apps with PhoneGap

Note: Many of the tutorials reference the older PhoneGapStarter.zip file. However, in later releases the PhoneGap templates are using the newer Apache Cordova files. Click the following links to download the project files and to view the Getting Started guide.

Once you have installed the templates into Visual Studio and completed your project you should be able to successfully run your WP7 app on both the emulator and a Windows Phone 7 device.

However, the purpose of PhoneGap is Write-once, run-anywhere. So to have code that can only be run on a WP7 phone seems to defeat the purpose. Thankfully there is a free service from PhoneGap that can help with this called PhoneGap:Build. The online service can take your HTML, CSS and JavaScript files (everything the PhoneGap templates create using Visual Studio) and compile them into apps that are ready for a vendor’s app marketplace.

To use the service you need to sign in with either your AdobeID (PhoneGap was purchased by Adobe last year) or your GitHub account. Once you are signed in you will see a dashboard similar to this:

PhoneGap Build Dashboard

To get started click the new app button. A dialog box will appear:

PhoneGap New App Dialog

Give your app a name and select where to upload it from. You can create a new Git repository, pull from an existing one or choose to upload files from your computer. Note that if you select the latter option you can only choose an index.html file or an archive file. For me I will be using a .zip file. This file will contain an index.html file, the PhoneGap JavaScript file and a CSS file. All of these get generated in the www folder of my Visual Studio solution.

My dialog box now looks like this:

PhoneGap New App Dialog Completed

Once you hit the Create button your app will appear under the Apps heading on the Dashboard.

PhoneGap Build Dashboard App

Clicking the app name will bring you to a page containing the various builds that have been created. You will get packages for iOS, Android, Windows Phone, BlackBerry, webOS and Symbian. Note though that PhoneGap:Build will not create packages for iOS unless you have purchased a developer account with Apple and have added the correct signing key to your PhoneGap:Build account. See the iOS Developer Program for more details.

To retrieve your app click the Download button below the appropriate package and save the file to your computer. Since I am building for Android I will receive a file with a .apk extension.

PhoneGap Build Downloads

Once the item is saved to my computer I can then move the app to an Android mobile device for installation or even upload it to one of the Android marketplaces. To deploy the .apk file to my Samsung Galaxy Tab 2 10.1 Android tablet I will copy the file from my computer to my Dropbox folder.

To install the app click the file on Dropbox to begin downloading it to your Download folder on the device. Once the .apk file is in your folder click it to begin the installation process.

App Install Dialog Box

Note: To install apps that do not come from a recognized Android marketplace you will need to make sure that you allow installation of non-Market applications. To do this go to Settings | Applications and click the Unknown Sources checkbox.

Samsung Tablet Settings

Once the app is installed you will see it in your list of Apps. Here is my PhoneGap Hello World app. Pressing the “Say Hello World” button will put “Hello World” into a TextArea tag.

Hello World App

In this article we saw that by building apps with the PhoneGap template in Visual Studio 2010 we are not solely restricted to using the app on a Windows Phone 7 device. With ready-made sources like PhoneGap:Build and Dropbox we can export the finished product to other mobile devices like a Samsung Galaxy Tab 2 10.1 tablet. This gives us flexibility to test our products before we deploy them to an Android Market like Google Play.