Vous êtes sur la page 1sur 38

Data Structures and Algorithms

Rationale
Computer science is a fieldto
of study
that deals with solving a
Introduction
App
variety of problems by using computers.
To solve a given problem by using computers, you need to
Development
design an algorithm for it.
Multiple algorithms can be designed to solve a particular
problem.
An algorithm that provides the maximum efficiency should
be used for solving the problem.
The efficiency of an algorithm can be improved by using an
appropriate data structure.

Data structures help in creating programs that are simple,


reusable, and easy to maintain.
This module will enable a learner to select and implement
an appropriate data structure and algorithm to solve a given
programming problem.
Ver. 1.0

Session 1

Data
Structures and Algorithms
Objectives

In this session, you will learn to:


Explain the Windows 8 platform and its features
Explain the basics of Windows Store apps
Identify the essentials of Windows Store app development

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Introduction
to Windows
8

Click the following link to view an animation, which gives an


overview of Windows 8.

Overview of
Windows 8

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Introduction
to Windows
8
(Contd.)

Windows 8 editions:
Windows 8

Windows 8 Pro

Windows Runtime (RT)

Ver. 1.0

Session 1

Data
Structures
and Algorithms
The Windows
8 Experience

The prominent features of Windows 8:


Fast and fluid user experience

Immersive and full screen interface

Support for different interaction


mechanisms

Ver. 1.0

Session 1

Data
Structures
and Algorithms
The Windows
8 Experience
(Contd.)

Sharing among apps

Similar experience for a variety of


devices

Support for multiple views

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Getting
Familiar with
Windows 8

The Windows 8 user interface provides a whole new


working experience to users.
Important differences in this Windows edition:
Start screen

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Getting
Familiar with
Windows 8 (Contd.)

Charms bar
Search Charm
Share Charm
Start
Devices Charm
Settings Charm

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Getting
Familiar with
Windows 8 (Contd.)

App bar

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Getting
Familiar with
Windows 8 (Contd.)

Let us explore Windows 8

Ver. 1.0

Session 1

Data
Structures
and Algorithms
The Windows
8 Platform

Click the following link to view an animation, which explains


Windows 8 platform.

Win8 Platform

Ver. 1.0

Session 1

Data
and Algorithms
Just aStructures
Minute

Which one of the following layers of the Windows 8 platform


includes the languages in which you can develop an app?
1. Model Controller
2. View
3. System Services

Ver. 1.0

Session 1

Data
and Algorithms
Just aStructures
Minute (Contd.)

Solution:
1. Model Controller

Ver. 1.0

Session 1

Data
Structures
The WinRT
APIs and Algorithms

Is a new library of APIs for developing


Windows Store apps.

WinRT

Allows you to build apps that support


interaction by using touch devices as well
as pointing devices.

Helps you to build apps that easily adapt to


different types of devices.

Ver. 1.0

Session 1

Data
Structures
and Algorithms
The WinRT
APIs (Contd.)

The WinRT APIs are shown in the following figure.

Ver. 1.0

Session 1

Data
Structures and Algorithms
Asynchronous
Programming in WinRT

WinRT provides asynchronous programming support with


the help of its asynchronous APIs.
The names of the methods in these APIs have the suffix,
Async, which indicates that these methods are
asynchronous.
A call to an asynchronous method needs to be preceded by
the await operator.

Ver. 1.0

Session 1

Data
Structures and Algorithms
Asynchronous
Programming in WinRT
(Contd.)
The following code snippet shows a call to an asynchronous
method:
private async void btnSubmit_Click(object sender,
RoutedEventArgs e)
{
Windows.UI.Popups.MessageDialog msg = new
Windows.UI.Popups.MessageDialog("Welcome to Windows
Store APP Development.");
await msg.ShowAsync();
}

Ver. 1.0

Session 1

Data
and Algorithms
Just aStructures
Minute

The _________ keyword is used to declare methods that


include a call to an asynchronous method.
1. async
2. asynchronously
3. asynchronous

Ver. 1.0

Session 1

Data
and Algorithms
Just aStructures
Minute (Contd.)

Solution:
1. async

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Introduction
to Windows
Store Apps

Click the following link to view an animation, which gives an


overview of Windows Store apps.

Intro to Windows
Store Apps

Ver. 1.0

Session 1

Data
Structures
and
Algorithms
Features
of Windows
Store
Apps

Support for multiple devices


Easy navigation and quick search
Tile-based interface

Windows
Store apps

Focus on content by displaying the app in


full screen without chrome
Adaptable to different views
Share and exchange data quickly among
apps

Ver. 1.0

Session 1

Data
Structures
and
Algorithms
Features
of Windows
Store
Apps (Contd.)

Support for multiple programming languages,


such as C, C++, C#, or VB

Windows Store
apps

Navigation patterns for developing user friendly


apps with easy navigation
Animation library to provide variety and
elegance to the apps
Support for incorporating various devices, such
as GPS, Webcam, and Microphone

Ver. 1.0

Session 1

Data
Structures
and
Algorithms
Features
of Windows
Store
Apps (Contd.)

Let us create a new Windows Store project

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Structure
of a Windows
Store Project

App.xaml
App.xaml.cs

Files

MainPage.xaml
MainPage.xaml.cs
<Project_Name>_TemporaryKey.pfx

Windows
Store
Project

Package.appxmanifest
Properties
References

Directorie
s

Ver. 1.0

Assets
Common

Session 1

Data
and Algorithms
Just aStructures
Minute

The _________ file provides a set of default styles for your


app.
1. App.xaml
2. <Project_Name>_TemporaryKey.pfx
3. StandardStyles.xaml
4. MainPage.xaml

Ver. 1.0

Session 1

Data
and Algorithms
Just aStructures
Minute (Contd.)

Solution:
3. StandardStyles.xaml

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Gearing
Up for Developing
Windows Store Apps

You must be aware of the complete lifecycle of Windows


Store app development.
The various phases in the lifecycle:
Plan
Design
Develop
Test and debug
Package and deploy

Ver. 1.0

Session 1

Data
Structures
and
Algorithms
Planning
a Windows
Store
App

Planning for a Windows Store app involves the following


steps:
Deciding the tools and technologies
Identifying the features to be provided by the app
Checking the possibility of using hardware capabilities
Identifying personalization requirements
Planning for accessibility
Planning for globalization

Ver. 1.0

Session 1

Data
Structures
and
Algorithms
Designing
a Windows
Store
App

Navigation
Design

Command
Design

Touch
Design

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Developing
a Windows
Store App

Windows Store apps can be developed only on Windows 8.


You need to install Microsoft Visual Studio, which provides
you the platform for developing the apps.
Windows Store apps can be developed by using:
C or C++ with XAML
C# or VB with XAML
JavaScript with HTML5/CSS

Ver. 1.0

Session 1

Data
Structures
and aAlgorithms
Testing
and Debugging
Windows Store App

You need to test the app to ensure that it provides the


intended functionality without any error.
If an error is reported while testing the app, you need to
debug the error.

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Packaging
and Deploying
a
Windows Store App

You can deploy the app on a local machine or on Windows


Store.
An app is automatically packaged and deployed on the local
machine when you execute it in the Visual Studio IDE.
To deploy the app in Windows Store, you need to package
and publish the app manually.

Ver. 1.0

Session 1

Data
Structures
and
Algorithms
Demo:
Creating Hello
World
App

Problem Statement:
Sam has started learning how to create Windows Store apps.
As his first app, he wants to create an app that displays the
message, Hello World!!!, on the interface. Help Sam to create
the required app.

Ver. 1.0

Session 1

Data
Structures
and
Algorithms
Demo:
Creating Hello
World
App (Contd.)

Solution:
To create an app that displays the message, Hello World!!!, on
the interface, Sam needs to perform the following tasks:
1. Create a new Windows Store app.
2. Design the User Interface (UI).
3. Execute the app and verify the output.

Ver. 1.0

Session 1

Data
Structures and Algorithms
Summary

In this session, you learned that:


Microsoft has introduced Windows 8, which can be installed on
computers, tablets, and smart phones.
The salient features of Windows 8 are:
Fast and fluid user experience
Immersive and full screen interface
Support for different interaction mechanisms
Sharing among apps
Similar experience for a variety of devices
Support for multiple views

The basic enhancements in Windows 8 are:


Start screen
Charms bar
App bar

Ver. 1.0

Session 1

Data
Structures
Summary
(Contd.) and Algorithms

Windows 8 enables development of Windows Store apps that


can run on various devices and support various interaction
mechanisms.
The components of the Windows 8 platform are divided into:
Core
Platforms, Frameworks, Libraries, and Runtimes
Application Code

WinRT includes the following API categories:


User Interface APIs
Devices APIs
Communication and Data APIs
Media APIs
Fundamental APIs

WinRT provides asynchronous programming support with the


help of its asynchronous APIs.

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Whats
Next?

Before the next session, please ensure to:


Read Chapter 1 of the book, Introduction to Windows Store
App Development Part I.
Go through the recorded lectures and Knowledge Byte, and
complete the Lab@Home exercises, based on the learning
plan available on the technology page on Cloudscape.
Go through the Web-based Training (WBT) session, which
covers the following topics:
Identifying the Various Application Development Models
The WinRT APIs
Guidelines for Making Great Windows Store Apps
Templates for Windows Store Apps
Various Windows in Visual Studio IDE
Extensible Markup Language (XML)

Ver. 1.0

Session 1

Data
Structures
and Algorithms
Whats
Next? (Contd.)

You may not be able to understand the


concept taught in the next session
if you do not go through the WBT.

Ver. 1.0

Session 1

Vous aimerez peut-être aussi