3 ms·
ORM = Object Relational Mapping Put as simply as I can put it, it's an abstraction layer in front of SQL. The general logic (which I object to, though I still
by bmelton 16y ago
ORM = Object Relational Mapping
Put as simply as I can put it, it's an abstraction layer in front of SQL.
The general logic (which I object to, though I still prefer ORM-based development) is that most of your class Objects relate to how you would store them in a database. Your 'User' object has a first name, a last name, a password, etc., which all map neatly to database records.
So, instead of doing "INSERT INTO users firstname, lastname, password) VALUES ('foo', 'bar', 'baz');", you create a user object:
User.firstname = 'foo'
User.lastname = 'bar'
User.password = 'baz'
User.save()
- aw3c2 16y agoThank you!