Hello, And congratulations for this great framework. I hope to rise up quickly What is orm? Is proper. Or is eloquent. Do you could implement eloquent? Thanks
|
Nov '13 |
5 |
1633 |
4 |
Hello, And congratulations for this great framework. I hope to rise up quickly What is orm? Is proper. Or is eloquent. Do you could implement eloquent? Thanks
ORM = Object Relational Mapping
https://en.wikipedia.org/wiki/Object-relational_mapping
It is a set of classes that allow you to access a database with an object oriented approach.
I don't understand what you mean by proper/eloquent but if you are asking whether it is proper to use an ORM vs. the PHP library functions (mysqli_db_connect() etc.) yes it is. As far as eloquence, I personally think it is nicely designed, so yeah it is eloquent.
he probably means Laravel aproach of ORM which name is Eloquent https://four.laravel.com/docs/eloquent
Jose,
Phalcon has its own ORM that implements the ActiveRecord pattern. In this instance it is the same as the Eloquent implementation.
You can use whatever ORM you like: ZendDb, Eloquent, Propell or anything else. The benefit of using Phalcon is that you get a huge performance increase because of Phalcon's design.
Regarding scalability of the framework, Phalcon can scale nicely depending on the hardware you dedicate to your application and the separation of services i.e. separate web server to db servers etc. Infrastructure changes will help you with scalability more than the framework itself. Having written that Phalcon supports different db connections so that you can easily create db connections for read and others for write.
Have a look at this https://album-o-rama.phalcon.io/ - github: https://github.com/phalcon/album-o-rama/
The application handles 2 million records. So I can safely say it pretty much scales - Note that this app is running on a small EC2 Amazon instance. With Phalcon, you will need to upgrade less frequently your hardware than with another framework purely due to its implementation (as a C extension that is)
Hi
Out of interest, why did you choose Active Record instead of Data mapper. Phalcon being relatively new, I assumed Data mapper, or some new funky pattern. Active Record looks really dated and messy, took me back to ~2006. Nice project, although ActiveRecord is a big (unexpected) minus.