Thursday, July 26, 2012

Orlando Windows Phone & Metro User Group Announces - Dark Sky API Developer App Contest!

,
Orlando Windows Phone & Metro User Group Announces - Dark Sky API Developer App Contest! 

 Are you a Florida based developer?


Have some skills you're dying to show off?

Well now is the time!

 In support of the Florida .NET Development Community OrlandoWPUG is sponsoring a friendly contest of our development talent to find the best Windows Phone 7 and Windows 8 application using the Dark Sky API.


Dark Sky is a new kind of weather app. It uses state-of-the-art weather forecasting to predict when it will rain or snow — down to the minute — at your exact location, and presents it to you alongside the most beautiful radar visualizations you’ve ever seen.

Joel Martinez (@joelmartinez), founder of the Orlando .NET User Group (@ONETUG), has created the C# wrapper for the Dark Sky API - see the details on Github. Prizes - they are going to be good! There will be one grand prize for the "Best Windows Phone 7 Application" and one for the "Best Windows 8 Metro Application"

 Watch for more details - Sign up, follow Shayne Boyer aka TattooCoder, OrlandoWPUG Founder (@spboyer) and @OrlandoWPUG for announcements of start dates and further details....

Resources



Read more →

Wednesday, July 18, 2012

Getting started with Windows Phone and MVVM Light - Part 1 of 2

,

A few days ago, Rich Dunbar wrote a post about how to get started with with Windows Phone Development and the post went freaking viral. Now the reason here is that Rich, in his spare time, sponsors and host events for Nokia in order to promote Windows Phone Development and as a a reward will get you a Nokia Device and App Hub Token. A pretty nice prize for learning how to write apps for Windows Phone.

 The post is a pretty good resource on where to get what you need to get started and how to get the prize. Here is an excert...


Every time I tweet about new Windows Phone developers being able to receive a free Microsoft App Hub registration token (a $99 value) and a sweet Nokia Lumia dev device (currently I have Lumia 800's), I get a lot of "I sure wish I could make an app" responses. So I am writing this post to help you know just where to start and what tools are available to help you be successful in a hurry.
Step 1: Download and install the necessary SDK, SDK update and Silverlight tool kit for Windows Phone development.
WP7 SDK 7.1: http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=27570 
WP7 SDK 7.1.1 Update: http://www.microsoft.com/en-us/download/details.aspx?id=29233
Silverlight for Windows Phone Toolkit:  http://silverlight.codeplex.com/releases/view/75888
Step 2: Bookmark or favorite the following sites for resources, code samples, tutorials, templates, icons and many other things to help you get started and continue developing. 
...Read more

In Orlando on the 10th of August, he is hosting an event that covers a lot if not all of the post step by step.  Sign up here if you're in that area: Nokia Meetup - Orlando, FL | Aug 10, 2012 - Meetup http://bit.ly/NHchzF .

What I wanted to do with this post is give you what I think is another need to know when developing Windows Phone Applications and that's the MVVM design pattern using MVVM Light by Laurent Bugnion. So, here goes.

There are a few other MVVM Frameworks available, but this by far is my favorite and in fact was also used by Amazon in their Kindle for Windows Phone application.

Start by going here and installing the latest version, this will install the templates within Visual Studio and what you'll need to complete the steps in this walk through as well as future applications I look forward to seeing.

Creating the Application


Open Visual Studio (I'm using 2010 for this), select New Project and in the Installed Templates you'll see MVVMLight(WP71).


You'll notice that MVVM Light supports WP7 and WP7.1, it also supports Windows 8 too!
I left the name of the project MVVMLight1 just for example purposes.  Go ahead and click OK and create the project. Before we write an additional code let's just hit F5 and make sure that the project compiles and the "test" initial page fires up.  This ensures that the template / framework and all of the pieces and parts of MVVM Light are operational.  If so, you should see the following:


Connecting the View and the View-Model


First let's look at the View. Open MainPage.xaml, and take a look at line 17.  The most important piece of MVVM is setting the DataContext of the View.  This allows the View to know where to look for its data or bindings.

<phone:PhoneApplicationPage x:Class="MvvmLight1.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            mc:Ignorable="d"
                            d:DesignWidth="480"
                            d:DesignHeight="768"
                            shell:SystemTray.IsVisible="True"
                            DataContext="{Binding Main, Source={StaticResource Locator}}">

You'll notice that instead of binding to an object directly, the DataContext is set to a StaticResource Property called Main within Locator. We'll put that aside for now until we cover the rest of the information here in the view.

Next, if you move down to line 32, you'll see where the view is binding to properties in the View-Model.

<StackPanel x:Name="TitlePanel"
            Grid.Row="0"
            Margin="24,24,0,12">
    <TextBlock x:Name="ApplicationTitle"
               Text="{Binding ApplicationTitle}"
               Style="{StaticResource PhoneTextNormalStyle}" />
    <TextBlock x:Name="PageTitle"
               Text="{Binding PageName}"
               Margin="-3,-8,0,0"
               Style="{StaticResource PhoneTextTitle1Style}" />
</StackPanel>

<Grid x:Name="ContentGrid"
      Grid.Row="1">

    <TextBlock Text="{Binding Welcome}"
               Style="{StaticResource PhoneTextNormalStyle}"
               HorizontalAlignment="Center"
               VerticalAlignment="Center"
               FontSize="40" />
</Grid>

By setting the Text property equal to {Binding Welcome} for example it is telling the view to get the value from the View-Model which is subsequently set in the DataContext of the View as stated above. So in looking at ViewModel/MainViewModel.cs in the solution explorer you'll see that that value is set to "Welcome to MVVM Light".

public string Welcome
        {
            get
            {
                return "Welcome to MVVM Light";
            }
        }

ViewModelLocator

Ok, so back to the ViewModelLocator. This class is the air traffic controller, if you will, of linking up your views with the view models, well that's how I look at it anyway.  It's responsible for creating and disposing of all of your View-Models, and although it is not the only way to do this; it is the way MVVM Light does it.

One thing that I'll state is that other than adding additional views, I almost never touch the ViewModelLocator code, it's thoughtless when it comes to the core app development.

The application sets a resource in App.xaml as shown below:

 <Application.Resources>
     <vm:ViewModelLocator x:Key="Locator"
                          d:IsDataSource="True" />
 </Application.Resources>

Seems pretty cut and dry. BUT where a majority of the examples I have seen concerning MVVM Light stop is right here. Other that some specific how to do this or that, I think they fall short for the beginner.  So, the next step is adding an additional page. So let's move on...

Adding a Second Page

For the sake of organization and keeping a little sanity when getting into large applications let's add a new folder called "View".  Next, right click and select Add -> New Item. You'll see now that within the Add Item Dialog you have a few options for MVVM Light as well as the traditional add items.



Select MvvmView (WP7) and name it SecondPageView.xaml and click ok.  You'll notice that the structure, DataContext, etc is exactly the same of MainPage.xaml, essentially it's a template and easy to change.

Next, we will add a new View-Model. So, right click the ViewModel folder and select Add->New Item->MvvmViewModel (WP7), name the View-Model "SecondPageViewModel.cs" and click Add.



In order to wire up the new View and View-Model we must open up the ViewModelLocator.cs class and take advantage of the snippets that MVVM Light gives us to do so and then do a little clean up.

Go to just above the constructor and type in the following and hit enter -
mvvmlocatorproperty
What this snippet does is add the following items to the class.

private static ViewModelType _viewModelPropertyName;

        /// 
        /// Gets the ViewModelPropertyName property.
        /// 
        public static ViewModelType ViewModelPropertyNameStatic
        {
            get
            {
                if (_viewModelPropertyName == null)
                {
                    CreateViewModelPropertyName();
                }

                return _viewModelPropertyName;
            }
        }

Now the snippet will highlight the ViewModelType identifier first and you will want to change this to SecondPageViewModel, then hit tab. Second, change the _viewModelPropetyName to _viewModelSecondPage and hit tab. Finally, you will be navigated to the comment portion for the ViewModelPropertyName and change this to SecondPageViewModel. When you are done it should look like this...

private static SecondPageViewModel _viewModelSecondPage;

        /// 
        /// Gets the ViewModelSecondPage property.
        /// 
        public static SecondPageViewModel ViewModelSecondPageStatic
        {
            get
            {
                if (_viewModelSecondPage == null)       
                {
                    CreateViewModelSecondPage();
                }

                return _viewModelSecondPage;
            }
        }

Ok, now a little work to do to make this addition complete.  Need to add " CreateViewModelSecondPage();" to the constructor just under "CreateMain();".  This ensures that the instance of the new View-Model is created.

Next, one draw back is that the snippet creates a duplicate of "Cleanup()", so if you get the following error:

Type 'MvvmLight1.ViewModel.ViewModelLocator' already defines a member called 'Cleanup' with the same parameter types
You'll need to also move the contents of the duplicated method to the existing Cleanup method. In our case, the contents are " ClearViewModelSecondPage();".

Last step, go to the SecondPageView.xaml and change the value in the DataContext to the new ViewModel.

from:

DataContext="{Binding ViewModelName, Source={StaticResource Locator}}">

to:

DataContext="{Binding SecondPageViewModel, Source={StaticResource Locator}}">

Part 2 we'll see how to add a button on the first page to navigate to the second page which will cover navigation and messaging.

Download code for Part 1 here
Read more →

Monday, July 16, 2012

Orlando Windows Phone User Group - Kickoff Meeting

,
owpug.tattoocoder.com
Wow what a great start to the new group in Orlando!

First, let me start by thanking Voxeo  (@voxeo) for hosting the event.  What a great room, theater seating, barista on staff, great office space...very tech!  They do offer co-lo office space so hit them up if you are a startup and you need some space.  Almost every wall in this place is a whiteboard.

Those chairs were awesome!
Attendees included Windows Phone MVPs, authors, ComponentOne, Windows Phone Marketplace champs, newbies and even non Windows Phone devs; exactly what I was looking for when starting this group. A really exciting group to engage in and the conversation and interaction was more than I expected.

As I said at the beginning, it's a very exciting time to be a developer in the Microsoft .NET stack of technology. If you're not, you either doing the wrong thing or you're dead!

With the recent announcements of Windows Phone 8 and Surface, I can't think of a better time to sharpen your skills or pick a new path in your development career.

Luis and Alex telling us the tricks.
Next up, we had Alex (@Aapg1102) and Luis Perez (@LuisNeuralnet) from Neuralnet Systems present their take on tips and tricks, the unspoken rules.

Now these guys have the goods!  They have 42 applications in the Marketplace and have gone through the paces when it comes to marketing, updates, when to what how, and what NOT to do. For those of you who attended, the slide deck is available here to refresh your memory as I am sure it was more information then you could retain in the hour long presentation.
Highlights for me were:

  • How does the PubCenter really works
    • eCPM experiences
    • Why 10,000 impressions aren't 10,000 impressions
  • Aftermath of an application
    • kind of - "It's out there...what's next"
The group was full of questions and even the experienced developers in the crowd walked away with some info they felt was rewarding.

As a sponsor of the group Russ (@russcamtv) and ComponentOne dished out ComponentOne Studio for Windows Phone for all in attendance, huge thanks to them!  I look forward to seeing some great apps using these controls.

ComponentOne offers great developer controls for Windows Phone, Windows 8, as well as other .NET platform development tools.


Next meeting will be hosted at the brand new Microsoft Store in the Florida Mall on August the 17th at 6:30 PM.  This is there official opening week, and we have been asked to be there the day after they open to use their fantastic theater.  Checkout the Meetup page for the store. for details on the location and theatre spec sheet.  I will be sending out more information as soon as we secure the speakers and agenda. 





And finally, please pickup Joe Healy (@devfish) and Kevin Wolf's (@ByteMaster) book; Sam's Teach Yourself Windows Phone 7 Application Dev in 24 Hours.  Both were in attendance, signing copies and contributing much knowledge about current and future state of Windows Phone and Windows 8 development.  Thanks to both of you!







Pictures courtesy of RussCam!
Luis and Alex

Good crowd, filled with talent.

TattooCoder

Shayne, Alex, Luis and Russ

Shayne and the Guys from Neuralnet

Read more →

Thursday, April 12, 2012

My Response to CNET: Is AT&T's sales force prepared to sell the Nokia Lumia 900?

,
Mary Jo Foley (@maryjofoley) tweeted that this article was depressing and I felt compelled to write an opinion.

Now, let me first state that I am not a journalist or a professional blogger, yet a passionate developer who lives Windows Phone and has been an iPhone user for the last 3 or so years.

One thing that we all must remember when answering the posted question above, is that we are talking about people, with opinions and passions and habits.  These things are hard to break.

There are a great deal of AT&T employees that have been carrying around an iPhone for the better part of five years living most of their lives looking into that screen as if every bit of information and experience they could ever find would only come through the 3.5 inch display.  Not to mention there are plenty of non AT&T employees that walk around the same way.

Remember the approach that Apple took when they premiered the iPhone?  They told the free world it was Amazing! The focused on the users first, showing them how awesome it was, how it connected to iTunes and they could put their music on it so on and so forth.  Me as a developer, I had no idea I could right apps for this thing and I stay pretty dang connected on whats new out there regardless of the OS or vendor.  Found that out later.

Microsoft's approach, in my opinion is from the other side. Make the developers love Windows Phone, and we do. Show us how quick and easy it is to create apps for it and how awesome Visual Studio and Blend is for creating these applications, and it is.  Let the developers do the talking, until recently the Nokia Lumia 900, Nokia/AT&T/Microsoft marketing campaign to get this beautiful device out there into the everyday persons' hands.

Of course, what is the first thing most analyst say  "It's a great OS / device...but there are no apps".  Well Android had the same issue and it seems to be doing just fine now.  I would like to see some group do a true analysis on the "quality" (I know, it's subjective) apps out there for each of the platforms taking these few points into consideration:

  • # of applications actually installed on devices
  • Fart apps don't count
  • # of trial apps installed on devices - users never thoughts it was good enough to pay for the full one
I'm sure there are other things that would narrow down the list of apps, and sure iTunes would probably still be ahead no doubt.  However, it would give us a better measure of the playing field.

Sorry if I got off here...but I have shown my Lumia 900 to many iPhone users and Android users. Their first comment 8 of 10 times is "Damn that's fast!".

So, what we as developers, Windows Phone lovers, Microsoft and Nokia must do is now focus on the people who use their smartphones everyday.  Tell them WHY they will love, not necessarily why its better than the iPhone or what apps they can install to replace the ones they had so they can get close the same one. But again make them see why it so great.
Read more →

Monday, April 9, 2012

48 hrs with My Lumia 900 Windows Phone

,
So its been 2 full days with the Windows Phone, jumping out of the iOS world using the Nokia Lumia 900 as my everyday device.  I have to say I'm still swimming in the pool doing the backstroke.  I love it!

Battery life is great and I use the hell out of my phone. Email , Twitter, News, Checking In, Photos and browsing constantly while running around with the family doing our very filled life things.

Couple of observations I wanted to point out.  I had the strangest thing happen to me while walking around the store...it locked up. Now, before anyone starts with "Well guess your new fancy phone isn't so fancy (as my daughter would say)".  My dang iPhone would lock up constantly, as would my Android and Blackberry etc etc.  So it's not uncommon.  The issue was I had no freaking idea how to unlock it.

I was holding down the power button and getting the normal "slide down to power off" screen, but the screen wouldn't respond.  Camera worked though??  And the battery symbol had a "?" on it. I was lost and thought crap" Now what.

Solution: Hold down the power button for about 15 seconds, hard reboot all is well.


Now since I practically live on my phone after a few days I wanted to see what I really missed as far as apps and other functionality I used constantly.  Here is a list so far:

Apps



Flipboard - (@flipboard) http://flipboard.com

If you haven't used this application on your iPad or iPhone your missing the best news, social aggregation application out there.  Funny thing is when I first saw it, I thought, "Man this looks like a Windows Phone App!". When I installed it, i uninstalled about 6 other applications.

Banking Applications

I know they are coming, but I use SunTrust and Chase and the Chase application on iOS is great.  Depositing checks via pic upload is fantastic.  Now I tweeted over the weekend about Suntrust and today got a reply from them unprovoked.  I do just simply browse to their sites, but there are some baked n OS functionality i do miss.


Functionality

Screenshot

Unless I've missed it, but I did search online and found nothing.  In iOS use can press the "home" button and the "power" button at the same time to capture the current screen regardless of what your doing on the device and it snags the screen an puts it in your pictures.

This is great when watching screencasts, doing research on apps, so on and so forth.


Other than that, so far, I don't miss it.  And looking at the iPhones in my house, there are a bunch both 3GS and 4s, they look so tiny and dated compared to the Windows Phone. 

Till next time...

Read more →
Powered by Blogger.
 
Creative Commons License
TattooCoder.com by Shayne Boyer is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.