AngularJS integration with Haskell
github.com
github.com
I really really hate scaffolding tools. They generate pages of code that I didn't write out myself, that I have no idea what functionality they implement, and that will be hopelessly broken on the first API upgrade in any of the tools the generate code for.
Can we please not have this kind of crap for Haskell? You can say I don't have to use them, but it is worse than that. These kinds of generators encourage poor library design. Instead of the 4 lines of code that I can use to get my website started with Scotty, they encourage a style of library design where I need hundreds of lines for minimal functionality.
If you really want to show people how to use Scotty and Angular, can't you just publish an example as a gist?
https://github.com/openbrainsrc/makeci
I'd love to see other people's Scotty/Spock projects.
My point is that if you are a newcomer to Haskell, then this is not the way to start learning. If your first project in Haskell is a yeoman generated web server that activates any number of GHC extensions, you will be stumped by the first encounter of .. "No instance for Data.String.IsString a0 .." that you get from GHC.
Examples are fine, we clearly need as many of those as possible. If you copy code from an example into your own project, at least you have some idea of where that code comes from and what it does.
I don't understand your point about library design. Library design is the responsibility of the person who implements the library, not the beginner who is using it.
I think things like those https://github.com/rayokota/generator-angular-scotty/blob/ma... should be put into a well-documented library for others to export and use. This is a straightforward approach to make things one writes available for everybody else.
And then, I guess, scaffolding with no-brainer one-liners like `put "..." $ updateModel ...` is fine by me.
That's fine and all but Haskell's a powerful enough language to abstract away most boilerplate. What little remains can be taken care of with the TemplateHaskell extension. For a nice example of a library in Haskell that requires almost no boilerplate at all, check out XMonad. All of what you'd expect to be boilerplate is packed into a variable called defaultConfig.
The main difference between AngularJS and other frameworks is that AngularJS comes with a good testing framework too,something other JS frameworks dont do.
AngularJS has set a new standard for client side frameworks,that's what matters.
Subjective.