Wednesday, February 17, 2010

Windows Phone 7: Will the browser suck like windows mobile did?


.
So the big news out of Redmond recently is Windows Phone 7, the new mobile OS from Microsoft. Slick demo videos and hoopla combine to make this all really confusing. I'm frantically looking for technical specs on this and I'm having issues. From what I can tell, we won't know more until the MIX conference.

As a mobile application developer, I find this very intriguing but I need DETAILS. Is the browser the same piece of crap that Windows Mobile was running? All that POS consisted of was old school Pocket IE with a new name. Trust me, it was bad. It couldn't even handle a keypress or cursor event in javascript... Hopefully though, it will be fine. Ars Technica reports it as " unsurprisingly, still Internet Explorer. Claimed to be somewhere between IE 7 and IE 8, the new browser is, as with the rest of the platform, fully multitouch friendly. One thing not found in the new browser is Flash." We'll see.

Another question is what kind of development tools will we have for this? The obvious answers aside "It's Visual Studio duh", I would like to know things like will we have straightforward access to the hardware? Simple management of system resources like network adapters and contacts? Most of these things were done with extreme hacks and 3rd party libraries in prior versions. One this is for sure though, apps on prior versions of windows mobile will NOT run on the new platform. Could mean quite a bit of delay before corporate adoption (on rugged handhelds for example).

My ranting aside, below are some links I've dug up that cover this event. Below that is the marketing video showing the OS.

I will be doing a series called "My first app" in which I will be doing a sample iPhone, Android, Blackberry and web app. While the goal is to help people getting in to development find their way, it's also an opportunity to grade the different dev platforms against each other. Would love to add windows phone 7 to the list.



Coverage:

windows 7 phone series starts from scratch

Hands On with Windows Phone 7 Series

Microsoft unveils Windows Phone 7 Series hotness

Tuesday, February 9, 2010

Using Reflection in C# - Copying objects across namespaces


.
You may not find yourself in this situation that often, but sometimes you have two objects of the same structure who find themselves in different namespaces and you want to copy one to the other. An example of this is having two webservices who use the same Customer object. If a return of a Customer from one web service is to be used in the other, you face a sticky situation. The second service won't accept the return from the first without some tricks because they are in different namespaces.

This can be solved 3 ways that I'm aware of. Of the 3, I prefer to use reflection. The first is to hack your Reference.cs files to remove the namespacing and make them match. The problem with this is that you have to do this each time you update your reference from the WSDL. Not good in my opinion.

The second way is to implement the iConvertible interface, something I find overkill.

The third way is to copy all of the properties of the first object to an empty copy in the second namespace using reflection. Below is a method called ObjectCopy that will do just that.



//Use System.Reflection at the top of your file

public Object ObjectCopy(Object from, Object to)
{
Type fromType = from.GetType();
Type toType = to.GetType();

PropertyInfo[] fromProps = fromType.GetProperties();
PropertyInfo[] toProps = toType.GetProperties();

for (int i = 0; i < fromProps.Length; i++)
{
PropertyInfo fromProp = fromProps[i];
PropertyInfo toProp = toType.GetProperty(fromProp.Name);
if (toProp != null)
{
toProp.SetValue(to, fromProp.GetValue(from, null), null);
}
}

return (to);
}

Monday, February 8, 2010

Please Make A Note: Posting Source Code in Blogger


.
Please Make A Note: Posting Source Code in Blogger

Blog post detailing how to add source code to a blogger blog post. Thanks!

Sunday, February 7, 2010

Microsoft Tag - Physical Hyperlinks


.
Microsoft is trying to change the way we interact with printed content. Today if you see a web address on a business card, a billboard, a real estate sign, a magazine or any other physical print medium you have to type the address in to visit them on the web. Tag is trying to change that, and it's having some success.

You take a picture of a printed microsoft tag 2 dimensional barcode with the camera on your smartphone (blackberry, iPhone etc...) and the tag application will take you directly to whatever content the publisher has intended.

Below is a video from CNET showing what it's all about. This looks promising.



Here's microsoft's site on the subject. I'm going to be diving into the developer tools soon and I will report back my findings here.

Friday, February 5, 2010

Develop in Internet Explorer instead of Firefox - HOW TO


.
Nothing is more disappointing to a web developer than having a user say "I tried going to your website but it looks broken". It takes the wind right out of your sails. Especially when you say "But I tested it?!? How could this be?" Welcome to the wild and wacky world of cross-browser compatibility, the bane of our existence and the cause of many a sleepless night.

The mandate in this post title is not "Never develop in Firefox". Really what I want to stress is to do your testing in IE before you tackle other browsers. The reason? Unless you are developing in a closed environment where all your users are Firefox or Opera nuts, most of your users will be using some flavor of Internet Explorer. Below is a great breakdown of browser market share to illustrate the point (Source: NETMARKETSHARE )

So you might be thinking that means doing with out awesome tools like FireBug. And while I will admit it's going to be a little harder, what I will show you is there is plenty in IE for you to still do your job. I'll quickly go over those options now.

IE Developer Toolbar (For versions of IE less than 8) and IE Developer Tools for IE 8

These two options will give you most of everything you love in Firebug (but not all) and will become indispensable as you forge forward developing in IE. I won't mention all the good stuff here, but a few of the great tools include clearing browser caches per domain, on-screen ruler, color picker and element selector.

For IE users in 6 or 7, look here

For IE 8 users, just hit F12


IE Built in Javascript Debugging


I will warn you right now, forget to turn this off and the next page you go to could blow up in your face. Instructions for turning it on can be found here. This is a life saver when you need to know where in a javascript an error is occurring and all your browser is telling you is "Object not set to an instance of an object"... yeah really helpful.

Conclusion

In addition to what I've shown here there are tons and tons of add-ons and freeware out there to assist where these fall short. Also, if you've got visual studio, IE will attempt to debug there if you enable the option. Good luck working on the dark side!

It's Friday - iPad parody


.
It's Friday! Enjoy this parody of the iPad keynote.


Thursday, February 4, 2010

Welcome to Novarata!


.
Hello Nobody!

Welcome to my first blog post that will inevititably fall to the bottom of the list and never be read by anyone!

However, it's here I will define my mission for this blog:

Blog Mission - Strengthen my technical knowledge, work on my writing skills and help my fellow tech nerds.

So there it is, thanks for not reading it nobody, it really means a lot.

Most of the work I do is in Microsoft .NET 3.5, so while I will try to keep my posts as high level as possible, when I go into details, this is the form it will take. As I write this blog, I will try my best to categorize which posts will be going into the nuts and bolts and which ones will stay at the 10,000 foot view (BOOM Buuzzzword). Thanks for not reading.

To round out my initial post, I'll link a few interesting articles I've recently read.

-Great article about one man's journey to scale a massive internet application

What Second Life can teach your datacenter about scaling Web apps

-I used to work for a wireless carrier so stories like this are interesting to me. More politics over spectrum using the iPad as fodder to push agendas

Government warns of wireless network congestion again, rides iPad to push its spectrum agenda

-Wired's full coverage of the Apple iPad. Curious to see if this thing hangs around.

Apple’s iPad Tablet: Full Coverage

That's all for now.