Few general tips for Windows Phone development

by Marius Gheorghe 13. October 2011 10:48

- don't use ZUNE for deployment. Use WPConnect (a tool which comes with the SDK. You'll find it in \Windows Phone\v7.1\tools\wpconnect). It's much lighter than Zune and it also allows you to debug launchers/choosers.

- don't close the emulator. Never.

- learn the difference between pivot/panorama and use them accordingly (if it helps think of the pivot as a tab control).

- it's a good idea to not hardcode colors and use the accent color (for instance where you want to "highlight" a specific text).

- make sure you test your app in both themes.

- think of the navigation flow of the app. Remove pages from the navigation stack when it doesn't make sense for the user to "get back" with the back key.

- fast, Fast, FAST. I can't stress so important is to have a app which feels fast.

- the JPG decoder is faster than PNG. Consider this when choosing the format of images for splash screen, backgrounds etc.

- make sure you understand the difference between "content" and "resource" when dealing with app resources.

Tags:

dotNET

RewritePath issue on ASP.NET 4

by Marius Gheorghe 24. June 2011 09:25

  Ported a app from ASP.NET 2 and 4 and had a interesting issue with HttpContext.RewritePath.  Basically I was doing url rewriting using to ashx handler to get nice urls on asp.net 2. When I moved the app to 4 all postbacks on pages with rewritten url were broken (even if I was running the app with the backward compatible settings).

Found a workaround (not perfect but it gets he job done). Basically RewritePath has a parameter called “rebaseClientPath” which “updates” the path after url change. This rebase doesn’t seem to work anymore on ASP.NET 4 so make sure it set the param value to false.

Hope this helps someone.

Tags:

dotNET

Moved to CodePlex

by Marius Gheorghe 2. March 2011 08:22

Moved all my OSS projects from BitBucket to CodePlex. Here's the profile page with links to all projects. Source control is Mercurial for everyting. And speaking of Mercurial, TortoiseHG 2.0 was released todays and looks very nice.

 

Tags:

dotNET

How to download xaps from the WP7 marketplace

by Marius Gheorghe 1. February 2011 12:55

I have decided to publish this hoping that MS takes more seriously the WP7 marketplace security. I stumbled upon this while debugging another app with Fiddler and having Zune started. Basically, as far as i could tell, Zune pulls all the UI data unecrypted from MS server formatted as atom feeds. Worse is that the actual app download is also done without at least being authentificated.

Basically , let's see how we can get the Adobe Reader xap file.  The first query should be a search :

http://catalog.zune.net/v3.2/en-US/apps?q=adobe%20reader&clientType=WinMobile%207.0&store=zest&orderby=downloadRank 

This will return a feed with details for all apps who match the search criteria (in this case the search for Adobe Reader returns 2 applications).

From this we only have to grab the app id (which is a guid). With this guid we have to request the full app details :

 

http://catalog.zune.net/v3.2/en-US/apps/{productId}?clientType=WinMobile%207.0  

Obviously replace {productId} with the actual id. This will return another feed with app details and between those details we find the actual URL directly to the xap file


 

Microsoft, please change this.

 

Tags:

dotNET

Here's what i have been working on lately

by Marius Gheorghe 16. September 2010 17:47

Tags:

dotNET

Windows Phone 7 development

by Marius Gheorghe 20. August 2010 16:01

Not much time for blogging lately. Sigh. Anyway, from my previous post, it should be clear that i am working on a WP7 project. The app i am working on should be up in the marketplace at the end of October when the phones will be released.

Here are a couple of comments related to WP7 development :

- don’t treat it as a toy. If you approach the platform with the “desktop developer” mindset you will fail. Hard.

- think a lot about usability when designing the UI of a mobile app.

- understand the app lifecycle and the various performance tradeoffs.

- it’s Silverlight 3 with phone specific additions. You can use some stuff from Silverlight toolkit but don’t count on too many things working out of the box. Look into panorama & pivot controls. They are very useful in a lot of UI scenarios.

- the “runtime” (compact CLR + Silverlight) is pretty fast. For “regular” stuff you’ll never need to worry about performance.

Tags:

dotNET

Bad experience with extension methods

by Marius Gheorghe 12. July 2010 16:29

Had some bad experience with a OSS library in the context of extension methods. 2 rules were broken:

- the logic of a very important type in that library was implemented with extension methods.

- the extension methods were declared in DIFFERENT namespaces (!!!).

 

That, frankly, is just dumb. Extension methods are used for extending types for which you don’t have the code. Even if you break this rule remember to put the extension method in the same namespace of the extended type so that when somebody is importing the namespace of that type it has access to ALL extension methods automatically.

Tags:

dotNET

Debug this

by Marius Gheorghe 6. May 2010 13:42

 

var container = new Dictionary<int, List<Tuple<int, string, int, Dictionary<int, string>>>> ();

I'm sure it's very fun to debug the code which is using this data structure.

Tags:

dotNET

How many versions of CLR are out there ?

by Marius Gheorghe 19. April 2010 05:38

Official versions are :

- the desktop/server version that everyone knows.

- CoreCLR - the Silverlight version.

- the version from .NET Compact framework  (which runs on windows mobile phones, Xbox 360 etc)

- the version implemented in the .NET Micro framework.

 

The more the merrier, i guess.

Tags:

dotNET

Use Gmail as a SMTP server

by Marius Gheorghe 18. April 2010 08:31

You can use Gmail as SMTP server to send emails. When i launched Topi last week i decided to use Gmail instead of the mail server of the hosting company (since Gmail is much more reliable). To configure it you can simply drop this into web.config  (replace test with actual account data):

<system.net>
    <mailSettings>
        <smtp deliveryMethod="Network" from="test@gmail.com">
            <network host="smtp.googlemail.com" port="587" defaultCredentials="false" userName="test@gmail.com" password="test"/>
        </smtp>
    </mailSettings>
</system.net>

 

Make sure you use port 587 because it won't work with the other one. Also i decided to use log4net to receive logging data for email so, since log4net Smtp appender doesn't support TLS authentification, i have added this to Microruntime.

Tags:

dotNET


marius gheorghe

developer, dad, gamer

Contact me

My Resume

Favourite Tools