Software Development
description
Transcript of Software Development
![Page 1: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/1.jpg)
Software Development
![Page 2: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/2.jpg)
Chapter 3 –Your first Windows 8 app
![Page 3: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/3.jpg)
Contents ❷❸• Getting ready• Visual Studio's first time setup• Acquiring a Windows 8 developer license• Your first program: Hello world!• Assignments• Questions and answers
![Page 4: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/4.jpg)
Review: needed tool• You will need at least the following tools to
develop Windows 8 applications1. Computer with a Windows 8 operating system– It is also recommened to have a touchscreen device, but
it is not required
2. Development tools– Development tools
3. Internet connection
![Page 5: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/5.jpg)
Getting ready• We will assume Windows 8 has already been
installed on your work computer• Before starting, you should ensure that:
– You have functional internet connectoin, downloading Visual Studio may take a long on a bad or slow connection
– Windows has been properly updated and security fixes are installed (use the Windows Update service)
![Page 6: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/6.jpg)
Download Visual Studio 2013 Express• Visual Studio 2013 Express for Windows 8 is a free
product available at http://www.visualstudio.com/downloads/download-visual-studio-vs
• Download theexpress versiondesigned forWindows 8development
![Page 7: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/7.jpg)
Installing Visual Studio• Visual Studio 2013 Express installation file is
titled winexpress_full.exe.• Launch the installation file by double clicking
on its icon.• The installer's first screen will appear
– Accept the license terms and click Install
![Page 8: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/8.jpg)
Installer launch screen
![Page 9: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/9.jpg)
Installation• After clicking Install, you just need to wait for
10-20 minutes depending on your computer processing power
• You will be notified when the installation has finished successfully.
– A Launch button will appear on the bottom of the window.
![Page 10: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/10.jpg)
Successfully installed
![Page 11: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/11.jpg)
Visual Studio's first time setup• When Visual Studio is launched for the first
time, you will be asked to sign in.• Signing in is required to develop Windows 8
applications• The process is easy, just click on the Sign In
button and follow instructions– You may also sign in later
![Page 12: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/12.jpg)
Signing in
![Page 13: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/13.jpg)
Acquiring a developer license• A developer license is required so that you will
be able to install the programs you've developed
• A free developer license is valid for 30 days and a paid license for 90 days at a time
– After expiration the license can be automaticalle renewed through Visual Studio
![Page 14: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/14.jpg)
Your first application• The easiest way to learn Windows 8
programming is through trial and error• Let's write a simple Hello World program
– You can continue developing the application on your own
• You will need– A computer with Windows 8.1 operating system– Visual Studio 2013 installed and registered
![Page 15: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/15.jpg)
Starting a new project• A Windows 8 application consists of a
collection of different files called a project• Launch Visual Studio, and choose File/New
Project• The New Project window will open
![Page 16: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/16.jpg)
New Project window
![Page 17: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/17.jpg)
Acquiring a developer license• If you're starting a new project in Visual Studio
without a developer license, the program will prompt you to get one
• Getting a temporarylicense is free
– This kind of license has noaccess to the WindowsStore
![Page 18: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/18.jpg)
Hello World interface• Visual Studio includes a code editor and a
visual interface design view• In Toolbox on the left side of the window you
will find the component needed to build your interface.
• Drag'n'drop two components into the MainPage.xaml interface: TextBlock and Button
![Page 19: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/19.jpg)
Interface
![Page 20: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/20.jpg)
Writing code• The Button will change the displayed text
when the button is activated• In Visual Studio code is written in the code
editor• You can open the code editor be double-
clicking the Button component• You may name the TextBlock component by
using the Properties window
![Page 21: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/21.jpg)
Code editor
![Page 22: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/22.jpg)
Component and code• You can change a
component's name in the Properties window
• Once the TextBlock has been named, for example as ”textblock”, you can type the following code string into the Button component's event manager: textblock.Text =
”Hello, World!”;
![Page 23: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/23.jpg)
Running your application• You can launch your application through Visual
Studio by clicking the Start button in the middle of the toolbar
![Page 24: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/24.jpg)
Running your application• Building and launching the application will
take a few seconds• The screen will turn black and your application
interface will appear• Touch the button, and the text should change
![Page 25: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/25.jpg)
Application
![Page 26: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/26.jpg)
Closing the application• As Windows 8 application run in fullscreen mode,
you must know how to return to Visual Studio• There are several ways
– Touchscreen: swipe down from the top of the screen to close the application
– Press Alt+F4 on your keyboard– Press Windows+D, to return to Visual Studio. Then click
the red Stop Debuggingbutton on the toolbar
![Page 27: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/27.jpg)
Assignments• Find out the hardware requirements of Visual Studio Express
2013 for Windows. Will the studio run on older computers?• Explain why Windows 8 developers need a developer license.• Visual Studio is delivered with four program templates.
Describe the situations where you would use each template and give an example of an application suitable for each template.
• 4. Find out how you can easily open Blend directly from Visual Studio. Can Visual Studio be opened directly from Blend?
![Page 28: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/28.jpg)
Questions and answers 1Do I need a touch-screen computer, laptop, or tablet
to be able to develop Windows 8 apps.• Not necessarily, but having a touchscreen device has
many advantages.• Visual Studio comes equipped with a Windows 8
simulator, with which you can test on a mouse how your program would work on a touchscreen.
• The application will think that it is run with a touchscreen.
![Page 29: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/29.jpg)
Questions and answers 2My computer has Windows 7 installed. How can I start
developing Windows 8 apps• You must upgrade your Windows to Windows 8 in order to
use and develop Windows 8 apps.• If your computer is at most a couple years old and runs well
on Windows 7, you will most likely be able to upgrade you operating system.
• If your computer is old and slow, it would be best to buy a new computer, for example a touchscreen laptop. These are available for under 400 euros.
![Page 30: Software Development](https://reader036.fdocuments.net/reader036/viewer/2022062810/56815e8d550346895dcd1cac/html5/thumbnails/30.jpg)
Questions and answers 3I have created a Windows 8 app and want to copy it for my
friend/colleague. How can I copy my program to another computer? • If your friend or colleague has Windows 8 and Visual Studio, you can send
him your program's source code and ask to compile it on his computer.• If this is not possible or you want to keep the source code, you can create
an application package for distribution in Visual Studio, and then copy this package to another computer.
• The application package can be created by clicking on the Store menu and then clicking on Create App Packages. Your friend or colleague can then acquire the required developer license with the PowerShell command Get-WindowsDeveloperLicense.