This forum has been archived. Please start a new discussion on GitHub.

ICE can used by Delphi?

hi, i am a delphi programmer,i am interesting with ice.

now, i uesd the delphi in desktop development. is there any way to use ice service with delphi? i mean : i write Server with c++, and access server use my delphi desktop program.

how ice access database on linux and windows XP/2000/NT? ODBC,OLEDB or others?



  • Language independence
    Client and server can be developed independently and in different programming languages (currently C++ and Java). The Slice definition used by both client and server establishes the interface contract between them and is the only thing they need to agree on.

    So you can't call an ICE server directly by using Delphi. Instead of it , you can develop a middle layer between ICE server and your Delphi program .

    You can call the Database API in ICE programs . and Freeze is a good choice to access Berkeley DB .

    marc and bernard give more professional tips here :
  • bernard
    bernard Jupiter, FL
    The ideal way to use Ice from a given programming language is through a corresponding Ice language binding. Currently Ice provides C++ and Java bindings, and a PHP binding is under development.

    So no Delphi binding at this time. The next best solution is to use Delphi's ability to call other languages (C/C++ for sure, maybe Java as well) and write a wrapper library, e.g.:
    [Main Delphi application]-[Delphi/C++ library]-[Ice/C++ client]--network--[Ice server]

    Regarding database access, you can use Ice with any database you like.
    It just happens that Ice provides a service (Freeze) to store Ice objects: with Freeze, Ice objects are stored directly in a database, Berkeley DB. You don't need to perform any conversion from Ice format to database format: Freeze takes care of it.

    To do the same directly with say ODBC, you would need to convert each Ice object data member to some column in your ODBC table (and vice-versa when reading the database). It's not very difficult, just not as easy as with Freeze.