Building Web, Cloud, and Mobile Solutions With F# (英語) ペーパーバック – 2012/12/28
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
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. Youll 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 youre a mid- to senior-level .NET programmer, youll 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
Daniel Mohl is a Microsoft F# MVP, F# and C# Insider, blogger, speaker, and event organizer. He blogs at blog.danielmohl.com and you can follow him on Twitter at twitter.com/dmohl.
Another criticism is the way the material is presented. It reads more like a hasty (but lengthy) online tutorial than a print-worthy guide. The author frequently refers the reader to learn the details of concepts at various URLs. If I wanted to go hunting all over the net in order to learn this stuff, I could do that for free without buying the book. But I understand some people prefer this kind of compressed style, even though it's not for me.
Overall, it feels like the author assumes a certain level of knowledge from the reader in order to make his points and draw connections between concepts, but unfortunately I don't have that knowledge, and it doesn't seem like this book is going to give it to me. Maybe after I self-educate from other sources and get more knowledgeable, I'll be able to get a lot from this book. If I get to that point, I'll amend my review appropriately.
Because I have a solid understanding of F#, I found some of the explanations of F# language features unnecessary.
Treat this book like good class notes from a fellow student. It is not a reference, or the be-all end all. It is a collection of good ideas with context. I found it much more productive to read this book first, and then wade through other material about ASP.NET, and windows azure.
The author, Daniel Mohl, does an excellent job in delivering just as much as you need to get a taste of what web development with F# could be like. Sure, it's not a reference book, but on the other hand it shines a light on the flourishing community around F#, and what it has produced, that a reference book probably wouldn't. [Here it would be easy to go astray and start talking about how great F# is, but that the community is even greater (Is there even such a thing as a C# community? Actually, "The domain csharp.org is for sale" - see for yourself!), but I'll try to refrain from that.] This could well serve as a book to get you introduced to the endless possibilities - at least if you're still living in the illusion that "F# is just for calculations and stuff".
Chapter 1 - Building an ASP.NET MVC 4 Web Application with F#
This is a ferociously paced chapter, covering concepts that are probably new to you if you come from a C# background. Discriminated unions, type providers, agents, pattern matching, the Option type, async and computation expressions are all covered in 36 pages! (Yes, I put async on the list, even though it exists in C# too, but the F# async model is slightly different.) Once again, this is not a reference book, but you'll get to know enough to get started, and even more important: wanting to get started.
Chapter 2 - Creating Web Services with F#
The beginning of this chapter shows how easy it can be to work with WCF in F#, and incidentally it's all done in code instead of configuration - just the way I like it (XML is evil!). We also get some some advice based on personal experience and some trivia on how Json.NET came to replace System.Json. Little things, but adding great insight. After WCF, the author jumps into Web API 4.0, which is OK since the book is almost a year old by now. You can go look up the attribute routing features of 5.0 for yourself. SelfHost is shown, but not OWIN, which I've never tried, but am curious about. However, that would have required more words...
Then we get a short walk-through of the alternatives to WCF and Web API. I found this part highly interesting, since I conducted my own study of a few of the mentioned alternatives just a week ago. I'm definitely gonna take a closer look at Frank after reading this! (And maybe take back what I said about OWIN, because Frank seems to replace Frack, and Frack was OWIN-compatible, so I guess you can say it's implicitly mentioned.)
The chapter finishes with yet another walk-through, this time on unit testing. You'll get a short but sweet overview of some of the most common options for unit testing, asserting and even acceptance testing. Since we're in .NET territory, some of the names will be familiar...
Chapter 3 - The Cloud! Taking Advantage of Azure
As an old-school client/server developer with my roots firmly planted in MFC and SQL Server (even though that was a long time ago), I've been reluctant to anything cloud related, and perhaps especially Azure. Words such as "security" and "performance" spring to mind, but this chapter seems to cover it all - in the very succinct manner that by now has become a trademark for this book. Actually, I'm even thinking about installing both the SDK and the authors own creation, an Azure framework cleverly named Fog, and giving it a try.
Chapter 4 - Constructing Scalable Web and Mobile Solutions
A very short section on mobile development (currently outside my scope, but I notice that Xamarin isn't mentioned - probably because Xamarin support for F# is never than this book) leads to a yet another interesting and highly relevant section: NoSQL! Short examples for Mongo, Raven and Couch are provided. You will find yourself wondering why you struggle every day with relational databases for all forms of persistence, whether you need it or not.
Chapter 5 - Functional Frontend Development
The last chapter of book (yes, we're already at the end!) covers, as the title suggests, frontend development, and that's also slightly outside my scope. The really cool thing here though is the fact that you can do frontend development with F#! Take that, all you folks who are saying that F# is just for calculations.
Appendix A, B and C
... gives you some great tips on tools, libraries and technologies, as well as some recommendations on further reading. Handy.
Daniel Mohl has put together a little gem of a book. It covers just about everything you need to know to get up and running, even if you don't have any prior F# experience. However, I do recommend that you buy it together with e.g. Expert F# 3.0 by Don Syme. And when you've finished the book, give it to your C# shop boss and say: "Look how productive we can get with F#!"