1 / 30

Software Development

Software Development. Chapter 3 – Your first Windows 8 app. Contents ❷❸. Getting ready Visual Studio's first time setup Acquiring a Windows 8 developer license Your first program: Hello world! Assignments Questions and answers. Review: needed tool.

latoya
Télécharger la présentation

Software Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software Development

  2. Chapter3 –Yourfirst Windows 8 app

  3. Contents ❷❸ • Getting ready • Visual Studio's first time setup • Acquiring a Windows 8 developer license • Your first program: Hello world! • Assignments • Questions and answers

  4. Review: needed tool • Youwillneed at least the followingtools to develop Windows 8 applications • Computer with a Windows 8 operating system • It is also recommened to have a touchscreen device, but it is not required • Developmenttools • Development tools • Internet connection

  5. 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)

  6. Download Visual Studio 2013 Express • Visual Studio 2013 Express for Windows 8 is a freeproductavailable at http://www.visualstudio.com/downloads/download-visual-studio-vs • Download theexpress versiondesigned forWindows 8development

  7. 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

  8. Installer launch screen

  9. 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.

  10. Successfully installed

  11. 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

  12. Signing in

  13. 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

  14. 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

  15. 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

  16. New Project window

  17. 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

  18. 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

  19. Interface

  20. 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

  21. Code editor

  22. Component and code • Youcanchange a component'sname in the Propertieswindow • Once the TextBlockhasbeennamed, for example as ”textblock”, youcantype the followingcodestring into the Button component'seventmanager: textblock.Text= ”Hello, World!”;

  23. Running your application • You can launch your application through Visual Studio by clicking the Start button in the middle of the toolbar

  24. 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

  25. Application

  26. Closing the application • As Windows 8 applicationrun in fullscreenmode, youmustknowhow to return to Visual Studio • Thereareseveralways • Touchscreen: swipedownfrom the top of the screen to close the application • Press Alt+F4 on yourkeyboard • Press Windows+D, to return to Visual Studio. Thenclick the red Stop Debuggingbutton on the toolbar

  27. Assignments • Find out the hardware requirements of Visual Studio Express 2013 for Windows. Will the studio run on oldercomputers? • Explainwhy Windows 8 developersneed a developerlicense. • Visual Studio is delivered with fourprogramtemplates. Describe the situationswhereyouwoulduseeachtemplate and give an example of an applicationsuitable for eachtemplate. • 4. Find out howyoucaneasily open Blenddirectlyfrom Visual Studio. Can Visual Studio beopeneddirectlyfromBlend?

  28. Questions and answers 1 • Do I need a touch-screencomputer, laptop, ortablet to beable to develop Windows 8 apps. • Notnecessarily, buthaving a touchscreendevicehasmanyadvantages. • Visual Studio comesequipped with a Windows 8 simulator, with whichyoucantest on a mousehowyourprogramwouldwork on a touchscreen. • The applicationwillthinkthatit is run with a touchscreen.

  29. Questions and answers 2 • My computerhas Windows 7 installed. How can I startdeveloping Windows 8 apps • Youmustupgradeyour Windows to Windows 8 in order to use and develop Windows 8 apps. • Ifyourcomputer is at most a coupleyearsold and runswell on Windows 7, youwillmostlikelybeable to upgradeyou operating system. • Ifyourcomputer is old and slow, itwouldbebest to buy a new computer, for example a touchscreenlaptop. Theseareavailable for under 400 euros.

  30. Questions and answers 3 • I havecreated a Windows 8 app and want to copy it for my friend/colleague. How can I copy my program to anothercomputer? • Ifyourfriendorcolleaguehas Windows 8 and Visual Studio, youcansendhimyourprogram'ssourcecode and ask to compileit on hiscomputer. • Ifthis is notpossibleoryouwant to keep the sourcecode, youcancreate an applicationpackage for distribution in Visual Studio, and then copy thispackage to anothercomputer. • The applicationpackagecanbecreatedbyclicking on the Store menu and thenclicking on CreateAppPackages. Yourfriendorcolleaguecanthenacquire the requireddeveloperlicense with the PowerShellcommandGet-WindowsDeveloperLicense.

More Related