Skip to main content

Open Access 2014 | Open Access | Buch

Buchtitelbild

Learn BlackBerry 10 App Development

A Cascades-Driven Approach

insite
SUCHEN

Über dieses Buch

Learn how to leverage the BlackBerry 10 Cascades framework to create rich native applications. Learn BlackBerry 10 App Development gives you a solid foundation for creating BlackBerry 10 apps efficiently. Along the way, you will learn how to use QML and JavaScript for designing your app’s UI, and C++/Qt for the application logic. No prior knowledge of C++ is assumed and the book covers the fundamental aspects of the language for writing BlackBerry 10 apps. Also a particular emphasis is put on how to create a visually enticing user experience with the Cascades framework, which is based on Qt and QML.

Starting with the native SDK configuration and an overview of the Momentics IDE, the book is fast-paced and you will rapidly learn many of the best practices and techniques required for developing beautiful BlackBerry 10 apps.

Learn BlackBerry 10 App Development is written for developers wishing to learn how to write apps for the new BlackBerry 10 OS and those interested in porting existing iOS and Android apps to BlackBerry 10 as native applications.

Inhaltsverzeichnis

Frontmatter

Open Access

Chapter 1. Getting Started
Abstract
This chapter will show you how to set up your BlackBerry 10 development environment and deploy your first application on the BlackBerry 10 simulator and on a physical device. You will also get a broad perspective of the Cascades programming model, as well as its most essential features. In setting up your environment, I will walk you through the following steps:
Anwar Ludin

Open Access

Chapter 2. QML and JavaScript
Abstract
QML and JavaScript are the cornerstones of Cascades declarative user interface design. Both technologies, while amazingly easy to master, pack an enormous amount of punch when it comes to creating user interfaces quickly and effortlessly. QML, being a declarative language, lets you describe your user interface much like HTML would describe a web page. JavaScript then adds programmatic logic in event handlers, slots in Qt/Cascades parlance, and essentially ties your UI together with some behavior.
Anwar Ludin

Open Access

Chapter 3. C++, Qt, and Cascades
Abstract
I have avoided discussing C++ until now and given you mostly a “QML/JavaScript” perspective of Cascades programming. My goal was to show you how easily you could quickly build applications using QML and JavaScript only, without even writing a single line of C++ code. By now you know enough about the Cascades programming model and it is time to look at what’s happening behind the scenes in the C++ world.
Anwar Ludin

Open Access

Chapter 4. Controls
Abstract
Controls provide the fundamental UI building blocks of Cascades applications. By learning how to use them effectively, you will be able to design shiny applications where information is presented to the user in a polished and clear manner. This chapter will review the most essential Cascades controls and show you how to use them in your own applications. Considering that you will build your UI in QML most of the time, I will use QML exclusively in this chapter (you can also build your UI using C++, but that should rarely be the case in practice). UI best practices are another important topic that I will cover throughout the topics presented here. After having read this chapter, you will
Anwar Ludin

Open Access

Chapter 5. Application Structure
Abstract
An important step in designing your Cascades application is to plan how you will organize or structure the application’s pages and navigation. In order to make sure that you will not face any design problems, you need to clearly understand your application flow by asking yourself the following questions:
Anwar Ludin

Open Access

Chapter 6. ListView and DataModel
Abstract
A ListView is a fundamental Cascades control because it gives you an efficient way of displaying to the user hierarchical data on a screen where the real estate is relatively limited. List views are therefore one of the most flexible controls available in the Cascades framework and provide you lots of options for specifying how your data will be rendered as list items. Another important aspect of list views is their ability to clearly separate your data from its visual appearance by using the model-view-controller pattern. As illustrated in Figure 6-1, the ListView plays the role of a controller, which handles—among other things—user interactions; the DataModel represents your data; and, finally, a ListItemComponent is a QML template defining visual controls for rendering your data. You can also define multiple ListItemComponents for different data item types (I will tell more about types in the “Data Models” section. For the moment, simply keep in mind that a data model can define a type, which is used by the ListView to render a data item.).
Anwar Ludin

Open Access

Chapter 7. HTTP Networking
Abstract
HTTP networking is ubiquitous on mobile devices. This book would certainly not be complete if it did not include a chapter explaining how to use the BlackBerry 10 networking services. In this chapter, I am going to exclusively concentrate on HTTP networking, which covers about 90 percent of the cases you will face during application development. Also, BlackBerry 10 leverages the underlying QtNetwork module, which makes HTTP programming amazingly simple. The goal of this chapter is to show you how the different networking classes work together to access HTTP servers from a BlackBerry 10 mobile device.
Anwar Ludin

Open Access

Chapter 8. Personal Information Management APIs
Abstract
As you start developing Cascades business and productivity apps, you will realize the necessity for leveraging core services such as searching contacts, sending messages, and managing calendar entries. The aforementioned services fall under the personal information management (PIM) umbrella and refer to the tools used to manage the user’s personal and professional lives. One approach would be to implement the PIM services in your own application, which would quickly become daunting. Also from a user perspective, providing functionality already covered by the core applications would be less than ideal. A better approach would therefore be to reuse the preexisting PIM services provided by the BlackBerry 10 core applications and leverage them in your own apps. You can essentially achieve this in two ways:
Anwar Ludin

Open Access

Chapter 9. Sensors
Abstract
Sensors enable your BlackBerry 10 device to collect information about the outside world and to react to physical events. With some imagination, you can use the sensors API to build highly immersive apps that respond to the device’s position, accelerations, and rotations. Gaming is an obvious area that benefits from using sensors, but the majority of apps have yet to tap the potential of using sensors. There are really no limits to what you can achieve, and as mobile devices continue adding new types of sensors, the number of applications that use sensor data will experience exponential growth in the years to come.
Anwar Ludin

Open Access

Chapter 10. Invocation Framework
Abstract
You discovered in Chapter 8 how to access the PIM databases using the BlackBerry 10 PIM APIs. This chapter shows you another way of accessing third-party functionality using the invocation framework. The invocation framework is a very powerful way of integrating external applications directly into your own app (including UI elements called cards). The invocation framework is a two-sided coin: you can also use it to expose some of your own application’s functionality to client apps. This is an extremely important concept because it provides seamless integration between applications, thus avoiding the necessity to develop from scratch functionality that is already available in a core or third-party app. Here are some typical scenarios where you should consider using the invocation framework:
Anwar Ludin

Open Access

Appendix. Device File system
Abstract
You can use the BlackBerry 10 device’s file system in order to store your application’s data and share files with other apps running on the device. This appendix gives you an overview of your application’s home directory’s structure and the corresponding directory permissions.
Anwar Ludin
Backmatter
Metadaten
Titel
Learn BlackBerry 10 App Development
verfasst von
Anwar Ludin
Copyright-Jahr
2014
Verlag
Apress
Electronic ISBN
978-1-4302-6158-2
Print ISBN
978-1-4302-6157-5
DOI
https://doi.org/10.1007/978-1-4302-6158-2

Premium Partner