Tag Archives: Microsoft Visual Studio Express 2012

WP8 Development 17-23

Overview and persisting

Having built the SoundBoard app with lesson 1 through 23, I have been writing code, along with each video, while adequately commenting. I now have an unambiguous overview of Windows Phone 8 development and to challenge myself, I have volunteered for the opportunity to build the Windows Phone 8 interpretation of an app that is already available for iOS and Android, of which the SoundBoard app will be a great resource. I am going to repeat lesson 1 through 23, but not through video, rather, the text and screenshot version of each lesson and my source code commenting. It won’t be the app that I’ll build and of which I will publish the source code of (as communicated in C#: Day 2), but I will write a blog post of the trial and tribulation, methodology and result of my first attempt at an app. Most of what the app will be is accounted for with the SoundBoard app, but not everything, including the part that Bob Tabor challenges you to in the beginning of lesson 14. I’ll attempt to trounce that challenge with this app before continuing the series and I’ll elaborate on that separately. I’ll essentially attempt a few of his challenges at the end of lesson 23 as well, albeit with the app I am building. Naturally, I could begin smaller, i.e. building a variant of the “PetSounds” app, and persist from there. Although, I visualize that I would be able to do that easily enough.

Learning is half the fun

Packages, like the Coding4Fun Toolkit package and the Json.NET package are an invaluable resource along with the NuGet application-level package manager extension for Visual Studio. As for Json.NET, JSON and Json Data – all of which there was a referral to by Bob in lesson 21 – I didn’t get a palpable grasp of what either of them was and the use for them (other than the application of them in the SoundBoard app) as well as what Serialization and Deserialization implied. A few Bing queries afterward was enlightening (hint: underlined text == link). MSDN has a helpful article – albeit from 2002 – on Object Serialization in .NET and Windows Phone Dev Center has a topic on Serialization as well. Part 11 of Windows Store apps for Absolute Beginners with C# will probably clarify Json Data even further when I eventually get to that series. Thus, these packages, or Open Source libraries, with their preprogrammed Classes and Methods, have you building apps with littlest effort and with outright haste.

Lastly, Kudos to Clint Rutkas.

Advertisements

WP8 Development 6-16

Windows Phone 8 Development for Absolute Beginners goes on to the development of the SoundBoard app.

“Style is a simple way of saying complicated things.” — Jean Cocteau

The benefit to previous knowledge of CSS is increasingly apparent after the Part 6 lesson and going forward. The similarities to CSS when you style using Static Resources of which you give a key to be able to reference using Markup extensions, are obvious. The App.xaml being the equivalent to an external style sheet and the MainPage.xaml to the internal style sheet, while converting styles, or rather Theme resources, to a local value, corresponds to inline styles.

Who’s a pretty app?

Concocting a mockup from a sketch template as well as familiarizing with the Design Process and the different Tile templates is a desirable discipline. Live Tiles are preferable to the static icons of alternative mobile operating systems, and I’ll elaborate on that in a forthcoming blog post on iOS and Windows Phone, and later, on Android and Windows Phone as well.

Using Brain.ToComprehend();

Assimilating a fundamental grasp on the C# code and XAML markup, their syntax and how they operate individually and interact jointly, as well as the correlation of Runtime and Design-time, the IDE and the Windows Phone Emulator, is predominant thus far. I would not be able to write the SoundBoard app code by heart as of yet, but I have a newfound realization when contemplating the code. A Method stub, anyone?

Keep Calm and Develop On

Along somewhere, I did overlook a namespace: using SoundBoard.ViewModels; in MainPage.xaml.cs that had to be there for the Part 15 lesson. A mouseover the red squiggly line under SoundData revealed that “The type or namespace name ‘SoundData’ could not be found […]”, which had me identify where the SoundData Class, or rather, Object type, was established and how it was implemented, to solve the issue. Although, it is easier to mouseover the little blue rectangle under ‘SoundData’ (set the cursor anywhere within the red squiggly line), click the icon and select using SoundBoard.ViewModels; to have the IDE identify and solve the problem. When I went to comment on it, I saw someone have had that issue too and had already commented on it. Repeating a segment of the Part 15 lesson from the day before, gave me a better grasp on the LongListSelector_SelectionChanged Event handler and its related XAML Elements and Properties. Concluding that repetition is clarifying, solving a problem yourself is good practice, but should you run into an issue, see the comments.

As I download the video of each lesson, I play it with VLC media player set to Always on Top, writing the code in Visual Studio myself as it is playing. Amid C#, setting the Solution Explorer window to Auto Hide, and the Device window amid XAML too, the UI and video are both accessible on the 2560 pixel wide screen. Although, while doing Part 16, I lapsed when Bob Tabor uncommented line 26, BuildLocalizedApplicationBar(); of the MainPage.xaml.cs, and thus the Application Bar didn’t appear when I started debugging, although without a single error. Solving the issue was straightforward, the Application Bar had its invocation expression commented out and was therefor never invoked.

Furthermore, you don’t want to create two MainPage.xaml and MainPage.xaml.cs in the same project, like I tried when changing the Grid element into a StackPanel element in Part 5 – as I desired to have both for the purpose of repeating and with separate commenting in the same project – even if you rename Classes, et cetera. Create a copy of the project folder.

WP8 Development 1-5

I have gleefully finished part 1 through 5 of Channel 9, Windows Phone 8 Development for Absolute Beginners.

Windows Phone Emulator

A virtual Windows Phone device.

Installation and requirements

As you install the Windows Phone SDK (SDK 8.0), Microsoft Visual Studio Express 2012 for Windows Phone goes with it, both of which are free. It has a different layout to Microsoft Visual Studio Express 2013 for Windows Desktop, intelligibly. Thence, I now have both. There are system requirements for the former, which are Windows 8.1 Pro (or 8.0 Pro) 64-bit OS and an x86-64 CPU with either AMD or Intel Virtualization (AMD-V and VT-x respectively) and to have the BIOS or UEFI setting of that technology set to enabled) as the Windows Phone Emulator will use Hyper-V hardware virtualization. If you have any Intel Core i3/i5/i7 (nearly all Core 2) or AMD Athlon II, Phenom, Phenom II or FX processor, you are O.K.

Screenshots of the installation.

Windows Phone 8.0 SDK and Visual Studio Update 4 installation.

XHTML, HTML, XAML, SGML, XML … WTH.

My previous knowledge of HTML and CSS, specifically XHTML have been an asset as to grasping XAML. You have Elements and Attributes in XAML too (although termed Objects and Properties), recognizable from XHTML and HTML as well as the familiar syntax and structure. There are subtle differences as well of course, for instance, the lowercase tags of XHTML as opposed to case-sensitive CamelCase of XAML. While HTML is a derivative of SGML and XHTML is a derivative of XML – which is also a derivative of SGML – XAML too is a derivative of XML and the sum of fundamental knowledge of each, does coalesce into a revelation with a newfound grasp on – and an awareness of – markup language, namespaces, procedural programmingdeclarative programming and well-formedness that I didn’t have prior. Bob Tabor suggested to learn either of HTML vs. XHTML and CSS in the concluding thoughts to the C# Fundamentals: Development for Absolute Beginners series and it is already apparent as to why. XML itself has become increasingly compelling too. Eventually, I’ll do the HTML5 & CSS3 Fundamentals: Development for Absolute Beginners series as well. I am enthralled by C#, XAML and Visual Studio.

A Screenshot of the IDE.

The Integrated Development Environment (IDE).