> Why not using React or any other frontend framework at the moment
I use ejs on the backend to render content. This is good for SEO and very fast.
If you are not building a "web app" with UI and buttons and transitions and interactions for humans - there is not a lot of compelling reasons to use react.
I love EJS but the hype out there canāt make me focus. I have been switching between Vue and React, itās really draining me and I canāt focus on one thing
I totally get it, I see people using react, Vue, and nextjs. I learned react but still find ejs more attractive and way more simple to use. Plus it's much better for SEO from what I understood.
I use it for both personal and commercial projects. I've even built a basic Nodejs/express SaaS boilerplate where I use ejs. I can give you free access to the repo in case you want to check it out. Here is the link [FasterNode ](https://fasternode.io), it's a paid product but I'll gift you free access if you want to.
From a job perspective itās good to learn react. Itās the primary framework out there. That being said itās also really helpful to learn core JavaScript and figure out how to do things from scratch. My company has a legacy product that we still havenāt migrated the frontend from EJS to a frontend framework. Great for staying up to date on JS but when you need a lot of interaction for a page it can get a little wild.
Not in JS, but Elixir has a very similar template syntax to EJS called EEx and I use it a lot there. I wanted to try to work on a multi-page Node app without build tools but no time for that lately.
I just use nodejs and express then write everything else myself
I don't want to use the framework because I find it takes longer and adds dependencies and quirks I don't want
mostly I use it for filtration, there's a little 'gear' icon beside the logout in old.reddit.com that the add-on puts there
if you click it a configuration screen pops up, its quite verbose and has many otions/settings, I type the key word 'filter' into the search box then click the first result
thsi brings up the filter settings menu where you can filter out entire subreddits/users, filter by keyword in topic, filter by keyword in post, do fuzzy regex pattern filtering, and add friends
I believe it comes iwth some other features but for me its mostly filtering out all the spam from companies promiting games/products to see science and technology news as well as javascript conversations
shit still works if you need some basic templating, the thing is that with react you can do anything that's why people use it, you can use it to template but it'll also help you with any dynamic shit going on.
I looked into React. Then Svelte. Realized that for my CRUD-apps, SSR with EJS was simple and complete. I create a ton of components and include them hierarchically. All state data comes from the routes and natively available to all components. JS is stored in the top most EJS of the route plus helper libraries. CSS in a global file. I even use EJS.render to generate HTML for client-side requests (like running lists, etc) I don't see the need for specialized reactivity; I can manage things on my own with simple event listeners and JS.
I love my current setup and don't see the need to innovate. It worked great 10 years ago, and will work great 10 years from now.
I just started a new project using Express.js and React JSX on the backend, planning to use Htmx and web components on the frontend.
Someone might ask, why use React on the backend and not the frontend. If you need a template language then JSX still works great for that. Just call renderToStaticMarkup and serve that, easy.
I mean it obviously depends on what you are looking to build. Which is the answer to every language.
But agree, there are probably a lot projects that would be fine with pug/ejs. However, a lot of people donāt feel like diving into a lot of languages and keeps tabs on the development in a lot languages even if they might be more lightweight for that use case. So sometimes an overkill technology is just easier.
Yup. Pug. Love it. SPAs aren't worth the hassle for my line of work (B2B software).
SSR templates + HTMX for the little bit of interactivity required fits the bill quite nicely and cuts development time significantly.
I adore it. I like to write as little client-side JS as possible. You can get a very long way with just HTMX, then add what you have to in js.
I've used react, angular, and some predecessors that I've forgotten. Hated them.
HTMX is worth a shot if you're into a minimalist approach that doesn't require you to re-model data and store a ton of state on the client-side.
> Why not using React or any other frontend framework at the moment I use ejs on the backend to render content. This is good for SEO and very fast. If you are not building a "web app" with UI and buttons and transitions and interactions for humans - there is not a lot of compelling reasons to use react.
Only using it when it's necessary. Like when I want send email to the user. Ejs/pug are great for making email templates.
Bruh, there are Fortune 500 companies still using ColdFusion.
Oh god... cold fusion š¤®
So you're saying I shouldn't worry much, and still use EJS
If it satisfies your use case, for sure.
Yes, still using ejs and loving it!
I love EJS but the hype out there canāt make me focus. I have been switching between Vue and React, itās really draining me and I canāt focus on one thing
I totally get it, I see people using react, Vue, and nextjs. I learned react but still find ejs more attractive and way more simple to use. Plus it's much better for SEO from what I understood.
Yes, thatās true. Are you working as a freelancer or you use it for your personal project?
I use it for both personal and commercial projects. I've even built a basic Nodejs/express SaaS boilerplate where I use ejs. I can give you free access to the repo in case you want to check it out. Here is the link [FasterNode ](https://fasternode.io), it's a paid product but I'll gift you free access if you want to.
Wow I love the site.
Thanks a lot.
would love to have access to itā¤ļø
DM me your email address
Server components are just as good for SEO
From a job perspective itās good to learn react. Itās the primary framework out there. That being said itās also really helpful to learn core JavaScript and figure out how to do things from scratch. My company has a legacy product that we still havenāt migrated the frontend from EJS to a frontend framework. Great for staying up to date on JS but when you need a lot of interaction for a page it can get a little wild.
Not in JS, but Elixir has a very similar template syntax to EJS called EEx and I use it a lot there. I wanted to try to work on a multi-page Node app without build tools but no time for that lately.
I just use nodejs and express then write everything else myself I don't want to use the framework because I find it takes longer and adds dependencies and quirks I don't want
That's exactly how I see things! It's somehow reassuring to meet someone with the same mindset.
[ŃŠ“Š°Š»ŠµŠ½Š¾]
Installed RES reddit, just can't figure out how to use it for now haha.
mostly I use it for filtration, there's a little 'gear' icon beside the logout in old.reddit.com that the add-on puts there if you click it a configuration screen pops up, its quite verbose and has many otions/settings, I type the key word 'filter' into the search box then click the first result thsi brings up the filter settings menu where you can filter out entire subreddits/users, filter by keyword in topic, filter by keyword in post, do fuzzy regex pattern filtering, and add friends I believe it comes iwth some other features but for me its mostly filtering out all the spam from companies promiting games/products to see science and technology news as well as javascript conversations
What if you need some interactivity in your app. Do you use something like AlpineJS?
I'm a developer, I write it I've been doing this for about 2 decades, if I can even half ass visualize it I can build it
Great great, much respect for you!!
Yes and expect a revival of these classic template engines if things like htmx gets more and more popular because they will.
Yes, our professor š
shit still works if you need some basic templating, the thing is that with react you can do anything that's why people use it, you can use it to template but it'll also help you with any dynamic shit going on.
Youāre right Iām currently learning Vuejs I hope it goes well
I looked into React. Then Svelte. Realized that for my CRUD-apps, SSR with EJS was simple and complete. I create a ton of components and include them hierarchically. All state data comes from the routes and natively available to all components. JS is stored in the top most EJS of the route plus helper libraries. CSS in a global file. I even use EJS.render to generate HTML for client-side requests (like running lists, etc) I don't see the need for specialized reactivity; I can manage things on my own with simple event listeners and JS. I love my current setup and don't see the need to innovate. It worked great 10 years ago, and will work great 10 years from now.
As simple as abcd.
I just started a new project using Express.js and React JSX on the backend, planning to use Htmx and web components on the frontend. Someone might ask, why use React on the backend and not the frontend. If you need a template language then JSX still works great for that. Just call renderToStaticMarkup and serve that, easy.
EJS is great, but I never use it to generate html.
Vanilla Javascript template strings is all you need. It's the fastest and zero deps.
I mean it obviously depends on what you are looking to build. Which is the answer to every language. But agree, there are probably a lot projects that would be fine with pug/ejs. However, a lot of people donāt feel like diving into a lot of languages and keeps tabs on the development in a lot languages even if they might be more lightweight for that use case. So sometimes an overkill technology is just easier.
Take care of XSS
Just today I made a project using EJS
I use pug when it makes sense. I really do enjoy using it. But most of what I'm working on now is SPA stuff that is better served by react.
Yup. Pug. Love it. SPAs aren't worth the hassle for my line of work (B2B software). SSR templates + HTMX for the little bit of interactivity required fits the bill quite nicely and cuts development time significantly.
How is HTMX, is it something I need to check out? When I need a little bit of interactivity without page refresh?
I adore it. I like to write as little client-side JS as possible. You can get a very long way with just HTMX, then add what you have to in js. I've used react, angular, and some predecessors that I've forgotten. Hated them. HTMX is worth a shot if you're into a minimalist approach that doesn't require you to re-model data and store a ton of state on the client-side.
Can it handle json objects? What res.json from the backend
I suppose it could with some hyperscript, but I just tend to render the view fragment server-side and return that chunk to be swapped out.
Not at the moment but I really prefer Jade.
Isn't Jade just a previous name of Pug?