Multimobile Development (eBook)

Building Applications for the iPhone and Android Platforms
eBook Download: PDF
2010 | 1st ed.
XV, 462 Seiten
Apress (Verlag)
978-1-4302-3199-8 (ISBN)

Lese- und Medienproben

Multimobile Development - Matthew Baxter-Reynolds
Systemvoraussetzungen
56,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
You've developed a killer app for one mobile device-now it's time to maximize your intellectual investment and develop for the full spectrum of mobile platforms and devices. With Cracking iPhone and Android Native Development, you'll learn how to quickly retool between the iPhone and Android platforms and broaden the interest and audience of your app, without working with burdensome and error-prone compatibility layers and toolkits.

Cracking iPhone and Android Native Development takes you, the developer, through the same mobile software development project on both platforms, learning the differences between and the relative strengths and weaknesses of each platform as you go. No magic intermediate layers of obfuscation-by the time you get to the end, you'll be an expert at developing for any of the major smartphone platforms using each vendor's preferred toolset and approach.

Cracking iPhone and Android Native Development covers the iPhone and Android platforms, two of the hottest mobile device platforms on the market today.

Matthew Baxter-Reynolds is a software development consultant, working with companies to improve their products and capability as software developers. Between 2000 and 2003, he wrote a considerable amount of content on Windows .NET and Windows DNA technologies for Wrox Press, including a best-selling book, Beginning E-commerce. He also acts as chief technical officer to Simplehosted, a leading provider of mobile workforce management solutions in the U.K. Their solutions are based on Windows Mobile.


You've developed a killer app for one mobile device-now it's time to maximize your intellectual investment and develop for the full spectrum of mobile platforms and devices. With Cracking iPhone and Android Native Development, you'll learn how to quickly retool between the iPhone and Android platforms and broaden the interest and audience of your app, without working with burdensome and error-prone compatibility layers and toolkits. Cracking iPhone and Android Native Development takes you, the developer, through the same mobile software development project on both platforms, learning the differences between and the relative strengths and weaknesses of each platform as you go. No magic intermediate layers of obfuscation by the time you get to the end, you'll be an expert at developing for any of the major smartphone platforms using each vendor's preferred toolset and approach. Cracking iPhone and Android Native Development covers the iPhone and Android platforms, two of the hottest mobile device platforms on the market today.

Matthew Baxter-Reynolds is a software development consultant, working with companies to improve their products and capability as software developers. Between 2000 and 2003, he wrote a considerable amount of content on Windows .NET and Windows DNA technologies for Wrox Press, including a best-selling book, Beginning E-commerce. He also acts as chief technical officer to Simplehosted, a leading provider of mobile workforce management solutions in the U.K. Their solutions are based on Windows Mobile.

Title page 1
Copyright page 2
Contents at a Glance 4
Table of contents 5
About the Author 11
About the Technical Reviewer 12
Acknowledgments 13
CHAPTER 1 Introduction 14
What’s the Purpose of This Book? 15
How Is This Book Structured? 15
Where Can You Get Help and Support? 17
Conclusion 17
CHAPTER 2 The Six Bookmarks Server Service 18
Creating an API Account 18
Creating a User 19
The Users Service 21
REST ful Web Services 21
Testing the Calls 22
Examining Logon Operations 22
Obtaining a Token 23
Logging On the User 24
Cleaning Up 24
The Bookmarks Service 25
Adding Some Test Data 25
Working with OData 26
OData Queries 30
Issuing Updates over OData 31
Constraining Data to the Logged-On User 31
Conclusion 31
CHAPTER 3 Application Architectureand Functional Specification 32
A Word About Slates 32
Functional Specification 32
Logging On 33
Synchronizing 33
Navigator 34
Configuring Bookmarks 35
Configuring a Single Bookmark (“Configure Singleton”) 36
Missing Functionality 36
Application Architecture and Technical Specification 37
Approach 37
Object-Relational Mapping 38
Metadata 38
Entities 39
Generating Entities 40
SQL Statements 41
Change Processors 42
Server Communication 42
Technical Approach Broken Down by Platform 43
Core Toolset 44
Issue HTTP Requests 44
Read XML Document (Including Reading OData Results) 45
Write an XML Document 45
Maintain a Local Store 46
Conclusion 46
CHAPTER 4 Android: Installing the Toolset 47
Why Android First? 47
Installing the Toolset 47
Installing Java 47
Installing Eclipse 48
Installing the Android SDK 48
Bug in the “r05” Installer 48
Installing the Android Development Tools (ADT) into Eclipse 49
Configuring the Emulator 53
Creating Our Android “Hello, World” Application 56
Saying “Hello, World” 59
Declarative Layout 59
Wiring Up the Button 61
Conclusion 66
CHAPTER 5 Android: Building the Logon Formand Consuming REST Services 67
Creating the Project 67
Conventions for Presenting Code 68
Calling RESTful Services 69
Issuing Web Requests 69
The “DownloadSettings” Class 70
The “Download” and “DownloadXml” Methods 70
Extra Methods on “HttpHelper” 73
Authenticating Our API Account 74
The “LogonResponse” 76
Building the “XmlHelper” Class 77
Creating the “Logon” Method on the API Service 81
Wiring Up “EnsureApiAuthenticated” 84
Authenticating the User via “UsersService” 85
Setting “Allow Internet Access” Permission 86
Creating the Logon Form 87
Model/View/Controller 91
Contexts and Building the Controller 91
Binding the View and Controller 94
Logging On 98
“Remember Me” 101
Conclusion 103
CHAPTER 6 Android: An ORM Layeron SQLite 104
SQLite on Android 104
Entities 104
“EntityType” 105
Creating the Basic “Entity” Class 111
Setting Values in an Entity 113
Building “Bookmark” 118
Registering the “EntityType” 120
Displaying Some Fake Bookmarks 121
Creating the Form 121
Creating the “Navigator.xml” Layout 122
Creating the Controller 124
Creating the View Interface 125
Creating the Navigator Activity 126
Showing the Bookmarks 128
Adding the Activity to the Manifest 131
Issuing the “Go to Navigator” “Intent” 131
Wiring Up the Bookmarks 133
Building the “Sync” Class 135
Calling the Server’s Bookmarks OData Service 135
Namespaces 136
Adding Functionality to “XmlHelper” 137
Querying the Feed 138
Creating Entities from Name/Value Collections 142
Managing the Database 143
The “SqlStatement” Class and “ISqlStatementSource” Interface 145
Creating Tables 146
Examining the Database with Sqliteman 150
Writing Bookmarks to the Database 154
Building the Change Processor 154
Inserting Entities 155
Downloading Bookmarks 157
Reading Bookmarks and Displaying Them on the Navigator 159
Executing the Entity Collection 161
Asking the Navigator Controller to Load the Real Bookmarks 163
Conclusion 164
CHAPTER 7 Android: Pushing Changesto the Server 165
Capturing Local Changes 165
Constraining SQL Filters 165
Excluding Deleted Entities from the View 171
Getting a Bookmark by Ordinal 172
Building the Configuration Form 173
List Views 173
Binding List Data 178
Handling Menu Actions 188
Creating the Context Menu 190
Configuring Singletons 196
Pushing Changes to the Server 204
Detecting Local Changes 204
Building the “PushUpdates” Method 204
Issuing Server Requests to Insert, Update, and Delete 208
Update via “HTTP MERGE” and Insert via “HTTP POST” 209
The “ODataOperation” Enumeration 209
Marking Fields As Being Available on the Server 209
Building the XML 211
Building “ExecuteODataOperation” 214
Conclusion 219
CHAPTER 8 iOS: Installing the Toolset 220
iPad Development 220
Installing Xcode 220
An Objective-C Primer for .NET and Java Developers 220
Problems with Objective-C 221
Calling Methods (aka “Sending Messages”) 222
Creating the Project 222
Properties (and a Little Memory Management) 224
A Little More about Memory Management 229
Methods 230
Namespaces 232
The Biggest Gotcha in Objective-C 232
“Hello, World” for iPhone 232
Building the User Interface 234
Creating a Windows and Showing the View 241
Displaying the Message Box 242
Conclusion 244
CHAPTER 9 iOS: Building the Logon Formand Consuming REST Services 245
Creating the Project 245
Creating the Logon Form 245
Creating the Logon Form User Interface 247
Showing the Logon Form 250
Special Note About Grouped Views 254
Conventions for Presenting Code in the iPhone Chapters 254
Calling the Services 255
Capturing the Logon Request 255
Calling the API Service 260
Building the Proxy Classes 261
The SBHttpHelper and SBDownloadBucket Classes 262
Implementing SBDownloadBucket 265
Making a Real Call to the API Service and Parsing the XML 271
Calling the Users Service 289
Notifying That Work Is in Progress 295
Conclusion 297
CHAPTER 10 iOS: An ORM Layer on SQLite 298
A Note About Content That Has Already Been Covered 298
Entities 298
The SBEntityType Class 299
The SBEntity Class 307
Setting Values in an Entity 310
Building SBBookmark 315
Creating SBEntityType Instances 318
Displaying Some Fake Bookmarks 320
Creating the View 320
Building the View Engine 324
Displaying Bookmarks 329
Handling Navigation 332
Building the Sync Class 334
Calling the Server’s Bookmarks OData Service 334
Namespaces 336
Querying the Feed 336
Stubbing SBSync 339
Parsing the XML 343
Spinning the Progress Wheel 350
Database Operations 351
Including SQLite 351
Building SBDBHelper and Implementing Error Handling 354
Defining SQL Statements 356
Creating Tables 358
Storing the Database in the Correct Location 367
Writing Bookmarks to the Database 368
Building the Change Processor 368
Completing getLatest 373
Reading Bookmarks and Displaying Them on the Navigator 375
Conclusion 387
CHAPTER 11 iOS : Pushing ChangesBack to the Server 388
Configuring Bookmarks 388
Putting Data on the Table 391
Sorting the Bookmarks 394
Singleton View 395
Editing a Bookmark 400
Capturing and Committing Changes 403
Implementing the Delete Method 407
Adding a Bookmark 408
Deleting Bookmarks 410
Manually Syncing 413
Pushing Changes to the Server 414
Work Items 417
Issuing OData Change Requests 423
Flagging Fields As “Not on Server” 424
Issuing Requests 425
Implementing executeODataOperation 429
Modifying processWorkItems 431
Conclusion 433
CHAPTER 12 iOS: MonoTouch 434
Mono in the Big Picture 434
Chapter Structure 435
Installing MonoTouch 435
“Hello, World” 436
Inspecting the Code-Behind 439
Wiring Up the Button 441
Running the Project 442
Calling the Six Bookmarks API RESTful Service 443
Creating the Project 443
Building ServiceProxy Et Al. 444
Calling the Service Method 449
Conclusion 453
Index 454

Erscheint lt. Verlag 31.12.2010
Zusatzinfo XV, 480 p.
Verlagsort Berkeley
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Netzwerke
Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Informatik Software Entwicklung Mobile- / App-Entwicklung
Schlagworte Android • Apple iphone • Mobile Development • Smartphone • Time
ISBN-10 1-4302-3199-8 / 1430231998
ISBN-13 978-1-4302-3199-8 / 9781430231998
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 11,7 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Robust and fast cross-platform application development

von Marco Cantu; Pawel Glowacki

eBook Download (2024)
Packt Publishing Limited (Verlag)
29,99