DEV Community

Sofwan Rafiee
Sofwan Rafiee

Posted on

Javascript


Nowadays, having a basic understanding of JavaScript is becoming increasingly important. If you're looking to dive into any of the popular JS frameworks out there, such as ReactJS, you'll need a solid foundation in the language first. That said, JavaScript is a powerful tool, and before you can master it, you'll need to have a handle on HTML and CSS, as they're the building blocks that JS is used to manipulate.

When you really know JS, you'll be able to write code that does exactly what you want it to do, rather than relying on copy-pasting and feeling like a bit of a fraud. It's also really cool that you can use JSON data from the backend of your website (be it Laravel, NextJS, Django, JSP, or something else) and stay in the JS environment. These days, it's just not relevant to embed HTML in PHP/ASP/JSP or PHP/Blade - there's a clear separation between front-end and back-end.

Let's take a simple example: in the past, you might have used PHP to generate HTML, right? Now, you're better off using JavaScript to generate the HTML and PHP to supply the data in JSON form. This might mean learning how to change PHP into an API server and working with headers and curl or Postman. But don't worry, over time it will become much easier once you get the hang of the ecosystem.

If you're feeling confident in your JS skills, why not try using it to become a server (instead of PHP)? Check out the NextJS tutorial and see where it takes you!

On a different note, my favorite simulator game is SDK in Python because I'm really into telemetry data, so I had to go back to Python. But that's just me - it's important to find the tools and technologies that work best for you.

As for me, I started learning JS during the jQuery era. It was easy to manipulate the DOM and the code was very expressive. After a few years of using jQuery, I decided to try ReactJS, and now I'm using 100% JS for front-end development.

If you're thinking of taking on a project that involves using Laravel with ReactJS, I recommend separating your folders so you're not using the built-in version. Just install Sanctum and connect to ReactJS using tokens from there. I'm also working on a project that uses Python Flask and ReactJS, and I'm currently chatting with ChatGPT about the architecture.

A few tips to keep in mind: NGinx web server has a special plugin that can really boost loading times (just enable gzip and find the right settings), and personally, I'm still loyal to MySQL when it comes to databases.

All in all, I believe that mastering JavaScript is a lot like learning English as a second language - it takes time and effort, but it's well worth it in the end. Happy coding!

(credit - Azri Nazli Alias)

Top comments (0)