I have just move towards to learn Ajax . Before learning Ajax one big
question raised to me what to use haml or erb.
From day one of Rails, i have used only .erb files.
I read DRY feature of haml and haml really impress me.
I really wish to use haml .
Before use i raised some questions :-
1 . Is there are more advantage execluding dry feature of haml over
erb.
2 . Is there any limitation or drawback of haml .
3. Give me some quick start to Ajax but should be simple because i have
only theoretically knowledge of Ajax.
Before use i raised some questions :-
1 . Is there are more advantage execluding dry feature of haml over erb.
2 . Is there any limitation or drawback of haml .
3. Give me some quick start to Ajax but should be simple because i have
only theoretically knowledge of Ajax.
I always use .erb but in the last project I had to use haml. of course
it has a dry syntax, but my opinion is that it distorts the concept of
templating language. The use of haml makes you learn another syntax
different from html, but a view, at the end, is html…
I don’t like it much
has a dry syntax, but my opinion is that it distorts the concept of
templating language. The use of haml makes you learn another syntax
different from html, but a view, at the end, is html…
I don’t like it much
I think haml is excellent and much prefer it to erb. But that just
shows that different tools suite different people. OP try it yourself
and use whichever one you prefer. Either will do the job.
On Wednesday, November 7, 2012 3:15:55 PM UTC+5:30, Colin L. wrote:
question raised to me what to use haml or erb.
only theoretically knowledge of Ajax.
shows that different tools suite different people. OP try it yourself
and use whichever one you prefer. Either will do the job.
Colin
Thanks lot reply.
I waiting for reply on this question.
Give me some quick start to Ajax but should be simple because i have
only theoretically knowledge of Ajax.
Give me some quick start to Ajax but should be simple because i have only
theoretically knowledge of Ajax.
That is why it is best to only ask questions on one subject at a time.
I would start by using google, I am sure it will find lots of useful
stuff. A search for
rails ajax tutorial
looks like a good start. If you already understand the theory you
should have few problems.
I think you mis-counted the zeros. It suggests haml take 1.5 times as
long erb. However it is irrelevant either way as only a tiny
proportion of the total time is spent rendering either erb or haml.
On Wed, Nov 7, 2012 at 4:35 AM, Иван Бишевац [email protected]
wrote:
I use both, but prefer haml, because it’s concise.
I normally give clients a decision when the project starts (or make my
own based on what they express their technical skill to be at the
start of a project.) In short what I tell clients is “Do you know much
about HTML? Does learning something new really bug you or do you want
to work with what you know?” Those two questions help me decide
whether to use HAML which is concise like the above quote states or
use ERB which has a far less learning curve and for technology
disinclined people who know basic HTML, does not lock them out of
their own views.
For the performance issues, to me that matters not one bit considering
I do fragment caching and I do full caching depending on the page so
at that point the argument is moot, unless you are dynamically serving
every one of your pages dynamically which is ignorant to do even on a
small site. So in short the issues about “speed” in my eyes are
immature and ignorant to modern caching techniques for dynamic sites.
Check out Backbone.JS or Spine JS. (Newcommers will find Backbone’s
documentation better, but I’ve actually switched to Spine which I like
certain parts of better).
For front-end tempting, you’ll probably want .haml.jst. check these out
This used to be how we did used haml with JST, but the repo is gone