~/writing / tags / DotNet

#DotNet

31 writings

F# 8: Unwrapping New Features and Nostalgic Connections

I walk through two F# 8 changes: omitting fun in member-access lambdas and updating nested records with concise syntax. I pair each feature with an older library approach, including FSharp.Core.Fluent and FSharpPlus lenses.

4 min773 words

Plotly, F# and Response of India to Covid Crisis

In this F# Advent post, I use Plotly.NET and FSharp.Data in a Dotnet Interactive notebook to chart Indian COVID cases and weekly vaccinations. I combine the series and read the chart as showing cases falling as vaccination increased.

4 min616 words

Machine Learning Monday

After a poll, I chose the then-new ML.NET 0.6 for a possible F# machine-learning series. This first post lists questions I still had about its internals, GPU support and comparison with Keras, and mentions my small cleanup pull request to the samples.

2 min342 words

Azure web sites with Paket

I use Paket for these small Azure Website experiments. Add a .deployment file that calls build.cmd, then bootstrap Paket, restore packages, build with MSBuild, and copy the output to the deployment target.

2 min385 words

Functional Strategy Pattern

I compare the strategy pattern in C# and F#, using functions as strategies in the F# example. The point is that a function can be passed directly where the C# version uses a class-based strategy.

2 min359 words

Functional Singleton Pattern

I show the Singleton idea with C# and F# examples, while admitting I have used it without knowing where it belongs. I question its role in functional code, where data types often do not carry behavior.

2 min316 words

Functional Factory Pattern

I use C# and F# examples to consider how the factory pattern’s object-creation role maps to functional code. I suggest F# option types as one way to represent products and ask readers to review the examples.

2 min264 words

To Xamarin with Love

After a difficult experience with Android Java, I compare event-handling examples in Java, C#, and F# for Xamarin Android. I argue that language choice affects the coding experience and leave Xamarin.Forms and ReactiveUI out of the comparison.

3 min556 words

Web programming and F# still a Far Cry?

In this 2014 account, NuGet updates fail on my F# templates, Paket later hits project-file problems, and Azure deployment still needs a workaround. After more than seven hours trying to get Hello World running, I put C# in the front end and F# in a library so I can get back to coding.

3 min511 words

My broken marriage with C# and extramarital affair with F#

I use a relationship metaphor to describe growing attached to F# while continuing to work with and respect C#. My milestones include running F# on Heroku, joining its community, and contributing templates and web examples; F# is my first choice when possible.

4 min607 words

SignalR + Servciestack with F# hosted on Azure

I combine ServiceStack and SignalR in an F# project using an OWIN startup class, then describe the Azure deployment problem that led me to remove global.asax.fs. The services run side by side, but the post does not make the web service itself real-time.

3 min512 words

Xamarin Studio 3 - First Look

I give my first impressions of Xamarin Studio 3: debugging seemed more stable, F# had first-class support, and the designer and Xamarin.Forms caught my attention. I still had an Android/F# error on my machine, so this is an early reaction rather than a report that everything worked.

2 min224 words

Thanks to wonderful community

I trace how Rob Conery’s talk changed how I learned, then thank the open-source projects and F# people who helped me. The names include ServiceStack, NancyFX and several community members; I also credit the software behind this blog.

4 min715 words

SignalR + Nancy with F# hosted on Azure

I combine Nancy, OWIN, SignalR, and F# to make a chat application, then describe the project-file imports needed for Azure deployment. I also point readers to a GitHub repository and a deployed sample.

5 min824 words

Servicestack F# template. Starting from the Start

This is my step-by-step setup for ServiceStack V4 with F# in an empty ASP.NET project: remove the C# files, add an F# AppHost and service, then add Razor views. It reflects the V4-era package and project setup described in the post.

5 min848 words

When Servicestack meet F# via Side Waffle

I describe making ServiceStack F# templates, including a two-week ASP.NET hosting bug caused by copying self-host code and the crude copy-paste workaround I used to get a template working. The post later updates readers that V4 and an ASP.NET host were available.

4 min699 words

Asp.Net MVC5 with F#

The post introduces the then-new pure F# MVC5 template, replacing the older split C#/F# project layout. I plan to start with C#-to-F# syntax comparisons before making the examples more functional.

2 min297 words

Getting started with Functional web

I introduce a planned functional web-development series, starting with F# templates for ServiceStack, Nancy, Simple.Web, and MVC/Web API. I also point readers toward Scala and Clojure options and learning resources.

3 min549 words

Functional Programming Need in Web Development

I argue that functional programming deserves a place in web development as projects and user bases grow. I offer immutability as one way to reason about shared state and introduce a planned series focused mainly on F#.

3 min402 words

Functional Programming, How I started and Why?

I explain how I got into functional programming and why I chose F#, drawing on my earlier work with data and numbers. The post argues that functional ideas deserve a place in how we teach programming.

4 min610 words

Why Ruby on Rails in not only for Ruby on Rails Developers?!

As a .NET developer, I argue that Rails is worth learning for its conventions and the starting point it gives MVC newcomers. I credit Rails with helping me organize ASP.NET MVC code, while noting that the Rails approach is not a silver bullet for every service.

4 min688 words

Entity Framework Upside Down

I argue that using Entity Framework only to map a database misses features it provides, and that production use needs more thought than copying a demo. I offer a caution about the tool, not a recipe for one “right” way to use it.

3 min420 words

Something Never Changed!!! Guiding Principles to Software Development

I adapt Scott Hanselman and Patrick Cauldwell’s older software principles for the .NET tools I knew at the time. The list covers testing, automation, dependencies, persistence, assemblies, public APIs, authentication and what I considered done; it is explicitly a personal selection.

8 min1,527 words

Moving away from OOP

I look back at a C# project that grew to 14,000 lines when I wrote it as a mass of functions, then fell to 700 after I reorganized and optimized it. That experience was my first practical lesson in OOP; the rest points readers toward design patterns.

2 min290 words

Massive Effect

I introduce Massive through the question of why to use a Micro ORM, then explain why I often prefer writing SQL when ORM abstractions still leave me debugging generated queries. The post includes a brief Massive example and a personal case for separating database models from view models.

8 min1,568 words

Arrival of David aka Micro Orm

After weighing ORM productivity against performance, I turn to ServiceStack OrmLite and show its POCO mapping, table creation, CRUD operations, and transactions. Dapper and Massive provide context, but most of my walkthrough is about OrmLite.

8 min1,402 words

Going to Vietnam Because of ORM

I use a hypothetical large application to show how one Entity Framework model for over 1,000 tables could become slow and hard to maintain, then suggest splitting it by module. I argue that ORM-generated SQL can cost more time to inspect and tune than it saves in a high-traffic system.

5 min901 words

Map your self using ORM

I introduce ORMs through an Entity Framework example: mapping Northwind, scaffolding a repository and MVC controller, and handling CRUD without writing connection and command code. I also mention Orchard, which uses NHibernate, as a favorite for a later article.

6 min1,169 words

Nuget mall of OSS

I point .NET developers to NuGet as a way to find and install open-source packages. Knockout.js, Ninject, MEF and jqGrid are a few things I discovered there; the post sticks to NuGet rather than linking each project separately.

1 min196 words

Test your self before test your code

Before writing tests, I say, decide what behavior you want to check; then I demonstrate Visual Studio's generated unit tests for integer, float, and object-array addition. I also argue that unit tests are the developer's responsibility, unlike clicking through the application.

6 min1,172 words

Search the site