Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PhoneGap By Example
  • Table Of Contents Toc
  • Feedback & Rating feedback
PhoneGap By Example

PhoneGap By Example

By : Andrew Kovalenko
close
close
PhoneGap By Example

PhoneGap By Example

By: Andrew Kovalenko

Overview of this book

PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about. It is one of the first and fastest spreading tools to develop hybrid applications using CSS, JavaScript, and HTML, without losing the advantages of native applications. If you are already a web developer, this book will provide you with the skills you need to create, customize, test, and deploy hybrid mobile applications. Starting from the beginning, this book will cover how to set up your PhoneGap development environment, add mobile web frameworks and plugins, design and customize the application layout, and utilize the embedded features of the PhoneGap framework. By working through the steps in each chapter, you will quickly master a variety of mobile applications with totally different approaches. You will then learn how to develop a PhoneGap plugin with native interfaces for iOS and Android, as well as common approaches to test PhoneGap applications. With ample screenshots that show you how to build a phenomenal application, PhoneGap by Example will ensure your success with this cutting-edge mobile development framework for hybrid applications.
Table of Contents (12 chapters)
close
close
11
Index

Testing theory


There are few popular ways of writing tests. Let's look at them and understand the difference between them.

Test-driven development

Test-driven development (TDD) is a process that relies on short repetition development cycles. It means that we write tests while we are writing an implementation. The shorter the cycles are, the better. Here is a diagram showing the TDD flow:

Before we write the actual code that does the job, we need to prepare a test. After the first run, the test fails, because there is nothing implemented. After that, we have to make the test pass cycle by cycle. When it happens, we may spend some time refactoring what is done so far and continue with the next method, class, or feature. Everything starts from writing tests. This is a very good approach, because that's the place where we define what our code should do. By writing tests, we protect ourselves from writing and delivering code that is not needed. We are also sure that the implementation meets the...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY