I'm trying to use F# to develop a chrome extension and found that there are some framework : fable, websharper, borelo and SAFE in https://fsharp.org/use/web-apps/
I don't know how to choose . Can Anyone help me to make the choice?
For a Chrome extensions in particular I would probably recommend Fable.
Fable is an F# to JavaScript compiler and should be compatible with what Chrome expects for extension development. If you want/need to use existing JS packages e.g. from npm this is probably the way to go.
Bolero uses WebAssembly to run .Net in the browser which seems likely to introduce more compatibility issues. Though there are examples using WebAssembly. It would also, in principle, give you access to many .Net libraries to integrate with your extension.
I've not used WebSharper. My understanding is it also provides F# to JS compilation so it may be suitable.
SAFE isn't a separate technology. It is essentially a template which combines F# + Fable in the browser and F# + .Net on the server for writing full stack apps in 100% F#.
Related
I have developed a commercial extension for the Unity3D game engine in F#, it's a piece of code which extends the editor with advanced node/graph editing features. F# is perfect for this due to the nature of immutability and DU's.
But, to my question: I realized that the license for the FSharp.Core.dll which comes with Microsoft .NET/Visual Studio probably doesn't allow you to re-distribute it with a commercial project? How would I go about finding out if this is the case or not, and if it's not is there any way to create my own compiled version of FSharp.Core.dll which would run on Unity3D?
The reason I ask is because Unity3D uses Mono 2.6 (albeit a modified version, to my understanding) under the hood, and there is no FSharp.Core.dll bundled with the editor, so I need to supply my own with my extension.
See: Is F# 3.0 runtime redistributable?
The answer is of course Yes. The language would be pretty useless if its core library wasn't re-distributable...
I am using spring framework for my java enterprise application .
I felt javascript / jquery is hard to maintain for larger enterprise application.
Classes and Objects makes code maintenance easier.
how can i use dart with spring framework / JSP?.
The HTML code can be generate with JSP. However, we cannot debug with Dart Editor anymore.
It would be nice and more encourage people to start to use Dart by just by support debugging a HTML with dart from non-standard dart editor debug server.
For example: The HTML part is served by a Jetty server which contains links to dart
and we should be able to debug in Dart Editor.
Personally, This is the most needed feature otherwise, it's difficult to ask people to migrate old sytem with JSP, PHP to start to use Dart
We are listening to Dartian reponse.
I found one issue in Dart issue list: https://code.google.com/p/dart/issues/detail?id=3748
The best way to use dart with springframework and JSP is to create rich client app (RCP) in dart and use springframework and JSP for implementing a service layer that should be used by the RCP.
There are various disadvantages if you chose to mix the application state between the client (browser) and the server. Much more scalable model is to build on service oriented architecture (SOA) and keep the UI logic solely on the client side.
Hope it helps ;-)
In the Build 2011 keynote and demos, they were always talking about C++, C#, Visual Basic and JavaScript. Can't I build Metro style Apps with F#? Or is it safe to say that if it works with C#, then it works with F# as well?
Or is it eligible to say if it works with C# then it works with F# as well?
Yes, that's how it is supposed to work. In addition to javascript and C/C++, any CLS compliant language that runs on top of the CLR will have access to the WinRT API.
Unfortunately in the VS 2011 Express edition you don't get tooling support but I guess this will be added progressively or to other editions:
Don talks about this a little around 7:40 into his talk.
http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-904T
I had the same question and created a blog post: Create a Metro App in F# (NOT)
There are a few issues:
You cannot reference ordinary .NET dll’s (even in C#). They have to
be have recompiled with a “reference” to the WinRT. Because of this
you cannot reference the F# dll. I think this will be solved when F#
3.0 get released (source: Understanding F# slide from Don Syme at
build).
The ability from F# to create Metro apps. This has to be
built by the F# team. This is an open question. This is the all-F#
approach (In WPF it is today possible but not recommended).
Tool support for creation Metro front-end projects. This will be not the case for the
F# 3.0 release. (source: Understanding F# slide from Don Syme at
build).
Using Visual Studio 11 Developer Preview (Full, not Express), I was able to reference and run F# code from a C# Metro style application with the following caveats:
You will get a build warning saying that the project can't be referenced, even though Visual Studio will still allow you to add it.
You must remove all references to all DLL's in the F# project, including FSharp.Core.
By following these steps it is possible to run F# code from a C# Metro style application, but it is nearly impossible to write any useful code in F# without references to the core language libraries. Let's hope they update the libraries to be WinRT compatible soon.
The question has been answered here:
Windows 8 and F#
Although you cannot create and design Metro apps directly in F#, you can still create so called Portable library in F# with all Models and ViewModels and use it in another Metro projects. It's not ideal, but it works.
I ported my stock chart library for .NET3.5-4.0 to Portable library,it works quite well on Metro with C# Metro application and some my Metro UI bridge.
I'm convinced that I can use F# to make Metro application in many parts.
Some popular languages like Python and Ruby have native, JVM and .Net CLR implementations. C# is implemented with free Mono project. Aren't there any attempts of implementing F#?
As others pointed out, the standard F# implementation from Microsoft is just a .NET (CLI) application that runs on multiple implementations of CLI (namely .NET and Mono). F# also produces .NET (CLI) applications as libraries that also work on both .NET and Mono. However, that is still the same CLI implementation of F# (just running on different implementation of CLI)
To answer your question -
As far as I know, there is no other attempt to implement F# compiler for other platforms/runtimes.
F# shares a common background with OCaml, so the easiest way to get another implementation of F# would be to take OCaml and add F#-specific features (and remove OCaml-specific features).
You can use only shared sub-language and cross-compile using both F# and OCaml.
Also, there are some plans to release F# as open source, so it may be possible that (in the future), someone will port F# to other platforms such as JVM using the source (when released).
F# interactive, fsi.exe, already runs on Mono, as do compiled F# programs.
There is a compiler for targeting a subset of F# to FPGAs, which I guess is a non-.NET implementation
http://www.avalda.com/
Link
Mono is an implementation of .net which happens to include a c# compiler (as well as a vb compiler). It is not primarily a c# implementation.
I need to give end-users the ability to securely edit an asp.net mvc web application templates and so far Liquid Template Language seems to be perfect, but it is written in Ruby and porting it seems a too complex task for me as I don't know Ruby... anyone tried to port it to C#? It would be really useful in a lot of situations and I'm going to actively help for what is needed!
Update: I also found out a Javascript version, this should ease the porting enough.
Do you mean DotLiquid? It's a .NET 4.0 port of the Liquid template language for Ruby. The template syntax itself is the same as Liquid, but the .NET code takes advantage of .NET / C# conventions as much as possible. It's obviously open source, same as the original Liquid project.
Disclosure: I wrote DotLiquid (well, I did the C# port from Ruby, anyway). Like the original poster, I also wanted to have access to Liquid template syntax from .NET code. I'm hoping it's useful for other people. Liquid's Ruby source code is very clean, and included a full suite of unit tests, so it made porting quite straightforward. If you do find any bugs, please