Alternatives for PHP

Asked

Viewed 861 times

0

And I really like C# so I took a look at ASP, but I didn’t like it much. I’ve handled Nodejs and I like it a lot.

I wanted a language like PHP, where you can put the code inside the HTML and manipulate him.

Thus:

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

So I was wondering if there’s another language that allows me to do this, I was wondering if there are any and if there are any 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 it was said, there are the templates (Thank you very much for the answer, helped, but not yet solved), If you can send good alternatives to Nodejs as well.

  • 4

    What’s wrong with Ode?

  • The most common ones used on the server are (in that order) PHP, Java web and Node.js, with a strong Node trend. You can still use javascript to manipulate the data in the client and use ajax requests to search and send data to the server. In this case it makes no difference what you use on the server.

  • No problem, I just didn’t like EJS very much, I wanted something more like how JSP and PHP work, like echo "<div>oi</div>"

1 answer

7


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

Only for C# has a huge list. Some:

Has a list of various mechanisms for various languages in Wikipedia.

If you’ve looked at classic ASP, you should know that it’s been considered obsolete for about 15 years. After that came ASP.NET which can also be considered obsolete, came ASP.NET MVC which is the most used today and the ASP.NET Core which is the latest news.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.