Live data from Hacker News

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

yesodweb.com

21–30 of 113 posts

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

#21
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?

I don't think anyone's actually done it, because most of our users really like Hamlet. That said, switching should be a piece of cake. All you need to do is get the textual result from the templating language you're using and apply preEscapedText to it. Since we use blaze-html under the surface, any templating languages using that library's types will automatically work with Yesod.

Of course, support for type-safe URLs will vary by templating languages, so you may have to manually render URLs yourself, but that's doable via getUrlRender.

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

#22
post #4

They really have to change their website, but in particular that cheesy/glossy logo. It just looks awful.

We agree, if you click on the home page (http://www.yesodweb.com) you will see a complete redesign. This will be ported to the blog & book soon.

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

#23

A question I'd love to see a good answer to. We've got Yesod, we've got Happstack, and also Snap. What are the major differences between them? Is one of them a clear winner, the way Django/Rails are in Python/Ruby respectively?

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 gives you templating and persistence out of the box, but the template engine is a love it or hate it deal, and persistent isn't mature enough to use with an RDBMS backend.

Snap gives you templating, but no persistence out of the box. The template engine doesn't give you compile time type safety, but it also contains no logic, it is an html template system like lift. If you want to talk to a database, you use whatever haskell module you want, there's nothing snap-specific about it.

Happstack is basically the same deal as snap, but early on was pretty heavily focused on their own acid-state storage system. It has since become much more storage agnostic, and the acid-state storage system is used outside of happstack now.

Between happstack and snap, happstack has better docs, including tutorials on how to integrate with a ton of different web related modules (different template systems, digestive-functors, etc). Snap has a better web server underlying it, and subjectively appears to have more developers actively working on it. Because both allow you to use whatever modules you like quite easily, migrating an app from one framework to the other is pretty easy. Migrating from snap or happstack to yesod or the other way is quite a lot more effort.

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

#24
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.

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

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

#25

A question I'd love to see a good answer to. We've got Yesod, we've got Happstack, and also Snap. What are the major differences between them? Is one of them a clear winner, the way Django/Rails are in Python/Ruby respectively?

Yesod is the clear winner in terms of features, number of users, active development and community, or probably any other of the usual metrics. That alone doesn't mean it is the best. Rails is the winner in Ruby, but I often prefer Sinatra.

You might also be a little biased being a yesod developer and all. For what it is worth, I found both the happstack and snap communities far more helpful. Yesod makes a ton of assumptions, and questioning those assumptions was met with "just start liking what I like".

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

#26

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…

What were the problems you saw in Hamlet?

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

#27

Earlier quoted context omitted.

Yesod is the clear winner in terms of features, number of users, active development and community, or probably any other of the usual metrics. That alone doesn't mean it is the best. Rails is the winner in Ruby, but I often prefer Sinatra.

You might also be a little biased being a yesod developer and all. For what it is worth, I found both the happstack and snap communities far more helpful. Yesod makes a ton of assumptions, and questioning those assumptions was met with "just start liking what I like".

I am certainly biased, but these are all objective measurements. I am not claiming that the Yesod community is better, just that it is more active. I am sorry you didn't have a good experience. If you can point to specifics of inflexibility that can help us re-think our design.

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

#28

A question I'd love to see a good answer to. We've got Yesod, we've got Happstack, and also Snap. What are the major differences between them? Is one of them a clear winner, the way Django/Rails are in Python/Ruby respectively?

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.

> Snap has a better web server underlying it

Again, how so?

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

#29
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.

As someone who loves yesod, this feels kind of accurate, but I don't see it as a bad thing. Yesod is what a type-safe Rails should look like.

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

#30
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?

Personally, I can't stand the "lets mix code and markup" style of template systems in general, which includes most templates. I also hated the indentation system, it just doesn't work well in markup heavy templating. I'm fine with indentation in programming (obviously given that we're talking about haskell), but it drove me nuts in templates as I had to indent far too much, it isn't simple blocks of code being indented, it is "indent everything that is inside something else", which is of course everything.

I found it was just as ugly and awkward as JSP/ASP/PHP, but with the added detriment of forcing me to use indentation where I didn't want it to make it look even less clear, and no closing tags so existing tools look at it and puke. I actually like syntax highlighting. I am atypical I think in that I like zope/lift/heist templates where the template is just pure HTML, and it calls out to "snippets" of code to do anything dynamic. But given the indentation issue, I'd sooner use JSP than hamlet.

Post reply on HN