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.
WebSharper official documentation can be found here http://websharper.com/docs/resources. The doc focus more on how to reference resources for Sitelets
so today, I will explain how you can reference your own js
and css
file and explore the different ways available to make the SPA
of your dreams.
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.
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.
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
.
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!
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
.
Last week I talked about how I used Deedle to make some basic statistics on my expenses. Using my bank statements, I showed how to categorize, group, sum and sort expenses in order to have a better view on where the money goes. It was helpful but I realised that instead of checking each transaction from the bank statement, it would be better to track individual item purchased. A lot of expense trackers work this way. We need to input every expense one by one manually. It takes a lot of time which is why I always ended up not using them. I needed to find a faster way.
The first time I encountered Deedle was from @brandewinder’s book Machine learning projects for .NET developers. Deedle is a library which facilitates the manipulation of data frames and data series.
Yesterday, a friend of mine asked me what was the easiest way to get started with F# on Mac. I pointed him to http://fsharp.org/use/mac/ which gives multiple options to install F# on Mac but it doesn’t contain the option of using VSCode with Ionide. Since I think it is the most straight forward way to have an environment setup to use of F# rapidly especially when someone wants to just have a quick look, I decide to write a blog post to go through the installation step by step.
Lately I’ve seen a lot of posts about burnout in the the Software industry blogs. Burnout refers to the lost of motivation, hopelessness at work or life, and lost of interest in anything. Stress and anxiety are symptoms which can lead to it.
When I first started to play with WebSharper, everything was nice and clean. I was coding in my own world/sandbox/project whatever you want to call it.
But the thing is that most of the time, we don’t start from empty, blank project. What we do instead, is that we write code which integrates with an existing application.
I was lucky enough to work on a project with a backend written in F# with a Domain
library containing all the application domain written in F# as well.
Few weeks ago I covered how to use external JS libraries with WebSharper.
I explained how we could integrate taginput
which is a cool library that allows us to use tags in our webapp.
It was used with JQuery and I showed you how we could extended WebSharper JQuery and add taginput
functionalities.
Lately I’ve been very happy about how WebSharper.Warp
allows me to iterate quickly and without pain.
Last week, I covered how we could use WebSharper.Warp to build prototypes quickly. Check it out if you haven’t read it yet.
Today, I decided to explore how WebSharper.Warp actually works behind the scene.