top | item 40741472

(no title)

amanvirk | 1 year ago

Too much misinformation

- Locks you to their own Validator. Nope, Run npm install Zod and you have it working

- Their own Response/Request classes. Isn't it same with Fastify, Express and other frameworks?

- Annotations, Aren't they part of JavaScript?

discuss

order

morbicer|1 year ago

That's why I don't recommend Fastify or Express. Remix and Hono use standard Req/Res

Annotations are not part of Js, they are part of Ts and are a concession to OOP people coming from other languages. It's a personal opinion but I don't like them and I enjoy this opinion is not uncommon because only few libs are riddled with them.

amanvirk|1 year ago

Yeah being subjetive is fine. We all have tastes and preferences and that's why there are so many frameworks and ecosystems.

Going to nitpick a little here

Hono docs language says, they wrap the standard Request object that you can access via HonoRequest.raw https://github.com/honojs/hono/blob/main/src/request.ts#L26

Annotations/Decorators are in stage3 of JavaScript. But I agree they are not super common in JS world except TS heavy libs or frameworks. Btw we aren't big fan of them and use them sparsely in models and commands only