You are previewing Building Web, Cloud, and Mobile Solutions with F#.

Building Web, Cloud, and Mobile Solutions with F#

Cover of Building Web, Cloud, and Mobile Solutions with F# by Daniel Mohl Published by O'Reilly Media, Inc.
  1. Building Web, Cloud, and Mobile Solutions with F#
  2. Preface
    1. Who This Book Is For
    2. Getting Set Up to Run the Examples
    3. How This Book Is Organized
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari® Books Online
    7. How to Contact Us
    8. Acknowledgments
  3. 1. Building an ASP.NET MVC 4 Web Application with F#
    1. The F# ASP.NET MVC 4 Project Templates
      1. Finding and Installing the Templates
      2. Exploring the C# Project
      3. Dissecting the F# Project
    2. F# Controllers and Models
      1. Controllers
      2. Models
    3. Interacting with a Database
      1. Entity Framework
      2. Querying the Data
      3. Querying with Type Providers
    4. Taking Advantage of F#
      1. Moving to a More Functional Approach
      2. Understanding Pipelining and Partial Function Application
      3. Making the Controller More Functional
      4. Simplification with Pattern Matching
    5. Related Advanced Topics and Concepts
      1. Improving Responsiveness with Async Workflows
      2. Caching with MailboxProcessor
      3. Jumping on the Message Bus
      4. Continuation-Passing Style
      5. Creating a Custom Computation Expression
    6. Summary
  4. 2. Creating Web Services with F#
    1. Installing the Existing WCF Project Template
    2. Exploring the Output Code
      1. Consuming the Service
      2. Diving into Records
    3. Building an ASP.NET Web API Service
      1. Analyzing the Template
      2. Interacting with the HTTP Service
    4. Exploring Other Web Frameworks
      1. Service Stack
      2. Nancy
      3. Frank
    5. Testing Your Creation
      1. Getting Set Up
      2. Improving Tests with F#
      3. FsUnit
      4. Unquote
      5. NaturalSpec
    6. Summary
  5. 3. To the Cloud! Taking Advantage of Azure
    1. Building and Hosting F# on Azure
    2. Creating an F# Worker Role
    3. Introducing Fog
    4. Interacting with Azure Storage Options
      1. Blobs
      2. Tables
      3. Queue Storage
      4. SQL Azure
    5. Taking Advantage of the Azure Service Bus
      1. Queues
      2. Topics
    6. Exploring Authentication and Authorization
      1. Authentication and Authorization with ACS
      2. Claims-based Authentication
      3. Claims-based Authorization
    7. Building for Scalability
      1. Building the Web Role
      2. Understanding the PlaceOrderCommand
      3. On to the Worker Roles
      4. Wrapping Up the SQL Azure Worker Role
      5. Adding the Finishing Touches
      6. Caching
      7. CDN and Autoscaling
    8. Shining F# Examples
      1. {m}brace
      2. Cloud Numerics
      3. Framework for .NET Hadoop MapReduce
    9. Summary
  6. 4. Constructing Scalable Web and Mobile Solutions
    1. Scaling with Web Sockets
      1. Building a Web Socket Example with .NET 4.5 and IIS 8
      2. Creating a Web Socket Server with Fleck
    2. Using SignalR
      1. Building a Persistent Connection Example
      2. A JavaScript Client
      3. An F# Client
      4. Constructing a Hub Example
    3. Going Mobile
      1. The jQuery Mobile Approach
      2. Adding Windows Phone
    4. Combining F# and NoSQL
      1. MongoDB
      2. RavenDB
      3. CouchDB
    5. Summary
  7. 5. Functional Frontend Development
    1. Setting the Stage
    2. Looking at LiveScript
      1. Benefits
      2. Usage
      3. Example
    3. Exploring Pit
      1. Benefits
      2. Usage
      3. Example
    4. Diving into WebSharper
      1. Benefits
      2. Usage
      3. Example
    5. Summary
  8. A. Useful Tools and Libraries
    1. FAKE (F# Make)
    2. NuGet
      1. Basic Usage
      2. Useful NuGet Packages
    3. ExpectThat
  9. B. Useful Websites
    1. fssnip.net
    2. tryfsharp.org
    3. Visual Studio Gallery
    4. jQueryMobile.com
  10. C. Client-Side Technologies That Go Well with F#
    1. CoffeeScript
    2. Sass
    3. Underscore.js
  11. Index
  12. About the Author
  13. Colophon
  14. Copyright
O'Reilly logo

Appendix C. Client-Side Technologies That Go Well with F#

In the last chapter of this book, I showed you a few options for creating web-centric, client-side code in a functional style. In this appendix I’ll introduce a few other client-side technologies that go well with F#. While this introduction does not comprehensively cover any of the technologies, it will give you enough information to get started.

CoffeeScript

I’ve mentioned CoffeeScript a few times throughout this book. CoffeeScript is similar to LiveScript in that it’s a unique language that compiles to JavaScript. As I mentioned in Chapter 5, it is one of the parents of LiveScript, therefore much of what I stated about LiveScript also applies to CoffeeScript. The biggest difference between LiveScript and CoffeeScript is that LiveScript has more of a focus on providing support for developing in a more functional style.

Note

While this appendix focuses on client-side technologies, CoffeeScript is not limited to only client-side development. It can also be used for server-side development thanks to Node.js.

You may be wondering why you might wish to choose CoffeeScript over LiveScript. CoffeeScript has been steadily growing in popularity. Because of this, it has a great support group, lots of online examples, and a growing subset of tool support. The biggest things you lose when choosing CoffeeScript over LiveScript include several of the functional stylistic concepts that LiveScript provides as well as a few of the niceties of ...

The best content for your career. Discover unlimited learning on demand for around $1/day.