We have been pretty busy these past few months working on a number of enhancements to WebSharper for its 2011 Q2 milestone - and I am happy to announce that the new 2.3 release is now out for public consumption.
Anton gave a short overview about some of the new features in this release, in particular the new deployment layout that packages generated artifacts into the target assembly, greatly simplifying the process of building and deploying WebSharper 2.3 applications.
The WebSharper 2.2 compiler generated a pair of new files for every assembly it processed:
- A .dep file with the dependency information for the assembly, and
Enhanced Async support
The current 2.3 release further improves on WebSharper's Async support by implementing a round-robin scheduler with a granularity of a single bind operation (that is, a let! binding inside an Async computation expression) and giving a client-side implementation to Async.Parallel using this scheduler. Overall, this makes it possible to emulate executing multiple asynchronous computations "in parallel", such as initiating multiple web service calls or manipulating the DOM from multiple "agents" executing on your page independently.
We will surely be blogging about this new feature, in the meantime check out Joel's article on implementing an asynchronous slot machine using simple and powerful F# Async expressions.
Sitelets have been an integral part of the WebSharper Professional product line, a clear differentiator to the WebSharper Standard line. If you have been to any of our talks or listened to our webcasts, you probably are aware that we recommend developing your web applications on a sitelet foundation, e.g. using sitelets to model your application functionality.
The 2.3 release bring a couple smaller enhancements to sitelets:
- You can now use the tilde (~) character in your sitelet template markup files (*.template.xml) to refer to the application root directory. In particular, any src and href attribute will be mapped accordingly. This now works correctly even if you are deploying to a virtual directory under IIS.
- Full authentication support using the ASP.NET authentication pipeline. Previous implementations relied on cookies only, this now is extended to all authentication protocols you may have been used to in your traditional ASP.NET applications.
- Placeholders in the [Head] section of a markup template - it is now possible to place arbitrary placeholders inside the head section in tag positions. These placeholders have a slightly different type than ordinary placeholders.
Bug fixes and further enhancements
Anton's announcement also lists over 30 further bug fixes and enhancements to the installer, the formlet library, updating to the latest jQuery, sitelets, and Visual Studio integration. We certainly recommend updating to the 2.3 release even if you are working on larger enterprise application projects, the new features and enhancements in this release are very much worth the effort.
As usual, the new 2.3 compiler is accompanied by an update to every available WebSharper extension, and the new 2.3 series of each are now available on the WebSharper Extensions page. This new batch also includes the long-awaited Twitter extension and the upcoming extensions for TinyMCE, a mature and powerful, open-source and platform-independent WYSIWYG HTML editor.
A tiny glimpse of WebSharper 2.4
In our efforts to bring you the most advanced functional web programming framework, we continue to implement various code optimizations to bring down the generated code size (now in Release mode). The current 2.3 release has no new optimizations, it simply removes whitespace to save you about 20-25% on the generated code size. We plan to implement some key optimizations in the upcoming 2.4 release, giving a massive (50% or more) drop in the generated code size.
The other major enhancement planned in 2.4 is making the jQuery dependency optional. The current releases assume jQuery as the default DOM functionality provider, and although it is technically feasible to implement additional providers, they don't come out-of-the-box with WebSharper. The plan is to support an alternate DOM provider implementation, targeting a more lightweight foundation suitable for running efficiently especially on mobile devices.
If you encounter any issues, please use the WebSharper Bugzilla so your issue can be tracked properly. Thanks, and enjoy the current 2.3 release!