Alex Tech Adventures The webs best tutorials!

Welcome, Guest
Please Login or Register.    Lost Password?

DataMapper pattern with Zend Framework
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: DataMapper pattern with Zend Framework
#635
DataMapper pattern with Zend Framework 1 Year, 9 Months ago Karma: 16
** This thread discusses the content article: DataMapper pattern with Zend Framework **

alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
The administrator has disabled public write access.
 
#636
DataMapper pattern with Zend Framework 1 Year, 9 Months ago Karma: 0
Hello Alex,

It's really good to see you again after a long long days...
Thank you. It's very helpful.
beregu
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#637
DataMapper pattern with Zend Framework 1 Year, 9 Months ago Karma: 0
Like Beregu said: Really cool to see another video, will be watching it today.

Still hoping you'll do the tutorial about error handling though..

Thanks!
Yorian
Junior Boarder
Posts: 29
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#638
DataMapper pattern with Zend Framework 1 Year, 9 Months ago Karma: 0
Epic video!
I have a doubt, is this patter as a whole also called ActiveRecord or what is the difference? anyone?
vlopez
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#639
DataMapper pattern with Zend Framework 1 Year, 9 Months ago Karma: 0
Just fully watched the video, quite a good one. Will make some adjustments to my mappers. Overall they look quite the same though.

Although it all works in this example, in my case I would consider not creating objects for everything. Sometimes it just isn't needed. It saves a lot of memory..

One problem i ran into btw is the fact that two people might be working on the same data in the database at the same time (person A opens the data for editting in a form, same does person B. Person B updates it after which person A does. This creates a problem in data consitency. Seems to be a problem of the fact that php is stateless..

@vlopez: ActiveRecord is a different pattern. The datamapper (which is a better one to my opinion) creates a bridge between the database and the domain object model. It solves the problem of the difference between the way databases work (most databases at least) and object work.

Active record is best used for simple systems. The idea behind it is that it creates a direct relation between a domain object and a certain row in the database.

@alex: In my system I also use an Identity map next to the datamapper, it makes sure that there is only one instance each domain object model. Might be interesting for you to have a look at.
Yorian
Junior Boarder
Posts: 29
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#644
Re:DataMapper pattern with Zend Framework 1 Year, 9 Months ago Karma: 0
Yorian,

"One problem i ran into btw is the fact that two people might be working on the same data in the database at the same time (person A opens the data for editting in a form, same does person B. Person B updates it after which person A does. This creates a problem in data consitency. Seems to be a problem of the fact that php is stateless.."

I don't understand, are you saying that when the data is inserted into the DB it the application may confuse userId's recording a comment for example under another users ID? That sounds like a uber problem! Unless you mean something totally different by 'data consistency'.

Could you let me know exactly what the problem is? I'm new to OOP/MVC/ZEND I have designed my DataMapper for my latest project based on this article and the last thing i need is a problem like that. lol

Thank you
Crilly
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Moderators: alexanderrv
You are here: Home Forum

Statistics

Members : 1401
Content : 42
Web Links : 1
Content View Hits : 191196

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 50 guests online