Rash thoughts about .NET, C#, F# and Dynamics NAV.


"Every solution will only lead to new problems."

Category Diverses

In dieser Kategorie sind Blogeinträge die nicht richtig in die anderen Kategorien einzuordnen sind.

Friday, 22. November 2013


FAKE 2.2 released

Filed under: Diverses — Steffen Forkmann at 17:06 Uhr

It’s a long time since the last major FAKE release and the community has contributed a lot of really cool features. This is so awesome and I want to thank all the contributors. You rock.

Today, I’m happy to annouce the FAKE 2.2 release. This release is really a very big change, so if you are still on FAKE 1.x there might be some problems for the upgrade. Feel free to contact me if you need help.

What’s new?

There is really a lot happening in this release so I want to talk about some of the improvements. Let’s start with the change of the project stucture. We separated the projects into different nuget packages in order to deploy a much smaller FAKE.Core package. These are the packages we have on nuget.

  • Fake.Deploy – allows to use FAKE scripts in deployment.
  • Fake.Experimental – exciting new stuff we want to try out and might want to remove again.
  • Fake.Gallio – contains the Gallio runner support.
  • Fake.SQL – Contains tasks for SQL Server.
  • Fake.Core – All the basic build features and FAKE.exe. If you only want the basic functionality then you would probably want to use this.
  • FAKE – Contains all the stuff above. We keep this package for compatibility.
FAKE.Deploy

As you can see the FAKE.Deploy package is now finally released. A big thanks to Colin Bull and all the others that are working in this area. See this tutorial for more information.

FAKE.Boot

Another interesting sub project is FAKE.Boot by Anton Tayanovskyy. It’s also released today. Read more about it in Anton’s blog.

New tasks

Of course we have plenty new tasks:

New globbing system

We (which means Colin 🙂 ) changed the implementation of the file scanning in FAKE. The original implementation was way to complicated and had tons of bugs in it. The new version is really elegant and only a fraction of the original code size. If you are interested in Functional programming check this out. It’s an interesting problem.

You will notice that a lot of the original file pattern functions are marked as obsolete. The file patterns implement IEnumerable, so you don’t need to use the “Scan” function any more.

What’s next?

I have some ideas how to reorganize the project and how to make it easier to debug build scripts. There are also ideas floating around how we can change the way FAKE bundles the FSI and but this still needs some time.

In the meantime we try to improve the existing tasks and continue to improve the documentation.

Up for grabs

The FAKE project joined the Up For Grabs project and I started to add tasks which are meant for new contributors to join the project. So if you want to get involved in FAKE then these might be interesting for you.

SemVer

I want to start using SemVer but I still have to figure out all the details of the new version number strategy. If someone has ideas about this then please let me know.

Monitoring external projects

Most of the tasks in FAKE are calling external tools. It’s very hard to test this properly so one approach is that FAKE is dogfooding the latest FAKE version to build itself. This ensures that most issues are catched very early. But of course FAKE’s own build script doesn’t use all the supported tasks.

In order to make FAKE more stable I want to monitor more external projects. So if you have an OSS project with a public CI build which is using FAKE then please let me know. I will try to maintain a list of these projects and will start to monitor if a new FAKE version would break these projects.

Go and grab the bits

Thanks again to all the 39 contributors – I thinks that’s an awesome number for an OSS  project that’s written in F#.

Friday, 4. January 2013


F# and Microsoft Dynamics NAV 2013 OData Services

Filed under: C#,Diverses,Dynamics NAV 2009,Dynamics NAV 2013,F#,Visual Studio — Steffen Forkmann at 13:52 Uhr

In my last post I described how we can access Dynamics NAV 2009 SOAP web services from F# and the benefits we get by using a type provder. Since version 2013 it’s also possible to expose NAV pages via OData. In this article I will show you how the OData type provider which is part of F# 3 can help you to easily access this data.

Exposing the data

First of all follow this walkthrough and expose the Customer Page from Microsoft Dynamics NAV 2013 as an OData feed.

Show the available companies

Let’s try to connect to the OData feed and list all available companies. Therefore we create a new F# console project (.NET 4.0) in Visual Studio 2012 and add references to FSharp.Data.TypeProviders and System.Data.Services.Client. With the following snippet we can access and print the company names:

As you can see we don’t need to use the “Add Service Reference” dialog. All service type are generated on the fly.

Access data within a company

Unfortunately Dynamics NAV 2013 seems to have a bug in the generated metadata. In order to access data within a company we need to apply a small trick. In the following sample we create a modified data context which points directly to a company:

Now we can start to access the data:

As you can see this approach is very easy and avoids the problem with the manual code generation. If you expose more pages then they are instantly available in your code.

As with the Wsdl type provider you can expose the generated types from this F# project for use in C# projects.

Further information:

https://frmedicamentsenligne.com
Tags: , , ,

Saturday, 12. December 2009


Christmas tree in F#

Filed under: Diverses — Steffen Forkmann at 12:19 Uhr

Today I had way too much time on the train 😉 , so I wrote a little functional christmas tree program:

let line width j =

  List.init

    width

    (fun i -> if abs(width/2 – i) <= j then "*" else " ")

 

let tree n =

  List.init (n/2) (line n) @        // treetop

    List.init 2 (fun _ -> line n 0) // trunk

 

let printTree =

  tree >> Seq.iter (Seq.fold (+) "" >> printfn "%s")

 

printTree 11

 

    *     
   ***    
  *****
 *******  
********* 
    *     
    * 
Tags: ,

Friday, 27. November 2009


Observing the FileSystem

Filed under: Diverses — Steffen Forkmann at 10:38 Uhr

The following class is a wrapper for the System.IO.FileSystemWatcher and converts the FileSystem events into observables. You need to download and reference the Reactive Extensions for .NET (Rx) to use this code:

public class FileSystemObservable

{

  private readonly FileSystemWatcher _fileSystemWatcher;

 

 

  public FileSystemObservable(string directory,

    string filter, bool includeSubdirectories)

  {

    _fileSystemWatcher =

      new FileSystemWatcher(directory, filter)

        {

          EnableRaisingEvents = true,

          IncludeSubdirectories = includeSubdirectories

        };

 

 

    ChangedFiles =

      Observable.FromEvent<FileSystemEventHandler,

                             FileSystemEventArgs>

      (h => h.Invoke,

       h => _fileSystemWatcher.Changed += h,

       h => _fileSystemWatcher.Changed -= h)

      .Select(x => x.EventArgs);

 

    CreatedFiles =

      Observable.FromEvent<FileSystemEventHandler,

                             FileSystemEventArgs>

      (h => h.Invoke,

       h => _fileSystemWatcher.Created += h,

       h => _fileSystemWatcher.Created -= h)

      .Select(x => x.EventArgs);

 

    DeletedFiles =

      Observable.FromEvent<FileSystemEventHandler,

                             FileSystemEventArgs>

      (h => h.Invoke,

       h => _fileSystemWatcher.Deleted += h,

       h => _fileSystemWatcher.Deleted -= h)

      .Select(x => x.EventArgs);

 

    RenamedFiles =

      Observable.FromEvent<RenamedEventHandler,

                             RenamedEventArgs>

      (h => h.Invoke,

       h => _fileSystemWatcher.Renamed += h,

       h => _fileSystemWatcher.Renamed -= h)

      .Select(x => x.EventArgs);

 

    Errors =

      Observable.FromEvent<ErrorEventHandler, ErrorEventArgs>

      (h => h.Invoke,

       h => _fileSystemWatcher.Error += h,

       h => _fileSystemWatcher.Error -= h)

      .Select(x => x.EventArgs);

  }

 

  /// <summary>

  /// Gets or sets the errors.

  /// </summary>

  /// <value>The errors.</value>

  public IObservable<ErrorEventArgs> Errors

           { get; private set; }

 

  /// <summary>

  /// Gets the changed files.

  /// </summary>

  /// <value>The changed files.</value>

  public IObservable<FileSystemEventArgs> ChangedFiles

           { get; private set; }

 

  /// <summary>

  /// Gets the created files.

  /// </summary>

  /// <value>The created files.</value>

  public IObservable<FileSystemEventArgs> CreatedFiles

           { get; private set; }

 

  /// <summary>

  /// Gets the deleted files.

  /// </summary>

  /// <value>The deleted files.</value>

  public IObservable<FileSystemEventArgs> DeletedFiles

           { get; private set; }

 

  /// <summary>

  /// Gets the renamed files.

  /// </summary>

  /// <value>The renamed files.</value>

  public IObservable<RenamedEventArgs> RenamedFiles

           { get; private set; }

}

Now we can use the observable and can easily create meta-events:

IDisposable writer =

    new FileSystemObservable(@"d:\Test\", "*.*", false)

        .CreatedFiles

        .Where(x => (new FileInfo(x.FullPath)).Length > 0)

          // … you can do much more with the combinators

        .Select(x => x.Name)

        .Subscribe(Console.WriteLine);

Tags: ,

Wednesday, 18. June 2008


Little Delay

Filed under: Diverses — Steffen Forkmann at 17:02 Uhr

Der versprochene Text verschiebt sich leider etwas, da hier im Hostel in NYC kein WLAN ist.

Korrektur: Im schönen Innenhof ist welches. 😉

Korrektur 2: Das WLAN ist wie ein Blinker. An – Aus – An – Aus …

Monday, 18. February 2008


Musikempfehlung: The Nickajacks

Filed under: Diverses,Veranstaltungen — Steffen Forkmann at 18:12 Uhr

An dieser Stelle mal ein kleiner Musiktipp: “The Nickajacks”

The Nickajacks

Bandmitglieder

Matthias Starch – drums
Sven Schmidt – vocal & guitar
Holger Kallenbach – bass

http://www.myspace.com/thenickajacks  (Mit Hörproben)

http://www.thenickajacks.com/

Tags: , ,

Saturday, 17. November 2007


Xda Orbit 2 (HTC Touch Cruise) kommt wohl Anfang Dezember

Filed under: Diverses,Steffen,Windows Vista — Steffen Forkmann at 10:14 Uhr
Mein guter “alter” HTC Artemis

O2 XDA orbit 1Vor gut einem Jahr habe ich mir bei der Vertragsverlängerung von O2 den Xda Orbit (HTC Artemis) zugelegt und kurz darauf einen Erfahrungsbericht dazu gebloggt. Bisher war ich eigentlich immer zufrieden mit dem Gerät. Kleinere Baustellen wurden im laufenden Jahr auch schon behoben.

Seit dem Update auf Windows Mobile 6 freue ich mich über die Vista ähnliche Oberfläche, mein TomTom 6 hat nun endlich eine vernüftige Kartenbasis und für mein MobileOffice habe ich mir endlich eine 2GB Speicherkarte geleistet.

Der Neue von HTC

Mittlerweile wurde jedoch der “Xda Orbit 2” auf Basis des HTC Touch Cruise angekündigt. Das Nachfolgemodell soll neben einem schnellerer Prozessor (Qualcomm – 400 MHz) auch eine bessere Kamera (3,0 MegaPixel) besitzen. Das sind zwei nette Punkte, die mich an meinem Gerät eigentlich nicht gestört haben, aber das beste kommt noch: Das neue Gerät soll UMTS-fähig sein (mit HSDPA) und auch die TouchFLO-Oberfläche besitzen und mit dem “Genion L”-Tarif angeblich nur 99,- kosten.

Damit ist es das erste SmartPhone, das alle meine (Handy-)Wünsche auf einmal erfüllen kann (GPS mit TomTom, WLAN, UMTS, Windows Mobile 6, .NET Compact Framework, Mobile Office, ActiveSync, …) und mit dem Preis ein echter iPhone-Killer.

Ich fürchte ich muss zu Weihnachten mein Handy tauschen. 😉

Tags: , , , , , , , , , , , , ,

Tuesday, 18. September 2007


CLIP-Mitgliedschaft

Filed under: Blogs,Diverses,msu solutions GmbH,Navision — Steffen Forkmann at 18:37 Uhr

Ich freue mich bekannt geben zu können, dass der Navision Blog ins Microsoft “Community Leader/Insider Program” (CLIP) aufgenommen wurde. Das ist eine große Ehre für uns und auch eine weitere Motivation wieder intensiv über Dynamics Nav Themen zu bloggen.

CLIP-Mitgliedschaft

Tags: , , , , ,

Monday, 20. August 2007


Zitat des Tages

Filed under: Diverses,Lustiges — Steffen Forkmann at 12:14 Uhr

“When you have garbage in your hand, fold faster than Superman on laundry day.”

Pokerweisheit

Friday, 13. July 2007


Das Auktionshaus tencents.de – Die neue Geldmaschine

Filed under: Diverses,Steffen — Steffen Forkmann at 10:19 Uhr

Vor kurzem bin ich durch eine Spam-Mail auf das neue Auktionshaus tencents.de aufmerksam geworden. Tencents wirbt mit preiswerten Artikeln die teilweise über 70% Ersparnis gegenüber dem Originalpreis bringen. Bei manche Auktionen wird dem Gewinner sogar der gesamte Preis des Artikels erlassen – z.B. aktuell bei einem FlatScreen-LCD-TV. Also wie rentiert sich dieses Auktionshaus trotzdem? Die einfache Idee ist Geld für jedes Gebot zu verlangen.

Gebote werden immer in 10 Cent Schritten abgegeben und für jeden Bietvorgang muss man ein vorher erkauftes Gebotsrecht einsetzen. Das bedeutet: Wenn ich den LCD-TV geschenkt bekommen möchte, dann muss ich das letzte Gebot erhalten und die Auktion gewinnen. Damit ich bieten kann muss ich mir vorher ein Gebotsrecht kaufen. Soweit so gut. Nachdem ich jedoch mein Gebot abgegeben habe, verlängert sich die Auktion um eine Minute. Damit bekommen andere wiederum die Möglichkeit Höchstbietender zu werden. Im konkreten Fall des Fernsehers bedeutet das, dass die Auktion schon mehrere Tage lang immer wieder um 60 Sekunden verlängert wird – bis jetzt wurden 11818 Gebote darauf abgegeben.

Gebotsrechte kann man z.B. im 20er Pack kaufen – für satte 9,90 Euro. Das heißt für jedes 10 Cent Gebot verdient der Seitenbetreiber 50 Cent. Wenn der Einkaufspreis des LCD-TV erreicht ist, hat tencents.de schon das fünffache an Gebotsrechten eingenommen – momentan sind das 5909 Euro. Das ist eine unglaubliche Gewinnspanne.

Da bleibe ich doch lieber bei den bekannten Wegen und kaufe bei den etablierten Warenhäusern wie Amazon. Dafür gibt es wenigstens auch Gutscheine – wie aktuell z.B. von coupondeal.de.

Tags: ,