Showing posts with label Web. Show all posts
Showing posts with label Web. Show all posts

Monday, July 14, 2014

Improvements to the F# Web Templates



There has been quite a bit of activity with various F# web templates over the last few months. This post will cover several of these activities.

ServiceStack Templates:

Kunjan Dalal and I have released version 2 of the ServiceStack templates. This version includes 4 new templates that target version 4 of ServiceStack. You can find the latest at http://visualstudiogallery.msdn.microsoft.com/278caff1-917a-4ac1-a552-e5a2ce0f6e1f.

MVC 5 Templates:

There are now 2 new "empty" templates available in the latest release of the package available at http://visualstudiogallery.msdn.microsoft.com/39ae8dec-d11a-4ac9-974e-be0fdadec71b. There have also been several fixes and enhancements provided by various members of the F# community.

- Patrick McDonald improved the default serialization of the MVC5 and Web API templates so that an "@" character is no not appended to the end of JSON property names.
- Functionality has been added to appropriately handle cancellation of a template creation request
- The necessary changes have been made to allow NuGet restore to work for projects created from this template

Web Item Templates: 

Last but not least, the Web Item Templates have been enhanced to support Visual Studio Express 2013 for Web.

Monday, April 21, 2014

F# Support for Web Projects

In December of last year, I announced a few templates that made it easy to create pure-F# MVC 5 and Web API 2 projects in Visual Studio 2012 and 2013. In a parallel stream, the F# team was working closely with the F# community to improve the F# web development experience by adding features such as publish-to-web. It's exciting to see that this great work is now available as a Visual F# Tools Preview. You can read more about this at http://blogs.msdn.com/b/fsharpteam/archive/2014/04/06/towards-web-project-support-in-the-visual-f-tools.aspx. This, as well as the recent announcement regarding the acceptance of contributions to the Visual F# Tools, is a huge step forward in the evolution of web development with F#.


Thursday, April 10, 2014

TypeScript in First-Class F# Web Projects

I was recently asked about how best to use TypeScript within a pure F# web project. Currently, there are two steps that are needed to make this happen. 

1. Add the TypeScript item template by downloading and installing the latest version of the F# Web Item Templates extension from http://visualstudiogallery.msdn.microsoft.com/f1dae7fe-1ecc-4f1b-86b5-32a2970d012a.


2. Modify your project file to allow the TypeScript files to compile to JavaScript when the project is compiled. To do this, you need to do the following:

- Edit your fsproj file. 

- Add the TypeScriptToolsVersion element and specify the appropriate TypeScript version that you have installed.


- Add 3 new commands to the BeforeBuild target.


- Save and re-open your project. You should now be good to go.



I plan to work on a solution to reduce the pain of step 2 in the near future, so stay tuned...


Monday, December 2, 2013

New F# Web App Item Templates

There is a new VSIX available on Visual Studio Gallery that can help in the creation of first-class F# ASP.NET MVC and Web API projects. To see the new item templates, do the following:

1. Follow the steps defined in this post.

2. Install the VSIX from here or search for it and install from Tools | Extensions and Updates...


3. Restart Visual Studio and create or open a first-class F# ASP.NET MVC or Web API project. If you don't have one handy, you can get an MVC 5/Web API 2 template from here or install this sneak peak of one of the F# Nancy templates that Ryan Riley and I are working on.

4. Add a new item (Ctrl+Shift+A) and select the Web subcategory. You should see the following:

Tuesday, November 5, 2013

F# Web Programming Session (slides and examples) at Progressive F# Tutorials 2013

Thanks to all who came out to the web programming session that Zach Bray and I led at Progressive F# Tutorials 2013. You can find the slides and examples from the session at https://github.com/dmohl/FsOnTheWeb-Workshop.

Additionally, you can find the FunScript and HashBang presentation at http://funscript.info/presentations/progf/slides.html#1 and a working example of the associated chat client/server app at https://github.com/ZachBray/HashBang.

Wednesday, October 17, 2012

Rough Cut of Building Web, Cloud, and Mobile Solutions with F#

Back in May I talked about two books that were currently underway. Today I'm proud to say that one of those books is now available as a Rough Cut on Safari Books Online.


I hope you enjoy reading it as much as I enjoyed writing it! A huge thanks goes to Ryan Riley for his continued expertise and guidance as the technical reviewer.