I was wondering, why Datastore has custom implementations when any ORM can do the task

Hi,

I was wondering if anybody could explain why Persistence Layer has been written from scratch instead of using some sort of ORM.

Thanks,
Abdul Mateen.

Hi Abdul,

At that time, we didn't know of an ORM that worked with PostgreSQL,
MySQL and Google's BigTable. That might have changed, but not aware of
any such options.

Beyond that, ORMs rarely work well. Leaky abstractions and all...

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Jun 27, 2014 at 2:07 AM, abmateen@gmail.com wrote:

Hi,

I was wondering if anybody could explain why Persistence Layer has been written from scratch instead of using some sort of ORM.

Thanks,
Abdul Mateen.

--
You received this message because you are subscribed to the Google Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Actually, the more important reason is that an ORM relies on compile-time
annotations to handle the mapping to the DB.

If we wanted to store all form data in one huge instanceId-key-value table,
that would be fine, but we wanted to structure the data as traditional
database tables, with a different table for each formId.

That usage, where the table construction varies at run time and is not
known at compile time, is not possible with ORMs.

··· On Fri, Jun 27, 2014 at 7:22 AM, Yaw Anokwa wrote:

Hi Abdul,

At that time, we didn't know of an ORM that worked with PostgreSQL,
MySQL and Google's BigTable. That might have changed, but not aware of
any such options.

Beyond that, ORMs rarely work well. Leaky abstractions and all...

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Jun 27, 2014 at 2:07 AM, abmateen@gmail.com wrote:

Hi,

I was wondering if anybody could explain why Persistence Layer has been
written from scratch instead of using some sort of ORM.

Thanks,
Abdul Mateen.

--
You received this message because you are subscribed to the Google
Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Perfect, Yes mitch that was what I was thinking, ORM will not be able to handle the runtime mappings. and I think the separate tables for each form works well!!

Thanks a lot for your replies.

··· On Friday, June 27, 2014 8:12:15 PM UTC+5, Mitch wrote: > Actually, the more important reason is that an ORM relies on compile-time annotations to handle the mapping to the DB. > > If we wanted to store all form data in one huge instanceId-key-value table, that would be fine, but we wanted to structure the data as traditional database tables, with a different table for each formId. > > > That usage, where the table construction varies at run time and is not known at compile time, is not possible with ORMs. > > > > > > > On Fri, Jun 27, 2014 at 7:22 AM, Yaw Anokwa wrote: > > Hi Abdul, > > > > At that time, we didn't know of an ORM that worked with PostgreSQL, > > MySQL and Google's BigTable. That might have changed, but not aware of > > any such options. > > > > Beyond that, ORMs rarely work well. Leaky abstractions and all... > > > > Yaw > > -- > > Need ODK services? http://nafundi.com provides form design, server > > setup, professional support, and software development for ODK. > > > > > > On Fri, Jun 27, 2014 at 2:07 AM, wrote: > > > Hi, > > > > > > I was wondering if anybody could explain why Persistence Layer has been written from scratch instead of using some sort of ORM. > > > > > > Thanks, > > > Abdul Mateen. > > > > > > -- > > > You received this message because you are subscribed to the Google Groups "ODK Developers" group. > > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com. > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > > You received this message because you are subscribed to the Google Groups "ODK Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com