Monday, April 14, 2014

All that glitters is not gold

I have to say, over the past few weeks I quite fell in love with WPF. It's like WinForms, that has all it's things sorted out, kinda grown up. All those class names make sense and are consistent throughout the framework (I'm talking especially about controls).

Until I came across WebBrowser customizations. In WinForms it was simple and straightforward, so I assumed this will be the same, but better. Well, I was wrong. When I tried to assign any kind of event in mshtml/DOM, the WebBrowser froze. Yes, the event has been processed, but I was unable to select text or scroll the page. Useless! I didn't find anything, that helps - not even in solution, that described exactly my problem about mouse lockups.

I started research to replace default IE WebBrowser with e.g. WebKit. There are some nice stuff, like WebKit.NET, Awesomium or GeckoFX. I understand that browser is a big deal, but I don't want to ship my tiny app with at least 30 MB in browser DLLs.

I had a strange feeling about the solution mentioned before, because I noticed in the HUGE discussion below the article that people thanks the author, so it should work. But it didn't. This time I was more stubborn and kept on reading posts.

Finally I reached one post, that points out the author forgot to put "[ComVisible(true)]" above one class, which solved my problem and it started to work. Phew!

In many, many solutions I found, that this is not expected behavior, it's in the WPF framework since the dawn of time, but Microsoft apparently don't care. Sucks!

Thursday, April 10, 2014

Quiky v1

As I wrote, when I started to re-create Quiky in WPF, I set feature set for the first release. And because everything I wanted has been made and greatly tested, now it's time for public release.

Monday, April 7, 2014

Quiky WPF

I decided to reengineer Quiky, because I didn't trust it in the worst way - that it will keep my data. I reworked the core code few times and probably left some bugs, so here and there I lost my contents or replaced a page contents by contents from a different page. And for a text editor this is a severe issue.

I tried WPF, but it was really uncompatible with all the stuff I put quite an effort into, so I started WinForms again. Because I had so much done it was quite quick. But then I realized I added some unneccessary code and it got huge before I was able to tune the saving and stuff.

So I started fresh again and when I reached the most basic state, I figured I can't use those chunks of code, because I will fall into the same pit. And then I realized, because of this, there's no compatibility issue with WPF any more, so I can wave obsolete WinForms good bye.

Also I decided to strictly make versions here (for me for the first time). To set a bunch of features to add and make a roadmap. My problem is to add so many features at once I got lost in the code and if I screw up, there's no way back. The very first version will be just the most basic functionality.

I had few failed attemps to make WPF app before, so I kinda knew what issues I'll have to deal with. First of all, I used Panel a lot. In WPF there are four or five replacements. I chose DockPanel.

To my surprise the start was quite fast, even a LOT of things is different - like methods and it's arguments. But it makes more sense, than WinForms, and I like it.

I also made a bold decision to use QetriX approach, so it will have e.g. DataStores. It really feels great to finally implement all those old ideas, I must say! :)

Tuesday, February 11, 2014

JetriX

Thanks to my new work project with colleagues from IBM CZ I laid my hands on IBM Worklight, which is PhoneGap on steroids with a server backend. I had no other chance than yet again install my disfavored Eclipse, which poweres Worklight Studio and IBM Rational Team Concert.

I has been taught how to use it and ultimately how to build hybrid mobile applications in it. I learned quite a few new stuff about Eclipse.

For Android (and couple of my Java tries) I used IntelliJ Idea Community Edition, even after Google introduced Android Studio, because I don't like single purpose tools (you can't build Java apps in A.S.).

Worklight Studio has a support for Android Studio, for building Android app (if you don't want to install Android Dev Tools in Eclipse), so I installed it as well and after that I discovered It's easier to make .apk in Worklight Studio itself and Android Studio struggles to launch properly.

But having Eclipse up and running I had yet another urge to try Java web apps (servlets) again. So I installed Tomcat and started new Dynamic Web Project.

Thanks to a video tutorial I had a working "Hello World" in a couple of minutes. I don't count resolving "HTTP Status 405" error, as it was because of Eclipse code template (that includes super.do[Post|Get](req, resp), causing the error).

After that it was quite straightforward. Create bunch of packages, fill them with classes and write some code. It gave me few insights how to improve the PHP framework, towrads unification between platforms.

Anyway, we were obliged to put the hybrid mobile application on Windows Phone Store as well, which requires a Visual Studio to compile and debug the WP project. So we purchased that, together with Windows 8.1 Pro (our company computers all has OEM licenses for Win7). As a result, I'll try to do the same with ASP.NET and it opens the door for better WPF desktop app.