Phillip Trelford's blog articles

0
comment
on 2/20/2013 9:08 AM
On Tuesday I did a lightning talk at the MVP Summit in Bellevue on connecting to all things, from statistics to statistical programming languages with Intellisense and LINQ using F# Type Providers, a feature shipped with Visual Studio 2012:   Connecting to an Excel file: Querying users stored on SQL Azure: query { for u in db.Users do where (u.UserId <> userId) select u } Querying genres via the Netflix API: query { for g in ctx.Genres do where (g.Name = genre) for t in g.Tit[...]
>> Read the full article
.
0
comment
on 2/12/2013 11:43 PM
Foq is an open source .Net mocking library with a familiar fluent API for Moq users that lets you setup mock object using either LINQ or F# Code Quotations. Moq was developed to take advantage of .Net 3.5 LINQ expression trees and C# 3.0 features. Foq has been designed to provide first-class support for users of both C# and F#. C# users can use the LINQ API while F# users can choose between the LINQ API and Code Quotations. We use F# as a unit testing language at work and Foq for mocking code written in bo[...]
>> Read the full article
.
0
comment
on 1/26/2013 5:27 PM
F# 3 has LINQ expression support built-in just like C# and VB.Net. Prior to this basic LINQ expression interop could be achieved with the F# PowerPack and F# Code Quotations. F# 3 LINQ support opens up APIs that use LINQ expressions like Moq, a popular .Net mocking library. With some minor workarounds Moq is relatively easy to call from F#. C# Moq example: var mock = new Mock<IFoo>(); mock.Setup(foo => foo.DoSomething("ping")).Returns(true); F# requires a type annotation: F# requires the return va[...]
>> Read the full article
.
0
comment
on 11/21/2012 2:24 PM
I’ve found writing unit tests in F# very productive, with it’s terse syntax and powerful type inference. I write F# tests against C# and F# implementations. Writing tests in F# can be a good introduction to the language and this is something we do on our team. To get up to speed quickly you’ll typically want a familiar unit testing framework and mocking library syntax. F# code works with all the popular open source .Net unit testing frameworks: NUnit xUnit mbUnit …it also works with Micro[...]
>> Read the full article
.
0
comment
on 11/4/2012 4:03 PM
First things first, a big thanks to the team at Skills Matter particularly Wendy and Anaïs for making this event happen. This year the tutorials were held over 2 days in the atmospheric Crypt in Clerkenwell: Expect a return next year in London and New York. Day 1   Practical Functional-first Programming with F# Friends don't let friends use null An outstanding keynote from Don which built on the talk he gave at the Progressive .Net Tutorials earlier in the year, stacked full of nuggets.[...]
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper