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 .
Add comment

Comments

gravatar Klemen Slavič: Nice. ;)
July 21, 2008
gravatar Paul M: Yeah. It's good :)
July 23, 2008
gravatar refinance ohio: 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 :evil: :evil: :evil: :evil: :evil: :evil: :evil:
December 19, 2011
gravatar 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.

December 29, 2011
gravatar 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
January 21, 2012
gravatar 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.
January 24, 2012
gravatar 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 :evil:
January 25, 2012
gravatar 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
January 27, 2012
gravatar 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.
January 29, 2012
gravatar 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.
January 29, 2012
gravatar 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.
January 30, 2012
gravatar muscle warfare reviews: Top stuff!
January 30, 2012
gravatar 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.
January 31, 2012
gravatar cheap uggs boots: Your first-class knowledge about this good post can become a proper basis for such people. nice one! :mad:
February 1, 2012

Php5_zce_logo

Upcoming events

I will be speaking 06-02-2012: D-Day
I will be speaking 17-02-2012: Techademy Trainingday February
I will be speaking 23-02-2012: Zend Webinar: Git for Subversion Users

Tags

1337 2008 2010 2011 4developers access modifiers accessibility AdaLovelaceDay09 advent agavi agile alfred amsterdam apache api apple article articles atk atkMetaNode audioscrobbler automation azure backwards compatibility barcelona barcodes bash bbc bbq beatstad belgium best practices bittorrent blogging blogs boards of canada book books bughuntday bundle caching cake cal evans calendar career cat cerf certificate cfp clear cms cologne common sense communities community components conference conferences contest continuous integration contribute contribution crisis css custom d-day datetime DbFinderPlugin decorator decorators deployment devdays development directoryindex docblox doctrine documentation download dpc dpc09 dpc10 dpc11 DPC2008 dreamhost drupal dv7 eclipse ed editors efficiency enterprise errors event events expertise ezcomponents facebook finland flickr fork framework frameworks freelance freeze frontend fun game games geoip germany getting real git github gnome-do google google calendar googletalk graceful degradation hack hackers hidden gem hiphop howto hp HR html http i386 ibuildings icann ide ideasofmarch idm imovie indy ingewikkeld integration international php conference internet interview ipad IPC ipc ipc08 ipc10 ipc11se iterm2 javascript jenkins jenkins-php job job openings jobeet john peel joomla joomladays kiva kubuntu launcher launchy left on the web libraries library lighttpd lime linktuesday linux live london loudblog m2ts mac magazines malware mambo marjolein mediterra meeting meme meta methodology micro-financing microframework microsoft migration movie music mysql namespace namespaces netbeans netherlands newsfire nllgg nos odmarco open source opinion ORM osx paradiso paris partnership pavilion pear pecl performance personal pfc10 pfc11 pfcongres pfcongrez pfz photo php php5.3 phpabstract phpazure phpBB phpbb phpbelgium phpbenelux phpbnl10 phpday phpdoc phpdocumentor phpgg phpitalia phpnw phpnw08 phpnw11 phpstorm phptek phptek09 phpuk2009 phpUnderControl phpunit php|architect php|tek podcast politics portability postcrossing presentation presentations private projects protected prototype PSR-0 public python qa qr codes re2c recruiting refactoring review rewrite ruby on rails san francisco schedule scifi script security sensio seven things sfdaycgn sflive2011 shell scripting silex simplexml slides smfony software sogeti solar sound speakers spl ssh standard standards star trek static steer strings stylesheets subversion symfony symfony live Symfony2 symfonycamp symfonyday symfonylive symfonyUnderControlPlugin talk talks techademy technology techportal tek09 telecommuting terratec terrorism testfest testing textmate textpattern the right tool timeout tips tld todo tomas tools training twig uncon unet usability usergroup validation vhost video vim vinyl virus warp webinar weblogging webservices wiki windows winphp women wordpress work workshop world world of warcraft wpi writing wunderlist xml xpath xsd yara year youtube zc11 ZCE zemanta zend zend framework zend server zend studio zendcon Zend_Form zite
© 2004 - 2012 Stefan Koopmanschap + Powered by Symfony, photos powered by Flickr, links powered by Delicious, Shanghai smilies by Iconbuffet. Feeds: rss / atom. Left on the Web v4.4.0.1