Recursive Pure Functional Transforms Series
ReturnThis page contains links to all of the screen-casts in the screen-cast series on Recursive Pure Functional Transforms.
Many developers may already be familiar with certain aspects of functional programming. If you are one of those developers, feel free to skip those screen-casts that cover material that you already know, and continue watching at the point in this screen-cast series where you are not familiar with the content. This screen-cast series is oriented towards a typical object-oriented developer who has not had exposure to functional programming. The goal is to go from OO all the way through to writing recursive pure functional transformations, so it is necessary to cover such topics as lambda expressions, closures, and extension methods.
Also, two of the screen-casts in this series cover the semantics of XML in depth. If you are an XML expert, you can skip the screen-casts on XML. However, if you are not absolutely clear on namespaces, syntax for namespaces, default namespace semantics, data-centric vs. document-centric XML, mixed content, and the XML infoset, you may want to view the screen-casts on XML.
1 | Introduction to Recursive Pure Functional Transforms | This screen-cast introduces the series, and demos some concrete examples of recursive pure functional transforms. Watch this first. |
2 | Primary Usage Scenarios (Part 1) | This screen-cast discusses the primary scenarios for Recursive Pure Functional Transformations. It demonstrates some rudimentary transforms, and shows a few of the ‘transformation operators’ that you will use in a pure functional transformation. |
3 | Primary Usage Scenarios (Part 2) | This screen-cast continues with demonstrating some rudimentary transforms, and shows more of the ‘transformation operators’ that you will use in a pure functional transformation. |
4 | Lambda Expressions | This screen-cast covers lambda expressions, which are a necessary language feature to know in order to write recursive pure functional transformations. |
5 | Closures | This screen-cast covers closures, which is another necessary language feature to know in order to write recursive pure functional transformations. |
6 | Laziness and Eagerness | This screen-cast covers the idea of laziness, and its opposite, eagerness. It is necessary for you to understand these concepts in order to write transformations that perform well. |
7 | Extension Methods | This screen-cast covers extension methods. Extension methods enable us to write queries in a more natural fashion. |
8 | Functional Purity | This screen-cast covers functional purity. Functional purity is a must in order to write reliable, robust, debuggable, readable, and understandable functional transformations. |
9 | XML – Part One of Two | This screen-cast and the next screen-cast discuss the semantics of XML in detail. In order to discuss recursive pure functional transformations, it is necessary to understand the semantics of XML in depth. This screen-cast and the next one cover XML to the depths necessary to understand the markup in Open XML documents, and to understand writing recursive pure functional transformations of XML. |
10 | XML – Part Two of Two | This screen-cast discusses document-centric vs. data-centric XML, covers all XML nodes, and then covers the XML infoset. |
11 | LINQ to XML Functional Construction | This screen-cast covers some of the more interesting and important semantics of the XElement constructor, including the ability to pass nested collections, and the ability to pass null as an argument, either directly to the constructor or as an item in a collection. |
12 | LINQ to XML Namespaces and Names | This screen-cast covers the details around controlling namespaces and names in LINQ to XML. In addition to explaining the mechanics of using the XNamespace and XName classes, it also covers controlling of serialization, and the differences between the .NET implementation of LINQ to XML and the JavaScript implementation of LINQ to XML (Ltxml.js). |
13 | LINQ to XML Axis Methods | This screen-cast covers some interesting semantics around axis methods in LINQ to XML. It covers important performance implications, including the performance issues around querying in reverse document order. It also covers the interesting idioms around extension methods. We’ll be making use of those idioms in recursive pure functional transforms of XML. |
14 | The Identity Transform | This screen-cast introduces Recursive Pure Functional Transformations (RPFT) of XML, and then discusses the Identity Transform. We must know how to transform an XML tree into an identical XML tree using RPFT before we can start to morph and transform the tree in interesting ways. |
15 | Replacing Elements | This screen-cast discusses ‘replacing’ an element from the source XML tree with a new element in the newly cloned XML tree. To demonstrate this scenario, we write a simple transform of Open XML WordprocessingML into HTML using just a few lines of code. |
16 | Removing Elements | This screen-cast discusses ‘removing’ an element from the source XML tree when cloning the XML tree. To demonstrate this scenario, I write code that removes proofing errors and comments from a WordprocessingML document. This screen-cast shows taking advantage of the semantics of LINQ to XML where you can pass null as content to the XElement constructor. Null is simply ignored when passed as content. By transforming an element from the source tree to null, it is effectively removed from the newly cloned XML tree. |
17 | Transforming Attributes | This screen-cast discusses transforming attributes in an XML tree. To demonstrate this scenario, I write code that removes the RSID attributes from a WordprocessingML document. |
18 | Why Do Transform Methods Return Object? | This screen-cast discusses why transform methods return object instead of XElement, XNode, or XObject. To demonstrate why, I write code that transforms a single content control into three paragraphs. |
19 | Complex Transforms of XML Elements | This screen-cast discusses an idiom / pattern that is useful when writing more complex transforms of an XML element. To demonstrate the idiom, I write code that conditionally sets the paragraph and character style for specific content in a document. |
20 | Writing a Custom Axis Method | Sometimes the easiest way to accomplish a particular task is to write an axis method that returns just the elements in an Open XML document that you are interested in. Sometimes you want to write the axis method in a lazy fashion so that it performs as well as possible on large documents. You also may need to use some form or another of recursion as the easiest way to write your axis method. However, recursion and laziness are at odds. You can’t write a method that uses ‘yield return’ in some places (to implement laziness) and uses ‘return’ in other places to implement recursion. This screen-cast shows how to get around this limitation in the C# language. |
21 | Grouping Operations | Grouping operations are an important tool in your toolbox when writing recursive pure functional transformations. There are two varieties of grouping operations – grouping all like items in a collection, and grouping all adjacent like items in a collection. This screen-cast examines both varieties. |
22 | Using Tuples | When you calculate intermediate results in a transform, you often need to ‘carry forward’ the calculated information to the next stage of the transform. You use tuples for this purpose. |