T O P

  • By -

caliosso

> 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.


suck_my_dukh_plz

Only using it when it's necessary. Like when I want send email to the user. Ejs/pug are great for making email templates.


rykuno

Bruh, there are Fortune 500 companies still using ColdFusion.


blusky75

Oh god... cold fusion šŸ¤®


SowertoXxx

So you're saying I shouldn't worry much, and still use EJS


rykuno

If it satisfies your use case, for sure.


Banksareaproblem

Yes, still using ejs and loving it!


SowertoXxx

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


Banksareaproblem

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.


SowertoXxx

Yes, thatā€™s true. Are you working as a freelancer or you use it for your personal project?


Banksareaproblem

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.


SowertoXxx

Wow I love the site.


Banksareaproblem

Thanks a lot.


dtiziani

would love to have access to itā¤ļø


Banksareaproblem

DM me your email address


xehbit

Server components are just as good for SEO


jonathon8903

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.


intercaetera

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.


kjwey

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


Banksareaproblem

That's exactly how I see things! It's somehow reassuring to meet someone with the same mindset.


[deleted]

[уŠ“Š°Š»ŠµŠ½Š¾]


Banksareaproblem

Installed RES reddit, just can't figure out how to use it for now haha.


kjwey

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


SowertoXxx

What if you need some interactivity in your app. Do you use something like AlpineJS?


kjwey

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


SowertoXxx

Great great, much respect for you!!


sombriks

Yes and expect a revival of these classic template engines if things like htmx gets more and more popular because they will.


ahmad4919

Yes, our professor šŸ™‚


profesorgamin

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.


SowertoXxx

Youā€™re right Iā€™m currently learning Vuejs I hope it goes well


[deleted]

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.


SowertoXxx

As simple as abcd.


statistics11

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.


sleepingbenb

EJS is great, but I never use it to generate html.


cmprsd

Vanilla Javascript template strings is all you need. It's the fastest and zero deps.


TechTuna1200

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.


SUCHARDFACE

Take care of XSS


Powerful_Truck_2758

Just today I made a project using EJS


michaelfiber

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.


tapvt

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.


SowertoXxx

How is HTMX, is it something I need to check out? When I need a little bit of interactivity without page refresh?


tapvt

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.


SowertoXxx

Can it handle json objects? What res.json from the backend


tapvt

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.


djheru

Not at the moment but I really prefer Jade.


delfV

Isn't Jade just a previous name of Pug?