0% found this document useful (0 votes)
9 views

IS238 Lecture 1 - Introduction

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

IS238 Lecture 1 - Introduction

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

IS 238 : Mobile Application Development

(12 credits)

Lecture :
Instructor : Dr. Kennedy Wednesday 07:00 – 09:00
E-mail: kenfactz@gmail.com Room: D01 (LUHANGA HALL)

Practical:
Friday 14:00 – 16:00
1
General Course Information

⚫ This course has a total of 8 credits (2 Hrs lecture & 1


hr Tutorial)
⚫ Lecture time - Wednesday (07:00 – 09:00)
⚫ Tutorial - Friday (14:00 – 16:00)
⚫ Course work carries 40 % marks
❖ Test one 20% marks (7th week)
❖ Test two / Practical 20% marks (11th week)
⚫ University Examination carries 60%

2
Course Units

Unit I: Introduction:

Unit II: Mobile Programming

Unit III: High Level User Interface

Unit IV: Low Level User Interface

Unit V: Persistence Storage

Unit VI: Networking

Unit VII: Optimization

Unit VIII: Optical Packages


Unit I: Introduction – Mobile devices

⚫ What is a mobile devices?


➢ A mobile device is a general term for any type of handheld
computer.
➢ They are portable
➢ They can often fit in your hand.
➢ Some of them are powerful enough to do many of the same
things you can do with a desktop or laptop computer.
➢ Example: Tablets, e-readers, and Smartphones -
Unit I: Introduction – Mobile devices

⚫ Go through the internet and search different learning resources that


will enable you to understand the following:
➢ Types of mobile devices and the criteria which distinguish them.
➢ Advantages of using mobile devices over desktop computers
➢ Challenges of using mobile devices
Unit I: Introduction – Java

⚫ What is Java?
➢ Java is a language and a platform originated by Sun
Microsystems and released in 1995.
➢ Java runs on a variety of platforms, such as Windows, Mac OS,
and the various versions of UNIX
⚫ Java is the language.
➢ It is a language in which developers express source code
(program text).
➢ Java’s syntax (rules for combining symbols into language
features) is partly patterned after the C and C++ languages in
order to shorten the learning curve for C/C++ developers.
Unit I: Introduction – Java

⚫ Java is the platform.


➢ Java Platform is a collection of programs that help programmers
to develop and run Java programming applications efficiently.
➢ It includes an execution engine, a compiler, and a set of libraries
in it.
Qn: Why Java is a platform independent language?.
➢ When the Java program runs in a particular machine it is sent to
java compiler, which converts this code into intermediate code
called bytecode.
➢ Bytecode is sent to Java virtual machine (JVM) which resides in
the RAM of any operating system. JVM recognizes the platform
it is on and converts the bytecodes into native machine code.
➢ Hence java is called platform independent language
Unit I: Introduction – Java

⚫ Java is the platform.


➢ Java Platform is a collection of programs that help programmers
to develop and run Java programming applications efficiently.
➢ It includes an execution engine, a compiler, and a set of libraries
in it.
Qn: Why Java is a platform independent language?.
➢ When the Java program runs in a particular machine it is sent to
java compiler, which converts this code into intermediate code
called bytecode.
➢ Bytecode is sent to Java virtual machine (JVM) which resides in
the RAM of any operating system. JVM recognizes the platform
it is on and converts the bytecodes into native machine code.
➢ Hence java is called platform independent language
Figure 1: The way Java works.

Source: Head First Java, 2nd Edition by Kathy Sierra


What you’ll do in Java: You’ll type a source code fi le, compile it using the
javac compiler, then run the compiled bytecode on a Java virtual machine.

Figure 2.

Source: Head First Java, 2nd Edition by Kathy Sierra


Unit I: Introduction – Java 2 Platform

⚫ What we commonly refer to as "Java" is more formally known as


the Java 2 Platform.
⚫ Sun Microsystems has defined three Java platforms, each of which
addresses the needs of different computing environments:
➢ Java 2 Standard Edition (J2SE)
➢ Java 2 Enterprise Edition (J2EE)
➢ Java 2 Micro Edition (J2ME)
Unit I: Introduction – Java 2 Platform

⚫ Java Platform, Standard Edition (Java SE):


➢ The Java platform for developing applications, which are stand-
alone programs that run on desktops. Java SE is also used to
develop applets, which are programs that run in web browsers.
⚫ Java Platform, Enterprise Edition (Java EE):
➢ The Java platform for developing enterprise-oriented
applications and servlets i.e server based applications
➢ Target for business use
➢ Large scale of systems which may contains tens of servers and
many users
➢ It is used for web based services
➢ Machine are of high performance
➢ Java EE is built on top of Java SE
Unit I: Introduction – J2ME

J2ME phones
Unit I: Introduction – J2ME

⚫ J2ME is divide into


1) Configurations. (CLDC, CDC)
2) Profiles (MIDP1.0, MIDP 2.0)
3) Additional/Optional Packages (Bluetooth API, Location API... )

The J2ME platform consists of a set of


layers that support a basic runtime
environment with core Java libraries and
a Virtual Machine (VM), a set of system-
level application programming interfaces
(APIs) in a configuration, and a set of
application-level APIs in a profile.
Figure 3.
Configurations

⚫ The J2ME platform covers a large range of different devices types.


⚫ Devices like TV set-top boxes, Internet TVs and high-end
communicators have
➢ A large range of user interface capabilities and memory budgets
in range of 2 to 16 Megabytes as well.
⚫ On the other hand devices like simple mobile phones, pagers and
personal organizers
➢ Have a very simple user interface and low level memory budget
⚫ Due to the large range of different type devices in the J2ME market
place, Sun has split the Java 2 Micro Edition in configurations
⚫ A configuration is designed for a specific kind of device based on
memory constraints and processor power
Configurations

⚫ A configuration specifies three basic elements:


➢ A set of Java programming language features
➢ A set of Java virtual machine features
➢ A set of supported Java libraries and application programming
interfaces (APIs) .
⚫ A J2ME configuration defines a minimum platform for a “horizontal”
class or family of devices
➢ Each with similar requirements on total memory budget and processing
power.
⚫ A configuration defines the Java language and virtual machine
features and minimum libraries that a J2ME supported device
manufacturer or a content provider can expect to be available on all
devices of the same class.
Configurations

⚫ To avoid fragmentation that could lead to confusion, Sun has


introduced until now only two configurations, which are:
1) CLDC: Connected Limited Device Configuration
➢ Very simple user interface (including no UI at all)
➢ Low level memory budgets (160 KB to 512 KB)
➢ 16 or 32 bit processors
➢ Wireless communication, possibly low bandwidth
➢ Limited power, often battery operation.
➢ Examples: Mobile phones, pagers and personal organizers.
Configurations

2) CDC: Connected Device Configuration


➢ Large range of user interface capabilities (down to and including
no UI)
➢ Memory budgets in range of 2 to 16 Megabytes.
➢ 16 or 32 bit processors
➢ Connectivity to some type of network
➢ Examples: TV set-top boxes, Internet TVs and high-end
communicators
Configurations

⚫ The relationship between CDC, CLDC and Java 2 Standard Edition


is illustrated in figure 4:

⚫ As shown in the figure above, the main functionality in CDC and


CLDC is inherited from the J2SE.
⚫ All the classes which are inherited from the J2SE are precisely the
same or a subsets of the corresponding classes in the J2SE and
the classes which are outside the J2SE environment may not use
the java.* class names
Configurations

⚫ Upward compatibility is achieved between the different editions of


Java 2 platforms.
➢ All features implemented in the CLDC are also implemented in
the CDC to achieve upward compatibility between J2ME
configurations as well.
➢ All applications implemented for the Connected Limited Device
Configuration platform can be run in the Connected Device
Configuration platform as well
CLDC: Connected Limited Device Configuration

⚫ The CLDC was the first configuration to be defined


⚫ CLDC is for very constrained (limited) devices
⚫ Devices with small amounts of memory and/or slow processors
⚫ It is bound to the main target group: small toys or gadgets, which
always are carried around by the user, e.g. mobile phones or PDAs.
⚫ The market consisting of personal, mobile, connected information
devices is served by the CLDC.
⚫ This configuration includes some new classes, not drawn from the
J2SE APIs, designed specifically to fit the needs of small-footprint
devices.
CDC: Connected Device Configuration

⚫ CDC serves the market consisting of shared, fixed, connected


information devices.
⚫ CDC includes a full Java VM and a much larger set of core classes,
so it requires more memory than the CLDC and a faster processor.
⚫ To ensure upward compatibility between configurations, the CDC is
a superset of the CLDC (see Figure 4).
Profiles

⚫ The configurations distinguish different types of devices.


➢ But there so many types around they still have to be refined further
because a configuration might cover devices intended for totally
different usage, like mobile phones and refrigerators, or washing
machines and set-top boxes.
➢ For example, mobile phone and e.g. a washing machine could
belong to the same configuration but it is obvious that a mobile
phone application is not expected to run on the washing
machine or vice versa.
⚫ Thus, the J2ME framework provides the concept of a profile to
achieve application environment portability.
⚫ A J2ME profile addresses the specific demands of a certain
“vertical” market segment (e.g. banking or payment applications) or
device category
Profiles

➢ Profiles may include libraries that are far more device category specific
than the libraries provided in a configuration.
⚫ Profiles are implemented on top of a configuration.
⚫ Applications then are written for a specific profile, as profiles are
assembled for a specific configuration.
⚫ Both profiles and configurations define a set of Java API classes
which can be used by the applications.
⚫ Therefore,
➢ A profile is just a collection of Java APIs and class libraries
residing on top of a configuration and providing domain specific
classes to a configuration to fill in missing functionality and to
support specific uses of a device
Profiles

⚫ CLDC based profiles:


➢ Mobile Information Device Profile (MIDP)
➢ Personal Digital Assistant Profile (PDAP)
⚫ CDC based profiles:
➢ Foundation Profile (FP)
➢ Personal Basis Profile (PBP)
MIDP: Mobile information device profile
(on top of CLDC)

⚫ This profile provides a standard platform for small, resource-limited,


wireless-connected mobile information devices like cellular phones
and two-way pagers.
⚫ In addition to being wireless-connected, these devices have
➢ Small displays
➢ Limited input devices
➢ Limited local storage
➢ Limited battery life and
➢ Limited CPU power
⚫ Two types of devices will be accommodated:
➢ Mobile information appliances
➢ voice communication devices
MIDP: Mobile information device profile
(on top of CLDC)

⚫ According to the MIDP 2.0 specification (JSR-118), a Mobile


Information Device has the following characteristics:
➢ Screen size of approximately (at least) 96x54 pixels
➢ Display depth of 1 bit
➢ One- or two-handed keyboard, touchscreen input device
➢ 128 KB nonvolatile memory for MIDP components
➢ 8 KB nonvolatile memory for application-persistent data
➢ 32 KB volatile runtime memory for Java heap
➢ Two-way wireless connectivity
MIDP: Mobile information device profile
(on top of CLDC)

⚫ The MIDP adds APIs in a number of areas to the very basic APIs
defined by the CLDC. The new features include:
➢ Support for application lifecycle management similar to the way
applets are defined in Java 2 Standard Edition.
➢ Persistent storage of data.
➢ HTTP-based network connectivity based on the CLDC's
➢ Generic Connection Framework.
➢ Simple user interface support, with enough flexibility to build
games or business applications.
MIDP: Mobile information device profile
(on top of CLDC)

⚫ The MIDP adds APIs in a number of areas to the very basic APIs
defined by the CLDC. The new features include:
➢ Support for application lifecycle management similar to the way
applets are defined in Java 2 Standard Edition.
➢ Persistent storage of data.
➢ HTTP-based network connectivity based on the CLDC's
➢ Generic Connection Framework.
➢ Simple user interface support, with enough flexibility to build
games or business applications.
Additional/Optional Packages

⚫ An optional package is a set of APIs in support of additional,


common behaviors that don't really belong in one specific
configuration or profile
⚫ Example of Optional packages:
➢ Bluetooth API
➢ Location API
➢ Multimedia API
MIDlets

⚫ A MIDP application is referred to as a MIDlet.


⚫ MIDP does not support the running of traditional applications that
use a static main method as their entry point.
⚫ Its entry point is a class that extends the
javax.microedition.midlet.MIDlet class.
⚫ MIDP defines an application lifecycle model similar to the applet
model.
⚫ One or more MIDlets are packaged together into what is referred to
as a MIDlet suite.
⚫ A MIDlet suite is basically a standard JAR (Java archive) file and a
separate file called an application descriptor (JAD).
MIDlets

⚫ All the user-defined classes required by the suite's MIDlets must be


in the JAR file, along with any other resources that the MIDlets
require
⚫ The JAR file must also include a manifest with a number of
MIDPspecific entries that describe the MIDlets in the suite.
Developing MIDlets

⚫ The reality of MIDP programming today is that the applications you


can write are constrained in many ways.
➢ Memory is a particularly scarce resource.
➢ Limited screen size.
➢ Limited processor.
➢ There are bugs in the implementations of J2ME on some
phones
➢ Operators as the possibility to brand the phones.
Porting applications

⚫ Porting and testing applications is very time consuming since there


are differences between different phone models such as:
➢ Screen size
➢ Memory
➢ Processor
➢ Bugs
➢ Operator problems
➢ Specification divergence
Tools

⚫ To solve the problems with restricted devices and porting you'll


need some tools:
➢ Computer with Windows or Linux.
➢ JDK (Java development kit)
➢ WTK (wireless toolkit)
➢ IDE (NetBeans, Eclipse, Jbuilder, ...)
➢ A Java phone
END OF LECTURE

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy