Mobile Applcation UPDATED
Mobile Applcation UPDATED
COURSE OVERVIEW:
COURSE OVERVIEW
• Project Work
• Programming Fundamentals:
• Familiarity with Mobile Platforms:
• Web Technologies:
• Software Development Lifecycle (SDLC):
• Version Control Systems:
• Database Fundamentals:
PREREQUISITES CONT’D
• This covers version control systems like Git for managing source
code, collaboration, and tracking changes.
• Understanding of basic Git commands (commit, push, pull, merge)
and workflows (branching, tagging).
DATABASE FUNDAMENTALS:
1. B'far, R. (2004). Mobile computing principles: designing and developing mobile applications with
UML and XML. Cambridge University Press. Ebook - http://content.schweitzer-
online.de/static/catalog_manager/live/media_files/representation/zd_std_orig__zd_schw_orig/0
02/209/645/9780521817332_foreword_pdf_1.pdf
2. Mukherjea, S. (Ed.). (2016). Mobile Application Development, Usability, and Security. IGI Global.
https://books.google.co.tz/books?hl=en&lr=&id=JchNDQAAQBAJ&oi=fnd&pg=PR1&dq=%22MOBI
LE+APPLICATION+%22+book&ots=qKVoJrZr2u&sig=sovOLRlD8pHqrSPHjVzcTs34GF0&redir_esc=y#
v=onepage&q=%22MOBILE%20APPLICATION%20%22%20book&f=false
3. Velu, V. K. (2016). Mobile Application Penetration Testing. Packt Publishing Ltd.
• https://books.google.co.tz/books?hl=en&lr=&id=Y0XiCwAAQBAJ&oi=fnd&pg=PP1&dq=%22MO
BILE+APPLICATION+%22+book&ots=ZnuFs866nU&sig=WTVFj2RPrAgzCQLHphAa_HLTa7k&redir_
esc=y#v=onepage&q=%22MOBILE%20APPLICATION%20%22%20book&f=false
INTRODUCTION TO MOBILE APP DEVELOPMENT
• User Interface (UI): This is the visual elements through which users
interact with the app.
• Business Logic: This refers to underlying functionality that defines
the app's behavior and processes data.
• Data Storage: This refers to the mechanisms for storing and
retrieving data, such as databases or cloud services.
• Networking: This covers the communication with external servers or
APIs to fetch data or perform actions.
MOBILE APPS ARCHITECTURAL PATTERNS
• Model-View-Controller (MVC)
• Model-View-Presenter (MVP)
• Model-View-ViewModel (MVVM)
• Clean Architecture
MODEL-VIEW-CONTROLLER (MVC)
• Model:
• Represents the data and business logic of the application.
• Manages data manipulation, validation, and storage.
• Does not depend on the user interface (View) or the user's input
(Controller).
(MVC) CONT’D
• View:
• Represents the presentation layer of the application.
• Displays the data to the user in a particular format (e.g., UI elements,
screens, pages).
• Receives user input and sends it to the Controller for processing.
(MVC) CONT’D
• Controller:
• Acts as an intermediary between the Model and the View.
• Receives user input from the View and processes it (e.g., user
actions, requests).
• Manipulates the Model based on the input received and
updates the View accordingly.
MODEL-VIEW-PRESENTER (MVP)
• MVVM is a variation of the MVC and MVP patterns that emphasizes data
binding to establish communication between the View and the View Model.
• This is done by promoting separation of concerns, testability, and
declarative UI development, MVVM enables efficient development and
maintenance of user interfaces in modern app development frameworks.
CLEAN ARCHITECTURE
6. Design Tables:
Once the database is created, you can start designing tables.
In the SQL Database Control Panel, select your database.
Click on "Design Tables" to define the structure of your database.
Add tables and define their fields (columns) along with their data types.
8. Save Changes:
Make sure to save your changes regularly as you design your database.
STEPS CONT’D
•
DATA ENTRY USING GRID COMPONENT
• Alpha Anywhere is a low-code platform that allows you to build web and mobile
applications quickly and easily. When creating user experiences (UX) using Alpha
Anywhere, follow the following steps :
1. Define Requirements:
Before starting development, gather requirements from stakeholders to understand what the
application needs to accomplish and who the target users are.
2. Design the UX:
Use wireframing and prototyping tools to create a visual representation of the user interface.
Consider the flow of the application, user interactions, and the overall look and feel.
CONT’D
• In the UX Builder, locate the panel where you want to add the
list control.
• From the Controls pane, find the "List" control (or any other
list-related control such as "List View").
• Drag and drop the list control onto the panel within the UX
Builder.
ADDING A BETTER LOOKING LIST
1.Optimize Performance:
1. Ensure that your list control performs efficiently, especially when
dealing with large datasets. Use server-side pagination and lazy
loading to fetch data incrementally and avoid overwhelming the user
interface. Eg default record display list(10, 25, 50, 100 etc)
2.Test and Iterate:
1. Test your enhanced list thoroughly to ensure it meets usability and
performance standards. Solicit feedback from users and stakeholders,
and iterate on the design based on their input.
SET UP YOUR LIST AND DETAILS PANEL:
• Set up your list and details panel:
• Create a list control and a details panel card in your UX. Make sure you
have populated your list with data and configured your details panel card
to display detailed information based on the selected list item.
• Add a Selection Changed event to the List control:
• In the UX Builder, select your list control.
• In the Properties pane, find the Events section.
• Locate the Selection Changed event and double-click it to add an event
handler.
CONT’D
• Bind the List Control's Selected Item to the Details Panel Card (Optional):
• To ensure that the details panel card displays information corresponding to the
selected list item, you may need to bind the selected item from the list to the
details panel card.
• You can do this by setting the Data Source property of the details panel card to
the same data source as the list control and configuring the filter or criteria to
match the selected item.
CONT’D
Definition: Intents are messaging objects that allow you to request an action from another app
component (like activities, services, and broadcast receivers).
Types:
1. Explicit Intents: Used to start a specific component within your app.
2. Implicit Intents: Used to activate components from other apps based on the specified action and
data.
Intent Filters:
Components can declare intent filters to specify the types of intents they
can respond to, such as specific actions or data types.
Sending and Receiving Intents:
You can send intents to start activities, start services, or send broadcasts.
Components can also receive intents and act upon them.
SERVICES:
1.Definition:
Services are components that run in the background to perform long-running
operations or handle tasks without a user interface.
Types:
1. Foreground Services: Services that have a visible notification, making the
user aware that the service is running.
2. Background Services: Services that run without a visible notification. These
are generally used for tasks that don't require user interaction.
CHARACTERISTICS OF MOBILE APPLICATIONS
Portability:
Mobile applications are designed to run on a variety of devices, including
smartphones, tablets, and wearables. They should adapt to different screen sizes,
resolutions, and hardware capabilities.
Context Awareness:
Mobile apps can control device sensors like GPS, accelerometer, and camera to
gather contextual information and provide personalized experiences based on the
user's location, movement, and surroundings.
CHARACTERISTICS OF MOBILE APPLICATIONS CONT’D
Offline Capabilities: Mobile applications should be able to function even when there is
limited or no internet connectivity. They may cache data locally to ensure users can
access essential features and content offline.
Touch Interface: Unlike traditional desktop applications, mobile apps primarily rely on
touch-based interactions for navigation, input, and manipulation of content. User
interfaces should be intuitive, responsive, and optimized for touch gestures.
Push Notifications: Mobile apps can send push notifications to engage users, provide
updates, or deliver timely information even when the app is not actively in use.
Effective use of push notifications can enhance user engagement and retention.
CHARACTERISTICS OF MOBILE APPLICATIONS CONT’D
Shared Preferences:
1. Ideal for storing small amounts of primitive data such as user preferences, settings,
or simple app state.
2. Simple key-value pairs stored in XML files.
3. Accessed using the Shared Preferences API provided by the Android SDK.
Internal Storage:
1. Used for storing private data files that belong to the application.
2. Data is stored in the device's internal memory.
3. Suitable for sensitive data that should not be accessible to other apps.
4. Accessed using file I/O operations such as reading and writing to files.
STORING AND RETRIEVING DATA CONT’D
External Storage:
1. Used for storing large files or data that needs to be shared with other apps or
accessed by other users.
2. Data is stored in public directories on the device's external storage.
3. Requires appropriate permissions to read and write data to external storage.
4. Accessed using file I/O operations similar to internal storage.
STORING AND RETRIEVING DATA CONT’D
SQLite Databases:
1. Ideal for storing structured data in relational database format.
2. Provides a powerful and efficient way to manage and query data.
3. Supported by Android through the SQLite Open Helper class and SQLite
Database API.
4. Enables complex querying, indexing, and data manipulation operations.
STORING AND RETRIEVING DATA CONT’D
Content Providers:
1. A mechanism for managing and sharing structured data between apps.
2. Provides a standardized interface for accessing and manipulating data stored in
SQLite databases or other data sources.
3. Enables data access through URIs and supports CRUD (Create, Read, Update,
Delete) operations.
4. Often used for accessing system data or sharing data between different apps.
STORING AND RETRIEVING DATA CONT’D
Network Storage:
1. Data can be stored on remote servers or cloud storage solutions.
2. Allows for centralized storage and synchronization across multiple devices.
3. Requires network connectivity and appropriate security measures to protect
data in transit and at rest.
4. Accessible using network communication protocols such as HTTP,
REST(Representational State Transfer) APIs, or custom protocols.
STORING AND RETRIEVING DATA CONT’D
ORM Frameworks:
1. Object-Relational Mapping (ORM) frameworks like Room (for Android) or Core
Data (for iOS) provide higher-level abstractions for working with databases.
2. Simplify database operations by mapping database tables to object-oriented
models.
3. Handle tasks such as database schema management, data caching, and query
optimization.
DATA SYNCHRONIZATION:
• Definition: Data synchronization is the process of ensuring that data on the client
(mobile device) matches the data on the server.
• Two-Way Synchronization: Involves updating both the client and server with
changes made on either side to ensure consistency.
• Conflict Resolution: Handle conflicts that arise when the same data is modified on
both the client and server simultaneously. Strategies include last-write wins,
manual resolution, or merging conflicting changes.
OFFLINE DATA ACCESS:
• Definition: Data replication involves copying data from one location (e.g., server) to
another (e.g., multiple servers or edge devices) to ensure redundancy, scalability,
and fault tolerance.
• Master-Slave Replication: Data changes are propagated from a master database to
one or more slave databases.
• Peer-to-Peer Replication: Data is replicated between multiple nodes in a
decentralized network without a central authority.
WORKING WITH A CONTENT PROVIDER
• HTTP/HTTPS Requests:
• HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure) are the
foundation of communication on the web.
• HTTP is used for transmitting data between a client (e.g., a mobile app) and a
server.
• HTTPS provides secure communication by encrypting data using SSL/TLS
protocols.
RESTFUL APIS:
RESTful APIs:
1. REST (Representational State Transfer) is an architectural style for designing
networked applications.
2. RESTful APIs use standard HTTP methods (GET, POST, PUT, DELETE) to perform
CRUD operations on resources.
3. RESTful API uses Clients to send HTTP requests to interact with resources on
the server. The server processes the requests and returns appropriate
responses.
WEB SOCKETS:
1.States:
• A state represents a specific condition or mode in which a system can exist at
a given time.
• Each state is defined by a unique identifier and may have associated
properties or variables that describe its characteristics.
• For example, in a traffic light system, states could include "Green", "Yellow",
and "Red".
STATE MACHINES CONT’D
2. Transitions:
• Transitions define the movement of the system from one state to
another in response to events or conditions.
• Transitions are triggered by events and are typically associated with
specific conditions that must be met for the transition to occur.
• For example, in the traffic light system, a transition from "Green" to
"Yellow" may be triggered by a timer reaching a predefined threshold.
STATE MACHINES CONT’D
3. Events:
• Events are external stimuli or occurrences that trigger state transitions.
• Events can be user inputs, sensor readings, timer expirations, or any
other form of external stimulus.
• For example, in a vending machine, inserting a coin could trigger an
event that transitions the machine from the "Idle" state to the
"Accepting Coins" state.
STATE MACHINES CONT’D
4. Actions:
• Actions are tasks or operations performed when a state transition
occurs.
• Actions can include updating variables, sending messages, invoking
functions, or changing system behavior.
• For example, in a microwave oven, transitioning from the "Cooking"
state to the "Paused" state may involve stopping the timer and
displaying a "Paused" message
STATE MACHINES CONT’D
• Telephony refers to the technology and systems used for voice communication over
long distances, typically through the use of telephones or mobile devices.
1. Voice Calls:
• Mobile phones allow users to make and receive voice calls to communicate with others.
• Voice calls are established using cellular networks, which consist of a network of base stations (cell
towers) and switching centers that route calls between users.
• Modern smartphones support features such as call waiting, call forwarding, conference calling, and HD
voice calling.
2. SMS (Short Message Service):
• SMS is a text messaging service that allows users to send short text messages between mobile devices.
• SMS messages are typically limited to 160 characters per message but can be concatenated to form
longer messages.
• SMS is widely used for person-to-person communication, automated notifications, and two-factor
authentication (2FA) purposes.
TELEPHONY CONT’D
5. Telephony APIs:
• Mobile operating systems provide telephony APIs that allow developers to integrate telephony features into their
applications.
• These APIs enable developers to make and manage voice calls, send and receive SMS/MMS messages, and access call logs
and other telephony-related information.
• Telephony APIs also support features such as querying network information, monitoring signal strength, and managing SIM
cards.
6. Call Management:
• Mobile devices provide features for call management, such as call blocking, call screening, and caller ID.
• Users can manage their contacts, create favorites lists, and organize call logs based on various criteria.
• Smartphones also offer features such as Do Not Disturb mode, which allows users to silence calls and notifications during
specified times.
DECIDING SCOPE OF AN APP
• Deciding the scope of an app is a critical step in the development process and
involves defining the features, functionalities, and objectives of the application.
Here's a structured approach to help you decide the scope of your app: