In

2007
I said...
Database interfaces
 for open source
 languages suck
They’re all limited

 They’re all different

They’re all duplicating
 development effort
We need

a common database driver API

    for Perl 6 and Parrot
But what?
Mature, Stable, Functional,
      Object Oriented

Well documented with a test suite

Well known to a wide user base

Well...
JDBC
JDBC
No, not Java, just the JDBC API

  The class and method names,
          the semantics
       the documentation
     ...
Actually, not plain JDBC

Sanitize the worst influences of Java

Easier to use for dynamic languages
Your Code



         DBI



         DBD



Database Client Library
Your Code
DBI v2 API

                      DBI



                      DBD



             Database Client Library
Your Code
DBI v2 API

                      DBI
DBDI API

                      DBD



             Database Client Library
Your Code
DBI v2 API

                      DBI
DBDI API

                      DBD



             Database Client Library
NO JDBC FOR THIS!

                    Your Code
 DBI v2 API

                       DBI
 DBDI API

                      ...
2010
java2perl6api

  Generates Perl 6 Role modules that
mirror the API of specified Java Classes

         http://github.com/ti...
DBDI

A database driver manager and driver
 implementation framework in Perl 6

Uses the roles generated by running
java2p...
It Runs!

  A working PostgreSQL driver
      is included in DBDI

It’s very minimal today (July 2010)
but it only took a ...
Next steps?
Build up a class/role hirearchy
   borrowing from open source
         JDBC drivers

Separate driver-specific logic from
dr...
Interested?

  Come and join the fun!

    dbdi-dev@perl.org

#dbdi on irc.freenode.org
Upcoming SlideShare
Loading in...5
×

Perl 6 DBDI 201007 (OUTDATED, see 201008)

4,206

Published on

For an updated version see http://www.slideshare.net/Tim.Bunce/perl6-dbdi-yapceu-201008

Published in: Technology
1 Comment
4 Likes
Statistics
Notes
  • Congratulations !!! This is an excellent work.Thank you for sharing. We have selected your presentation for the reference in our group Slideshare 'BANK OF KNOWLEDGE'. We would be honored by your support through your membership. You are invited to join us ! I wish you a nice day. Greetings from France. Nadine

    http://www.slideshare.net/group/bank-of-knowledge
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
4,206
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
1
Likes
4
Embeds 0
No embeds

No notes for slide

  • Database interfaces for Java, C#, VB etc also suck, but are much more functional
    Perl has its own database drivers, as do Python, Ruby, PHP, tcl etc etc
    Just about every open source language has its own database drivers
    Some even have more than one set of database interfaces and drivers

  • They're All limited
    Most provide access to a fraction of database client functionality
    They're All different
    Even the ones modelled on the DBI differ in significant ways
    They're All duplicating development effort
    So much more could be achieved if the same effort was focussed on fewer drivers that could be shared across languages
    Diversity is good, but this is madness.
  • All drivers can implement the common API,
    then any parrot language can use any driver

  • We need an API that is...
  • The only good fit is the Java JDBC API
    “JDBC is the new ODBC”
    So I'm proposing that the JDBC API specification be the common database driver API for Parrot
    The goal being to be able to use the official JDBC docs as the primary docs for the API
  • The only good fit is the Java JDBC API
    “JDBC is the new ODBC”
    So I'm proposing that the JDBC API specification be the common database driver API for Parrot
    The goal being to be able to use the official JDBC docs as the primary docs for the API
  • The only good fit is the Java JDBC API
    “JDBC is the new ODBC”
    So I'm proposing that the JDBC API specification be the common database driver API for Parrot
    The goal being to be able to use the official JDBC docs as the primary docs for the API
  • Language interface layer adapts the JDBC API to the particular needs of that language











  • Perl 6 DBDI 201007 (OUTDATED, see 201008)

    1. 1. In 2007 I said...
    2. 2. Database interfaces for open source languages suck
    3. 3. They’re all limited They’re all different They’re all duplicating development effort
    4. 4. We need a common database driver API for Perl 6 and Parrot
    5. 5. But what?
    6. 6. Mature, Stable, Functional, Object Oriented Well documented with a test suite Well known to a wide user base Well known to driver developers
    7. 7. JDBC
    8. 8. JDBC No, not Java, just the JDBC API The class and method names, the semantics the documentation the test suite
    9. 9. Actually, not plain JDBC Sanitize the worst influences of Java Easier to use for dynamic languages
    10. 10. Your Code DBI DBD Database Client Library
    11. 11. Your Code DBI v2 API DBI DBD Database Client Library
    12. 12. Your Code DBI v2 API DBI DBDI API DBD Database Client Library
    13. 13. Your Code DBI v2 API DBI DBDI API DBD Database Client Library
    14. 14. NO JDBC FOR THIS! Your Code DBI v2 API DBI DBDI API DBD USE JDBC Database Client Library FOR THIS
    15. 15. 2010
    16. 16. java2perl6api Generates Perl 6 Role modules that mirror the API of specified Java Classes http://github.com/timbunce/java2perl6
    17. 17. DBDI A database driver manager and driver implementation framework in Perl 6 Uses the roles generated by running java2perl6api java.sql.DriverManager http://github.com/timbunce/DBDI
    18. 18. It Runs! A working PostgreSQL driver is included in DBDI It’s very minimal today (July 2010) but it only took a few hours to write
    19. 19. Next steps?
    20. 20. Build up a class/role hirearchy borrowing from open source JDBC drivers Separate driver-specific logic from driver-independant logic to make it easy to implement drivers
    21. 21. Interested? Come and join the fun! dbdi-dev@perl.org #dbdi on irc.freenode.org

    ×