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

Chris M. Shattock

  • 出版商: CreateSpace Independ
  • 出版日期: 2016-09-24
  • 售價: $2,220
  • 貴賓價: 9.5$2,109
  • 語言: 英文
  • 頁數: 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.

商品描述(中文翻譯)

在使用.NET Framework和Visual Studio 2015的Community Edition的情境下,以一個通用的程式語言F#學習商業導向的場景。這本書分為兩卷,附帶62小時的相關影片,著重於使用許多人稱為「真實世界」的範例來學習語言。目的是讓一個沒有經驗的程式設計師或者對應用程式開發沒有太多接觸的人能夠對F#的主要概念和在一般化應用程式開發場景中的使用有一個扎實的理解。

更多資訊和範例內容/影片請參考http://vfsfoundations.com

我們在第一卷的主題中繼續考慮資源的使用,而不僅僅是作為軟體國際化的工具。首先,我們介紹了在函數的鏈接和組合中使用的各種技術,以及如何使用這些技術來大大簡化例外控制的過程。然後,我們解決了使用Windows核心設施的事件追蹤和性能監控來儀器化應用程式的問題。Windows事件追蹤(ETW)是一個在錯誤管理和程式執行追蹤方面的基本工具,同時也方便報告審計和診斷資訊。將這些功能建立到一個F#程式庫中,可以通過重新考慮最初以面向對象和/或命令式方式編寫的程式碼,逐步利用F#功能。我們還發現,只需很少的努力,我們就可以擴展我們的追蹤模組,以包含使用Windows管理儀器(WMI)性能計數器。

憑藉這樣累積的F#專業知識,我們接著考慮了F#類型提供者的主題-我們展示了一個簡單的類型提供者來公開其方法,然後編寫了三個類型提供者來處理將配置設置公開給運行時組件的業務;從組件中提取資源以進一步解決應用程式在訪問和使用自己的WPF和/或第三方程式庫以通過F#呈現豐富用戶界面的需求;最後,使用基於Xml的外部方法來提供應用程式的國際化資源,而不使用.NET RESX方法。

在結尾部分,我們建立了一個核心組件,將我們累積的F#知識整合起來,以向引用應用程式提供一個共同的功能範圍。有了這個核心組件,我們可以實現一個動態編程介面,作為配置設置類型提供者的相反,然後創建這樣的動態資料訪問機制,同時通過事件記錄和性能監控進行儀器化,作為訪問組件資源和為引用應用程式提供國際化資源的潛在替代方法。

因此,我們逐步涵蓋了從入門概述到實際實施的主題,這些主題涵蓋了F#的各種功能,如使用Agents和Mailbox處理器;工作單位的異步和並行處理;完整和部分函數組合;集成Windows事件追蹤和WMI性能計數器;建立、使用和擴展Xml模式以支援資料完整性需求;使用Sandcastle Help File Builder創建F#專案的NuGet套件和API參考;基本的類型提供者和使用類型和非類型引用表達式;可觀察對象和觀察者;使用類型引用表達式擴展診斷資訊報告等。