Beautiful! -- Louis - sent from mobile ________________________________ From: Chris Bower Sent: Sunday, June 26, 2011 1:37 AM To: [email protected] Subject: Re: New Orchard Site
Thanks guys. Some of what we learned I shared on my blog, http://chrisbower.com. We used a lot of different techniques throughout the site, but the biggest key for us were shape methods. It allowed us to call anything we needed to from within a shape or layout, and also allowed us to have a very easy-to-use cache methodology. I've created a fairly comprehensive cache module that I'll be releasing to the community in the coming weeks (once things slow down a bit, and I get some rest) that I think will prove very beneficial. It vastly improved the performance of our site, especially when so many different content items and parts are pulled on to every page. The gist of how our implementation works: * We have 28 custom written modules, about 1 for every major section of the site, plus a few miscellaneous things like: image management (we have a module that crops and resizes images to the Rackspace file cloud), a YouTube module that scrapes our YT feed and populates video content, a common shape library module, caching modules, etc. * We have a different layout file for every different template used on the site (some dupes, based on a controller/action using the same sort of template as another controller/action). * The layout files pull shapes into the appropriate zones like so (An example of some shapes pulled into our homepage layout): WorkContext.Layout.Featured.Add(New.TopStoriesArea(), "1"); WorkContext.Layout.Featured.Add(New.MiniPetition(), "2"); WorkContext.Layout.BeforeMain.Add(New.FeaturedMedia(), "1"); WorkContext.Layout.BeforeMain.Add(New.FeaturedLinksArea(), "2"); WorkContext.Layout.AfterContent.Add(New.CurrentCasesScroller(CasesSetSize:4), "1"); WorkContext.Layout.TripelFirst.Add(New.MostRecentLegalDocs(), "1"); WorkContext.Layout.TripelSecond.Add(New.MostRecentJusticeFiles(), "1"); WorkContext.Layout.TripelThird.Add(New.FeaturedPoll(), "1"); * Note that we experimented first with widgets, but decided that trying to create a widget for each of the 100+ widget-like shapes we have on our site wouldn't have been a good idea. * Shapes are first defined by a shape method, then implemented by a "shape view", like so: [Shape,Cache] public IHtmlString SidebarAd(dynamic Display) { var ads = ContentManager.Query(VersionOptions.Published, "HouseAd").List().AsPart<HouseAdPart>().ToList(); return Display.SidebarAdView(Ads: ads); } * (A file named SidebarAdView.cshtml would then implement the shape with the provided parameters.) * Shape methods acted like controllers for partials. We could include logic wherever we needed to, pulled in from services * Shape methods were also called very often from other shapes: @foreach(var d in legalDocs) { var sourcePart = d.As<SourcePart>(); var source = ""; if(sourcePart!=null && sourcePart.Source !=null){ source = sourcePart.Source; } <li>@Display.ContentTitle(item:d, limit:35)<br /> <span>@Display.ContentDate(item:d)</span> </li> } * ContentTitle and ContentDate are shape methods that are our standard way of rendering a title and date for our content types. We probably could have done it in a more standard way by using Display(contentItem) and then defined display types and placements, but this seemed to be less complicated for us. That's one of the things I love about Orchard. There's not just one way to do something. It allows us to be opinionated, rather than being forced to the framework's opinion. To answer the DB question, we're just using MSSQL. We're hosted on a virtual web farm at Rackspace with a couple of web VMs and a DB vm. The entire site was built on Orchard, with the only exception being our donations being handled by Kimbia widgets. >From a metrics standpoint, it might be interesting to note that our site was >developed by myself and Jesse Wise (who came up with the shape method >implementation, major props) in about 5 months. We 'broke ground' in Orchard >in the middle of January and launched on June 25th. Neither of us had any >Orchard experience before that point. Having been involved in a few other >larger sites, I felt pretty good about the speed which we were able to >implement this project in Orchard, even with the (somewhat steep) learning >curve. From: Troy Robinson <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Sun, 26 Jun 2011 00:10:23 -0700 To: <[email protected]<mailto:[email protected]>> Subject: Re: New Orchard Site Yes, very nicely done. Curious to know how all the parts were mixed together and if it was done only using orchard? Also, what kind of database is being used? Very interesting! Regards, Troy On Sun, Jun 26, 2011 at 12:07 AM, Efe Kaptan <[email protected]<mailto:[email protected]>> wrote: Thats a wonderful job, welldone. Please share your knowledge with community. We need tips&tricks of your implementation. thanks. On Sunday, 26 June 2011, Chris Bower <[email protected]<mailto:[email protected]>> wrote: > Hey everybody, I am proud to announce that after many many months of > development, we have officially launched our new Orchard-based site: > http://aclj.org > Thank you Orchard team for all of your assistance, and for putting out such a > great platform. We're proud to be running on Orchard! > Chris BowerLead DeveloperACLJ > --- > > You are currently subscribed to orchard-discuss as: > [email protected]<mailto:[email protected]>. > > To unsubscribe send a blank email to > [email protected]<mailto:[email protected]>. > > > --- You are currently subscribed to orchard-discuss as: [email protected]<mailto:[email protected]>. To unsubscribe send a blank email to [email protected]<mailto:[email protected]>. --- You are currently subscribed to orchard-discuss as: [email protected]<mailto:[email protected]>. To unsubscribe send a blank email to [email protected]<mailto:[email protected]>. --- You are currently subscribed to orchard-discuss as: [email protected]. To unsubscribe send a blank email to [email protected]. --- You are currently subscribed to orchard-discuss as: [email protected]. To unsubscribe send a blank email to [email protected].
