Building Web, Cloud, & Mobile Solutions with F#: Create Scalable Apps with ASP.NET MVC 4, Azure, and Web Sockets

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Learn how to build key aspects of web, cloud, and mobile solutions by combining F# with various .NET and open source technologies. With helpful examples, this hands-on book shows you how to tackle concurrency, asynchrony, and other server-side challenges. You’ll quickly learn how to be productive with F#, whether you want to integrate the language into your existing web application or use it to create the next Twitter.

If you’re a mid- to senior-level .NET programmer, you’ll discover how this expressive functional-first language helps you write robust, maintainable, and reusable solutions that scale easily and target multiple devices.


Use F# with ASP.NET MVC, ASP.NET Web API, WCF, Windows Azure, HTML5, CSS3, jQuery Mobile, and other tools
Build next-generation ASP.NET MVC 4 web applications, using F# to do the heavy lifting on the server
Create WCF SOAP and HTTP web services
Develop F# web applications and services that run on Windows Azure
Build scalable solutions that allow reuse by mobile and web front-ends
Use F# with the WebSharper and Pit frameworks to build end-to-end web stacks

Author(s): Daniel Mohl
Publisher: O'Reilly Media
Year: 2012

Language: English
Pages: 176

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