Spartakiade Conference in Berlin

Next weekend in Berlin the Spartakiade will take place again – always a very interesting community conference consisting completely of workshops.

I registered for “Modern web development with AngularJS” and “Data stream analysis with Azure Stream Analytics” and I’m really curious about it. :-)

Developer Open Space 2014 at 17th–19th October 2014 in Leipzig

Also this year the Community (Not) Conference Developer Open Space has no role allocation in „speaker and listener“. Instead again the exchange of experience as well as the extending of the personal network while drinking a coffee is the important part. The agenda is decided on-site by the attendees themselves instead following the conference organisators.

Inline-Bild 1

On Friday, the workshop day, you can educate yourself in “classical” full or half day workshops. This year there are a total of 12 workshops to choose from.

Registering at devopenspace.de.

Spartakiade Conference in Berlin

This weekend in Berlin the Spartakiade took place: a conference that consists completely of workshops and is organized by the software developer community. I attended already the last two years as well as this year and it was again very interesting. In 2014 everything was on the topic “Mobile Development” and “Psychology”. Beside others these were the topics:

  • Azure Mobile Services
  • Composite User Interfaces for Service-Oriented Applications
  • Cross-Platform for WP8, WPF & WinRT
  • Development with Xamarin
  • Enterprise Web Applications with Ext JS / EXT.NET
  • Graphic Recording
  • Kanban in Reality
  • Mobile Backend as a Service
  • Psychologie of Decisions
  • Team Formation and Transformation

Spartakiade 2014

DevExpress XPO: Expensive SQL Query Upon XPCollection.EndInit() Call

For .NET projects I do like to use the controls by DevExpress. Additionally DevExpress XPO is very useful as database abstraction layer.

But in a current project I came across a very strange issue:

for a few forms (curiously not for all) a very expensive SQL query is sent to the database backend while the form is loading. It was basically a SQL query that loads all (and I mean really all) data rows from the database which is obviously not a very good idea. But as I wrote that was not the case for all forms: when loading the other forms only the current data object (the current row in the table) was loaded as expected.

Of course, I’ve first contacted the always very fast and helpful DevExpress support. They researched what causes the data request and determined that the XPCollection.Count property is requested by the CurrencyManager after the Control.UpdateBindings method call. Because that’s something inside the .NET Framework they can’t do anything about it unfortunately.

They suggested to not set the XPCollection at design time, but this would result in losing the possibility to build the forms in the Windows Forms Designer. That would have been very bad, because I do have a lot of big forms in this project and I really don’t like to build them all in code.

But I found another way – I will not call that solution, just a work-around – to be still able to use the designer:

Therefore I simple wrote two batch files (using a command line replacement tool called FART), one that runs before the build starts and makes sure no XPCollection is initialized in the InitializeComponent method (by just commenting the lines of code) and a second one that runs after the build finished and reverts these changes.

Here is the content of the pre-build batch file:

%1Tools\fart.exe -r -C "%1*.designer.cs" "this.xpKern = new DevExpress.Xpo.XPCollection(this.components);" "\x2f\x2fthis.xpKern = new DevExpress.Xpo.XPCollection(this.components);"
%1Tools\fart.exe -r -C "%1*.designer.cs" "((System.ComponentModel.ISupportInitialize)(this.xpKern)).BeginInit();" "\x2f\x2f((System.ComponentModel.ISupportInitialize)(this.xpKern)).BeginInit();"
%1Tools\fart.exe -r -C "%1*.designer.cs" "this.xpKern.ObjectType = typeof(Administration.Daten.Kern);" "\x2f\x2fthis.xpKern.ObjectType = typeof(Administration.Daten.Kern);"
%1Tools\fart.exe -r -C "%1*.designer.cs" "this.xpKern.Session = this.unitOfWork;" "\x2f\x2fthis.xpKern.Session = this.unitOfWork;"
%1Tools\fart.exe -r -C "%1*.designer.cs" "((System.ComponentModel.ISupportInitialize)(this.xpKern)).EndInit();" "\x2f\x2f((System.ComponentModel.ISupportInitialize)(this.xpKern)).EndInit();"

@exit 0

And the post-build one that reverts the changes:

%1Tools\fart.exe -r -C "%1*.designer.cs" "\x2f\x2fthis.xpKern = new DevExpress.Xpo.XPCollection(this.components);" "this.xpKern = new DevExpress.Xpo.XPCollection(this.components);"
%1Tools\fart.exe -r -C "%1*.designer.cs" "\x2f\x2f((System.ComponentModel.ISupportInitialize)(this.xpKern)).BeginInit();" "((System.ComponentModel.ISupportInitialize)(this.xpKern)).BeginInit();"
%1Tools\fart.exe -r -C "%1*.designer.cs" "\x2f\x2fthis.xpKern.ObjectType = typeof(Administration.Daten.Kern);" "this.xpKern.ObjectType = typeof(Administration.Daten.Kern);"
%1Tools\fart.exe -r -C "%1*.designer.cs" "\x2f\x2fthis.xpKern.Session = this.unitOfWork;" "this.xpKern.Session = this.unitOfWork;"
%1Tools\fart.exe -r -C "%1*.designer.cs" "\x2f\x2f((System.ComponentModel.ISupportInitialize)(this.xpKern)).EndInit();" "((System.ComponentModel.ISupportInitialize)(this.xpKern)).EndInit();"

@exit 0

The @exit 0 at the end of them is important as otherwise code 2 is returned (for whatever reason) and the Visual Studio build system will complain about it every build.

Now you just need to call these batch files in the Visual Studio build events with

$(ProjectDir)Tools\PreBuild.bat $(ProjectDir)

respectively:

$(ProjectDir)Tools\PostBuild.bat $(ProjectDir)

I know that this is not a very good “solution”, but the only idea I had that I can still use the form designer while avoiding these expensive SQL queries.

Did you ever have the same issue and maybe even a better solution for it? I’m looking forward to any other suggestion on this topic!

Intel Ultrabook MeetUp in Munich

Today there was a second Intel Ultrabook MeetUp in Munich (Germany) this year. The first one was in July.

Intel Ultrabook MeetUp in Munich

I was invited to speek a little bit about my experience with migrating a HTML5 app to the modern style UI (formerly Metro) of Windows 8 using the example of my Vocabulary Trainer project.

Developer Open Space in Leipzig

This weekend the annual Developer Open Space (German; formerly .NET Open Space) takes place in Leipzig (Germany) with around 150 attendees.

Developer Open Space 2012

I was invited to give a speech there today about utilizing the new Intel Ultrabook features on Windows 8 using the example of my Vocabulary Trainer project.

Developer Open Space 2012: After Speech

After the speech several attendees used the opportunity to get a closer look on the new Intel Ultrabook and asked questions regarding app development for Windows 8.

Have you been to the Developer Open Space, too?

Ultimate Coder Challenge: Adding a Words Card Game

After some interface improvements in my previous post, I added a words card game to the vocabulary trainer app since that.

But first I extended the main view with a semantic zoom. Here is the normal view:

Screenshot of Vocabulary Trainer: Without Semantic Zoom

And with semantic zoom (zoomed out):

Screenshot of Vocabulary Trainer: With Semantic Zoom

If there should be many lessons to display the user can get a better overview this way.

But now the more interesting part: the words card game that looks similar to the game Memory® by Ravensburger:

It displays covered playing cards in the first place. After the user touches/clicks on a card it is uncovered and a word in one of the two languages of the current lesson is displayed. The user then needs to find the translated word for it.

If there are too many words in one lesson to show, the words are picked random automatically.

Here is how that looks like now:

Screenshot of Vocabulary Trainer: Words Card Game

OK, that was the last post in the Ultimate Coder Challenge from me.

Of course, there is still enough things left that could be added to this vocabulary trainer – especially the online sychronization should be available soon -, but there is not more time left in this challenge.

As a summary you can say that it is possible to convert a HTML5 app to the new Windows 8 UI design in six weeks, but it is really much work. Although Microsoft says that with HTML5 you just develop once and deploy it to different platforms that’s more like wishful thinking. In practice you have to do a lot of extra work to get the right look and feel for each platform – especially for Windows 8.

Anyway, I hope you enjoyed reading my posts!

Ultimate Coder Challenge: IDF and Interface Improvements

It was great that I was invited to be at the IDF in San Francisco last week!

There I showed my vocabulary trainer at a booth of Intel at the technical showcase area.

IDF 2012: Showcase

But I also had time to implement some Interface improvements for the vocabulary trainer.

First of all I optimized this dictionary view:

Screenshot of the Vocabulary Trainer: Edit Dictionary

There is no need to show the flags for every single word. It just wastes space. Here is how it looks now:

Screenshot of Vocabulary Trainer: Edit Dictionary Revised

Now the flags are only showed once anymore at the top right of the screen.

Additionally I needed to find a good way to make it possible for the user to delete Folders again. Deleting lessons is done by selecting them first and then hitting the delete button in the command bar. But that’s not possible for folders as there is no way to select them.

Therefore I decided to use a kind of popup menu for this: when touching/clicking on a folder name a button should appear to enable the user to delete this folder.

After doing some research on that I figured out that this should be possible by using flyouts. So I added this peace of code to the HTML file:

<div id="deleteFolderFlyout" data-win-control="WinJS.UI.Flyout" aria-label="{Delete folder flyout}">
    <button id="deleteFolder">Delete this folder with all lessons?</button>
</div>

To finally show the flyout about touching/clicking the folder name I needed to call a JavaScript function in the OnClick event. But obviously it is only possible to call the JavaScript function if this is exposed with a WinJS namespace:

GroupedItems.ShowDeleteFolderFlyout(event)

And here is the JavaScript function itself including the namespace definition:

function showDeleteFolderFlyout(e) {
    var deleteFolderFlyout = document.getElementById("deleteFolderFlyout");
    deleteFolderFlyout.deleteFolderId = e.target.groupKey;
    deleteFolderFlyout.winControl.show(e.target, "right");
}

WinJS.Namespace.define('GroupedItems', {
    ShowDeleteFolderFlyout: showDeleteFolderFlyout
});

That’s how it looks like now after touching/clicking on a folder name:

Screenshot of Vocabulary Trainer: Delete Folder Flyout

This was the update for the current week again.

Read on next Monday!

IDF 2012: Meeting Fellow Ultimate Coders in San Francisco

This week the Intel Developer Forum (IDF) takes place in San Francisco.

It’s great to be invited again by Intel as last year.

This year I was invited as participant of the Ultimate Coder Challenge, but also as being an Intel Black Belt developer.

San Francisco is a great city and it was a pleasure to meet all the fellow Ultimate Coders and the other Black Belt developers. I knew many of them already from last year.

Have you been to the IDF 2012, too?

Intel Ultrabook AppLab in Berlin

Today there was an Ultrabook AppLab in Berlin (Germany) were I was invited to participate by Intel.

Several speakers explained the new features of the next generation Ultrabooks and how they can be used by developers.

Intel Ultrabook AppLab Berlin

But there were also a speaker from Microsoft talking about the new Windows UI Design of Windows 8.

And the most important part:

Intel Ultrabook AppLab Berlin: Buffet

We didn’t die of hunger and there ware enough time left to talk with fellow developers. ;-)

Have you been to this AppLab, too?