Alex Tech Adventures The webs best tutorials!

Error
  • Could not match ripper response
    URL: http://www.blip.tv/file/3522070
    Response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--[if IE 8]> <html class="ie8" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]--> <!--[if gt IE 8]><!--> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> <!--<![endif]--> <head prefix="og: http://ogp.me/ns# bliptvviewer: http://ogp.me/ns/apps/bliptvviewer#"> <!--chartbeat timer--> <script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script> <meta name="fb_channel_url" value="http://a.blip.tv/channel.html" /> <script type="text/javascript" src="http://a.blip.tv/scripts/BLIP/DestinationAnalytics.f8549cc.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-713068-1']); _Analytics.addVariables({"analytics":[[1,"template","lite-episode","3"],[2,"series name","zendtutorials","3"],[3,"QR","0","3"]]}); _Analytics.setVariables(); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <!-- rss--> <link rel="alternate" type="application/rss+xml" title="RSS Feed for zf 20: DataMapper with Zend Framework: reading" href="/rss/flash/3541308" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/reset.f8549cc.css" media="screen" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/common.f8549cc.css" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/episodePage.f8549cc.css" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/playerControls.f8549cc.css" /> <link rel="stylesheet" type="text/css" href="http://a.blip.tv/skin/smooth/endcap.f8549cc.css" /> <!-- Meta Tags --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>zf 20: DataMapper with Zend Framework: reading | zendtutorials on Blip</title> <meta name="description" content="Organization of classes in a DataMapper design pattern. Designing a DataMapper for reading from database."/> <meta name="keywords" content="zendtutorials"/> <meta name="keywords" content="zendtutorials blip"/> <meta name="keywords" content="zend framework"/> <meta name="keywords" content="php"/> <meta name="keywords" content="datamapper"/> <!-- FB Open Graph Tags --> <meta property="fb:app_id" content="136482209767138"/> <meta property="og:type" content="bliptvviewer:web_series_episode"/> <meta property="og:title" content="zf 20: DataMapper with Zend Framework: reading - zendtutorials on Blip"/> <meta property="og:image" content="http://a.images.blip.tv/Tmth-DataMapperWithZendFrameworkReading456-577.jpg"/> <meta property="og:description" content="Organization of classes in a DataMapper design pattern. Designing a DataMapper for reading from database."/> <meta property="og:locale" content="en_US"/> <!-- <meta property="bliptvviewer:series" content="zendtutorials"/> <meta property="bliptvviewer:release_date" content="1271944633"/> <meta property="bliptvviewer:duration" content="7623"/> <meta property="bliptvviewer:category" content="How To"/> <meta property="bliptvviewer:show_page" content="http://blip.tv/zendtutorials"/> --> <meta property="og:url" content="http://blip.tv/zendtutorials/zf-20-datamapper-with-zend-framework-reading-3541308"/> <meta property="og:site_name" content="Blip"/> <meta property="og:video" content="http://blip.tv/play/AYHYkyAD"/> <meta property="og:video:type" content="application/x-shockwave-flash"/> <meta property="og:video:secure_url" content="https://blip.tv/play/AYHYkyAD"/> <meta name="robots" content="all" /> <script type="text/javascript" src="http://a.blip.tv/scripts/BLIP/DestinationEpisode.f8549cc.js"></script> <script> var loaded = (new Date()).valueOf(); </script> </head> <body> <div id="Header" class="clearfix"> <div id="HeaderContents" class="clearfix"> <h1 class="Logo"> <a href="/" alt="Blip" title="Blip Home"> <span>Blip</span> </a> </h1> <div class="SearchAndNav"> <div class="Browse HoverDropDown"> <div class="BrowseButton HeaderCaption"> <div class="BrowseButtonShadow"></div> <a class="BrowseButtonLink"> <span>Browse</span> <span class="DropDownArrow Icon"></span> </a> </div> <div class="ChannelList clearfix"> <ul class="List"> <li><a href="/animation-and-comics-videos">Animation & Comics</a></li> <li><a href="/comedy-videos">Comedy</a></li> <li><a href="/drama-videos">Drama</a></li> <li><a href="/celebrity-entertainment-news-videos">Entertainment</a></li> <li><a href="/fashion-and-beauty-videos">Fashion & Beauty</a></li> <li><a href="/food-drink-and-travel-videos">Food & Drink</a></li> <li><a href="/health-and-fitness-videos">Health & Fitness</a></li> <li><a href="/home-and-family-videos">Home & Family</a></li> <li><a href="/diy-how-to-videos">How To</a></li> <li><a href="/education-documentary-videos">Learning</a></li> <li><a href="/music-videos">Music</a></li> <li><a href="/news-money-and-politics-videos">News & Politics</a></li> <li><a href="/sports-and-cars-videos">Sports & Cars</a></li> <li><a href="/talk-and-interview-shows-videos">Talk & Interview</a></li> <li><a href="/apps-tech-and-gadgets-videos">Tech & Gadgets</a></li> <li><a href="/videogames-videos">Videogames</a></li> </ul> </div> </div> <form class="SearchHeader clearfix" method="get" action="/search"> <span class="Icon SearchIcon"></span> <input type="text" name="q" class="SearchTerms" autocomplete="off"/> </form> <div class="Subscriptions"> <a class="FacebookLoginButton" id="FacebookLoginButton" title="Log in with Facebook"> </a> <span class="Indicator"></span> <a class="LearnAboutSubscriptions" href="/subscriptions/start-subscribing"> About subscriptions </a> </div> </div> </div> </div> <div id="PageInfo" data-posts-id="3541308" data-users-id="418265" data-ad-sales-categories="Tech,Screencast" data-core-value="0" data-admin-rating="1" data-lock="0" style="display:none !important;"></div> <div class="EpisodeLite" id="Content"> <div id="TheaterLiteContainer" class="clearfix"> <div id="TheaterLite" class="clearfix"> <h2> zf 20: DataMapper with Zend Framework: reading </h2> <h3> <a href="/zendtutorials"> zendtutorials </a> </h3> <div class="clearfix"></div> <div class="VideoPlayer clearfix"> <div class="EpisodeList"> <h3>Best of Blip</h3> <div class="EpisodeListContents" style="overflow: hidden;"> <ul class="Scrollable"> <li data-episode-uri="/madbunny/malice-episode_01-5915783" class="clearfix"> <a class="EpisodeThumbnail" href="/madbunny/malice-episode_01-5915783"> <img src="http://2.i.blip.tv/g?src=Madbunny-Episode_01789-585.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/madbunny/malice-episode_01-5915783"> MALICE Episode_01 </a> </h4> <span class="From"> from </span> <a href="/madbunny">MALICE: The webseries</a> </div> </li> <li data-episode-uri="/madbunny/malice-episode_02-5915916" class="clearfix"> <a class="EpisodeThumbnail" href="/madbunny/malice-episode_02-5915916"> <img src="http://0.i.blip.tv/g?src=Madbunny-Episode_02255-629.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/madbunny/malice-episode_02-5915916"> MALICE Episode_02 </a> </h4> <span class="From"> from </span> <a href="/madbunny">MALICE: The webseries</a> </div> </li> <li data-episode-uri="/madbunny/malice_episode_03-5915977" class="clearfix"> <a class="EpisodeThumbnail" href="/madbunny/malice_episode_03-5915977"> <img src="http://5.i.blip.tv/g?src=Madbunny-MALICE_Episode_03848.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/madbunny/malice_episode_03-5915977"> MALICE_Episode_03 </a> </h4> <span class="From"> from </span> <a href="/madbunny">MALICE: The webseries</a> </div> </li> <li data-episode-uri="/brentalfloss/mega-man-3-game-over-with-lyrics-5697120" class="clearfix"> <a class="EpisodeThumbnail" href="/brentalfloss/mega-man-3-game-over-with-lyrics-5697120"> <img src="http://8.i.blip.tv/g?src=Brentalfloss-66025709.png&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/brentalfloss/mega-man-3-game-over-with-lyrics-5697120"> Mega Man 3 Game Over WITH LYRICS </a> </h4> <span class="From"> from </span> <a href="/brentalfloss">brentalfloss</a> </div> </li> <li data-episode-uri="/redlettermedia/star-wars-episode-1-the-phantom-menace-review-3814393" class="clearfix"> <a class="EpisodeThumbnail" href="/redlettermedia/star-wars-episode-1-the-phantom-menace-review-3814393"> <img src="http://6.i.blip.tv/g?src=Redlettermedia-StarWarsEpisode1ThePhantomMenaceReview980.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/redlettermedia/star-wars-episode-1-the-phantom-menace-review-3814393"> Star Wars Episode 1 The Phantom Menace Review </a> </h4> <span class="From"> from </span> <a href="/redlettermedia">RedLetterMedia</a> </div> </li> <li data-episode-uri="/fashiontv/naory-beachwear-sexy-bikini-bathing-suit-photoshoot-ftv-5920458" class="clearfix"> <a class="EpisodeThumbnail" href="/fashiontv/naory-beachwear-sexy-bikini-bathing-suit-photoshoot-ftv-5920458"> <img src="http://3.i.blip.tv/g?src=Fashiontv-NaoryBeachwearSexyBikiniBathingSuitPhotoshootFTV165-746.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/fashiontv/naory-beachwear-sexy-bikini-bathing-suit-photoshoot-ftv-5920458"> Naory Beachwear: Sexy Bikini & Bathing Suit Photoshoot | FTV </a> </h4> <span class="From"> from </span> <a href="/fashiontv">Fashion TV</a> </div> </li> <li data-episode-uri="/realwineshow/pinot-grigio-real-wine-episode-8-5919017" class="clearfix"> <a class="EpisodeThumbnail" href="/realwineshow/pinot-grigio-real-wine-episode-8-5919017"> <img src="http://8.i.blip.tv/g?src=Realwineshow-PinotGrigioRealWineEpisode8621.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/realwineshow/pinot-grigio-real-wine-episode-8-5919017"> Pinot Grigio - "Real Wine" Episode 8 </a> </h4> <span class="From"> from </span> <a href="/realwineshow">Real Wine</a> </div> </li> <li data-episode-uri="/profootballweekly/no-pressure-5934100" class="clearfix"> <a class="EpisodeThumbnail" href="/profootballweekly/no-pressure-5934100"> <img src="http://3.i.blip.tv/g?src=Profootballweekly-NoPressure553-547.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/profootballweekly/no-pressure-5934100"> No Pressure </a> </h4> <span class="From"> from </span> <a href="/profootballweekly">Pro Football Weekly</a> </div> </li> <li data-episode-uri="/seriousbusinessonbtr/ball-of-flame-shoot-fire-serious-business-on-btr-ep61-5929964" class="clearfix"> <a class="EpisodeThumbnail" href="/seriousbusinessonbtr/ball-of-flame-shoot-fire-serious-business-on-btr-ep61-5929964"> <img src="http://3.i.blip.tv/g?src=Seriousbusinessonbtr-25441204.png&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/seriousbusinessonbtr/ball-of-flame-shoot-fire-serious-business-on-btr-ep61-5929964"> Ball Of Flame Shoot Fire - Serious Business on BTR [ep61] </a> </h4> <span class="From"> from </span> <a href="/seriousbusinessonbtr">Serious Business on BTR</a> </div> </li> <li data-episode-uri="/the-louise-log/how-to-cope-with-war-on-a-video-set-the-louise-log-29-5927528" class="clearfix"> <a class="EpisodeThumbnail" href="/the-louise-log/how-to-cope-with-war-on-a-video-set-the-louise-log-29-5927528"> <img src="http://4.i.blip.tv/g?src=Anneflournoy-HowToCopeWithWarOnAVideoSetTheLouiseLog29615.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/the-louise-log/how-to-cope-with-war-on-a-video-set-the-louise-log-29-5927528"> How To Cope With War On A Video Set: The Louise Log #29 </a> </h4> <span class="From"> from </span> <a href="/the-louise-log">THE LOUISE LOG</a> </div> </li> <li data-episode-uri="/vampiremob/vampire-mob-episode-three-of-six-season-one-4063885" class="clearfix"> <a class="EpisodeThumbnail" href="/vampiremob/vampire-mob-episode-three-of-six-season-one-4063885"> <img src="http://0.i.blip.tv/g?src=VampireMob-VampireMobEpisodeThree665.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/vampiremob/vampire-mob-episode-three-of-six-season-one-4063885"> Vampire Mob Episode Three of Six (Season One) </a> </h4> <span class="From"> from </span> <a href="/vampiremob">Vampire Mob</a> </div> </li> <li data-episode-uri="/goodmythicalmorning/i-wear-women-s-deodorant-5921692" class="clearfix"> <a class="EpisodeThumbnail" href="/goodmythicalmorning/i-wear-women-s-deodorant-5921692"> <img src="http://5.i.blip.tv/g?src=GoodMythicalMorning-IWearWomensDeodorant899.jpg&w=100&h=56&bc=000000&fmt=jpg" width="100" height="56" /> </a> <div class="EpisodeListItemWrapper"> <h4> <a href="/goodmythicalmorning/i-wear-women-s-deodorant-5921692"> I Wear Women&#39s Deodorant </a> </h4> <span class="From"> from </span> <a href="/goodmythicalmorning">Good Mythical Morning</a> </div> </li> </ul> </div> </div> <div id="PlayerEmbed"> <div id="EmbedTarget"></div> <script> (function() { var embedder = new BLIP.Embedder.Embedder({ postsID : "3541308", swfLocation : "http://a.blip.tv/scripts/flash/stratos.swf", shoggLocation: "http://a.blip.tv/scripts/ShoggPlayer-min.js", siteURL : "http://blip.tv", width : "620", height : "350", target: 'PlayerEmbed', useShogg: true }); embedder.embed(); })(); </script> </div> <div class="EpisodeEndcapLite" data-src="/episode/get_endcap?users_id=418265&posts_id=3541308&no_wrap=1&esi=1&lite=1"></div> </div> </div> </div> <div id="SocialMediaSection" class="clearfix"> <ul> <li class="Share"><a rel="modal" data-modal-href="/episode/get_share_actions/3541308?no_wrap=1"> <span class="Icon ShareIcon"></span> Share </a></li> <li class="Comment"> <a> <span class="CommentCallout"> <span class="Icon CommentIcon"></span> <span class="CommentCount"></span> Comments </span> <span class="SampleComment"> <span class="Icon SampleCommentNub"></span> <span class="SampleCommentText"> </span> </span> </a> </li> <li class="Facebook"> <div class="FacebookLikeBox FacebookEpisodeLike" data-action="ep-facebook-like"> <fb:like class="" href="" send="false" width="300" height="35" show_faces="false" font="lucida grande" show_faces="false"></fb:like> </div> </li> </ul> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> </div> <div class="Comments" id="disqus_thread" data-disqus-id="3541308" data-disqus-shortname="bliptv" data-disqus-developer="0"></div> <hr/> <!-- End Disqus Integration --> <div id="EpisodeDescriptionLite" class="clearfix"> <a class="ShowPoster" href="/zendtutorials"> <img src="http://a.blip.tv/skin/smooth/images/poster-none-available.png" /> </a> <div class="About"> <h2>About this episode</h2> <span class="ContentRating">TV-UN</span> <p> Organization of classes in a DataMapper design pattern. Designing a DataMapper for reading from database. </p> <ul class="MetaDataPairs clearfix"> <li class="Channel"> <h3>Category</h3> <strong> <a href="/diy-how-to-videos">How To</a> </strong> <strong> <a href="/apps-tech-and-gadgets-videos">Tech & Gadgets</a> </strong> </li> <li> <h3>Release Date</h3> <h6>Apr 22, 2010</h6> </li> <li> <h3>Runtime</h3> <h6>02:07:03</h6> </li> </ul> </div> <div class="Advertisement"> <script src="http://31a2.v.fwmrm.net/ad/g/1?nw=10274&pvrn=12345&csid=diy-how-to-videos&resp=ad;pagetype=episode&showname=zendtutorials&postsId=3541308;slau=300x250_destination_display&ptgt=s&envp=g_js&slid=fw_showAdBlock&w=300&h=250" language="javascript"> </script> </div> </div> <div class="ConditionalScroll" data-url="/show/get_recommended_shows?users_id=418265&no_wrap=1&esi=1"></div> <div id="CommentLink"> <hr/> <a href="#SocialMediaSection"> <span class="Icon CommentIcon"></span> Have something to say? <strong>Comment on this video</strong> </a> </div> <hr/> </div> <div id="FooterWrap"> <ul id="Footer" class="clearfix"> <li class="Links"> <h5>Useful links</h5> <a href="/about">About Blip</a> <a href="http://theblog.blip.tv">Blog</a> <a href="/people">People</a> <a href="/contact">Contact</a> <a href="/principles">Principles</a> <a href="/careers">Careers</a> <a href="/advertise">Advertisers</a> <a href="http://press.blip.tv/">Press</a> <a href="/developers">Developers</a> <a href="/copyright">Copyright</a> <a href="/privacy">Privacy Policy</a> <a href="/terms">Terms of Use</a> </li> <li class="Producers"> <h5>For Producers</h5> <span>Want to create an awesome original web series on Blip?</span> <div class="ProducerButtons"> <a class="ProducerSignupFooter MinimalButton Highlight" href="/users/create">Join</a> <a class="ProducerTourFooter MinimalButton" href="/tour">Take a tour</a> </div> <span>If you're already producing an original series, login to access your dashboard.</span> <div class="ProducerButtons"> <a class="ProducerLoginFooter MinimalButton" href="/users/login">Log in</a> </div> </li> <li class="TwitterFooter"> <h5><span class="Icon TwitterIcon"></span>Blip on twitter</h5> <div class="TwitterFeed" data-twitter-name="bliptv"> <ul class="Feed"></ul> </div> <a href="http://twitter.com/bliptv">Follow Blip on Twitter</a> </li> <li class="FacebookFooter"> <h5><span class="Icon FacebookIcon"></span>Blip on Facebook</h5> <div class="FooterFacebookMessage clearfix"> <div class="FooterFacebookLikeButton"> <fb:like href="http://facebook.com/blip" layout="box_count" show_faces="false" width="50" font=""></fb:like> </div> If you like your original series spoon-fed, "Like" Blip for episode releases, industry news and behind-the-scenes footage. </div> <a href="http://facebook.com/blip">Follow Blip on Facebook</a> </li> </ul> <div id="FooterCopyright">Discover the best in original web series.<span class="Copyright">&copy; 2012 Blip Networks, Inc. All Rights Reserved.</span></div> </div> <script type="text/javascript"> setTimeout(function(){var a=document.createElement("script"); var b=document.getElementsByTagName('script')[0]; a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0011/8003.js"; a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 100); </script> <script type="text/javascript"> /* this is pretty weird, and there's probably a better way to do it. #TODO fix and delete! document.write, bad. var browserVersion = navigator.appVersion; if(browserVersion.substring(5,11)=="iPhone"){ document.write("<div id=\"Navigation\">"); document.write("<a href=\"http://blip.tv/?skin=iphone\" class=\"LastLink\">Blip Mobile Site</a>"); document.write("</div>"); document.write("<div class=\"Clear\"></div>"); } */ </script> <!-- Begin comScore Tag --> <script> var _comscore = _comscore || []; _comscore.push({ c1: "2", c2: "6708843" }); (function() { var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true; s.src = (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js"; el.parentNode.insertBefore(s, el); })(); </script> <noscript> <img src="http://b.scorecardresearch.com/p?c1=2&c2=6708843&cv=2.0&cj=1" /> </noscript> <!-- End comScore Tag --> <!-- Start Quantcast tag --> <script type="text/javascript"> _qoptions={ qacct:"p-74vRiZ03u2gFw" }; </script> <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script> <noscript> <img src="http://pixel.quantserve.com/pixel/p-74vRiZ03u2gFw.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/> </noscript> <!-- End Quantcast tag --> <script type="text/javascript"> var _sf_async_config={uid:15601,domain:"blip.tv"}; (function(){ function loadChartbeat() { window._sf_endpt=(new Date()).getTime(); var e = document.createElement('script'); e.setAttribute('language', 'javascript'); e.setAttribute('type', 'text/javascript'); e.setAttribute('src', (("https:" == document.location.protocol) ? "https://s3.amazonaws.com/" : "http://") + "static.chartbeat.com/js/chartbeat.js"); document.body.appendChild(e); } var oldonload = window.onload; window.onload = (typeof window.onload != 'function') ? loadChartbeat : function() { oldonload(); loadChartbeat(); }; })(); </script> <div id="SubscribeLoginModal" style="display:none;"> <div class="Shade"></div> <div class="Content"> <div class="Note"> We keep track of your subscriptions through your Facebook account. No additional registration required.<br/> Nothing will be posted to Facebook without your explicit permission. </div> </div> </div> </body> </html>
    Regex: setPostsId\s*\(\s*(\d+)\s*\)

DataMapper pattern with Zend Framework

(0 votes, average 0 out of 5)
Data mapper is a must haveObject Relational Model pattern in any application.  In simpler terms, it is a translation adapter between your persistent database storage and the objects in your application that you can actually work with.  Although for medium or more complex projects you should avoid writing your own datamappers and rely on more field proven and testing ORMs, such as doctrine, you should have a good understanding of what is really going on before jumping to full ORMs and risking not knowing how to take advantage of them.  And of course for smaller projects something like doctrine can be an overkill and putting together a small set DataMapper classes is perfect.

This video explains how to layout model classes in order to read data from the database and transpose it to a processable format.  Since explaining how classes should work alone is long enough I only did the read form the database part and will do writing to the database next.

The focus of this super long video is two-fold. Firstly, I was often asked about the way I did my BookLister, how it looked similar to new ZF quickstart but did not fully fit into a proper design pattern.  There were also many questions on how best to organize code between Model and Controller, what should go where.  Even though there is little to none ZF specific functionalities discusses, I hope to answer all those quetions about best practices in organizing an MVC.  Experienced developers may find all of this old news and boring but I just cannot ignore many requests from newcommers to this not so welcoming paradigm.  Secondly, I was asked to look at a full CRUD in ZF.  I never addressed the issue at the time because at the time I was concentrating on some specific ZF functions (paginator, translator etc.) rather than application as a whole. Doing a DataMapper is a perfect opportunity to answer the CRUD requests since a good DM adapter should allow for seamless data transition in any direction so I will take care of this in the next, hopefully shorter, video.

Finally, before you press the play button, you may note that I do much less explaining and going over than I did before and most of the time just typing code away.  Since there is so much code to go over I do not want to make this a 5 hour long video by going over everythign I do so instead there will be a short summary video at the end of second installment where I do a very fast walkthrough and note any places where you have an option to do something different.



Key notes in the presentation:
  • Separating application logic and persisent data storage read/write commands using Domain Object and Data Mapper concepts making sure that Domain Objects concentrate only on solving business problem and forget about tedious backend.
  • Pickout common components from Domain Object and Data Mappers in order to make a uniform and consistent architecture avoiding any potential conflicts. This will be done using abstract classes.
  • Looking at what a Domain Object should be.
  • Looking at what a Data Mapper class should be.
  • Making sure relational database structure is fully normalized for.
  • Generating Domain Objects using Data Mappers based on search criteria (using single specific ID, all available, or a certain range); the R in CRUD.
  • Implementing Data Mappers to request data required.
  • Implementing Domain Objects to display data aquired.

Download source

Last Updated ( Thursday, 22 April 2010 14:02 )  
Discuss (2 posts)
Re: DataMapper pattern with Zend Framework
Dec 30 2010 13:08:21
Thank you for this enlightening video.

I tried to vote but clicking on the stars had no effect with Iceweasel / Linux(Debian) so you get a post instead
#857
DataMapper pattern with Zend Framework
Aug 18 2011 14:24:57
This last Video is horrible, after 30 minutes of watching sound is totaly out of sync with video... I guess i have to stick with blip.tv stream, hope it'll be better.
#960

You need to login or register to post comments.
Discuss...
You are here: Home Development Zend Framework DataMapper pattern with Zend Framework

Statistics

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

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 55 guests online