Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

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);
}

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.