Ask HN: Is HTML broken as it is, so why Jade?
Just to get something clear, i am a self taught web developer and i love learning new USEFULL technologies, recently i have been assigned to work on a project and it uses Jade, its a MEAN stack project and since i started using Jade, it just sucks for me, so my question is why Jade, what is worng with HTML as it is? if its not broken then why try to fix it? I feel like learning the shity Jade is like a waste of time and mental effort.
6 comments
[ 4.4 ms ] story [ 24.4 ms ] threadBut 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...
Consider this takes me 45 seconds to write:
Versus 15 seconds: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 <p>? <div>? <span>? 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.