Dart Notes 1

Dart Ecosystem – Database Connectivity

I’ve been looking into the Dart ecosystem the past few days as I’ve been getting more into it. One thing that I’ve noticed is that there seems to be a hole in the ecosystem when it comes to SQL database connectivity.

There doesn’t appear to be one well defined package or interface to multiple SQL database backends (ala Perl DBI or the like) – especially if you are interested in sending raw SQL.

There are a number of packages that implement interfaces of some sort to SQLite, and if you are using non-relational databases or Firebase, there seem to be good options, but if you want to write something that might connect to bog standard SQL Server, Oracle, MySQL, or Postgres remotely, there doesn’t seem to be a unified option for that. There are packages for MySQL and Postgres it seems, and there is an old package for ODBC, but it doesn’t look like it’s been updated in 8 years, so I’m not sure how compatible it is at the moment.

This pretty dramatically effects my thoughts of being able to use Dart on the backend with traditional relational databases as a datastore.

Dart Ecosystem – Lex and Yacc

I am having a hard time finding a version of the Lex and Yacc tools in Dart. I have been wanting to go through the book Modern Compiler Implementation in Java, and do the exercises in Dart. But the book mentions using Java versions of the Lex and Yacc tools, and so I’m a little stuck there at the moment.

There are other parsing libraries I’ve found that use combinators and they look pretty cool, and there is also the path of avoiding tooling, and generating the parsers by hand, which some other good books take, so there are other approaches I could take if I am interested in using Dart for exploring interpreters or compilers. But those approaches would not be compatible with that particular book.

Current Thoughts

It appears that at the moment Dart and Flutter are a bit pigeonholed into the Front-End / UI space. I think that Dart has a lot more potential than that, but it needs some help on the package ecosystem front to really be able to address some of the common use cases outside of the UI space.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s