View mode: basic / threaded / horizontal-split · Log in · Help
February 29, 2008
Tango DeRailed,DeActive Nomen est Omen ?
Hi,
just a few ideas about DDBI, DeRailed ...
So, the Sendero folks gave up the idea of ORM, CORBA etc. instead :
back to the roots: named DDBI. A good chance to reactivate DDBI but
unfortunately the DDBI rowset discussion is  at a stand still so I'd 
like to add a few sugesstions.

Let us use Java like DAO and a D-ish RowSet instead of Active Record.
-----
DAO is IMO a very good choice in case that you want to have a db 
agnostic library.
The required pattern are very well known. (factory, etc.)

Implementing RowSet is difficult using traditional compiled languages 
like D, so I suggest to implement LISP like lists in D.
These Lists are able to contain any kind of data including other lists. 
('cause we just deal with void*)

Opinions ?

Bjoern

(Corba is indeed a bad choice in case that you have to deal with massive 
service requests)
February 29, 2008
Re: Tango DeRailed,DeActive Nomen est Omen ?
Bjoern wrote:
> Hi,
> just a few ideas about DDBI, DeRailed ...
> So, the Sendero folks gave up the idea of ORM, CORBA etc. instead :
> back to the roots: named DDBI. A good chance to reactivate DDBI but
> unfortunately the DDBI rowset discussion is  at a stand still so I'd 
> like to add a few sugesstions.
> 
> Let us use Java like DAO and a D-ish RowSet instead of Active Record.
> -----
> DAO is IMO a very good choice in case that you want to have a db 
> agnostic library.
> The required pattern are very well known. (factory, etc.)
> 
> Implementing RowSet is difficult using traditional compiled languages 
> like D, so I suggest to implement LISP like lists in D.
> These Lists are able to contain any kind of data including other lists. 
> ('cause we just deal with void*)
> 
> Opinions ?
> 
> Bjoern
> 
> (Corba is indeed a bad choice in case that you have to deal with massive 
> service requests)


Hi.

Seems interesting. Where is all this been discussed? (I don't want to 
comment without proper context.)


-- 
Julio César Carrascal Urquijo
http://jcesar.artelogico.com/
March 01, 2008
Re: Tango DeRailed,DeActive Nomen est Omen ?
Julio César Carrascal Urquijo schrieb:
> Bjoern wrote:
>> Hi,
>> just a few ideas about DDBI, DeRailed ...
>> So, the Sendero folks gave up the idea of ORM, CORBA etc. instead :
>> back to the roots: named DDBI. A good chance to reactivate DDBI but
>> unfortunately the DDBI rowset discussion is  at a stand still so I'd 
>> like to add a few sugesstions.
>>
>> Let us use Java like DAO and a D-ish RowSet instead of Active Record.
>> -----
>> DAO is IMO a very good choice in case that you want to have a db 
>> agnostic library.
>> The required pattern are very well known. (factory, etc.)
>>
>> Implementing RowSet is difficult using traditional compiled languages 
>> like D, so I suggest to implement LISP like lists in D.
>> These Lists are able to contain any kind of data including other 
>> lists. ('cause we just deal with void*)
>>
>> Opinions ?
>>
>> Bjoern
>>
>> (Corba is indeed a bad choice in case that you have to deal with 
>> massive service requests)
> 
> 
> Hi.
> 
> Seems interesting. Where is all this been discussed? (I don't want to 
> comment without proper context.)
> 
> 

I guess it was Brad who wrote this article :
May be you should read this first :
http://www.dsource.org/projects/tango/wiki/DeActive

To discuss :
1)
Tango Talk
http://www.dsource.org/projects/tango/forums
2)
DDBI Forum at :
http://www.dsource.org/forums/viewforum.php?f=60

3)
Dr Dobbs article The Power of LISP for C Programmers
- "Lisp like lists in C"
http://www.ddj.com/cpp/199900573

Bjoern
March 02, 2008
Re: Tango DeRailed,DeActive Nomen est Omen ?
OK, I've read most of what you suggested, and also found this post on 
the Sendero forum wich seems very interesting:

http://www.dsource.org/forums/viewtopic.php?t=3580


Bjoern wrote:
> Hi,
> just a few ideas about DDBI, DeRailed ...
> So, the Sendero folks gave up the idea of ORM, CORBA etc. instead :
> back to the roots: named DDBI. A good chance to reactivate DDBI but
> unfortunately the DDBI rowset discussion is  at a stand still so I'd 
> like to add a few sugesstions.
> 
> Let us use Java like DAO and a D-ish RowSet instead of Active Record.
> -----
> DAO is IMO a very good choice in case that you want to have a db 
> agnostic library.
> The required pattern are very well known. (factory, etc.)

Yes, DAO is a very successful pattern and there's not much needed from 
the language to implement it. That seems like a good plan.


> Implementing RowSet is difficult using traditional compiled languages 
> like D, so I suggest to implement LISP like lists in D.
> These Lists are able to contain any kind of data including other lists. 
> ('cause we just deal with void*)
> 
> Opinions ?

When you say "implement LISP like lists in D" are you suggesting adding 
LISP lists to the language or in a library? Because I think it a list of 
Variants as implemented on Tango would provide the same functionality.



> Bjoern
> 
> (Corba is indeed a bad choice in case that you have to deal with massive 
> service requests)

Yea, Corba is too heavyweight to be used for database access. Though for 
intranet services would be a nice add-on. Just not needed right now.




-- 
Julio César Carrascal Urquijo
http://jcesar.artelogico.com/
March 02, 2008
Re: Tango DeRailed,DeActive Nomen est Omen ?
Hi Julio,
> OK, I've read most of what you suggested, and also found this post on 
> the Sendero forum wich seems very interesting:

> http://www.dsource.org/forums/viewtopic.php?t=3580

Oh, that's indeed interresting.

> When you say "implement LISP like lists in D" are you suggesting adding 
> LISP lists to the language or in a library? Because I think it a list of 
> Variants as implemented on Tango would provide the same functionality.

Lisp like list are able to contain other lists and that is afaik not
doable using a list of variants.

A snippet :
module lisplist;

alias void*   POINTER;
/**
 A CONS is a data structure that can construct lists.
 It consists of two cells, called the "car" cell and the "cdr" cell.
 A CONS is to symbolic processing what a binary digit is to numerical 
     processing.
 By combining CONS we can form lists, binary trees, hierarchies,
 and an infinite number of other useful data structures.
*/
struct CONS                 // A CONS is two pointers
{
   POINTER  car;
   POINTER  cdr;
}
alias CONS*    LIST;        // A LIST is a pointer to  a CONS

/**    cpush  (cons push)
Adds a CONS to the head of a list
modify the cdr cell of *z to point to *lst.
Set lst to point to the CONS z and return a pointer to the CONS.
*/
LIST cpush(CONS *z, LIST *lst)
{
   z.cdr = *lst;
   return *lst = z;
}

---------------
You can imagine that this datatype is very flexible. The idea is to use 
this type to implement "RowSet".

As said it is just an idea, or inspiration if you like, may be not worth 
the effort but I'd like to give it a try.

I guess I will add some more functionalty to the snippet this afternoon.
pop, cpop, reverse, merge and publish it using this forum-thread.
Bjoern
Top | Discussion index | About this forum | D home