Code analogy
In a Skype conversation with me and a few colleagues today, my colleague Ivo Jansch explained to us the difference between meta() and postMeta() in the atkMetaNode. He used for this the analogy of pregnancy. The analogy was too good to leave for the few that attended the skype chat, so I am publishing it here - with permission of Ivo - for everyone's education.
anything you want to change can be done in postMeta
only rarely you need to manually add stuff in the meta function
the policy is named policy because it enforces a standard on how to map database stuff to the application
in the meta function, this policy can be influenced
compare it to pregnancy
meta() is what happens inside the female
based on dna, policies, whatever food she happens to be eating etc, the baby is constructed
once it's born, you give it clothing etc.
sometimes however, you need to do surgery on the pre-born
if you wait until postmeta, it is either too late, or inefficient
which is why some stuff is done in meta()
e.g. if the womb is constructing a boy but you want a girl, you could let it be born first and then do a gender change
but that's a lot of overhead
so for performance reasons, you might change the gender before the utensils are appended to the unborn
(which is basically what things like $policy->setTypeAndParams do
(to make it a little more complete, even metanodes have a constructor, but that would then be comparable to conception, and you don't want to fiddle with stuff there yet)
also published on the
ATK wiki .
July 21, 2008 - tags: atk, php, atkMetaNode
emaar mgf palm gardens: Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information.
treat cracked heels: tips to heel dry and cracked heels, foot care, heal dry cracked feet, home remedies for dry heels. natural remedies for dry and cracked feet
cheap viagra online: Very good post. Made me realize I was totally wrong about this issue. I figure that one learns something new everyday. Mrs Right learned her lesson! Nice,informative website by the way.
Ladies Shoes: This is going to cost tens of billions of dollars and require a reasonable number of years for a smooth transition to a cleaner generating fleet. Ladies Boots If the final rule fails to recognize these realities, our entire economy will suffer,” the letter warns. Production Check China
rushfit: I am glad to visit your blog.. I found this post is really useful one.. I love reading this kind of stuff. Your blog is one of a kind, i love the way you organize the topics
coach outlet online: If you buy Coach items at the coach outlet online store, the goods will be sent out within 24 hours after confirming your payment and arrive to your door within 7 work days.No one can deny the shopping at the coach factory outlet is satisfactory. For the low prices and good quality.
coach outlet: coach outlet handbags You can not just save your cash but also your time inside a convenient way to obtain the exact same bags product and do not be concerned the shippment of one's products.The coach outlet store online are utilized for formal event in company area that will display your excellent taste.Not only does a briefcase make is easier to carry things.
Venta de Casas: I found your website perfect for my needs. It contains wonderful and helpful posts. I have read most of them and learned a lot from them. You are doing some great work. Thank you for making such a nice website.
Conservatories Chester: I was very encouraged to find this site. I wanted to thank you for this special read. I definitely savored every little bit of it and I have you bookmarked to check out new stuff you post.
cheap uggs boots: Your first-class knowledge about this good post can become a proper basis for such people. nice one!