Aug 16, 2016

Object Oriented Programming In Fsharp

Even though F# is a functional language, it also provides way to build application in a object oriented way. When interacting with C# libraries, it is very useful since C# is object oriented by nature. Today I would like to show you how you can define and build classes in a object oriented way.

FSharp

Aug 10, 2016

Understand Xamarin Forms Data Bindings

In Xamarin.Forms, interactions with buttons, labels, lists and all other controls are done via data bindings. Data bindings is one of the core component of the MVVM pattern (model - view - viewmodel). It provides a way to isolate model - view - viewmodel and therefore allows them to be swapped independently (for example for UI changes by swapping with another view or for testing purposes by swapping the viewmodel).

FSharp

Aug 02, 2016

Websharper Ui Next Template

WebSharper.UI.Next comes with a simple template engine which can be used to build doc elements. It is built using a F# typeprovider therefore gives typesafety for templating. If you never used WebSharper or WebSharper.UI.Next before, I published a tutorial few months ago on how WebSharper works and how you can use it to create SPA’s https://kimsereyblog.blogspot.co.uk/2015/08/single-page-app-with-websharper-uinext.html. WebSharper official documentation can be found here https://github.com/intellifactory/websharper.ui.next/blob/master/docs/Templates.md.

FSharp

Jul 26, 2016

Gradient Descent

The advantage of tracking your expenses is that you can compare each month and check if you saved more or less money than the previous month. Another interesting information is to know how fast you are spending your money. Checking how fast you spend your money gives you a hint on whether you are likely to be out or within budget at the end of the month. The easiest way to check that is to plot the daily cumulated sum of your expenses and compare each month. I have been doing this for the past few months and it worked pretty well but I realised that the cumulated sum is not always nice to look at. It looks like incremental steps which is not so pleasing to the eye.

FSharp

Jul 19, 2016

Setup Output Folder For Websharper Projects

There are part of software development which aren’t very exciting. Setting up output directories is one of them. But we have to go through it because having a well defined output structure helps tremendously when time comes to deploy and publish an application. When using the default template from WebSharper, it could be confusing how and where binaries goes when build the application. In fact choosing between Debug and Release make no difference, it all goes under the \bin folder.

FSharp

Jul 12, 2016

Manage Mutable State Actors Mailboxprocessor

Today I would like to share a technique that I use to maintain mutable shared state in my F# applications. This technique uses the MailboxProcesser, a simplified implementation of the actor model built into F#. Here’s the issue: I have a dataframe shared accross my whole application. The dataframe is constructed at bootup of the server which makes the application not scalable as to reconstruct the dataframe, a reboot is needed. The solution would be to provide a way to mutate the dataframe any time I need to. But mutable state involves concurrency issues and that’s where the MailboxProcesser comes to the rescue.

FSharp

Jul 05, 2016

Example Application Websharper

From time to time I get asked, why do you use WebSharper? A legitimate question as from the abundance of libraries, tools and frameworks available, one might think that WebSharper + F# is just another hippie stack.

FSharp

Jun 28, 2016

Deedle Primer Part2

Today, I would like to show more functionalities of Deedle and how they can be used in a real life scenario. If you never heard of Deedle before, you can find A primer on Deedle (Part 1) here. In real life, data rarely (if not never) come in a format exploitable for analysis therefore, a first step of manipulation of data is always needed before analysis.

FSharp

Jun 21, 2016

Ui Framework Websharper Spa Paket

Have you ever been guilty of referencing Bootstrap in your web app just to use one feature (like the navbar for example)? Hunting for the most full featured CSS/JS UI framework for hours. Referencing a huge framework just to use one or two features. Bootstrap, Foundation, MUI or Materialize, there are so many that it takes a lot of time to find the one that fits your needs. Few months back, I started to build a prototype to manage expenses and all I needed was a navbar and a card style. Because of bad habits, I directly started to hunt for a UI framework which would provide me beautiful cards. After few hours of search, I realised how time consuming that was and most importantly how unlikely would it be for me to find something tailored for my needs. So I decided to do something that I should have done long ago - Build my own tailored JS/CSS UI framework.

FSharp

Jun 07, 2016

Sqlite

For the past few days, I have been writing a lot of SQL queries to query SQLite databases. I had to extract data for reporting purposes from SQLite databases where simple SELECT-FROM-WHERE queries weren’t enough. From this experience, I learnt few tricks that I am sure some of you will be interested in. So today, I will list it all in this blog post.

May 31, 2016

Package Websharper To Mobile App

With WebSharper, it is easy and quick to build Single Page Applications (SPA) in F#. If you followed my blog, you must have noticed that I regularly post about WebSharper functionalities. Building a SPA using F# is one of the reason why I started to look into WebSharper. It is also the subject of one of the first blog post I wrote.

FSharp

May 23, 2016

Inlinve Versus Direct Websharper

In WebSharper, there are two keywords to bind JS code to our F# code - Direct and Inline. The documentation about the attributes can be found here http://websharper.com/docs/translation. I have demonstrated the use of it in previous blog posts: External JS library with WebSharper in F#, Sort, drag and drop in UI Next with Sortable. Although the documentation has some explanation about it, I still feel like it is pretty vague. So today I would like to give more explanation about the differences between Direct and Inline.

FSharp

May 19, 2016

Setup Android Xamarin Forms Fsharp

Sometime setting up a development environment is enough to discourage developers to experiment certain platforms. Most of us (if not all of us) in .NET already heard of Xamarin. But to start working on Xamarin, you need to setup an Android VM and setup the IDE in order to deploy on the Android VM. And it gets worse if, like me, you run Windows on VMWare on OSX (and you want to code in F#). Few months back, Xamarin was kind of a no-no for indie development due to the pricing. But since it merged with Microsoft, it is now free!

FSharp

May 11, 2016

Deploy Websharper Selfhost

Last week I talked about how to read text from an image using a OCR library. I explained the whole process of creating the web app but I omitted to explain the deployment to Azure. So today I would like to fill this gap by showing you how I deployed the selfhosted web app on Azure. This web app makes use of the WebSharper selfhost template which is composed by a WebSharper sitelet mounted on a OWIN selfhost.

FSharp