Blog Home  Home Feed your aggregator (RSS 2.0)  
Peter Nowaks Mobile Blog - Tuesday, July 13, 2010
Windows Phone in the cloud
 
 Tuesday, July 13, 2010

I’ve just stumbled over the method IsolatedStorageFile.GetFileNames("searchPattern”).

Lets take the given code:

try

            {

IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForApplication();

 

                file.CreateFile("test1.txt").Close();

                file.CreateFile("test2.txt").Close();

                file.CreateFile("test3.txt").Close();

                file.CreateFile("test4.txt").Close();

                file.CreateFile("test5.txt").Close();

                file.CreateFile("leer1.txt").Close();

                file.CreateFile("leer2.txt").Close();

                file.CreateFile("leer3.txt").Close();

                file.CreateFile("leer4.txt").Close();

                file.CreateFile("leer5.txt").Close();

 

string[] files = file.GetFileNames();

                files = file.GetFileNames("test*.txt"); //Returns 10 entries, instead of 5

 

            }

catch (IsolatedStorageException ios)

            {

            }

 

This shows that GetFileNames with search patterns fails in CTP and current beta returning in the sample with 10 entries, instead of 5.

If you use the sample including a subfolder, the values returned are correct.

 

SO, forr now, beware using this method on the Isolated Storage base folder.

Tuesday, July 13, 2010 3:58:39 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Phone 7 series development  |  Trackback

If you still haven’t heard of it: The Visual Studio 2010 Express for Windows Phone Beta has been released yesterday.

For installing this beta version, it is necessary to uninstall the April CTP.

In general it is a good thing to have a VM running the bits, as you can install them fresh. But there are sometimes circumstances that this isn’t possible, which leads a couple of times, that the uninstall fails of several reasons.

Ginny Caughey, as well a Device Application Development MVP, sharred a linkt to the US forums, which gives a few good advices and tipps, how to come around some uninstallation issues. The forum post can be found here.

Thanks Ginny!

Tuesday, July 13, 2010 3:49:51 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Phone 7 series development  |  Trackback
 Wednesday, July 07, 2010

As playing around a bit with the WP7 functionality, I wanted to create a small sample, which loads XAML Elements dynamically into the Page. No magic here.

The XAML fragment to be loaded has been extracted to a file called XamlFragment.xaml. I set in the Properties window of VS 2010  the Build Action to Content and deleted the value for the Custom Tool.

The idea was to package the file withe the XAP file and deploy it, so the SL App could read the file directly.

What I totally forgot about was the fact, that SL Apps have only access  to the Isolated Storage. But the Isolated Storage in fact is a subfolder of the Apps folder, where the XAP files get deployed. So how to access the file?

After searching a bit around I found out, that XNA has the same issue on accessing files like textures etc., which are packed within the XAP.

Therefore the Assembly Microsoft.Xna.Framework contains the static class TitleContainer.

Executing “TitleContainer.OpenStream(‘XamlFragment.xaml’)” returned an object of type stream, which could be accessed by my StreamReader.

(Please keep in mind that this stream is readonly)

 

More info on the TitleContainer class can be found here.

Wednesday, July 07, 2010 10:06:34 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Phone 7 series development  |  Trackback
 Monday, July 05, 2010

image Es ist ja mittlerweile ein offenes Geheimnis, dass Patrick Getzmann (MVP für Device Application Development), Simon Hackfort und ich an einem Entwicklerbuch (in Deutsch) zu Windows Phone 7 arbeiten.
Wer der Publisher ist und welche Inhalte es in diesem Buch geben soll, werden noch nicht verraten.
Das Veröffentlichungsdatum steht noch nicht 100%-ig fest, da hier mehrere Faktoren einen Einfluss darauf haben. Es soll jedoch noch dieses Jahr sein.

Wir für unseren Teil haben bereits eine Agenda an Themen festgelegt, welche das Buch behandeln soll. Doch wir sind an der Stelle noch ein wenig flexibel. Somit stellt sich die Frage: Was würden Sie sich als Inhalt für so ein Buch wünschen?
Es könnte sein, dass wir noch ein wenig Zeit haben werden auf die Wünsche einzugehen, geben aber keine Garantie, dass wir diese auch berücksichtigen könne.
Hinterlassen Sie somit ein Kommentar in diese Blog und wir werden schauen, was noch möglich ist im Buch unterzubringen…

P.S.: Vielen Dank an Alex Januschewsky (MVP für Windows Mobile) von http://mobilitynews.net/ für das WP7-Metro Logo, welches er uns zur Verfügung gestellt hat.

Monday, July 05, 2010 10:53:16 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [10]   WP 7 Buch  |  Trackback
 Thursday, July 01, 2010

Da nun bereits die TechTalk Reihe von Microsoft zum Thema Windows Phone 7 Entwicklung durch ist, freue ich mich umso mehr selbst einen Vortrag zu dem Thema bei der netug Niederrhein halten zu dürfen. Ich freue mich sehr darauf aus dem Nähkästchen der aktuellen CTP erzählen zu können und ein paar nette Samples zeigen zu dürfen.

Datum: Mittwoch, 14. Juli 2010

Zeit: 18:30 - 21:30

Ort: AUTOonline GmbH Informationssysteme

Straße: Hammfelddamm 6

Stadt/Ort: Neuss, Germany

Veranstalter: http://www.netug-niederrhein.de/

 

Ich würde mich freuen, euch vor Ort begrüssen zu dürfen.

Thursday, July 01, 2010 12:30:36 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [2]   Windows Phone 7 series development  |  Trackback
 Friday, June 25, 2010

.NET_CF_3.5

Recently I’ve been asked to do a review of a new published book on Data-Driven .NET Compact Framework 3.5 development.

It is called “.NET Compact Fraework 3.5 Data Driven Applications” by Edmund Tan, which has been released in April 2010.

The book is a pretty good book for developers, who want to start developing .NET Compact Framework Applications with the most recent version. It doesn't refer to Windows Phone 7 development, which is good, as for business applications the .NET Compact Framework 3.5 technology will be still valid for a longer period of time.

The book itself is structured in 13 chapters, and contains a complete lifecycle of 3 applications from design down to deployment.
Therefore it uses a pretty good story around the applications, which are developed here by sample. It gives an insight in thick, thin and smart clients, as well as in architecture with the MVC Pattern.
Working with databases (Oracle and SQL CE) is as well described as the creation and usage of WebServices. Even the topics 'Auto Update' and working with Bluetooth (among other interfaces) are described as well. Not to forget the usage of Sync Services, the book describes the topics Authentication and Encryption as well.
Chapter 7 is all about Best Practices for mobile applications. These topics for beginners are very useful. Unfortunatelly the book has some drawbacks.

Visual Studio 2008 for example is described as a requirement. Unfortunatelly the author doesn't describe, why Visual Studio 2010 can't be used in this scenario. (Visual Studio 2010 doesn’t support any Windows Mobile development. It is meant to be used for Windows Phone 7 development and later)
As well it isn't obvious to the reader, why 2 different database engines get used (Oracle and SQL CE). On the other hand these databse engines are valuable information to the reader, as he get's described how to work with those different platforms.
The described Dashboard application uses a pull mechanism, where it is requesting new data every minute. This isn't a good practice, as in this sample it isn't necessary as well as it is draining the battery. In general battery usage isn't mentioned at all.
The Bluetooth sample just uses a Bluetooth SerialPort. This means, that the user has to manage Bluetooth connectivity by himself. This isn't a real life scenario. By the usage of the 32feet Library, this would have had additional value to the reader and the user.
The described Pluginsystem lacks of security. Showing the basic steps is absolutly legal, but unfortunatelly not a real world scenario.
Datasets as the BusinessObject intermediate isn't a good choice in this book, as the memory usage is increased.
A side not of using Reflection that it is affecting the applications performance an memory isn't mentioned as well.
Creating a full search scenario is good. Unfortunatelly the coding here creates a security hole for SQLInjection, which isn't mentioned anywhere.
Using regular expressions for the search scenario is great, but the author doesn't tell the reader anything about Regular Expressions at all.
While the complete book uses C# code, it isn't obvious, while Chapter 4 suddenly introduces a VB.NET sample.
The salesforce sample describes the usage of Bluetooth and IrDA as interfaces for exchanging data. This would make it necessary, to have both sales persons to be at the same spot. This isn't a real life scenario as well.

All in all the book is a good entry point for .NET Compact Framework development, but lacks in the depth of the provided information and background. Nevertheless, as it lacks in a few mentioned details, this book shall be worth a read for beginners, as the story around the applications gives a good template on how to start with the overall application lifecycle.

If you are interested, you can check out the details (including a free chapter download) here.

Friday, June 25, 2010 10:30:12 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   .NET Compact Framework 3.5  |  Trackback
 Tuesday, June 22, 2010

You know these fridays: Bored on friday nights and you come on the great idea to play a drrinking game with some friends, like probably “Mexican” (find a description for the game here).

You have all the beverage in place, but it tends to happen, that you don’t have any dices around. Good when you have your Windows Mobile with you:

LieberLieber released virtual dices for this game for free over here.

image_thumb19[1]

Go and grab it.

P.S.: No warranties are given about headaches next morning. ;-)

Tuesday, June 22, 2010 12:32:11 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Mobile Games  |  Trackback
 Monday, June 14, 2010

Am 28.05.2010 findet die dotnet Cologne 2010 in Köln statt.

Die Veranstaltung selbst war einfach nur super. Es hat richtig Spaß gemacht dort den Vortrag zu “Silverlight für Windows Phone 7” halten zu dürfen. Nicht nur, dass der Raum fast überfüllt war, waren die Diskussionen zwischen den Teilnehmern sehr erfrischend.

Leider führte dies jedoch unter anderem auch dazu, dass ich den Stoff leider nicht komplett zeigen konnte. Aus diesem Grund gibt es an dieser Stelle die Slides und Samples zum Download.

Bitte beachtet, dass in den Samples eine Textdatei enthalten ist, welche weitere Informationen bietet.

Weitere Informationen zur dotnet Cologne findet Ihr hier.

PeNo_SL für WP7.zip (557,18 KB)
Monday, June 14, 2010 8:27:15 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Phone 7 series development  |  Trackback
 Wednesday, June 09, 2010

Windows Phone 7 ist nun auch schon seit einigen Tagen bekannt. Wer jedoch einmal in “Kürze” einen etwas umfassenderen Überblick für Entwickler haben mag, sollte sich folgenden Onlineartikel von mir auf mobile360.de einmal zu Gemüte führen.

Inhalte sind neben einem kurzen Überblick der Geräte- und Betriebssystemfunktionen auch das Anwendungsmodell, sowie die Plattformarchitektur. Auch das Thema Metro wird hier kurz angerissen.

Happy reading.

Wednesday, June 09, 2010 7:04:26 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]   Windows Phone 7 series development  |  Trackback
 Monday, May 17, 2010

Bereits nächste Woche, am 28.05.2010, findet die dotnet Cologne 2010, wie der Name schon vermuten lässt, in Köln statt.

Auch ich werde dieses Mal mit von der Partie sein. Thema ist dieses Mal die Entwicklung für das Windows Phone 7.

Der Vortrag hierzu findet um 16:15 Uhr statt .

Weitere Informationen zur dotnet Cologne findet Ihr hier.

Monday, May 17, 2010 8:18:48 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]    |  Trackback
Copyright © 2010 Peter Nowak. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.