DZone
Web Dev Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > Develop Web Apps in F# with WebSharper

Develop Web Apps in F# with WebSharper

Mitch Pronschinske user avatar by
Mitch Pronschinske
·
Jan. 22, 10 · Web Dev Zone · Interview
Like (0)
Save
Tweet
12.12K Views

Join the DZone community and get the full member experience.

Join For Free
F# is a relatively new language for Microsoft's .NET framework that is quickly gaining momentum in the financial and scientific software development communities.  IntelliFactory believes that it can forge a new path for F# in the mainstream web application space.  In less than two weeks, the company will debut their WebSharper platform for writing web apps in F# that are easily compiled into JavaScript for the client-side.

F# is a three-paradigm language that uses imperative, functional, and object-oriented programming (class-based).  New programming design approaches that are not easily expressed by just objects are possible with F#.  The functional programming capabilities can also lead to some mind-bending code.  F# is a strongly typed language that uses type interface so that data types don't need to be explicitly declared.  It includes a functional programming component that supports eager evaluation.  The language also uses pattern matching to resolve names into values.



In ASP.NET development, F# also offers productivity advantages over VB and C#.  F# is different because it is statically checked and type-safe.  It addresses weaknesses in ASP.NET development like untyped values, complex form construction, and using strings for IDs and method names that connect markup with code-behind (class-files).  

Writing a web application in F# on the WebSharper platform can be less-time consuming if a developer is not great at writing web apps in JavaScript.  Through WebSharper, developers can write a web app using a large subset of F# and .NET core libraries and then just let WebSharper map the code to JavaScript.  WebSharper can integrate with ASP.NET applications, but it is different from the standard approach because it builds applications from miniature web pages called "pagelets".  The pagelets correspond to functions on the client-side and they are automatically translated into JavaScript.   

WebSharper supports a wide range of JavaScript libraries, making it easy for developers to optimize their code in whatever way they choose.  jQuery, qooxdoo, Flapjax, and Yahoo UI are all supported by WebSharper.  The leap from F# to JavaScript is manageable because both are functional languages that support lambda expressions and closures.  Another unique part of WebSharper is a "formlet".  A formlet is a special pagelet that provides form functionality.  Formlets in Web Sharper run and validate on the client, submitting their result to a either a client- or a server-side callback.

                                                                       jQuery auto-complete



WebSharper will be released on February 8th.  Pricing has yet to be determined, but customers will be required to pay for support.  WebSharper comes fully integrated into Visual Studio.

Want to get ahead of the curve before F# really takes off?  DZone's Essential F# refcard can jumpstart your exploration into Microsoft's newest language.  The card was authored by Chance Coble and Ted Neward.
Web apps Web application app

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Comparing Distributed Databases
  • How BDD Works Well With EDA
  • Creating a REST Web Service With Java and Spring (Part 1)
  • Why Is Software Integration Important for Business?

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo