4 ms·
AngularJS integration with Haskell
- glutamate 12y agoThere's no "integration" here, only a pointless scaffolding code generator. 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?
- tel 12y agoThe price of popularity. With this increase in pro-Haskell talk in the echo chamber there will almost certainly be an increase in the number of people trying it out.
- glutamate 12y agoLet's help them try it out the right way. For instance, here is an example I wrote using Spock (which is built on Scotty), Spock-worker and SQLite: https://github.com/openbrainsrc/makeci https://github.com/openbrainsrc/makeci I'd love to see other people's Scotty/Spock projects.
- sergiotapia 12y agoInstead of knocking down someone for taking the time to share something of value, why don't you contribute as well? Sounds like a win-win to me.
- glutamate 12y agoMy point was not at all that this is a poorly implemented code generator for Scotty. What I am arguing is that this whole category of tools are counterproductive for languages like Haskell that enable and emphasise good library design. There is nothing I (or any of the much more skilled Haskell programmers out there) could contribute to this tool to save it. It is beyond redemption.
- oinksoft 12y agoStarter/example projects are nice to have when you are learning because they put something bigger than "Hello, World" in your hands, and I'm certain people will find this useful. To call a project like this "beyond redemption" is not very friendly to newcomers to Haskell. It's difficult to think about library design when you cannot yet perform everyday tasks in the language.
- glutamate 12y agoI would never criticise a beginner's Haskell project, but when people start providing resources for beginners that send them in the completely wrong direction, I think we have a right to point that out, and that takes precedence over not hurting the feelings of the people building said misdirections. 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.
- deleted 12y ago[deleted]
- drdaeman 12y agoScaffolding gets wrong when it tries to write non-obvious code instead of automating writing obvious repetitive boilerplate one. I think things like those https://github.com/rayokota/generator-angular-scotty/blob/master/app/templates/src/_Main.hs 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.
- chongli 12y agowrite non-obvious code instead of automating writing obvious repetitive boilerplate one. 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.
- lohankin 12y agowhat is a typical lifetime of a fad in javascript fremeworking? Will Angular-JS still be able to elicit as much enthusiasm next month? Am I the only one who thinks Angular is a terrible kludge, which tries to turn every host language into even bigger kludge?
- jbeja 12y agoThat why i stick with jQuery.
- camus2 12y agoAnguarjs is great for LOB applications,greater than any other framework because it allows one to write complex applications quickly. 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.
- sehr 12y agoit allows one to write complex applications quickly. Subjective.