Ask HN: Is HTML broken as it is, so why Jade?
1–7 of 7 posts
Re: Ask HN: Is HTML broken as it is, so why Jade?
#2But in pure HTML, how do you do something like ng-repeat?[1] You can’t. You have to either use a template language or you have to construct the HTML in the code. Both have goods and others. A template language allows you to keep an HTML like format that non-programmer’s can possibly understand and contribute to, and that can help separate the view from the business logic, but it comes at the cost of having to learn a new language / framework and the hurdles that abstractions sometimes create.
Similar question on Quora. [2]
[1] https://docs.angularjs.org/api/ng/directive/ngRepeat [2] http://www.quora.com/What-are-the-pros-and-cons-of-using-a-t...
Re: Ask HN: Is HTML broken as it is, so why Jade?
#3Consider this takes me 45 seconds to write:
#{item.title}
Versus 15 seconds: .container
.container__item(data-id=item.id)
h1.container__item__title= item.titleRe: Ask HN: Is HTML broken as it is, so why Jade?
#4HTML is too slow. My web dev method is so streamlined at this stage, if I'm writing individually, I'm spending too much time on stupid shit that doesn't really interest me. Consider this takes me 45 seconds to write: #{item.title} Versus 15 seconds: .container .container__item(data-id=item.id) h1.container__item__title= item.title
For example, http://emmet.io/
The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a
? ? ? I think you're losing a lot more by trying to gain 30 seconds of time.
Re: Ask HN: Is HTML broken as it is, so why Jade?
#5HTML is too slow. My web dev method is so streamlined at this stage, if I'm writing individually, I'm spending too much time on stupid shit that doesn't really interest me. Consider this takes me 45 seconds to write: #{item.title} Versus 15 seconds: .container .container__item(data-id=item.id) h1.container__item__title= item.title
If you are hand typing each and every one of those characters by hand you're doing it wrong. There are a lot of projects out there aimed at making writing HTML faster. For example, http://emmet.io/ The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a ? ? ? I think you're losing a lot more by trying to gain 30 seconds of time.
? ? ?
It takes 2 seconds to learn and forever on know that Jade defaults non-specified tags to divs.
For me Jade is faster to both write and read.
Re: Ask HN: Is HTML broken as it is, so why Jade?
#6Earlier quoted context omitted.
If you are hand typing each and every one of those characters by hand you're doing it wrong. There are a lot of projects out there aimed at making writing HTML faster. For example, http://emmet.io/ The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a ? ? ? I think you're losing a lot more by trying to gain 30 seconds of time.
> The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a ? ? ? It takes 2 seconds to learn and forever on know that Jade defaults non-specified tags to divs. For me Jade is faster to both write and read.
Re: Ask HN: Is HTML broken as it is, so why Jade?
#7Earlier quoted context omitted.
> The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a ? ? ? It takes 2 seconds to learn and forever on know that Jade defaults non-specified tags to divs. For me Jade is faster to both write and read.
Sorry, but my, and most people's, thoughts, is that code should be easy to read and understand what's going on. Jade does not do that. It might take "two seconds" to learn, that's extra time that you're wasting going and looking it up. It's much simpler to just write , that way everyone who knows HTML and looks at your code will know what's going on. Jade is bucking a standard for no real added benefit.