Replace PHP with Javascript and Node JS

Asked

Viewed 75 times

-2

It is possible to program the web completely without PHP, using Javascript and Node JS? Beyond Html and clear CSS;

  • Yes, using Node with Expressjs, Adonisjs or even other frameworks.

  • 1

    @Angelosoares or frameworks need, in nodejs using request and Response created a minimalist structure of independent routes, and works very well being much more efficient than the popular Fws, including with regex (I call Patterns there) for dynamic routes. But great that you cited the examples of existing frameworks.

  • 1

    It would help if you could [Dit] and substantiate the question (e.g., what was it that tried and did not work, to the point of having motivated the doubt, even because web browsing existed and worked long before PHP and Node)allowing for objective responses that do not depend on mere opinion. To understand what kind of question serves the site and, consequently, avoid closures and negativities worth reading What is the Stack Overflow and the Stack Overflow Survival Guide (summarized) in Portuguese.

1 answer

-4


Yes my friend! Totally viable, by the way! What you should understand is that in frontend, HTML, CSS and Javascript ALWAYS will be running in the browser. PHP and Nodejs are for backend, only to handle requests and responses, which are defined according to your need in the frontend. Your application doesn’t even need backend (in certain cases), you can use some kind of service BaaS (Backend as a Service), where you can integrate a kind of backend within the front! Look how cool! A good example of this is the Firebase, which enables you to integrate a database into the frontend, without the need to work on a backend for your application. You can have a fully Javascript-based application for example, with HTML, JS and CSS within a single (or multiple) file extension .JSX (or .TSX, if you choose to use Typescript). This fully Javascript-based application is strongly used when you work with ReactJS, a library created by Facebook, which allows you to create a Javascript-only application. But as said before, when you spin one build within Reactjs, it will generate HTML, CSS and JS statically within a folder, that is, the browser will not work with Reactjs itself, but rather with the files generated by it. I strongly recommend you study Reactjs integrating Firebase into it, you can create applications worrying only about your frontend, and without having the headache of creating a whole backend to meet the demand.

  • Caraca Felipe, thank you very much man, already opened up my mind a lot and removed several doubts. My focus is really not using PHP. If you have any course or content to indicate, leave it here. I’m really grateful. I finished college recently and now I want to specialize.

  • Cod3r offers several courses within Udemy, I recommend their Modern Web Development course, within this ONLY course, you can learn several frameworks aimed at web development (including, there they address the React). But don’t just rely on courses, always try to read the documentation first, it’s a good habit.

Browser other questions tagged

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