0

So I have been using an ORM for the past 3-4 months and have developed a website using it in par with a framework.

My curiosity is grown larger and what ORM really are, so i decided to start building one from scratch but did some research yesterday and today and im still very confused on where to start from and I don't seem to be able to find a good guide to start from.

Lately my love for MongoDB has been growing so it would be even more fun and interesting if I can have php + MongoDB ORM.

Do you guys have any starting points? Like books, slides or articles where I can have a look at and start.

If you guys want to add anything please tell me! I really want to learn the deep end of a infrastructure of a website!

Disposer
  • 6,201
  • 4
  • 31
  • 38
Steve
  • 1,213
  • 5
  • 16
  • 29
  • Im more of a practical person id rather workon something then just read on it. Same thing as a car you drive but don't know how the internal work. – Steve Jan 17 '15 at 18:49
  • Well, he's used to the interface the ORM exposes, if you would take that same interface and try to implement it, it can be very informative. – Dennis Jan 17 '15 at 18:55
  • Just recently I started wondering HOW a router works in PHP. I've used both CodeIgnitor and Laravel, and while I knew how to use the specific routers that they have, I didn't know how they worked until I started building my own, and started actually following the data as it traveled through one. – Kirkland Jan 18 '15 at 16:44

1 Answers1

2

With multiple different implementations of ORM's in different languages, it always comes down to a few different patterns which can be interesting to look into.

A few patterns are the ActiveRecord which are objects containing the data for each row, and are responsible for saving themselfs. And Repository which seperates the actual models from the repository.

Active Records vs. Repository - pros and cons?

http://en.wikipedia.org/wiki/Object-relational_mapping

http://en.wikipedia.org/wiki/Active_record_pattern

If you want to learn about programming architectures, I would highly recommend the following book with accompanied website

http://martinfowler.com/books/eaa.html

http://martinfowler.com/eaaCatalog/

Community
  • 1
  • 1
Dennis
  • 394
  • 1
  • 6