From Scrape To API

Intro Retro

Converting Scrape Data to Api

Introduction

TLDR If you prefer just code reading like me, you can skip to the repo

One of the somewhat mundane but necessary tasks in programming is to get data from externa Web sites (a.k.a Web Scraping) and store in easy to use format. These raw data when format properly can be consumed by multiple type of client through Api endpoints.

Since my planned advent of calendar post is not working as I plan. I will challenge myself to see if I can really use F# proficiently or not.

[]

Authentication With Json Web Token

Happy New Year 2023! I finally have time to write this post. And it’s the post, I am eager to write the most. Of all the resource in Safe stack, I found that authentication and authorization is the less well-known one.

Be it no more. In this post, I will show step by step how I create authentication with Jason Web Token (JWT) in Safe stack. The next post will be authorization.

[]

From Single to Multiple Pages in SPA

Introduction

Supporting multiple pages is one of the obstacle I found when using safe stack. I think it might be the nature of single page application. It’s like we are trying to fight against simple server side rendering somehome. Anyway, I will try my best to write this post in step by step manners. So everyone will understand.

There are quite a few tutorial on adding multi-page support for safe stack platform. Most of them will focus on using propagate message from parent page to child pages.

[]

Persistence (Almost) Ignorance

Floppy Disks Image

Old School Persistance Style

Welcome back to my building webapp with f# series. Last week, I was kinda exausted from writing and capturing the screenshot for the safe stack post. So this week, we will do something simple. We will not add any new functionality. We will do following things.

  1. Extract Persistence Layer
  2. Implement new NoSQL storage
  3. Create Storage class library

Why Persistance Ignorance?

If you know about Domain Driven Design already, you could skip this section. But if you don’t, please keep along. The concept of this is that the persistence storage should not interwind with the Core Domain logic. You should be able to switch and change persistence technology as you see fit in which you’ll see in this post.

[]

From Domain to Web with Safe Stack

Hi there. Welcome back to my F# web app development series. Just to recap for new people, we are going to create construction cost tender estimation (CoCoTender) using f#. If you are interested in the domain, you can read the past posts in the series. For this post, we wil emphasize how to connect the domain to web app using safe stack. So there is no need to understand the whole domain concept.

[]

Unit Testing and Console Application

Good day. Sorry, I am back after busy weeks. To bring back our past weeks, we did finish domain modeling in fsx file.

This week we will start touching the road. We create class library from our script file, do unit testing for our library, and finally let the client test our functionality with our console application.

So many things to do in this post, let’s start…

Class Library

Since we are going to create real application this time, we should create our solution before creating any project. I like to use command line so I follow script from Ian Russel as follow:

[]

Domain Modeling With F#

Welcome back. Today, I am going to explain the project we are going to created, discuss all the requirements with imaginary domain experts, list all the use cases, and (finally) model the domain in F# code.

Construction Cost Estimation Project

All the construction in the world, be it buildings, dams, roads or bridges. How small or large are they. All of them, starts with architecture blueprints.

No matter how beatutiful the blueprints are, the only thing matters are how much the budget is needed for that construction. This is very important since most of the owner of the building do not build the building themselves. Instead, they need to announce the project for the contractors. Each contractor need to bid in order to win the project.

[]

Build Webapp with F# Series

Hello, there. My name is Teerawat Wuttiwat. A programmer who likes to work with functional programming.

Background

Recently, I did have a chance to build webapp using any tech stacks I prefer. Since the stack require using Microsoft SqlServer and dotnet framework. and I am bored with C# programming. For your knowledge, I did program in C# since dotnet start. Basically, it is over 20 years ago. So I decide to bite the bullet and pick F#.

[]