Alternatives to PHP [closed]

0

And I really like C # so I took a look at ASP, but I did not like it very much. I already moved with NodeJS and I really like it.

I wanted a PHP-like language, where you could put the code inside HTML and manipulate it.

So:

<div><?php echo "oi" ?></div>

So I wanted to know if you have another language that allows me to do this, I wanted to know if there are any and if there are alternatives to PHP

But what I look for in a Template Engine or a language, would be the possibility to put code even within the HTML type:

for(var i = 1; i <= 100; i++) echo ("<div>OI " + i + "</div>);

EDIT 1: As I said, there are templates (thank you very much for the answer, it has helped but it still does not solve), if you can send good alternatives to NodeJS too.

    
asked by anonymous 20.12.2016 / 14:47

1 answer

6

It's true that PHP has this embedded in the interpreter itself, but being able to put code inside a tamplate is not characteristic of a programming language, so anyone can do this, template can understand that language, because in the background there will be a generated code and everything in the template will be text. Whether this will be well done or poorly done, whether it will be performanceist or not, depends on the quality of the tool used.

Only for C # has a huge list. Some:

You have a list of various mechanisms for various languages on Wikipedia .

If you look at classic ASP, know that it is considered obsolete some 15 years ago. After that came the ASP.Net that also may already be considered obsolete, came the ASP.Net MVC which is the most used currently and the ASP.Net Core which is the latest news.

    
20.12.2016 / 15:06