Learning Visual F# 4.0 (Foundations) (Volume 2)

Chris M. Shattock

  • 出版商: CreateSpace Independ
  • 出版日期: 2016-09-24
  • 售價: $1,890
  • 貴賓價: 9.5$1,796
  • 語言: 英文
  • 頁數: 742
  • 裝訂: Paperback
  • ISBN: 1537312022
  • ISBN-13: 9781537312026
  • 相關分類: F#
  • 無法訂購

相關主題

商品描述

Learn F# as a general-purpose programming language in a number of business oriented scenarios whilst making use of the .NET Framework and the Community Edition of Visual Studio 2015.

The book, in two volumes with 62 hours of accompanying videos, concentrates upon learning the language using what many would call “real world” examples. The intent is that an inexperienced programmer, or one who has little exposure to application development, can gain a sound understanding of the primary concepts and usage of F# in generalised application development scenarios.

Further information and sample content/videos at http://vfsfoundations.com

We continue the theme of Volume I in the consideration of resources generally - rather than just as a vehicle for the internationalisation of software. Firstly we cover a variety of techniques used in the chaining and composition of functions and how we can use such to greatly simplify the process of exception control. We then tackle the issue of instrumenting an application by using the Windows core facilities of Event Tracing and thence Performance Monitoring. Event Tracing for Windows (ETW) is a fundamental tool in error management and the tracing of programme execution whilst also facilitating the reporting of auditing and diagnostic information. Building these features into an F# library allows one to progressively exploit F# functionality by the reconsideration of code originally crafted in an object-oriented and/or imperative manner. We also find that, with minimal effort, we can subsequently extend our tracing modules to incorporate the use of Windows Management Instrumentation (WMI) Performance Counters.

With the thereby accumulated F# expertise we then consider the subject of F# Type Providers - we demonstrate a trivial Type Provider to expose its methodology and then code three Type Providers to deal with the business of exposing configuration settings to a runtime assembly; the extraction of resources from an assembly to further address an application's needs in both accessing and using one's own WPF and/or third party libraries for presenting a rich user interface via F# and, finally, an external, Xml based alternative to using the .NET RESX methodology in providing internationalisation of resources for an application.

In the closing sections we undertake the building of a core assembly that consolidates our accumulated F# knowledge to expose a common range of functionality to referencing applications. With this core assembly we then implement a dynamic programming interface as a converse of the configuration settings Type Provider and then create such dynamic data access mechanisms whilst incorporating instrumentation through event logging and performance monitoring, as potential alternatives to the developed Type Providers for accessing an assembly's resources and providing internationalised resources for referencing applications.

We therefore progressively cover introductory overviews through to practical implementation of topics that span F# features such as the use of Agents and Mailbox processors; asynchronous and parallelisation of units of work; full and partial function composition; integration of Event Tracing for Windows and WMI Performance Counters; the building, use and extension of Xml schemas to support data integrity requirements; creating a NuGet package and an API Reference of an F# project using the Sandcastle Help File Builder; basic Type Providers and the use of typed and un-typed Quotation Expressions; Observables and Observers; using typed Quotation Expression to extended the reporting of diagnostic information whilst also permitting the runtime logging and tracing of applications and their performance monitoring without the need for runtime administrative authority.