DEV Community

Odi - server-side framework

Dan T. on December 27, 2018

Introduction Hi guys! I am currently working on the server-side TypeScript framework. My team already widely use this framework in vari...
Collapse
 
triodjangopiter profile image
Pavel Ravvich •

Yes, this is very interesting idea. This something like Spring clone for TS. But where spring-data. I see Spring MVC and lombok. Fool tools bunch for Postgress, MySQL, Mongo and Redis and this framework will be the brilliant.

Collapse
 
dantsk profile image
Dan T. •

Hi! Currently, there are no plans to implement custom ORM. But Odi is integrated with TypeORM, and provide a wide set of possibilities. Also, Transactional methods are supported!

Collapse
 
covicake profile image
Fernando Andrés García Hernández •

I can't find anything on the docs regarding that integration with TypeORM. There are three empty entries regarding 'database' (Settings, Repository, Transactions) and I can't find any example on the web either.

Can you point me in the right direction? :) Thanks

Collapse
 
tiguchi profile image
Thomas Werner •

Having spent the last couple of years with Java server development this is definitely something I will look into. Just recently I started a small Node.JS API project using Express and found route setup and request payload validation really cumbersome and too verbose. Odi looks like a promising alternative!

Collapse
 
gregra81 profile image
Greg Rashkevitch •

Hi Dan,
Have you considered using + contributing to Loopback - v4.loopback.io/ ?

Collapse
 
dantsk profile image
Dan T. •

Hi! Thanks for your question. Loopback got a design like Nestjs, Ts.Ed, Routing-controllers. Shortly, differences between Odi and Nestjs are similar to differences between Odi and Loopback :)

Contributing will fail, as design goals of loopback is not completable with Odi goals.

Collapse
 
gregra81 profile image
Greg Rashkevitch • • Edited

Well, from taking a closer at Odi and at Loopback 4, I see only advantages in Loopback 4.

  • Regarding routing - it works very similar with decorators (Odi has decorators in the controller)
  • Regarding DI - Loopback does it explicitly, like any other framework I know (like Spring), Odi does too much magic - harder to debug (and test?)
  • Regarding all the future features you plan to develop - these exist today in Loopback 4
  • Also, Loopback has an LTS support and it's backed by IBM with people that are getting paid just to maintain and support the framework

In summary - I do not see any reason to take risks and go for a new framework that has only disadvantages over Loopback 4
Take my word for it and consider moving to Loopback 4 and contributing (or any other NodeJS framework)

Thread Thread
 
dantsk profile image
Dan T. •

It’s defenitily good arguments. But we have interesting things to show in the future that will differentiate odi from loopback. Anyway, it’s great to have a choice between technologies.

Collapse
 
jay97 profile image
Jamal Al •

I love the idea but what's with all the decorators. I hate the syntax. It adds a little unnecessary complexity. I would just use HOF.

Collapse
 
reegodev profile image
Matteo Rigon •

Starred as soon as I saw fastify being used as router

Collapse
 
larsklopstra profile image
Lars Klopstra ⚡ •

Looks sexy!

Collapse
 
dantsk profile image
Dan T. •

Thanks a lot!