-
2 weeks 2 days
-
2 weeks 4 days
-
4 weeks 2 days
-
4 weeks 5 days
-
4 weeks 6 days
ORM
In my old days of Codeigniter, I never really did actually use an ORM and with all these Ruby stuff on my mind I went ahead looking if they have one (which I'm pretty sure of).Basically what an ORM is that it turns your table into an object and you interact with it just like a regular object. Under the hood, DataMapper inspects the table's fields, primary keys and relationship and map this into your model's properties.The first one I tried was DataMapper, It's really simple yet feature rich. And as I browse through the forum, turns out that it has a variation DataMapper Overzealous Edition. Its almost the same as the native DataMapper except that it has some additional features like the on table relationship.While the off table relationship (I forgot exactly what its called) uses a separate table for the relationship, In the in table, you can just add an additional field on the table which serves as a relationship between each table.DataMapper also supports field validation and there's two types of them, pre-validation and post-validation. As the name suggests, pre-validation works when you're trying to save a new record while post-validation is something that you want to apply on the data before displaying it. A good example would be a unixtimestamp that's stored on your database, you don't wanna display it on its native form on the user, instead you apply post-validation to convert it into a human readable format.There's lots of things going on CI since the last time I've used it and I'm planning to spend more time on knowing them while maintaining my Ruby adventures.

Facebook
Twitter
Post new comment