Hacker News new | past | comments | ask | show | jobs | submit login

This looks super interesting. I don't think I've ever seen anything like it.

At first I thought it was similar to Classic ASP or JSPs, but after looking at some the examples, it's more like a JS framework in that it generates HTML dynamically with client side code. But, the thing that really looks cool to me is the interop between client and server that you can do.

You can use the exact same "type Person = {Name:string; DOB:DateTime;}" on the server and client. That's about as DRY as you can get, I think.




It's a F#-to-JS compiler, a UI framework, and an RPC system all built into one. Script# is similar, for C#, but I don't think it got that far? MS did start "Project Volta" IIRC but then gave up on it. There's also FunScript: http://funscript.info/ but that seems more focused only on the JS generation part.

I don't know why Micrsoft doesn't buy these guys and deliver this as a core solution. I'd guess it's because it's not on C#, and MS marketing doesn't know what to do with F#. They want to pigeonhole it as "F# is a special language for like, scientists and stuff. Don't worry, it ain't got nothing on C#." And hey, with enough time and resources, C# may catch up on some of the things. With Rosyln, I think it'd be easier to make a C# WebSharper thing.


There are already a few approaches out there for compiling C# to JS, like my JSIL (http://jsil.org/) and Script#'s unofficial successor, Saltarelle (http://www.saltarelle-compiler.com/). I believe there is a new Roslyn-based C#->JS compiler in the works as well.

I'm not aware of anything that approaches WebSharper's level of integration, though. It's a really impressive piece of work.


Any idea why Microsoft isn't doing this as a first-class thing, instead of creating half-fixes like TypeScript?


That reminds me strongly of what the Ocsigen[1] project has been doing for years: Eliom as a web framework that generates both server and client side code via js_of_ocaml.

Unfortunately, it kinda suffers from a not so shiny website, cluttered documentation and high complexity. I kinda dream of those things being solved, then it would be a really appealing option.

[1] http://ocsigen.org/


That does look very similar. Thanks for sharing.

What's really different about these is that you don't need all the ceremony of designing routes and controllers for anything other than navigation. Need to add a phone number to a contact? Don't make a whole controller and route. Just write a function that updates the database and call that function from the client code.

And, if you care about separation of concerns, I think you can just put the RPC calls in a separate module. But, really, it's so little code, I might not even do that.


It looks similar to Elm[1] to me. Which is great as far as I'm concerned, I'm a big fan of that approach - the more exposure it gets, the better!

[1] - http://elm-lang.org/


opa [http://opalang.org/] does something very similar too




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: