• Go DevMENTAL

    Building a great Windows 8 app Step 6: Which template should you use?

    • 0 Comments

    You are about to start coding your Windows 8 project, what template should you start with?

    This blog is part of a series.

    Picking the right template at the start of your project can save you a lot of work! Finding the right Visual Studio template, or finding a project template out there that is similar to what you are trying to build may mean some of the features you want are already coded and ready to go.This post will cover:

    • Visual Studio templates
    • Open source Windows 8 templates
    • Windows 8 Sample projects

    Visual Studio templates

    When you choose File | New Project  and choose Installed | Templates | <Programming Language> | Windows Store you see up to 6 different project templates to choose as a starting point. Let’s see when you should use each one:

    Blank app

    This template will create a very simple one page application, popular with single page applications such as timer apps, and one page puzzle apps, or apps with multiple screen navigation that does not follow the flow of other pre-defined templates.

    Blank App

    Grid App

    This template is good for apps that have a drill down or parent-child style of navigation. The template is designed to show one or more categories on a page called GroupedItems (or GroupedItemsPage) which is the default start page. If you select a group, details about a group are displayed on a page called GroupDetail (or GroupDetailPage). If you select an item, details about the selected item are displayed on a page called ItemDetail (or ItemDetailPage). This template works well for many apps that allow you to navigate through a lot of information such as store apps, blog reader apps, photo organizer apps, and teaching apps. If you choose to use this template, check out the Windows 8 camp in a box which includes a hands-on lab that tells you step-by-step how to create an app with sample data, and add features like snap, search, semantic zoom, and share using this template. It’s a very good resources for learning how to add features to this template.

    Windows store grid app

    Split App

    This is a template for a two page project. Designed for a Parent-child or drill down style of navigation. The difference between the Split and Grid App, is that when you select a group with this template it brings you to a page that is split in two. One half of the page will list all the items in the group, the other half of the page lists the details of any item you select within the group. The default start page is the Items (or ItemsPage) which lists all the groups. The page that lists the items and the details for the selected item is called Split (or SplitPage)

    Windows Store Split App

    Class Library

    Class libraries are useful when you have code you want to use in multiple applications. You can put the re-usable code into a class library and compile it into a .dll and then import it into one or more projects.

    If you want to re-use code across Windows 8 and Windows Phone or other .NET Platforms, you should consider using Portable Class Libaries instead.

    Windows Runtime Component

    If you are building a JavaScript project but you want to use a feature that is written in C# or C++ (either created by you or maybe from a 3rd party), you want a Windows Runtime Component. This project type allows you to wrap the functionality in a Windows Runtime Component so it can be references from JavaScript

    Unit Test Library

    Unit testing is a great way to find logic errors in your code. You can use the Unit Test Library to create test methods that will allow you to retest your application as often as needed.

    Direct2D App (C++ only)

    Used for developing C++apps with 2D graphics, including games. Nice little blog post on getting started with it here. There’s also a good video from Build, and some sample Direct2D projects.

    Direct3D App (C++ only)

    Used for developing C++ apps with 3D graphics, including games, to get started with this template, check out this video from build and some sample Direct3D Projects

    DLL (C++ Only)

    If you want to write code in C++ that can be re-used across projects. Use this template and you can create a dynamic link library (DLL) you can reuse in multiple Windows store apps or components.

    Static Library (C++ Only)

    If you want to write code in C++ that can be re-used across projects. Use this template and you can create a static library (.lib) you can reuse in multiple Windows store apps or components.

    Hmmm sounds similar to a DLL project doesn’t it? So what’s the difference between static and DLL (dynamic) libraries? When you compile a project that includes a static library, the library actually becomes part of the executable. That means your executable is bigger and it means whatever version of the code you compiled with is the version of the library that will run. When you compile a project that references a dynamic library, it is not compiled as part of the executable. If the same dynamic library is called by multiple projects it is only loaded once. Also the dynamic library can be upgraded to a newer version without replacing all the executables that use it.

    Fixed Layout (JavaScript Only)

    This is similar to the blank app template except this template has the infrastructure to scale for larger screens. For applications with a lot of graphics, such as games, this is very useful. Here’s a post by Chad Carter on creating a Fixed Layout App project.

    Navigation (JavaScript Only)

    This is basically a blank app but it has predefined controls for navigation, so if your app is going to have more than one screen, this is a like a blank app that has more support for navigation between pages. (thank you to Infragistics for Brent’s Bytes blog on templates which helped me in my research). Here’s a post by Chad Carter on creating a Navigation App project.

    Navigation App

     

    Open Source Templates

    Sometimes developers create templates for common applications that you can quickly update to suit your needs. Here’s a few you might find useful

    WordPress site template

    Created by IdeaNotion, If you are using Wordpress.org for your website and you want to bring your content to the store, check out this template that lets you view blog posts by category, view your pages, view and post comments, see post information in a live tile, and use the Search and Share charms. You can download the source code here, and find a quick start guide here.

    Club or team template

    This club/team template allows you to easily create an app for members of a club or team. You can share information about members of the team or executive, a blog, and upcoming events.

    I will be sharing a second version of this template shortly that also allows you to share photos and a twitter feed through the application as well. I will update this blog when that template becomes available

    RSS Feed reader

    What mobile app list of templates would be complete without the blog reader template. It seems like the Hello World of mobile apps.

    HTML/CSS Game kit

    This is a simple HTML5/JavaScript app that you can use as a starting point for building a JavaScript game

    Windows 8 sample projects

    Here’s a few interesting samples you can also check out to find code examples for different tasks

    • Note Taker 
    • Calculator 
    • And last but absolutely not least, don’t miss out on the Windows Store app samples a searchable library filled with all kinds of great code examples! Search for Music, geolocation, photos, skydrive, facebook, and find useful code examples for a variety of needs!
  • Go DevMENTAL

    Building a great Windows 8 app Step 5: Reserve your app name

    • 0 Comments

    You can reserve your app name before you publish your app

    This blog post is part of a series

    This blog post will explain

    • Why is your app name important?
    • How to create your store account (required to reserve an app name)
    • How to choose a good app name
    • How to reserve your app name

    Why is your app name important?

    “What’s in a name, that which we call a rose by any other name would smell as sweet” – William Shakespeare, Romeo and Juliet

    When someone searches for your app in the store, the first set of search results they see will simply show the app names, ratings, logo, and price. For example if I search for a timer in the store, this is what I see.

    Windows Store Timers

    With only four things to help me decide which timer I might want to download, it’s important to have a good app name. Right away I know that for me personally, Nyan Timer is not something I want to download (I don’t need Nyan Cat timing me as I practice a presentation, though maybe if I wanted to encourage people to finish something as fast as possible…). I would probably consider downloading the Timer & Stopwatch, the Best CountDown Timer or the Count down timer.

    Chances are someone has the same app idea that you have (that’s why step 1 : defining your app idea and figuring out what your app is best at is so important). It might take you a few days, a few weeks, or a few months to finish and publish your app. You may be worried the app name you want will be gone by the time you finish coding. Not a problem because:

    you can reserve your app name before you publish the app!

    To reserve an app name, first you have to

    How to create your store account

    Are you a student?

    You can create your student Windows Store account for free.

    Are you a startup company or a member of BizSpark?

    You could get your Windows Store account for free. Start up companies may be eligible for free MSDN accounts through the BizSpark program. When BizSpark members activate their MSDN accounts, they get a registration code they can use that will waive the subscription fee for the Windows store. After you activate your MSDN account, log in to MSDN and visit the WindowsDevCenter page, you will see a registration code on the page. Now you can go to the Windows store and create your account.

    MSDN Windows Store Registration Code

    Do you have an MSDN subscription?

    MSDN subscribers can get a registration code that will waive the fee for their Windows Store account. Log into MSDN and visit the WindowsDevCenter page shown in the above screen shot to get your registration code. Now you can go to the Windows store and create your account.

    Don’t have MSDN, BizSpark or DreamSpark?

    You can still create your Windows Store account, but you will have to pay a $49 annual fee. This fee gives you a one year subscription to the store. Go to the Windows store and choose Register now.

    How to choose a good app name

    There’s an article at dev.windows.com called Creating a great app listing that gives advice on how to pick a good app name. I won’t repeat everything they say because you can just read it yourself, but I’ll mention a few of their key points.

    • Think of a short name because the space to display your app’s name is often limited
    • Be creative and think of a few different names and variations
    • Don’t use app names trademarked by others otherwise the owner of that name could have your app removed from the store
    • Give your app a catchy name

    How to reserve your app name

    Once you’ve come up with an app name you like, you are ready to reserve your app name.

    Log in to the windows store portal with your live ID (the one you used for your store account)

    If you just created your store account, you must verify your payment method. After you first create your store account, there is a small charge placed on your credit card and reversed, even if you used a registration code to waive the fee. When you first log into the store before you can reserve an app name, you have to verify the payment method. When you click on the link you are asked to enter the transaction amount or the 3 digit code from your credit card transaction.

    Verify payment method Windows Store

    After you have a store account with payment method verified, select Dashboard.

    In the dashboard, you see all the applications you submitted and their status. Select Submit an app.

    10-31-2012 5-59-14 PM

    In the App name section, specify the app name you wish to use and select Reserve app name. If you get a message back informing you your app name is already in use, you will have to choose a different app name. Your app name will be reserved for 12 months.

    10-31-2012 6-16-56 PM

     

    Don’t worry, if you think of a better name later, you can change the app name.

    It is also worth noting that if you plan to release your app in multiple languages, you can reserve app names in other languages as well, there are instructions on how to do this at dev.windows.com in the article Naming your app.

    You are now one step closer to a great Windows 8 app! Don’t stop now! If you are a Canadian Developer keep an eye out for Developer Movement challenges which could earn you cool goodies!

  • Go DevMENTAL

    How do I get started building Windows Phone 8 apps?

    • 0 Comments

    Windows Phone 8 Start ScreenWhat do you need to build a Windows Phone 8 app?

    Windows Phone 8 was released at the end of 2012 and I am already getting questions from students about developing and testing Windows Phone 8 apps. First of all let me clear up two common misconceptions

    • Windows 8 and Windows Phone 8 are not the same platform. They have some things in common but they are not the same platform and if you build an app for one you can’t just take the same code and run it on the other. You can create portable class libraries that can be used on both platforms, and with good design you can re-use a lot of your code, but they are not the same platform
    • There are separate stores for Windows 8 and Windows Phone 8. As a student you can get free access to the Windows store and free access to the Windows Phone store.

    Okay with that out of the way, let’s look at what you need to install to start developing Windows Phone 8 apps.

    You have two choices:

    Install the Windows Phone 8 SDK

    If you have a laptop that meets the requirements and running Windows 8, you can install the latest and greatest Windows Phone 8 SDK. This gives you access to the new phone 8 features such as NFC and the wallet. To install the Windows Phone 8 SDK the biggest hurdles are usually the requirements for

    You may be able to install the SDK without these requirements but you won’t be able to run the emulator for testing. That���s fine if you have a Windows Phone 8 device you can use to test, but if you don’t you will want the emulator.

    Can I install the Windows Phone 8 SDK in a VM? You had to ask didn’t you? Well in an ironic twist, you can, but because the emulator itself runs as a Hyper-V machine you can’t install it in Hyper-V. I have however seen blog posts that say you can do it in VMware. Nokia wrote a blog post on how to install the Windows Phone 8 SDK in virtual machine. Of course I recommend you upgrade to Windows 8 rather than running it in a virtual machine (see PC World’s article on Why to upgrade to Windows 8)

    Install the Windows Phone 7 SDK

    If your current laptop can’t support the Windows Phone 8 SDK, you can still build Windows Phone 8 apps using the Windows Phone 7 SDK. The drawback is you won’t be able to use the newest features, but that doesn’t prevent you from building a great app.

    This will run on Windows Vista with Service Pack 2, and Windows 7, it does require DirectX 10 or greater to run the emulator.

    Are you a student? Get the full version of Visual Studio

    If you are a student, why not install the full version of Visual Studio instead of using the Express version that comes with the SDK?

    When you install the Windows Phone SDK it will install visual Studio Express so you have everything you need to build and test a phone app. However, if you are a student, you can get Visual Studio for free through DreamSpark, so why not use the full version. You should install Visual Studio first from DreamSpark and then install the Windows Phone SDK. When you install the SDK it will add the Windows Phone project templates to your existing installation of Visual Studio.

    Are you a Canadian? Get rewards for your apps

    The Developer Movement program can get you rewards for your Windows Phone 8 and Windows Phone apps!

  • Go DevMENTAL

    Free courseware for professors and instructors from Microsoft

    • 0 Comments

    Did you know Microsoft provides free courseware for professors and instructors?

    The Faculty Connection is a website that provides free courseware and resources for instructors of all levels.

    Here are some of the most popular recent downloads

    You can get free software too!

    Anyone can browse the content on the faculty connection website, but to download the content you must register and provide proof that you are an instructor, teacher, or professor. You can also reach out to your local technical evangelist to get a promotion code to simplify registration.

  • Go DevMENTAL

    Video of the week: Implementing Snap, Filled and Portrait Views in Windows 8 apps

    • 0 Comments

    If you are building a Windows 8 app, you must support snap view. This video shows you how to do it with XAML apps.

    I came across this video in a blog post by Jerry Nixon, a developer evangelist in Colorado. It’s a nice simple example and walkthrough on how to support the different views such as snap view, filled view, portrait and landscape view in a Windows 8 XAML app. The video takes a brand new page and adds support for each view and shows you how to check the appearance of each view.

     

    Great explanation Jerry, thanks. There are lots of other great resources and articles on Jerry’s blog as well.

    Once you’ve got that snap view supported, you are one step closer to publishing and getting rewards through the developer movement!

Page 1 of 3 (15 items) 123