AbstractModels
What is abstractModels
abstractModel is my attempt in doing a small ORM (Object Relational Mapping), by small i want to say not a 50 files ORM.
There's already others good php ORM projects to work with out, there such as Doctrine or Propel and some others you can easily find by searching on google. But they weren't exactly what i was looking for.
what i didn't want was:
- Dependancy on any system that use criterion to make sql queries ( i can't say that's bad, but it really make me sick).
- The need to include tons of files just to get the base things things to work (actually abstracModels is all defined in a single file and require only 2 files (class-db base and extended class) to work).
Why the need of an ORM
There's ton of reason to use an ORM in your applications, but the reality is that as using a framework ore another, it depends on the application you want to develop (where's the need to use a complete framework to display a single static page ..?) and of choice. It's something like debating of procedural programming versus object oriented programming, none is really better than another they both have advantage so we won't debate of this here.
But at least I'll tell you why I decide to use an ORM, because i had consistency and security in mind!
Ho I don't say that using an ORM will secure your apps on its own, but a least it can help you in this task by putting all fitering/validating methods in a single place, a place that you will code once and then you can just forgot about it. I think that an ORM is a good approach to this problem.
But let me be clear, nevermind which ORM or framework you will use but adding one more abstraction layer give you easier development (on big project at least) but also performance lost!!!
