万本电子书0元读

万本电子书0元读

顶部广告

Xamarin Blueprints电子书

售       价:¥

4人正在读 | 0人评论 9.8

作       者:Michael Williams

出  版  社:Packt Publishing

出版时间:2016-09-01

字       数:182.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Leverage the power of Xamarin to create stunning cross-platform and native apps About This Book Helps you get a clear practical understanding of creating professional-grade apps with Xamarin Covers Xamarin.Forms, Xamarin Android, and Xamarin iOS If you want to transform yourself from an amateur mobile developer into a professional app developer across multiple platforms, then this is the ideal book for you Who This Book Is For If you are a mobile developer looking to create interesting and fully featured apps for different platforms, then this book is the ideal solution for you. A basic knowledge of Xamarin and C# programming is assumed What You Will Learn Discover eight different ways to create your own Xamarin applications Improve app performance by using SQLite for data-intensive applications Set up a simple web service to feed JSON data into mobile applications Store files locally with Xamarin.Forms using dependency services Use Xamarin extension libraries to create effective applications with less coding In Detail Do you want to create powerful, efficient, and independent apps from scratch that will leverage the Xamarin framework and code with C#Well, look no further; you’ve come to the right place! This is a learn-as-you-build practical guide to building eight full-fledged applications using Xamarin.Forms, Xamarin Android, and Xamarin iOS. Each chapter includes a project, takes you through the process of building applications (such as a gallery Application, a text-to-speech service app, a GPS locator app, and a stock market app), and will show you how to deploy the application’s source code to a Google Cloud Source Repository. Other practical projects include a chat and a media-editing app, as well as other examples fit to adorn any developer’s utility belt. In the course of building applications, this book will teach you how to design and prototype professional-grade applications implementing performance and security considerations. Style and approach A project-based approach that will solve all your needs when it comes to creating native Android, iOS, and cross-platform apps efficiently and effectively.
目录展开

Xamarin Blueprints

Xamarin Blueprints

Credits

About the Author

About the Reviewer

www.PacktPub.com

Why subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Building a Gallery Application

Create an iOS project

Creating a UIViewController and UITableView

Customizing a cell's appearance

Creating an Android project

Creating an XML interface and ListView

Shared projects

Custom row appearance

Bitmap functions

The ALAssetLibrary

Adding the iOS photo screen

Adding the Android photo screen

Summary

2. Building a SpeechTalk Application

Cross-platform development with Xamarin.Forms

So how would this look in Xamarin.Forms?

Setting up platform projects

So what is happening here?

Setting up the SpeechTalk.iOS project

Setting up the SpeechTalk.Droid project

Xamarin.Forms, Windows Phone, and Visual Studio

What can we see here?

Inversion of Control (IoC) with Xamarin.Forms

So why should we use it?

So how do we benefit from this?

Autofac

iOS text-to-speech implementation

Bindings

Android text-to-speech implementation

Setting up IoC with Android

WinPhone text-to-speech implementation

IoC with Windows Phone

Platform independent styling

Summary

3. Building a GPS Locator Application

Core location and GPS

Project setup

Navigation with Xamarin.Forms

Why would we do this?

Building the navigation control

View model navigation

Integrating Google Maps using Xamarin.Forms.Maps

Reactive Extensions

Core location with iOS and the CLLocationManager library

Handling location updates

Android and the LocationManager

Creating an exit point

Creating an API key for Android

Creating our Windows project

Core Location Services with Windows Phone

The Application class

Web services and data contracts

What about data contracts?

Creating another API key for geocoding

Creating GeocodingWebServiceController

Newtonsoft.Json and Microsoft HTTP client libraries

ModernHttpClient and client message handlers

Feeding JSON data into the IObservable framework

More Reactive Extensions

Resource (RESX) files

Using GeocodingWebServiceController

OnNavigatedTo and OnShow

Pythagoras equirectangular projection

How are we going to calculate the closest position?

Summary

4. Building an Audio Player Application

Solution setup

Inversion of control with MVVMCross

View-models with Xamarin native

Creating the bindings

NSLayoutContraints

MVVMCross setup inside the PCL

Setting up MVVMCross with iOS

Setting up MVVMCross with Android

The SoundHandler interface

Implementing the iOS SoundHandler using the AVAudioPlayer framework

The Mvx IoC container

The audio player

A cleaner code approach to NSLayout

Creating AudioPlayerPageViewModel

Implementing the Android SoundHandler using the MediaPlayer framework

XML and Mvx bindings

MvxActivities

Summary

5. Building a Stocklist Application

Understanding the backend

Creating an ASP.Net Web API 2 project

Building an API controller

Setting up the mobile projects

Building core mobile projects

Improving app performance

Creating a global App.xaml

Theming with ControlTemplates

Updating the MainPageViewModel

Creating the Stocklist web service controller

ListViews and ObservableCollections

Value converters

Adding a DataTemplate to the global resource dictionary

Styles

Further optimization with XAML

Creating StockItemDetailsPage

Custom renderers

Adding styles for custom elements

Creating StockItemDetailsPageViewModel

Setting up the native platform projects

Hosting the Web API project locally

Summary

6. Building a Chat Application

The Model-View-Presenter (MVP) pattern

So why bother with this approach?

Architecture

How do we determine which layers our project needs?

SignalR

Starting with Open Web Interface for .NET (OWIN)

Creating an authorization server using OWIN OAuth 2.0

OAuthAuthorizationServerProvider

Use OAuthBearerAuthentication

Setting up the AuthenticationRepository

Configuring the Web API

Building the AccountController

Configuring OAuth Authentication with our Web API

Building the SignalR Hub

Setting up mobile projects

Creating the SignalRClient

Building the WebApiAccess layer

Application state

Setting up the navigation service

Building the iOS navigation service

Building the Android navigation service

Building the iOS interface

Handling Hub proxy callbacks

Implementing the LoginPresenter

Creating the connection between Presenter and View

Building the LoginActivity

Implementing the ClientsListPresenter

Creating ClientListViewController

The TaskCompletionSource framework

Creating the ClientsListActivity

Overriding the OnBackPressed activity

Building the ListAdapter

Building the ChatPresenter

Building the iOS ChatView

Extending the UIColor framework

Android TableLayouts

Building the Android ChatActivity

Running the server and clients

Summary

7. Building a File Storage Application

Project structure setup

Building a data access layer using SQLite

Building the ISQLiteStorage interface

Adding additional threading techniques

How do we solve this problem?

Creating the AsyncSemaphore

Creating the AsyncLock

Implementing native setup requirements for SQLite

Implementing the IoC container and modules

Implementing cross-platform logging

Implementing the SQLiteStorage class

Introduction to C# 6.0 syntax

Handling alerts in view-models

Building the IMethods interface

Building the ExtendedContentPage

Why are we implementing two different techniques for showing alerts?

Building a CarouselView using custom layouts

Adding scroll control to the CarouselView

Building a CustomRenderer for native gestures

Building the user interface

Using a SynchronizationContext

How do we know this context is from the main UI thread?

Building the EditFilePage

Behaviours

Challenge

Building the Windows Phone version

Summary

8. Building a Camera Application

Solution setup

Building the MainPageViewModel class

Improving the INotifiedPropertyChanged implementation

Creating the custom UI objects

Building the FocusView

Xamarin.Forms animations

Xamarin.Forms compound animations

Building the CameraView

Building a control for the iOS camera

Building the iOS CameraRenderer

Integrating the Android Camera2 framework

Building the CameraViewRenderer in Android

Handling native touch events through the FocusView

Using RX to handle events

Building a VisualElementRenderer for iOS

Building the CustomImageRenderers

Building the UIImageEffects class

Building the CustomImageRenderer for Android

Triggers

Easing.SinIn

Easing.SinOut

Platform effects

Building the CameraPage

Adding native orientation events

Challenge

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部