On Nov 12, 2012, at 10:48 AM, Aparajita Fishman wrote:

> As Peter said, it could be done using Poor Man's Classes. Note that 
> implementing an ORM (Object-Relational-Mapping) like ActiveRecord is an 
> extremely non-trivial task. 

About 4 years ago I experimented with something I called Restfull Active4D. I 
tried to make Active4D more like RoR's MVC approach than Fuseboxes.

Spent a lot of time and proved that it is a non-trivial task.  I actually got 
pretty close to some things.  It is still out on there on github 
https://github.com/salex/restful_a4d_v5_demo.

I tried to do too many things and never got them the way I wanted, but it was 
just a proof of concept and some parts were actually implemented on a limited 
virtual host application. 

It concentrated on Restful or CRUD routes. It had an rGen feature that was like 
rails generate scaffold. It would generate the CRUD controller, Model based on 
table elements you selected, and the basic CRUD Views. Everything was wrapped 
in fusebox but it hid a lot of fusebox.

One of the things it used was a library that implemented some ActiveRecord like 
stuff. You had to define your relationships in a config file, Those 
relationships where loaded into a library. Each table had it own model that 
implemented some of the ActiveRecord type stuff like  
Vendor.find_related("Ingredient",$attributes)

If you didn't use optional parameters( e.g., $map), it would get a rowset 
object of all elements for the finder method if a selection was needed, or 
basically a $row object for a single instance

If you want to attempt building something, what is out on github might give you 
some ideas.

Steve
> 
> On Nov 12, 2012, at 11:09 AM, Mehboob Alam <[email protected]> wrote:
> 
>> Can anyone with Ruby and RoR experience comment on this..
>> 
>> Is there any equivalent to "ActiveRecord" in Active4D; or how to go about
>> implementing this.
>> http://guides.rubyonrails.org/active_record_querying.html
> 

_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/

Reply via email to