It is time for me to freshen up my web skills and learn HTML5. The good news is that WebSharper 2.4 was released in January and added an open source license of AGPL v3. Also, Visual Studio 11 Beta was released at the end of February. The two appear to play well together, so this means I can learn how to use HTML5 using my favorite language, F#. I’m also going to learn a lot about WebSharper.
http://websharper.com/samples/HelloWorld shows how to implement a “Hello, world!” as a WebSharper application. What it does not show you is how to put that in a “sitelet” so you can build and run it yourself. Launch Visual Studio, select the IntelliFactory template “WebSharper 2.4 HTML Application (Sitelets)”. I added the provided source code to a HelloWorld.fs file and added it to my project. I then removed Main.fs and created a Site.fs with the following (anyone have a good HTML Copy for VS 11).
If you build the project, it creates a bin/html directory with your output. In this case, it contains a HelloWorld.html and supporting JavaScript code in a subdirectory named “Scripts”. Both Debug and Release put output in the same folder, so make sure you clean before building in Release and deploying. I copied the output to an "html" directory so I could demo it on this blog:
The source code for this project is available here.