官术网_书友最值得收藏!

Preface

The sudden explosion of mobile devices has made mobile apps development one of the hottest career fields for programmers. The global smartphone/tablet market shared by multiple platforms posed a serious question to mobile application developers and companies, as every mobile platform has different development frameworks and programming languages to develop native applications.

How can we achieve WORA (Write Once, Run Anywhere)?

The obvious solution was HTML5, which is supported by all the latest browsers and has great support for developing rich user interfaces. With the introduction of platforms such as PhoneGap, which exposes the native OS APIs to apps developed in HTML5/JavaScript and CSS3, HTML5-based applications became a double-edged sword. They can be developed using one code base and deployed as a mobile website as well as mobile apps which can be installed on different platforms, as opposed to developing native apps which will result in multiple code bases if multiple platforms are targeted. The availability of a large number of web developers in the industry who understand HTML, JavaScript, and CSS added a boost to the shifting direction of mobile apps development towards HTML5. As the demand increased for more and more mobile applications, both in enterprise and consumer areas, different types of HTML5-based development frameworks surfaced and are still surfacing!

Kendo UI Mobile from Telerik is one of the fastest growing HTML5- and jQuery-based cross-browser mobile applications development frameworks. KendoUI Mobile distinguishes itself from other frameworks by providing adaptive native UI rendering out of the box, without any extra coding, and supporting the Kendo base application development framework. While other mobile development frameworks concentrate on the UI part only, Kendo UI provides support for end-to-end, client-side development.

As the world is getting closer to the HTTP protocol, Web APIs (services which are exposed over plain HTTP) are gaining momentum. ASP.NET Web API helps to build powerful Web APIs, which can be consumed by a rich set of clients and is now the number one choice for .NET developers to build RESTful applications.

This book will introduce you to Kendo UI Mobile and will show you how to build an end-to-end mobile app using ASP.NET Web API as the service backend.

What this book covers

Chapter 1, Building a Mobile Application Using HTML5, helps a programmer, who is relatively new to the mobile applications development world, pick up on this journey to build an end-to-end app using Kendo UI Mobile. The chapter details different types of mobile applications such as native, hybrid and mobile websites, an introduction to Kendo UI Mobile, and wraps up with mobile applications design guidelines.

Chapter 2, Building Your First Mobile Application, introduces you to Kendo UI Mobile code in detail, and some screens for the Movie Tickets app will be developed explaining views, layouts, navigation, and more. From this chapter we get our hands dirty and write some really cool code.

Chapter 3, Service Layer with ASP.NET Web API, introduces you to one of the latest additions to Microsoft .NET stack, ASP.NET Web API. We will see routing, parameter binding, content negotiation, token-based authentication, authorization, and write some API methods which will be used for the sample Movie Tickets application. Readers not from the Microsoft background can skip this chapter as well as writing your own services with the same functionality on a platform of your choice or use the service hosted by us on the Internet. The frontend Kendo UI Mobile client application is independent of the backend API technology and will work with any service platform as long as it accepts and returns the same JSON data.

Chapter 4, Integration Using Framework Elements, discusses the common Kendo Framework elements such as DataSource, Templates, and MVVM, which are used in both mobile and web application development. Then we will start backend integration with the Movie Tickets app by building the User Account screen, discussing the Revealing Module Pattern and the application architecture.

Chapter 5, Exploring Mobile Widgets, introduces you to the core of the Kendo UI Mobile Framework, the Mobile widgets. We will dive deep into widgets such as ListView, Button, ButtonGroup, and so on. Using the provided jsFiddle examples, users can play around with the sample code.

Chapter 6, ActionSheet, ModalView, and More Widgets, continues on from the previous chapter, and we will explore more Kendo UI Mobile widgets hands-on.

Chapter 7, Movie Tickets Application – Complete Integration, completes our Movie Tickets sample application by integrating with Kendo UI Mobile widgets, framework elements, and the ASP.NET Web API service.

Who this book is for

This book is intended for novice and expert programmers with a web development background who want to build mobile applications or mobile websites for enterprise as well as consumer domains. A basic understanding of HTML, CSS, and jQuery is required to make good use of this book.

What you need for this book

The following software are required to make full use of this book:

  • Kendo UI Mobile: Free trial or commercial licensed version ($199 per developer)
  • jQuery 1.8.1: Free
  • Ripple Emulator: Free
  • MS Visual Studio 2010/2012 Express edition, ASP.NET MVC4: These are available as free downloads and are required only if you are a .NET programmer and are interested in exploring ASP.NET Web API.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Now let's create an action method in MoviesController.cs, which calls the GetMovieList BLL method."

A block of code is set as follows:

public class TrailerBO
{
    public string MovieName { get; set; }
    public string VideoUrl { get; set; }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<!-- Movies main view --->
<div data-role="view" id="mt-home-main-view" data-title="Movies"
        data-init="MovieTickets.movieList.initialize"
 data-model="MovieTickets.movieList.viewModel"
        data-layout="mt-main-layout" class="no-backbutton">

Any command-line input or output is written as follows:

customEvent fired
customEvent fired with data: Kendo UI is cool!

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: Two buttons, Open Left and Open Right, are placed on the NavBar widget in the layout of the views, which can be clicked to open the Drawer widgets as shown in the following code:

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code and graphics

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the colored graphics from: http://www.packtpub.com/sites/default/files/downloads/0922OT_ColoredImages.pdf

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.

主站蜘蛛池模板: 高邑县| 抚顺县| 无极县| 彭山县| 双辽市| 从化市| 乌兰浩特市| 兴化市| 新蔡县| 清镇市| 绥德县| 肥乡县| 延庆县| 秦皇岛市| 进贤县| 重庆市| 陈巴尔虎旗| 永川市| 安岳县| 泸定县| 乐安县| 疏勒县| 遵义县| 新乡市| 南平市| 图们市| 西乡县| 邯郸市| 汉中市| 灵武市| 恩平市| 浦东新区| 玛沁县| 宿州市| 和田市| 新干县| 新宁县| 昭苏县| 北辰区| 奉化市| 天等县|