by gagege · 12y ago · 0 comments
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.
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.
I'm not aware of anything that approaches WebSharper's level of integration, though. It's a really impressive piece of work.
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.
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.
[1] - http://elm-lang.org/