Category Archives: Uncategorized

Translate C# WPF Applications to HTLM5 with WPF.polymer Part III – UHU the C# to JS Compiler

Hi,

some people asked me for the cross compiler and the next steps. Unfortunately, I don’t have the time to fully elaborate on all the details so this is a work in progress post. I’ll try to make some updates and comments to this post when I find the time. If you are interested in a particular thing leave a comment so that I can address it first.

Roslyn

The C# to JS cross compiler is written in C# and is using Roslyn:

The .NET Compiler Platform (“Roslyn”) provides open-source C# and Visual Basic compilers with rich code analysis APIs

A lot of things have changed since my early tests with Roslyn one year ago: Roslyn is now a very popular and focused project. This also means that a lot of things have changed in the Roslyn code. Please have this in mind when using the code listings that are provided here.

The goal of the Roslyn project is to provide an API to the C# compiler pipeline.

compiler-api-lang-svc
Source
Continue reading Translate C# WPF Applications to HTLM5 with WPF.polymer Part III – UHU the C# to JS Compiler

Translate C# WPF Applications to HTLM5 with WPF.polymer Part II – Business Logic

Since more and more people show interest for this topic/posts and I just discovered a question on Stackoverflow mentioning this blog there is no more room for excuses – I owe you a second part. So I will just start and see how far I can come this time…

Last time, I showed you that XAML which is rendered into beautiful UIs is just a XML dialect and that we can use this knowledge to transform it into another XML representation: (X)HTML.

There was just one problem: our browser does not know about any WPF tags but instead speaks div, span, etc… But with Polymer to the rescue we were able to teach our browser how to read, simulate and render XAML. This allowed us to reuse our existing Desktop UI and display it in a modern browser.

But this was just a cool side effect and not what we really wanted. I promised you more: write code once and run it everywhere (smartphone, web, mac, linux)

Continue reading Translate C# WPF Applications to HTLM5 with WPF.polymer Part II – Business Logic

Translate C# WPF Applications To HTML5 with WPF.Polymer Part I – The GUI

Hi everyone,

I will show you in this post a concept of how to turn arbitrary desktop software that was written for example in C#/WPF into HTML5 cross platform solutions, with the help of new HTML5 features like Web Components. Or in other words, the next generation of hybrid software.

But before we jump into the details, I will provide some background information, why this technique can save you as developer a lot of time and your company tons of money:

Continue reading Translate C# WPF Applications To HTML5 with WPF.Polymer Part I – The GUI

I’m Going To MIT

1024px-MIT_Building_10_and_the_Great_Dome,_Cambridge_MA

It has been more than half a year, since I was accepted at MIT. After all the exams, the visa and scholarship application; after selling a complete household, my car, and being one month ‘homeless’; after filling out dozens of forms and getting gray hair, I’m just relieved and happy to enjoy a beautiful summer here in Cambridge.

The next year will be exciting and I’m looking forward to take part in promising and challenging projects, meet and work together with talented people, travel a lot and enjoy my new American everyday life.

I will try to share my insights, lessons learned, impressions and a lot more on this blog and thereby try to improve my English skills πŸ˜‰

Stay tuned!

Build A CRM Chrome Extension To Manage Over 10k Google Contacts

Hello,

this post is about creating a Chrome Extension to enrich the functionalities of Google Contacts and to manage more than 10k entries in an easy way.

The story starts one month ago, when I was confronted with the following requirements:

  1. “Build a Chrome Extension that is capable of managing all our Google Contacts (12k+)”
  2. “We want a simple login”
  3. “We want inplace editing for some cells, as well as batch editing for a subset of all cells”
  4. “The extension should support fuzzy search, sorting, inverse search(exclude matching entries), multimail, quick filtering by age, notes/tags, …” – unfortunately, Google’s Contacts API is lacking a lot or nearly all this functionality right now

Continue reading Build A CRM Chrome Extension To Manage Over 10k Google Contacts

Make a fancy animated HTML5 Logo for your WordPress with pure JS (3/3)

Welcome to the last part of this series on how to create an animated HTML5 logo for your blog.
Hopefully you’ve finished your animated logo and are now ready to integrate it into your WordPress blog. (You should have finished it – you had half a year to do so πŸ˜‰ )
This post will be on

  • how to improve the stability of our code
  • some cross browser considerations
  • we will introduce a multi purpose animator class

and finally go live with our logo!

Continue reading Make a fancy animated HTML5 Logo for your WordPress with pure JS (3/3)

Metaprogramming experiments: Selector Properties

Hello everyone!

A few days ago I wrote a post about “Virtual Instances in JavaScript with Proxy API – JSDataViews“.
It’s an approach on how to calculate the data representation of a variable at runtime with the help of the new Proxy API.

Today I want to show another feature which is part of the core of JSDataViews

Selector Properties

A lot of people are familiar with jQuery. The development of jQuery is driven by the fact that the DOM is a hierarchical, complex data structure and people need an easy way to access and manipulate different parts of it.
Since JavaScript objects can reach a similar complexity I was looking for an easy and nice way to run similar queries on them.
Continue reading Metaprogramming experiments: Selector Properties

Virtual Instances in JavaScript with Proxy API – JSDataViews

Today I discovered an interesting new way of declaring variables. I used a technique to mimic a principle which is called “Views” and which is well known in the database world.

DB Views !== UI Views

On the PostgreSQL website Views are described as follows:

The view is not physically materialized. Instead, the query is run every time the view is referenced in a query.

The principle can be simply visualized using a set of data entries where each “View” builds a subset of these entries (colored boxes) when executed:

db views

Enter JS

Instead of declaring the final variable/dataset for the View we will create a function that behaves like a View object. I’ll call this a Virtual Instance since the data for this View is not existent before it is accessed. Instead, the function is evaluated and brings data into the Β variable at runtime.
Continue reading Virtual Instances in JavaScript with Proxy API – JSDataViews