Sample Windows App Development - Apps: Beginner's Guide For App Programming, App Development, App Design (2015)

Apps: Beginner's Guide For App Programming, App Development, App Design (2015)

Chapter 6. Sample Windows App Development

In the past, Android and iOS emerged as the two main mobile device operating systems competing for consumers and developers' attention. However, Windows phones entered the picture and began sharing their app features for portable device users. As the new kid on the block, it doesn't have as much apps to offer to device users, which can be a good market for developers once Windows phones began to pick up in the market.

Developing Windows apps also require specific platforms like Visual Studio, the developers program and app development tool. Windows also support multiple programming languages to suit developers' preference. Programming language options include C# and XAML, JavaScript with HTML, and C++ with XAML.

Windows makes development easier for beginners by setting up a designated development website where all needed resources, development tools, and sample codes are available for download.

In developing newer universal Windows mobile apps, developers recommend getting Windows 10, its latest operating system online. Take note of minimum system requirement in running this operating system.

Prepare the Environment

Set up the app development environment by downloading the latest version of Visual Studio 2015. Those who have Visual Studio can update their current copy to use for development. Developers can also go online to download the Microsoft Visual Studio Community 2015, a free platform that includes simulators for testing the app.

Download the Visual Studio Community 2015 and custom install programs including the Universal Windows App Development Tools. Under this option are Tools and Windows SDK 10.0.10240 and Emulators for Windows Mobile 10.0.10240. Check all three features then hitNext to install.

Aside from development platforms, all Windows devices and desktops must be enabled to support app development. Apps will fail to deploy if all devices are not activated to support app development. Each device and desktop has different ways of development activation.

For Windows 10 desktop, phones and tablets, choose Settings> Update & Security> For developers. This will give you three settings that will let you install and test apps. Your main options are Sideload apps and Developer mode.

Developer mode allows you to debug installed apps on the devices. It can also sideload apps. Choosing this option is making your devices a testing tool for your apps. However, don't install other apps that you don't trust in this mode as it may cause inconsistencies and stop your device from running accordingly.

Sideload apps option is an option that allows installation of trusted app. However, it will require certificate to install apps. The device should have these certificates and approved to run the device without worries. If your current app's certificate is in the device, you can install the project app.

For Windows 10 desktops, users can enable this feature through the registry for Windows 10 Home Edition or gpedit.msc for other operating system versions.

For Windows 10 Home Edition, open command prompt and run as administrator to apply changes in the computer. Run regedit and wait for the registry to load. Look for the following folders and change DWORD values to 1, which means enabling or activating support for specific function:



These two registry entries are the same with Sideload apps and Developer mode in portable devices.

For other Windows 10 versions, run gpedit.msc. Look for Local Computer Policy. Look for Computer Configuration> Administrative Templates> Windows Components> App Package Deployment. Configure the policies and enable the options Allow all trusted apps to install(for sideloading apps) and Allows development of Windows Store apps and installing them from an integrated development environment (IDE) (for Developer mode).

Setting these all up means your devices are ready for development.

Registering as a Developer

Several guides include developer's registration as one of the first things to do in app development. Registration is not necessary if you're still learning app development. This is only for those who plan to sell their apps that are ready for publishing. Wait until you master app development before registering as a developer.

Create a Basic App

Even in loading Visual Studio, you still need to select your preferred programming language. This guide will use C# as the main programming language. Navigate your way from Installed> Templates> Visual C#> Windows> Universal from the left panel. Look at the right side of the program and see the list of templates available. Choose Blank App (Universal Windows). The Solution Explorer will show you one project, which is the default option because the template itself is adaptive. Developers can add other pages if preferred and further enhance them according to desired features.

Preview App

Although your current app is still bare, you can preview it using the designer feature that supports device configuration of your choice. Look for the drop down menu above the designer or editor area. Click the drop down button and see a list of devices with their sizes, screen resolution, and other option for preview. Select preferred device and orientation to see how your app will look like.

Running the App

Testing your app can be done by running it using a simulator or testing it on an actual device. Test your device locally or using a simulator by going to Standard toolbar and look for Local Machine button. The same button has a drop down arrow for choosing your preferred testing platform. Options include Simulator, Local Machine, Device, Remote Machine, and other mobile emulator choices. Select local machine or simulator to run the app on your current system.

If you prefer to see the app on an actual Windows device, select an emulator or attach the portable device to your computer.