Live data from Hacker News

Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

yesodweb.com

31–40 of 113 posts

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#31

Earlier quoted context omitted.

hamlet is by far Yesod's best feature. I have already ported it to Ruby (hamlet.rb) and Javascript (hamlet.js). Many users come with different pre-conceptions about what a good template language should be, but once they actually start using Hamlet, they love it. So honestly I am not 100% sure how much effort using a different template language is because not a single user has wanted to switch to an alternative. That…

>hamlet is by far Yesod's best feature In your opinion. >but once they actually start using Hamlet, they love it ... not a single user has wanted to switch to an alternative. Hamlet is one of the major reasons we're using snap instead of yesod. Of the 5 devs here who worked on a test app in yesod, the most favourable reaction to hamlet was "well, I guess I could live with it if I had to". Just because we didn't come…

I think you may be re-enforcing what I said. You came with a different pre-conception about what templates should be and didn't use Hamlet for a long period of time.

On the other hand, it seems you are very adamant that you must type your own closing tags rather than have the template language ensure they are correct through indentation.

Our goal is not to make every single developer happy. If you don't appreciate DRY & reduced errors (improper closing tags in this case), Yesod is certainly not for you, no matter what template language you used.

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#32
post #5

Earlier quoted context omitted.

I don't think this comparison is accurate at all. I suspect the author has only used Snap and not Yesod. Actually I don't know if there is a single Haskell programmer that has seriously tried all three web frameworks.

As someone who gave up on yesod because it is so railsish and moved to snap, I'd say it is pretty accurate.

[deleted]

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#33
post #28

Earlier quoted context omitted.

There's no "clear winner", there are pretty wildly differing opinions on the right approach to things. Yesod puts the most effort into marketing, and seems to pull in the most non-haskellers. The haskell community is kind of split on it, the rampant and unnecessary use of template haskell and quasi-quotation is frowned upon by many, and portions of yesod aren't composable as a result of their DSL obsession. Yesod giv…

> Yesod puts the most effort into marketing How is this the case? Compare http://yesodweb.com and http://snapframework.com/ and tell me you really believe that the yesod guys are marketers? > persistent isn't mature enough to use with an RDBMS backend. How so? Also, Persistent is still at 0.9, so the version number would agree. Any persistence layer you use with Snap or Happstack is just as easy to use in Yesod too.…

>you really believe that the yesod guys are marketers?

I didn't say yesod had the best website, I said they put the most effort into marketing. Michael and Greg do a lot of talking about yesod, and are the only haskell framework attempting to draw in people from outside of haskell. You seem to have interpreted this as an insult, it was not. Usage increases with awareness.

>How so?

Unless you are using your RDBMS like a dumb storage system, then persistent doesn't provide the tools to access it. We're not talking advanced stuff here, the most basic fundamentals were done incorrectly: it requires int primary keys on all tables for crying out loud. Obviously multi-column foreign keys just went out the window then too. Of all our apps here, not even the most trivial could be ported to yesod using persistent.

>Any persistence layer you use with Snap or Happstack is just as easy to use in Yesod too.

Certainly. But the major difference between yesod and snap initially appears to be "yesod provides high level DB access and snap doesn't". This may be true of mongo DB (I have no use for it), but for an RDBMS it actually ends up being that neither provides high level DB access, and you have to use something from hackage.

>Again, how so?

Happstack's webserver has several issues, space usage being a major one. This isn't a controversial statement, Jeremy will tell you the same thing, it is why he's focusing on replacing happstack-server.

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#34

Earlier quoted context omitted.

>hamlet is by far Yesod's best feature In your opinion. >but once they actually start using Hamlet, they love it ... not a single user has wanted to switch to an alternative. Hamlet is one of the major reasons we're using snap instead of yesod. Of the 5 devs here who worked on a test app in yesod, the most favourable reaction to hamlet was "well, I guess I could live with it if I had to". Just because we didn't come…

I think you may be re-enforcing what I said. You came with a different pre-conception about what templates should be and didn't use Hamlet for a long period of time. On the other hand, it seems you are very adamant that you must type your own closing tags rather than have the template language ensure they are correct through indentation. Our goal is not to make every single developer happy. If you don't appreciate DR…

I am not re-enforcing your statement at all. I think it is absurd to suggest that people will just suddenly start liking hamlet if they put up with it long enough. I used PHP for over a decade, I still think it is an awful template engine. Hamlet has the same problems as PHP, and added a new one. And the main part of your post I was objecting to was "everyone loves it and nobody has ever wanted to use anything else". We wanted to use something else, but once we stop using hamlet, there's nothing left making yesod unique vs happstack and snap, so we just switched instead of complaining.

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#35
From the Learn More link at the bottom [1]:

> Note the awesome Shakespearean inspired name convention. Another good reason to use yesod.

Lol.

> Until here I believe it goes in the right direction. Even if I believe the real future is by generating HTML pages from the client (using javascript) and server limited to serve JSON (or XML, or any object representation system).

This is a little unclear. Do you mean, prior to Yesod you thought web development was heading in the right direction, but Yesod made you realize there was a much better way, even if the future is HTML5 rich web apps with the app server as a JSON/XML API endpoint?

1. http://yannesposito.com/Scratch/en/blog/Yesod-excellent-idea...

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#36
post #5

Earlier quoted context omitted.

FWIW, since I only really have experience with Snap: When comparing to Ruby frameworks, you could roughly say that Snap is to Yesod what Sinatra is to Rails. Snap is relatively simple and as such easy to fully understand. But since it is a relatively simple framework, you have to mix and match other packages to get the functionality that you want. Yesod on the other hand is very elaborate - it contains a lot of funct…

I don't think this comparison is accurate at all. I suspect the author has only used Snap and not Yesod. Actually I don't know if there is a single Haskell programmer that has seriously tried all three web frameworks.

Could you please use arguments, rather than fallacies? I already said that I primarily have experience with Snap. But I did research both Snap and Yesod before using Snap.

Or from the horse's mouth:

Snap: "Snap is a simple web development framework for unix systems, written in the Haskell programming language."

Source: http://snapframework.com/

The Yesod book: "The Haskell community is constantly pushing the boundaries finding the cleanest, most efficient solutions for each challenge.

The downside of such a powerful ecosystem is the complexity of choice. By using Yesod, you will already have most of the tools chosen for you, and you can be guaranteed they work together."

Source: http://www.yesodweb.com/

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#37
post #32

Earlier quoted context omitted.

As someone who gave up on yesod because it is so railsish and moved to snap, I'd say it is pretty accurate.

[deleted]

I'm not sure what code examples would do, you could use the examples on the yesod site. It isn't a case of "yesod can't do X", it was just out of the 5 people who tried it, 4 voted no. You can't "fix" yesod when it isn't broken, and I think trying to cater to my subjective preferences would simply alienate the people who like yesod.

Your characterization of my posts as trolling is both inaccurate and unnecessary. Having a different opinion is not trolling.

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#38
post #26

Earlier quoted context omitted.

>hamlet is by far Yesod's best feature In your opinion. >but once they actually start using Hamlet, they love it ... not a single user has wanted to switch to an alternative. Hamlet is one of the major reasons we're using snap instead of yesod. Of the 5 devs here who worked on a test app in yesod, the most favourable reaction to hamlet was "well, I guess I could live with it if I had to". Just because we didn't come…

What were the problems you saw in Hamlet?

First of all, working on a framework (Padrino) myself: I firmly believe that "there's nothing better then ours" without actually answering the question properly is a rude thing to tell someone who asks for replacing a part. So, is there a system in place that allows me to use any templating language that conforms to a given protocol? And where can I find that protocol? (in Padrino, for example, this is Tilt)

Okay, whats wrong with hamlet. It begins on google: "yesod hamlet" does not yield any meaningful documentation. "Shakespearean Templates" does. So "Shakespearean Templates"[1] is a whole family of languages that solves a lot of problems already solved, but type-safe. Well... okay, so I do not only have to learn a whole new framework, I also have to learn 3 new languages (-2, if I only care about HTML templating). So, to me, the whole approach rings a bit of "the world is wrong and we fix everything". Considering gregwebs answer: even more so.

Hamlet just doesn't suit my tastes. I don't like auto-closing tags on intendation - any decent text editor should assist you enough to do that properly. I like how you put thought into generating URLs, but thats nothing the templating language should take care of. Also, Hamlet assumes that you are templating HTML - I often template other types as well, for example plain text - hence a need for replacing it by something that fits all needs better. In the end, I also prefer strictly logic-less templates, so hamlet doesn't cut it.

Also, the documentation should see some love. There is no way to have a look at the features (and languages) in isolation: Its a stream of consciousness that introduces features in a half-sentence (I had to grep it to find what "^" means - it was what I expected it to be, but nevertheless).

That said, I still find Yesod a compelling framework and it will be the first haskell framework I'll try out next time I have some spare time. But the first thing I'll do is replace the templating.

[1]: I would prefer if they had anything to do with shakespeare, the esoteric programming language. ;)

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#39

Earlier quoted context omitted.

I think you may be re-enforcing what I said. You came with a different pre-conception about what templates should be and didn't use Hamlet for a long period of time. On the other hand, it seems you are very adamant that you must type your own closing tags rather than have the template language ensure they are correct through indentation. Our goal is not to make every single developer happy. If you don't appreciate DR…

I am not re-enforcing your statement at all. I think it is absurd to suggest that people will just suddenly start liking hamlet if they put up with it long enough. I used PHP for over a decade, I still think it is an awful template engine. Hamlet has the same problems as PHP, and added a new one. And the main part of your post I was objecting to was "everyone loves it and nobody has ever wanted to use anything else".…

Its not absurd, that has been our experience the majority of the time.

Your comment about Yesod having nothing unique shows you never really used Yesod or are very intentionally trolling. For example, Snap does not have type-safe urls and Happstack has a very different approach to its related routing. I could come up with a lot of other examples.

Re: Yesod 1.0 - a robust, friendly, high performance web framework for Haskell

#40
post #6

I have one question about yesod: how easy is it to switch templating languages? I had a look at it more than once, but hamlet always turned me off. Is it easy to switch to, say, hastache?

Can anyone please explain me why I got downvoted for asking a question about the linked framework?
Post reply on HN