Dart interaction / access to database

前端 未结 5 1570
情话喂你
情话喂你 2021-02-05 12:38

How can Dart (running server side) access a database ?

Can I execute SQL-Statements directly or can I use some kind of ORM?

5条回答
  •  天命终不由人
    2021-02-05 12:44

    This hits on a larger question of migrating from current architectures such as CakePHP and RoR to Dart. Dart is very new and does not provide much functionality on the server side, not having db drivers is the least of your problems - Dart is lacking a tried and battle proven MVC framework which means that it is almost ludicrous to imagine migrating from CakePHP for the sake of argument to Dart.

    In a situation where you want to try and start converging to the Dart goals - it would make sense NOT to access the db directly from Dart but to use RESTful services in an existing MVC framework.

    This provides a much cleaner and robust interface than coding to SQL in Dart and provides a good migration path.

提交回复
热议问题