Key Facts This is based on the slides created by West Region DPE. You can get the slides, the code, and more at http://windows8appfactor.com.
- Developer Tooling
- Design tools
- Working with the Simulator
- Exploration of the Built in Templates
- Type of controls
- Working with Controls
- Data Binding
- Data Context
- Value Converters
- Item Controls/Item Templates
- Binding Collections
- Windows Phone 8
- Development Tools
- Windows Phone 8 Emulator
- The Shared Kernel
- The Phone API
Key FactsAt this time there are two separate marketplaces and two separate SDKs, one for tablets and PCs and one for phones. While there are many similarities in the programming models between Windows 8 and Windows phone, you will need to create separate projects for each platform. Microsoft realizes this is not the ideal scenario, but one that is work in progress, since Windows phone came before Windows 8.
- Download the Windows phone SDK
- Download Windows 8 SDK
- Windows Phone Store
- Windows 8 Store Info
Key Facts Windows 8 offers additional support for CPUs. The ARM processor is known to be a low energy CPU, allowing tablets and laptops to run for longer periods of time. Windows 8 also supports a number of sensors, allowing application developers to determine location, orientation of the device relative to gravity, and of course touch. Perhaps the biggest change is touch for a Windows 8 and the fact that there is this global marketplace, which makes it safe and reliable to download applications. It also provides a revenue model for developers and dramatically lowers the barriers to entry, freeing the developer from having to worry about billing and collection, creating a storefront, and raising awareness.
- Windows 8 supports a variety of applications
- Windows store apps
- Browser-based applications
- Desktop applications
- Windows 8 also supports several programming languages
- Windows 8 also supports declarative visual design languages
- Windows 8 also supports older programming models
Essential Downloads For Windows 8 Development Don't miss out on these links to start your downloading.
SkyDrive, Outlook and Identity Management with the Live SDKMake your apps or websites work with SkyDrive, Skype, and Outlook.com.
Key Facts There is an ever-growing list of supported programming environments, beyond the ones in the slide above.
- Some other options that are available
- Support for Direct 2D and 3D programming
- This programming model offers a collection of APIs for handling advanced graphics, such as multimedia graphics, animation, vectors.
- There is also support for advanced sound and music
- It is the same programming model used by Xbox game developers
- Requires the use of C and C++ programming
- Can take advantage of hardware acceleration ( GPU )
- Third-party gaming platforms are supported
Key Facts Visual Studio only runs in Windows 8. But even if you have a Mac, it is possible to run Windows 8 and a VM. There are free versions of Visual Studio, called Visual Studio Express.
- You can view and download the samples here:
Key FactsMicrosoft has pioneered the modern UI, which is a collection of design guidelines that are changing the face of computing. Many of the leading high-tech companies are now embracing this new way of designing applications, focusing on the content, not the chrome. Gone are the days of 3-D shadows, gratuitous animations, and the concept of skeumorphism. Users want a clean interface without distractions. Here are some other pointers :
- The modern UI was inspired by the Swiss movement of the 1960s
- From a font perspective, the UI was built upon the Segoe UI font, which was inspired by Helvetica and the Swiss movement
- Minimize dependencies on graphics and focus on typography
- Often described as sleek, quick, modern
- Influences the design of Windows phone, the Microsoft Web properties,and the Xbox dashboard
- Animation does play a role, with respect to touch gestures such as swipe and so on
Key FactsIt is important to know why Windows phone uses a simulator and why Windows 8 applications use an emulator.
- Windows phone requires an emulator because it doesn’t run natively on a Windows 8 developer computer. The Windows Phone app is not running on its native OS, which would be the phone itself.
- Windows 8 runs in the simulator. The simulator is nothing more than a fancy remote desktop app, that provides added features for the developer to test with, such as changing device orientation and resolutions - to name a few.
Key FactsDevelopers can choose from among a variety of templates. Each of these template types is available for various programming languages. The blank app template has the fewest bells and whistles, and requires the most work for the developer. You are basically starting from scratch here - there is no user interface to start with. Developers must add the necessary controls and markup to design the interface .
Key Facts The grid app template is very powerful. It makes it very easy to model applications where the data is hierarchical in nature. An application can have many groups , and each group can have many items. All the necessary navigation and relationships exist within the template. Even a default data model is provided that the developer can modify to suit his application needs.
- The four built in objects are:
- The important step here is to understand the data model.
- As explained previously, groups have many items.
- You will see this reflected in the code.
- Also note that both groups and items share similar or common properties, such as a title, description, and image.
||What it is
||What it contains
||Base class to both SampleDataGroup and SampleDataItem
||Represents data that is common to both groups and items.
||Title, Subtitle, Description, Image
||Represents an item
||The SampleDataItem represents a child or single item
||Content. SampleDataItem is stored as a collection withing SampleDataGroup
||Represents a group
||The SampleDataGroup is the group or parent of many SampleDataItems
||Contains a collection of many SampleDataItems
||Represents a collection of Groups.
||This is the master data source for the application. It is the container of all data.
||Contains a collection of many SampleDataGroups
Key Facts This template is similar to the grid app template. Instead of having separate pages for groups and for items, they are combined into a split screen scenario. This allows end-users to minimize paging in and paging out of groups and items.
Key Facts There are dozens of controls available to the Windows 8 developer. There is also a vibrant ecosystem where developers can purchase third-party controls. To view the built-in controls from within Visual Studio you will select view/toolbox. Some of the controls are simply containers for other controls, such as the layout panels.
Key Facts Building a user interface typically means dragging controls from the toolbox onto the designer surface. This can be done either from Blend or from Visual Studio. Wwhen dragging controls into a XAML page, you are essentially typing in example code into the designer automatically. This means that developers can directly type in XAML and not drag controls from the toolbox if desired. Itworks the same way as web development works in that you don't have to use a designer and you can do it by hand.
- There are generally two activities that developers engage in:
- Creating the user interface as described above
- Working with the .xaml page
- Entering code behind, which is code that execute based on the changing state of controls ( for example the user clicks on a button and code must execute )
- Working with the .cs page
Key Facts Properties allow you to customize the appearance and behavior of controls. More complex uses of properties involve nesting and elements. Be aware that there are default values. If, for example, you do not specify the grid and row attributes of a control, they will default to zero. There are various other default values depending on the control.
- Properties can be changed in several ways at design time:
- You can use the properties Windows of both Blend and Visual Studio
- You can edit the XAML directly, and bypass the properties Windows completely
- Properties can be changed at runtime
- Explained in the next section
Key FactsControl properties can be modified with code at runtime. This is always easier if you provide a name for a control. If you do not, you will need to navigate the visual tree and make use of the inherit parent-child relationship among controls. The code in the slide above illustrates both approaches.
Key Facts Events get triggered due to a user action or an internal change due to a sensor or a programmatically generated event. To enable controls to respond to user input, you will need to attach an event procedure. This can be done either through the declarative markup, or using code behind techniques. It is sometimes necessary to attach events at runtime .
Key Facts Data binding is important because it minimizes the code you have to write. It allows your user interface to automatically get populated with data from bound objects. You would normally have to write a lot of code behind to achieve the same result that you can declaratively using the binding syntax described here and on the next few slides.
- There is generally a source and a target
- The source is typically an object that implements INotifyPropertyChanged
- The source is generally an object that contains the data to be displayed to the user
- This makes it possible for the object to "notify" the control when the data has changed, thus enabling the controls to request the new data from their bound object and update the user interface
- The target is generally a user interface element
- It implements DependencyObject
- Dependencies allow user interface elements to communicate with the underlying data source ( typically poco objects )
Key Facts There is a special syntax for binding expressions. Note the use of the curly brace and the keyword "Binding." It is even possible to convert from the source to the target, using a value converter.
Key Facts Data context is a concept where objects can inherit data binding information from successive parent objects in an object relationship hierarchy. Binding would not be possible without a corresponding data context.
- It generally represents the data source that is used for data binding.
- A typical use of DataContext is to set it directly to a data source object.
- This data source might be an instance of a class such as a business object.
- Or you can create a data source as an observable collection, so that the data context enables detecting changes in the backing collection.
Key Facts Note the use of the item template in the list view control. Without any code we can display a list of students in the <ListView> control.
- The item template is bound to the student object
- The student object implements INotifyPropertyChanged
- A student has a first name and last name
- Students is an observable collection and is bound to the list control
Key Facts There are a few basic steps to binding collections to controls. You can see those requirements above.
- INotifyCollectionChanged notifies listeners ( controls ) when an individual item in the collection gets added or removed. This allows the control to get the latest data.
- If you need to loop through the collection, think about using the IEnumerable interface. The list in the collection is represented by ObservableCollection.
- ObservableCollection is simply a collection class that provides notifications to listeners when anything gets added or removed from the collection.
- This collection implements INotifyCollectionChanged and INotifyPropertyChanged.
- The INotifyCollectionChanged takes place when something in the collection is added, removed, removed etc.
- The INotifyPropertyChanged gets fired as an event when any property value gets changed
- The user will modify a customer record, for example, and the resulting event will be INotifyPropertyChanged, which will notify the user interface that a property has changed and that it should redraw itself the new data.
Key Facts Let's switch gears and now talk about Windows phone development. As you recall there is a separate store or marketplace for the phone platform. It is separate from the Windows 8 store or marketplace. There is also a separate SDK.
- Some of the built in templates differ. some of the templates include the following Windows phone template types:
- Data Bound app
- Panorama app
- Pivot app
- Direct 3D
- HTML 5
- Audio playback
- Audio streaming
- Scheduled task
- But there are a lot of similarities too.
- They both share the use of XAML, C#/VB, C++
- Much of the primitives in the .NET framework are identical
- Too many more to list
Key Facts There are 10 general steps to getting not only developing, but getting your app into the store.
||Download Tooling, SDKs
||Establish Windows Store Developer Account at Microsoft Dev Center Portal
|Step 4 (optional)
||App Development, App Package Creation
||Upload App package to Dev Center Portal
||Finish completing work at Dev Center Portal
||Wait for Certification
||Fix non-compliance errors and re-submit.
||Raise awareness, Make adjustments, Enhance application
Key Facts It is relatively easy to set up your Windows 8 computer to develop Windows Phone 8 applications. your typical 64-bit setup of Windows 8 should work.
- The SDK is for building games for Windows Phone 8 or Windows phone 7.5
- The SDK includes Visual Studio express 2012 for Windows Phone
- The SDK will also work as an add-in to higher versions of Visual Studio
- The SDK includes multiple emulators and some profiling tools
- Some testing tools are also provided
Key Facts Microsoft's dream about one platform for all devices is coming true. The latest mobile operating system for Windows phone is a full-fledged NT kernel.
- It is called "Shared Windows Core"
- Massive amounts of plumbing code around the filesystem and security infrastructure is common
- This allows developers to create apps and drivers that span three distinct environments of phone, tablet, and desktop
- This also means hardware manufacturers only have to write the device drivers once
- This also goes a long way in bringing browsers to parity between desktop, tablet, and phone
- The good news is for enterprises because now Windows Phone 8 includes Secure Boot, BitLocker and a bunch of encryption
- There's also shared libraries for C and C++, and Direct X
Key Facts You will notice that Windows phone 8 brings a lot to the table compared to its predecessor of phone 7.1
- For serious game writers Direct 2D and 3D bring incredible power to the forefront
- Direct 3D allows you to leverage the GPU, giving you hardware acceleration for the entire 3-D rendering pipeline
- Direct3D competes with OpenGL ( as a frame of reference )
Key Facts The Windows phone Offers some unique features.
- Win32 and COM APIs give you some low level features not previously available, such as Winsock, for those that want to do direct TCP/IP sessions.
- There's a brand-new API for speech synthesis and recognition
- The Windows lock screen background can leverage background image providers
- The user can customize notifications on the lock screen
- The SharedMediaTask allows an application to launch a dialogue that allows a user to share a picture or video on social networks
- A wallet namespace is available to define payment instruments that work with Near Field Communications and the Secure Element on the phone
Conclusion This content was meant as additional guidance to that already posted on:
If you have material you think I should add I would love to hear about it. This was my first pass through so I'm sure I will enhance it over time.
Setting Up before you arrive at an AppFactor EventIf you are planning to attend some of the in-person events, here are some links to some of the tooling. Be ready before arriving.