I've got really used to developing views in MVC4 using Razor. But I have to do a project in RoR and I'm pretty new to the whole Rails environment. I like Razor because it frees me from the <% business.
Can someone suggest a close cousin of Razor for Ruby?
Razor is a templating engine that was introduced with ASP.NET MVC, originally to run on the server and generate HTML to be served to web browsers. The Razor templating engine extends standard HTML syntax with C# so that you can express the layout and incorporate CSS stylesheets and JavaScript easily.
Popular template engines Template engines are mostly used for server-side applications that are run on only one server and are not built as APIs. The popular ones include Ejs, Jade, Pug, Mustache, HandlebarsJS, Jinja2, and Blade.
EJS is one of the template engines used with Node JS to generate HTML markups with plain Javascript. EJS stands for Embedded JavaScript Templates. It can be used both on the client and the server-side.
The react-engine , on the same side it happens the use of the same rendering mechanism. However, instead of a template engine semantic, it uses JSX , or if we want, we can also use JavaScript . The JSX is, therefore, broader then template engines.
I only know of 3 options. As far as I know, there is no Rails templating engine that's exactly like Razor:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With