Searching for a static site CMS

I am getting fed up with WordPress. There are more reasons than one for that, but it being heavy and needing too many updates are the two major ones. For the first one; WP isn’t really that nimble. It is quite heavy on a server, especially for a blog that gets only a few updates and a few comments per month. There is no reason for all this overhead.

There are multiple blogs running on the server where this one is running, but together they are heavy enough to make a dent in the IO and CPU of that monster sometimes even though none of those sites have a lot of traffic. Some of them daily updates though, but that shouldn’t give that kind of load; a lot of the load is because of bot attempts to guess passwords, try out exploits and trying to post comments. With caching on (which they all have), it is ok, but still, these sites should be running fine on a Rasberry Pi I, all of them. That’s how light they are.

Second point; if I don’t keep updating, it will get cracked/defaced/abused; it is not a matter if it will but when it will. I have been trying out some static CMS software like Jekyll and others but unfortunately I do need some kind of CMS to keep clients and friends who run sites with me happy.

There are a few commercial CMS’s that allow static site generation with an advanced content management system on top of some open source generator. The most popular one in that space seems to be Siteleaf.

Unfortunately I want to be able to fix things myself when they come up, so I need an open source solution.

In my searches, I found a few interesting projects:

First of all, a very interesting tool you can add on top of a simple site generator of your own making, CreateJS. It is interesting because it is quite flexible in it’s configuration. You add RDF notations to your pages and you can start editing; it supports blocks, collections and more. When I have more time, I will certainly check it out again, but looking at the ‘small’ CreatePHP example of usage, I am not sure if I would call this a lightweight solution. Might not be a bad thing, but not now.

Second interesting project I ran into was Directus. A structured editor on top of any database/structure; phpmyadmin on steroids so to say (it is far more advanced). It is a flexible solution for many things I often need, but not this. Definitely something to keep in mind for another project that needs more than just simple content management.

The last one I ran into was RespondCMS. A static, WYSIWYG, bootstrap based CMS. It is very flexible with it’s plugins and content components and, using Javascript or your own API, it can be used to basically create anything you want statically and hybrid without writing too much code. It’s WYSIWYG frontend requires a bit of playing around with before you can use it in production. 

In the coming months I will play around with Respond and see if it works well enough to use (or if it is easy enough to contribute to the things that do not work well enough). Even the combination Directus & Respond for a hybrid static/dynamic system seems compelling. AJAX all the dynamic stuff with simple custom Angular components that go into Respond. 

 

Recompile your Xamarin iOS projects to Android – Proof of concept

My first mobile programming experience was, unfortunately, using Jquery Mobile. I won’t go into too much detail, but it definitely wasn’t great. HTML on mobile devices definitely wasn’t ready at the time; it is not now either, but it’s at least bearable and jqm did not make that experience better.

After that I did some native work; it was my first brush with Objective C / iOS. I promised someone I would make that code open source but I would need to stamp it with a lot of warnings as the code (to me anyway) is absolutely ghastly when I read it now. It was kind of a side project which I did in the summer because I wanted to make something nice; the app turned out well but there was no marketing so you can’t even find it in Google anymore. I did learn a lot though; cramming a lot of learning into a very short time worked well for me. iOS turned out to be nice to code for and it thought me a lot about the API, transitions, animations etc.

I continued working native on both Android & iOS, far preferring iOS at that moment (at the time of writing that is still the case); the projects were usually little apps and games which with lower budgets. Clients were really trying to figure out mobile still.

Fast forward a year, I got in touch with more long term mobile development; I was asked to develop the mobile applications on Android + iOS for a fintech startup. This would be a project of at least months to a year. The previous developers were gone (… no reasons given) and I was allowed to start from scratch, not using the code of the previous coders.

As we suddenly now had a bunch of clients lined up next to this one and I was the only coder, I had to find some way of doing this while we gathered stability to hire more developers and in some way that I would not burn out.

I was very fast at doing projects for iOS by that time, but my Android skills were lacking. It took me far too much time to do both of them natively at the same time, so I, early on, picked Xamarin to do the development. It would at least save me from doing double work on the core of the system; most of the logic could be reused and the code still compiles to the respective native platforms while the frontends are really platform specific.

As I was working on the fintech startup, I had to delegate work for other clients to a freelancer for the time being. I would lay the groundwork in the evenings while he would build the actual app and while I worked fulltime on the fintech apps.

That turned out to be hard; even the apps I was doing focused 100% on were quite hard to do on both platforms at the same time.

So I took a week off to think how to fix this without driving myself and the freelancer mental. The latter basically already happened and we were to blame for that.

One of the options was to just drop Android; for most clients, Android was an afterthought anyway. They designed everything for iOS and then said something like ‘yeah, and that then also for Android!’.

But I went for another solution, at least I decided to see how far I could get; on the laptop I brought were my projects for Xamarin iOS and the projects by my colleague as well. I decided, lead by these projects solely, to see if I could get them to compile and run on Android ‘well enough’ to give to clients.

Locking myself up for a few weeks to get that done was a lot of fun and in the end I hoped it would help clients.

And it did; the LoB (Line of Business) projects we had could be recompiled without issues. The more consumer focused ones could also but were not sell-able that way. Great for prototypes however to show how it will look if you would run it on Android functionally, and, as a practical side effect; clients without an iPhone or no interest in getting their UDID or jumping through Apple hoops could now immediately test the app at the same time as their colleagues.

We tried to get investment for the project for a short while as we noticed that especially Microsoft shops were very interested in it; the fact that they could dev LoB applications in C# on client and server for all platforms (we were going to create a Windows mobile version) by writing one frontend was attractive to them. Unfortunately we didn’t have the time to pursue it and just left it.

After Xamarin Forms emerged, our developers started using that and my proof-of-concept remains what it was; a proof-of-concept. After some legal fixes, I can now finally release the source code. Don’t mind the code too much; it was rapidly written as people were desperately waiting for me. Here you go; hope it helps someone.

 

Ignoring files in Webpack

People tend to whine a lot about the documentation of Webpack; while I agree that it could be better, the thing is open source so if you want to help out just do it! One question however seems to be very poorly answered on the internet and my colleagues (and others) keep asking it; how do you simply ignore files?

You might have seen tons of warnings like “You may need an appropriate loader to handle this file type.” popping up when you run Webpack and you might want to get rid of them without doing what Webpack suggests; add a specific loader for all of them.

While this might mean you need more studying of how to use Webpack, often people get blocked for hours or even days(!) by searching for a quickfix(-and-we’ll-change-it-when-needed); that quick fix is;


npm install --save-dev ignore-loader

after which you can add;


loaders: [
{test: /\.(jpe?g|png|gif|svg|map|css|std|indent|html|txt)$/i,
loader: 'ignore-loader'},

CR95HF.dll won’t load in Windows (8/10) 64-bit – System.BadImageFormatException

This goes for all non-managed DLLs which are 32-bit but have the .NET application loading them compiled with AnyCPU (and not x86).

If this message appears in the Event Viewer : System.BadImageFormatException related to a dll (in this case the CR95HF.dll for NFC) , download the Windows SDK for your Windows version. It will contain CorFlags.exe in \Program Files\Windows SDKs\Windows\v7.1\Bin\.

Simply set the header of the managed .NET .exe to 32bit;

\Program Files\Windows SDKs\Windows\v7.1\Bin\CorFlags.exe /32BIT+ YourApplication.exe

And try to run it again ; it likely will run without any issues!

 

 

 

 

 

Bad internet connections on the move or why web-only generally sucks

TL;DR Internet does still suck in most places, please make standalone apps for your products and services that work offline too.

An internet page through a bad connection

A web page view through a bad connection

A lot of software engineers seem to agree with the popular notion that all applications will be web based one day; I am one of them, but I am someone who thinks that won’t happen soon (not before 2020 anyway) for various reasons.

Going for full web based software vs native software (on phones, tablets but also on desktop OS’s) is less performant and, when you need to do a lot of productive work, just annoying. Even if the native software is not very well designed in all aspects; going from one task to another in a productivity optimised native app will just be faster to work with. From the app (mobile/desktop) design, development and user experience side, it is possible to really push the envelop when going native which is why almost all popular desktop and mobile phone applications are native. That is not why i’m writing this post however and (slightly) worse interaction is something I can live with. Although if I have to use something a lot, it starts to really get on my nerves (try the Elance app for instance…).

Most web sites/applications are written with using mostly server side code with a frontend in HTML, CSS & Javascript. Besides a bit of AJAX, sites and applications are generally not very resilient against bad internet connections. And why would they be; everyone has a great internet connection everywhere these days right?

I travel a lot these days; UK, NL, BE, PT, ES, US, DE and others and I always have a bunch of devices with me, including laptops, tablets and phones. People who adore and keep pushing web-only applications are usually living in dense regions like cities and many of the loudest proponents are in Silicon Valley or other tech areas. Obviously the internet  connection is good there. In the cities. A bit out of a lot of cities (Seattle, LA, London, NYC, Orlando, Madrid, Munchen, Faro…) the connection is (much) worse or does not work at all. Stepping a bit out of London, sometimes even the entire GSM signal is not enough to conduct phone calls on, let alone do any meaningful 3-4g work on. Around and even in Munchen I have a hard time finding a stable connection at all.  A top class business hotel in the center had paid internet wifi so bad that it wouldn’t even load Gmail properly. And this is not a one-off experience; it is common, very common in 2015 still. A normal web application would not really load, an AJAX web application would throw up all kinds of errors (Jira, Hipchat) while a modern web application, once loaded (or preloaded), will work fine. It amazes me that either people don’t travel at all or maybe do not use internet a lot when travelling and just shout ‘all can be web; it is fast enough!’ from their fiber glass internet connection equipped apartments… Not having access to internet is not even the biggest problem; a very unstable internet connection is as the latter is far more common.

When referring to a modern web application I mean applications which let you use all the functionality that could possibly be used offline, actually can be used offline. For instance, writing blog posts, commenting on something, rating something, registering worked hours, creating issues etc. Content that must be updated will have a warning that it is not up to date and you click / drag to try to refresh, or it refreshes when ‘enough’ internet connectivity has been detected.

When ‘the internet is back’, the data is synced with the backend and everyone can see what happened. This is a solution to resolve the bad or no internet issue and there are enough technologies to get this to work, like Meteor or PouchDB. They are quite new and that is something to be weary off, but client-server programming is not new (and has a lot of the same issues) so it’s definitely possible to get it working well offline.

It’s not only small companies who don’t have finances to create web applications like that either; the aforementioned Jira & Hipchat web applications have it and especially Jira should work offline. But they don’t even have an official native or otherwise mobile app.

Which brings me to the next point; you have to preload the web application to work when you are offline. That’s not very convenient; you probably thought ‘there will be connectivity everywhere! It’s JFK right?’ until the plane landed and you notice you couldn’t even download your cat’s homepage properly.

A solution which is web based is for instance the Chrome Web store which allows you to download a base packet of HTML5 code which runs when you click on it, even when offline. What happens after that depends on the creator of the application (as is always the case; unless you are using Meteor or something like that, it won’t automatically work offline).

Which brings me to the conclusion; if you want me (and many people I know with me) as long term client, you need to have a mobile app, preferably native, next to your web application(s) which can work both online and offline. I happen to pick airlines based on this, I don’t work with Elance anymore because of this, I pick products for internal company use but also personal use based on the quality of the web applications and availability, at least for key productivity tasks, of a solid mobile or desktop app, preferably natively written. I wish companies would look around more and notice that the largest landmasses of this earth do not have (stable) internet and that it is quite lame to not account for the large group of (travelling) people in those parts.

You want your clients to use your products as much as possible; you can make that happen by making sure there is a top notch experience on every device, under every circumstance. Take a lesson out of the Whatsapp book.