• Go DevMENTAL

    Adding more to your Windows 8 app with less code: Share Contracts

    • 0 Comments

    The Share Contract in Windows 8 is a great way to let other people’s code improve your app

    I love the Share Contact in Windows 8. I love it as a developer because it allows applications other people are writing to enhance my application. I also love it as a geek because it is such a great example of the power of interfaces and contracts in your code.

    I am working on an app for my sister’s photography company, Unposed. the first version is fairly straightforward: the app provides a portfolio of her pictures, information on her studio and the ability to request an photo shoot. The metro look and feel is going to make her pictures shine! The plan is, in version two, to update the application with the ability for her clients to login and view their pictures in the application.  Of course when you are looking at pictures from a photo shoot and trying to decide what to order you may want to email a photo to granny and grandpa, or post a particularly great shot on facebook, google plus, or twitter, or whatever other social media comes along next week. By implementing the share source contract in my code, I’ll be able to share the images selected by the user with all of the above!

    First let me introduce you to the concept of Share for those who haven’t seen it yet. I’ve opened the Photo application in Windows 8 and selected a picture from my laptop taken at a Microsoft event where we had a photo booth. We took this awesome picture of me and my co-workers (Fred Harper, Mitch Barnett, Alex Yakobovich, and Ruth Morton) and I want to share it with my friends. I bring up the Charms bar and select the Share charm.

    image

    Because this application has implemented the Share Source contract, when I select the share charm, I am presented with a list of applications who are willing to accept this shared content. Right now I am running the consumer preview (this weekend I will install the release preview which is available now!) and I don’t have too many apps to choose from yet, just the Email app and a Share Target Sample app which I will explain shortly.

    image

     

    When I select mail, it launches the mail application and creates a new email with the photo I selected as content! Any Windows 8 Metro application that has implemented the ShareTarget contract will appear in that list when I choose share. So anyone who writes a Facebook app, a twitter app, or an email app will be implementing the Share target contract and will write the code that figures out how to handle/post/send the content that is shared from my application or other applications.

    This means as a developer I don’t have to try and guess if my user prefers Facebook or LinkedIn and I don’t have to learn how to call all the different APIs and I don’t have to worry about adding new code when a new social media app takes off. If I implement the Share source contract in my code I can simply say when a user is in this application they may choose to share content. Then whatever app the user happens to have installed on their laptop with the share target contract will pop up and they can use it to share their favourite photo with their friends. great functionality for my users with minimum work required by me! Sweet!

    TIP! Since Windows 8 is only at the release preview stage you may not have a lot of apps installed which you can use to test that your Share Source contract is implemented correctly. Download the Share Target Sample App. This app gives you a preview of what you are sharing so you can be confident that you have correctly implemented Share Source in your application.

    Visit Dev.windows.com and you will find Guidelines for sharing content in Metro apps, and a Quick start for sharing Content (with either JavaScript and HTML or with VB/C#/C++ and XAML

    If you are working on a Windows 8 app, don’t forget to sign up for an App Excellence Lab so you can be first to the store in Canada, and ask yourself does my app have any content users my want to share with others? If so implement the Share source contract, maximum wow for minimum effort!

  • Go DevMENTAL

    Tips and Tricks from Students: Silverlight Phone app “Reflex”

    • 0 Comments
    image

    This week’s interview features Philip Kurowski a student from The University of Western Ontario who built an game called Reflex

    Check out more tips from fellow students here

    Could you briefly describe your application/game?

    Memoreflex is a simple game where you play two rounds and try to get a high score. The first of the two rounds is called the “reflex round” and you tap the square on screen that turns blue as soon as you can, this happens five times in this round and gives you an average reflex time. The second round is the “memory round” where you tap the squares in the order they appeared in the first round giving you a score out of five for each correct square.

    Did you use XNA, Silverlight or both?

    I only used Silverlight, it made creating the UI very simple. Adding shapes and backgrounds, modifying their properties and getting the actual game features to work was much easier with Silverlight.

    What was your banging your head against a wall moment?

    Trying to put an animating timer in the game was my biggest problem with this game. Unlike when I used Java on the PC there was no Timer class that I could use, so I ended up using the Storyboard class and coded it to repeat itself over and over again to update the screen.

    Did you ever solve that issue?

    I used a Storyboard as a timer and coded it to update all the variables then begin again immediately like a timer would.

    If you had to build this same app again from scratch, what would you do differently?

    I would definitely redo the graphics, add themes make it look nicer then the simple solid blocks and gradients that it is now. The game now it pretty bare-bones, I would add a customization like how many block you have to tap each round.

    Any nice surprises?

    Not really, everything was generally straight forward.

    Did you leverage the mobile platform?

    The only thing I really considered much different from PC development was the size of the screen and the placement of objects

    Did you leverage the touch screen?

    Tapping was basically the main feature of the game. No keyboard was used or necessary.

    Did you have a favourite feature?

    Silverlight probably, just because it made everything so simple that I could focus more on the gameplay aspects instead of the little UI details and graphics.

    Are you publishing your application/game?

    Yes, it’s published already. It’s called “Reflex” because I made a mistake with naming it when I published it when it should be “memoReflex” and you can find it here.

    Where can I learn more about your app/game?

    Nowhere really, everything about it is in the marketplace description.

    Who developed this application?

    It was , Philip Kurowski, that developed this game. I just finished first year Engineering at UWO going into Software Engineering in the Fall and I wrote this app during exam time in April when I heard about this contest from my friend. I thought it was a great way to get into mobile development because that’s what a lot of employers look for in Software Engineering co-op placements.

  • Go DevMENTAL

    Carleton game inspires you to reduce pollution

    • 0 Comments

    Students from Carleton university took first place in the Windows Phone game category at the 2012 Canadian Imagine Cup with their game Breathe.

    ProjectBeaconWinners

    Canadians leave a large environmental footprint, how can we inspire Canadians to take more care of the environment?

    The Solution:

    Develop a game that imagines a future where earth has continued to ignore the issue of pollution and eventually has made life on the surface inhabitable then present the player with environmental puzzles to solve as a reminder that one person can make a difference

    The Game:

     

    The game is called Breathe. It was developed by Carleton University students  Gar Lam, Curtis Field, Clark McGillis, and Eva Demers-Brett mentored by Jean-Sylvain Sormany. The game has a gritty feel, after all pollution is a serious problem, the game shouldn’t feel like a Saturday morning cartoon. Instead this feels more reminiscent of Frank Miller of Sin City fame which is much better suited to the atmosphere portrayed in the game.

    The mechanics in the game require a variety of interactions, push the rock, shake the tree, collect the objects to solve the puzzles. The player’s actions affect the environment, but the environment also affects the player. For example, the sludge will keep the player from moving to quickly. Each puzzle must be solved before the player’s oxygen runs out.

    When you solve a puzzle you see the world shift from an orange haze into a blue sky as they transform the polluted world into a clean world. The end result is a unique game with a theme that reminds us all that the actions we take today will affect the world we live in tomorrow.

  • Go DevMENTAL

    Ottawa & Montreal Windows 8 Codapalooza

    • 0 Comments

    Windows 8 Start ScreenFor anyone in Ottawa or Montreal trying to get those Windows 8 app ready for the excellence labs, come code with company Smile

    The app excellence labs to get your app into the Windows 8 store first are upon us!  Build an application now, go to an App Excellence Lab and you could deploy your application in the Windows 8 store before everybody else (and get two years free). There are also virtual labs available.

    In Montreal

    Frederic Harper and Ramez Debbas  have two days where they will help you build your application to give you the possibility to register for the App Excellence Lab. On the 7th, and 9th of June, we’ll be available from 09h00 to 17h00 to help you build your application, in French or English, from HTML/JavaScript/CSS, or from C#/XAML. Details on where and how to register at the bottom of this post.

    In Ottawa

    You can join me, Susan Ibach, Thursday June 7th, as I spend the day coding her app and helping you with your Windows 8 apps wherever possible from 9:00 to 9:00! My French isn’t as good as Ramez & Frederic but if you’ll put up with my Acadian accent I’ll try!  Details on where and how to register at the bottom of this post

     

    What is a Windows 8 Codapalooza

    We’ll be there coding our own application and games, but also we are there to help you build yours. We’ll have French, and English support in the lab, and some expertise around HTML/CSS/JavaScript, and C#/XAML. Join us when you can!  We think being able to publish your application to the Windows 8 store before everyone is an amazing opportunity, we don’t want you to miss this chance. It’s going to be an informal event, where coding and fun will be on the schedule! No presentations, just coding, as the goal is to get at least 60% of our application ready so we are set for the App Excellence Lab.

    What if I don’t have any app ideas?

    No worries, we have plenty of ideas. Stop by and we’ll brainstorm until we find something you like.

    Are you crazy, we can’t build a full application in one or two days?

    Well Fred is a bit crazy, but that’s not the point, one day can make a difference!

    1. You don’t have to finish the application to attend the Excellence lab and get the magic token so you can deploy your app to the store before everybody else. If you can get about 60% of app done, you can still register.
    2. You don’t have to build Photoshop or AutoCAD for Windows 8. This is your first Windows 8 app, Use it as a learning opportunity to build a simple yet useful app, an RSS reader for your favourite blog, or a pace calculator for runners.
    3. You can port existing HTML5 application or games you have for Windows 8. See the resources part of this FAQ to help you get started.
    4. If you have experience in HTML, DotNet, or C++ you don’t have to learn a new language, just the APIs!

    So yes, we do think you can get an app ready for the lab in one or two Codapalooza days.

    Why should I develop with you guys instead of coding in the comfort of my home?

    I know, it’s nice to develop at home with the fridge nearby, but there are reasons to come code with us:

    1. You’ll have access to a Microsoft employee to help you.
    2. It’s not always easy to concentrate at home with all those distractiacagastions (sorry my cat just walked over my keyboard, case in point)
    3. Free beers! Yes, we like coding with a beer. (Okay that was Fred in Montreal promising free beer, I can’t guarantee free beer in Ottawa, we’ll see what we can do Smile)

    Do I need to pack a lunch?

    Absolutely… not! We need to eat too! We’ll have some food. You need to be there before 11:00 to get this royal treatment, as we’ll order with people there to be sure we have everything to satisfy all tastes.  In Ottawa same deal for lunch, and please be there by 5 if you want in on dinner.

    What do I need for the event?

    A computer with Windows 8 installed (you can download it from here) on it (primary, dual-boot or in a virtual machine). You’ll also need the SDK/Visual Studio 11 installed on your Windows 8 machine (you can download it from here). Last, but not least, your coding skills to build your next amazing application..

    If I want to start now, what are resources?

    Here are some steps you can follow to help you in the building process.

    1. Read Planning Metro style apps. It’s always easier if you plan before attacking the coding part. Use this to sketch out the concepts of your app and figure out functionality.
    2. Read Design guidance for Metro style apps.
    3. Find the right scenario via the End-to-end apps and gamesdocumentation.
      1. Web Sites to Windows 8– This is not very difficult at all and is a pretty minimal effort if you use the HTML5 programming model in Windows 8.
      2. Porting web-based Games to Windows 8– Specifically games that were built with HTML5 <canvas> or those that used a library such as CreateJS or easier to port to Windows 8. An example that has been done in HTML5 and converted to a Windows 8 app is Cut the Rope and Pirates Love Daisies.
      3. Developing Reader/Content Aggregation Apps – These are simple to build and I have seen them built in a day at Hackathons and can go from design to production very quickly.

    If I already built my app, or don’t need your help, what can I do?

    Perfect, register for the App Excellence Lab to get all the benefits of having build an application now. You can read this blog post to get more information on the lab, and you can send an email to win8cdn@microsoft.com and include the following information:

    • Your Name
    • Your city
    • The date you want to do in-person or virtual lab
    • A brief application description (no binary, optional screenshot, but only send if the screenshot is not confidential)

    OK, how can I register?

    As this event is open only to people that really want to build an application during one or two days with the goal of going to the App Excellence Lab, registration needs to be done by e-mail. Here is the simple process,

    For Montreal: send me an email at fredh@microsoft.com with your full name, the day you want to join it, and the time you’ll be there. The event will be held at our Montreal office at 2000 McGill College (corner Maisonneuve, and McGill subway station). Only people that had sent me an e-mail will be able to join the event. I highly recommend you to be there as soon as possible so you’ll have plenty of time to build your application.

    For Ottawa: send me an email at Susan.ibach@microsoft.com with your full name, and the time you’ll be there. I have limited spots, if you decide to join at the last minute, email me ahead of time and give me a tentative yes. The event will be held at CTE Solutions, at 11 Holland Avenue just across from Tunney’s Pasture, Thursday June 7th. A big thanks to CTE Solutions for letting me use one of their classrooms for the day! The more time you can spare, the more of your code you can finish. I’m hoping to make some big progress on my app.

    Feel free to forward this to friends, and co-workers. I hope to see you there!

  • Go DevMENTAL

    C# Tip’s and Tricks

    • 1 Comments

     

    logoaspnet 

    Are you interested in developing apps for Windows phone and Windows 8 and you already got the skills to code in Java.

    After few years developing in Java, I have finally decided to switch to C# with .net Framework. There are several reasons for this decision which I will going to explain in this series.

    Every time I talk to students on creating  apps, I kept hearing the same thing which they don’t know how to code in C#.

    This is why I'm going to show some tips and trick’s to code in C# from a Java projective .

    Take in mind that you can actually develop an app for Windows 8  in either C# , C++ or even JavaScript and HTML5. Learn more here

    Check out this useful book that I read by Rob Miles called C Sharp from Java Orange Book.that shows you how to code C# from a Java projective.

    Keep tuned as I will be posting Tip’s biweekly every Thursday.

    Tip #1

    Simple Class

    Java

     1: class Student{
     2: private string name;
     3:  
     4: public Student (String Name)
     5: {
     6:     name = Name;
     7: }
     8:  
     9: public void setname (String Name)  //Set
     10: {
     11:     name = Name;
     12: }
     13:  
     14: public string getname () //Get
     15: {
     16:     return name;
     17: }
     18:  
     19: }

    P.S If you tried to copy this code to a C# app, It will totally work.

    C#

     1: class Studnet 
     2: {
     3:  
     4: public string name {set; get;}
     5:  
     6: public Student (string Name)
     7: {
     8:     name = Name;
     9: }
     10:  
     11: }

    As you can see, I needed only 4 lines of code in C# where as 9 in Java.

    One last thing , If you started coding in C#  and you got some tips that you would like to share , let me know and maybe we can share your experience.You can reach me at  t-ramdeb@microsoft.com

Page 42 of 82 (408 items) «4041424344»