in

Telligenti

Serving up fresh ideas every day, Telligent style

Dan Hounshell

March 2008 - Posts

  • In search of an eco-friendly economical Home Server 2, Electric Boogaloo

    This is my second take at virtually building my new Windows Home Server. You can see version 1 here.

    My main reason for the reconfiguration was that I wanted to use a SeaSonic power supply. I could have just added it to the previous kit, adding only $40 to the total price, and chucked the one that came with the barebones Asus case/motherboard. I really like the small form factor of the Asus case, but it only supports two SATA drives. While I'm only buying two now, having room for another two would be great. That way if I happen to catch a couple of 500GB drives on sale I could upgrade from 1TB to 2TB on the cheap. Fitting two additional drives means getting a bigger case, though. I chose the Silverstone model below because it fit the bill, was still fairly small (a little bit wider, but still short), and it was on sale. Going with the black case meant that I could save an additional $10 on the DVD drive by not having to find one with a white bezel.

    Going away from the barebones kit meant that I lost a level of abstraction (the barebones kit had case, motherboard and power supply). So now choosing a motherboard and the power supply was on me.  I settled on the Gigabyte board below because it supports 4 SATA drives, has 6 USB connections, will handle up to 16GB of RAM and a more powerful CPU if I choose to repurpose it later. Oh yeah, and it was cheap.  I "upgraded" from a 2.2Ghz CPU to a 2.4Ghz, not a big deal, but it was part of a combo deal with the motherboard. I'm still sticking with a single core mainly for the power savings of 45W vs 65W. The SeaSonic power supply is the cheapest one that NewEgg carries, but it is also the only 300W one they have without committing a lot more money - and it's still and 80Plus efficiency unit. With only running the 2 power saving drives, the low power CPU, and really no other accessories (the DVD is really just for installing the OS) a 300W psu should be fine. The RAM was pretty much a wash, $2 increase.

     

    caseSILVERSTONE SUGO SG02B-F Black ABS / SECC Steel MicroATX Desktop Computer Case - Retail

    $64.99

    powersupplySeaSonic SS-300ES ATX12V Ver.2.2 300W Power Supply 100 - 240 V CB, CE, FCC, TUV, cUL, RoHS - OEM $41.99harddriveWestern Digital Caviar "Green Power" WD5000AACS 500GB 5400 to 7200 RPM 16MB Cache SATA 3.0Gb/s Hard Drive x 2 $94.99 x 2RAMKingston 1GB 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Desktop Memory - Retail $19.99cpuAMD Athlon 64 LE-1620 2.4GHz 1MB L2 Cache Socket AM2 45W Single-Core Processor - Retail $50.50motherboardGIGABYTE GA-MA69VM-S2 AM2 AMD 690V Micro ATX AMD Motherboard - Retail $64.99dvdLITE-ON Black 16X DVD-ROM 48X CD-ROM IDE DVD-ROM Drive Model DH-16D2P-04 - OEM $16.99

     

    I was pumped because the total price for this kit before shipping was nearly the same as the previous one, but I was getting a better CPU, better MB, and a much better power supply, and a case that was still smallish but would hold an additional two drives. Darn it, I still like the looks of that Asus case, though. Oh well, I'm a practical person. If I wanted design I'd be buying a Mac anyway, right? However, the shipping was for this kit is about $20 more because there was a free shipping offer on the previous case.

    The above kit comes in at just over $470 including shipping. I'm really pleased with that and I think I'll order it this weekend. It is pretty eco-friendly, will look okay sitting on a shelf somewhere, and the price is pretty nice, too. I would have have been ecstatic if it would have been closer to $400. If it was closer to $400 then adding the cost of WHS would put everything right at $550, which is the price of the cheapest HP MediaSmart Home Server, but having more memory, double the drive size, more energy efficient and just better all the way around. By the time I add the cost of WHS to what I've spec'd out it comes out to about $620. That still ends up being about $80 cheaper than the higher end HP unit (about $700). Both have 1TB of storage but mine has a little faster CPU, double the RAM, and still better in most areas. Some people will say that it's not really worth the $80 considering I have to actually build and test the PC and they're probably right. I knew I wouldn't save a lot of money, but building the computer to my specs is more important.

    Of course you could do something much cheaper than I have here, especially if you have an older PC or parts laying around. Even if you don't you could easily pick up a decently powerful refurbished IBM ThinkCentre or HP or other desktop from MicroCenter for $199, add another drive, install WHS and be off and running. You can probably find one with a pretty small form factor that looks pretty good, too. Something like this would work fine - I don't know if it supports SATA, but if not you could easily add two 250GB IDE drives for about $100. Not too shabby.

    I have to thank Jay R. Wren (@sillyevar) and Tom Lynch for their feedback on my initial post. Jay reminded me about the power supply and Tom got me thinking about supporting four drives rather than two. I'm glad I went down both those roads, I think I ended up with a better system because of doing so.

    Once again, what are your thoughts? Anything you would do differently? Do you have some different priorities or a different wish list?

  • In search of an eco-friendly economical Home Server

    I ordered the 120-Day Evaluation version of Windows Home Server last week. I got the DVD in the mail earlier this week and it's been sitting on my desk staring at me, daring me since then.

    Like most geeks, I've got a house full of computers (desktops, laptops, routers, wireless routers, XBox and more). One of the things on my To-Do list for quite some time is to implement some type of file sharing and backup strategy. Anything would be better than the spaghetti of mapped drives and cheap cron software that currently serves those purposes. DFS (Distributed File System) in Windows 2000 Server helps out some, but its not the answer. And yes, I still have one of those running.

    The promise of Windows Home Server is a godsend to me. So last night I jumped on NewEgg and started putting the hardware together. Yes, I could just buy one of the HP SmartMedia devices, but I'm a geek. I must build it.

    I'm looking for small, quiet, low power, and as economical as possible. I know I'll have to make some concessions given those parameters. My budget is under $500 dollars given that I'll have to shell out another $150 for the software once my eval is over.

    Below is what I've put together so far:

    caseASUS T3-M2NC51PV AMD Socket AM2 Barebone

    $179.99

    cpuAMD Athlon 64 LE-1600 2.2GHz 1MB L2 Cache Socket AM2 45W Single-Core Processor $44.99harddriveWestern Digital Caviar "Green Power" WD5000AACS 500GB 5400 to 7200 RPM 16MB Cache SATA 3.0Gb/s Hard Drive x 2 $94.99 x 2ramCORSAIR ValueSelect 1GB 240-Pin DDR2 SDRAM DDR2 667 (PC2 5300) $17.99dvdLITE-ON 20X DVD+R DVD+RW Burner included extra White bezel $26.99

     

    The RAM and CPU are a package deal - save $10. I could go cheaper on the DVD drive by $10, but that is the cheapest one with a white bezel. Foregoing the DVD drive completely is an option, but it's a "nice to have". I could go cheaper on drives, but I like going with the "Green Power" drives for this application. I'm not a memory snob so the Corsair ValueSelect is fine by me. I always try to stick to some kind of recognizable brand of memory and I've never had a stick go bad on me. I've read from several people that any more than 1GB of RAM is a waste with WHS. I could go dual core on the CPU, but to get a 45W dual core I'd have to go a bit more expensive. The single core 2.2GHz should be sufficient for a file/backup server. Reviews say the case is fairly quiet - I could get a silent one and upgrade the power supply, but those would set me back another $100. I know I could probably go with a much cheaper case, a regular desktop slimline, but I want to keep it small and quiet.

    After shipping it weighs in at at just under $460.00. Not too bad.

    What do you think? Any suggestions? Any room for improvement without sacrificing budget?

  • Upcoming Code Camps and Days of .NET

    This spring is quickly becoming packed with lots of great .NET community activity. The first is our local Cincinnati (we got left out of the official) Heroes Happen Here Community Launch. The rest are regional code camps. I can't describe code camps any better than Mike Eaton did recently:

    If you've never been to a Code Camp ... I really suggest you check it out.  These are not your typical vendor-sponsored conferences with lots of marketing fluff.  Code Camps and the Days of .NET are jam-packed with technical content from top to bottom.  The talks are almost always given by local developers that have no agenda other than to help make the world of software development a better place. 

     

    Heroes Happen Here - Cincinnati Community Launch - Tuesday, April 15th 6:00 PM

    Links: home page of Cinnug.org for more details, MaxTrain - The {Hometown} Launch

    Stefan Kyntchev will be presenting LINQ and I will be covering "What's New in ASP.NET 3.5"

    HeroesHappenHere

     

    Pittsburgh Code Camp - Saturday, April 12th

    Links - event web site

    This looks like it will be a great event. But with CODODN the following Saturday and Indy the one after that I can't disappear for three weeks in a row - my wife would kill me. Maybe next time Pittsburgh. It looks like at least a couple of area devs are making the trip, though - Jeff McWherter and Amanda Laucher are both presenting.

     

    Central Ohio Day of .NET - Saturday, April 19th

    Wilmington, OH

    Links - CODODN page on CINNUG, Session List

    I will be presenting "SEO for ASP.NET Developers". There will be a ton of great sessions here from some "wikid smaht" (yeah, I spent a little too much time with Brian Prince last night!) regional developers like Leon Gersing, Nino Bienvenuti, Steven Harman, Jay R. Wren, Michael Eaton, Jeff McWherter, Jason Follas, James Bender, Amanda Laucher, Darrell Hawley, Jim Holmes, Brian Prince (subscribe to Brian's RSS feed), Jeff Hunsaker, Joe O'Brien, Joe Wirtley and MORE!
    [PS, If any of the rest of you jokers want me to put a link to go with your name then email me the link or send me the link on Twitter. I'm way too lazy to look all of them up]

    Central Ohio Day of .NET

     

    Indy Code Camp - Saturday, April 26th

    Links - indycodecamp.com, agenda, Aaron Lerch's Blog

    I will be presenting "SEO for ASP.NET Developers". Looks to be another great event with the likes of Michael Eaton, Joe Wirtley, Jeff McWherter, Michael Wood, Chris Woodruff, Alan Stevens and more talking about some good stuff.

     

    Western Michigan Day of .NET - Saturday, May 10th

    Grand Rapids, MI

    Links - wmdotnet.org/dodn08, agenda, session list

    No announcement on sessions yet, should be coming any day now. I plan on being there.

    WM Day of .Net May 10, 2008 - I'll be there!

     

    Cleveland Day of .NET - Saturday, May 17th

    Links - clevelanddodn.org

    No announcement on sessions yet. I plan on being there.

    Cleveland Day of .NET
  • MIU HDPC

    Say hello to the MIU HDPC (Hybrid Dual Portable Computer) - via Engadget.

    This is either the smallest ugly computer I have ever seen or the largest ugly mobile phone I have ever seen. With 4GB of RAM, a 60GB HDD, the ability to run Windows XP, a 5 MP digital camera and a 9 hour battery life it is pretty darned cool for under $500 - looks be damned. This thing just might be the Anti-iPhone!

    MIU_1

    MIU_3

    MIU_2

  • What is wrong with the ASP.NET Community?

    Since Good Friday was a Telligent holiday Leon (Fallen Rogue) and I decided to meet for breakfast and some stimulating conversation. Well, stimulating for me at least; I'm not sure how much stimulation Leon got from my never-ending statements like "Huh?", "uh-huh" and "okay, I get it". For those keeping score, Frisch's Breakfast Bar FTW!

    Leon started off the conversation by stating that he had been really active in the Ruby community and had not actively participated in the ASP.NET community until about a year ago. At that point he realized that the Ruby community had some strong thought leaders and everything seemed to be on the right path so he decided to put more effort into the ASP.NET community, which he thought needed some help - some organization, some direction.  This led us to discuss the things we like, the things we dislike, and things that are broken and why. Over the next two hours we discussed various topics, but the majority of our conversation was dominated by our thoughts about the current state of the ASP.NET community that we both proudly consider ourselves members of.

    [Leon, feel free to chime in if any of my recollections are wrong.]

    I believe that Leon has a follow-up post to this where he will relay more of his thoughts and evangelize a bit, but I'll start off by presenting a couple of observations and theories that we, a couple of guys in the trenches, raised:

    1. The ASP.NET platform / community is immature for its age
    2. Thought Leaders are chasing dragons
    3. Microsoft needs to let go

    The ASP.NET Community

    dotnetCommunity

    The above image represents my view of the ASP.NET community. At the top of the pyramid you have the leaders who steer the community. At the ultimate tip is Scott Guthrie. While this may or may not be true it is perceived to be true so that makes it real. When Scott writes something in his blog or gives a code example then that example becomes the gospel - it becomes the way it should be done. It is copied over and over and over. And why not, nobody seems to know the platform better than he.

    The second group, the Practical Experts, are those of us who are perceived as having varying level of expertise, speak at Launch events, run User groups, write books, blog, etc. While there are a large portion of "loyalists" in this group, there are also a lot of ALT.NET people and others looking for the best way to do things. Some of these people profess TDD, BDD, design patterns and other "best practices" and some of them just do things the "Microsoft way".

    The bottom portion of the pyramid, which would be much larger if drawn to scale, consists of the rest of the ASP.NET developers that build or maintain web apps daily and are just looking to get the job done. This large group follows the platform/community rather than study it. They don't actively seek out better ways to do things. Instead they just do what the two groups ahead of them tell them to do.

    The ASP.NET platform / community is immature for its age

    I have to admit that I know little about the Java world so take my perception with a grain of salt. When I think of Java the first things that pop into my mind are the myriad of frameworks available. Thinks like Spring and ActiveRecord come to mind. While those things are available in the ASP.NET world, you have to look to find them - projects that fall under the Castle project for instance. They are not part of the "standard" toolkit of day-to-day ASP.NET developers. If you ask a 9-to-5 ASP.NET developer about ActiveRecord or Dependency Injection he or she will have no idea what you are talking about. She may know something about MVC if she's been following the recent headlines, but the majority of her time will be spent working with Web Forms. Don't get me wrong, I don't hate web forms, but I know there is a better way and I'm searching for it. But it's hard to sift through all the noise to find it. I really have to look to find the answers. It's difficult for me and I am not a 9-to-5 ASP.NET developer. Imagine how hard it is for someone who spends most of their time "following" the platform/community rather than studying it.

    Thought Leaders are chasing dragons

    Take a look at the image above. Notice the small groups that have branched off from the Practical Experts group. These are individuals or groups who have become disenfranchised with current state of our platform. They have become thought leaders and are doing something different from the mainstream. They've created their own frameworks - many of them adopted from Java and prepended with "N". Some of them have been adopted by the mainstream (this point can be argued), like NUnit, while most of them are still on the fringes. In most cases small groups of developers have followed these thought leaders creating splinter groups who are doing some amazing things.

    What is missing? Each of the arrows in that picture are one way. They go from the mainstream to the splinter groups. Nothing is flowing the other way. Realistically there is a small flow from the splinter groups back to the mainstream, but it is so small that it cannot be seen. We are missing some sort of encapsulation of those frameworks into the platform. Why? Why have they not been better accepted and more widely adopted? Because we, the community, are not steering the direction of the platform.

    Microsoft needs to let go

    Hooray: Microsoft adopted testing in Visual Studio
    Hiss: Microsoft created MSTest
    Would have been better if the framework allowed you to plug in whichever testing framework the developer wished. Why make a copy of NUnit? Rather than adopt some of the best practices being developed in the community, something similar (but not as good?) is baked into the product. As soon as MS makes something the out of the box default then that thing becomes "the way" to do things.

    Hooray: Microsoft hired Rob Conery to work on SubSonic full time
    Hooray: Microsoft hired Phil Haack to help work on the ASP.NET MVC framework
    Hiss: See both of the hoorays above.
    Microsoft hears our shouting for an alternative to web forms. They are actively seeking to offer one. In my opinion it would be better if Microsoft setup a grant to fund those projects rather than do them in-house. Why? At points during development concessions have to be made. If those projects are independent then those concessions can be made in the best interest of the product. As a Microsoft product those concessions might be made in the best interest of Microsoft or the .NET framework in general. I'm not questioning the honor nor commitment of either Rob or Phil. I know neither personally, but they are both friends of friends, I read their blogs and they both seem to be honorable and stand-up guys. Same goes for everyone else on the ASP.NET team that I have worked with and had conversations with - I know they have the best intentions. At risk of being a hypocrite I admit that if I were offered a job at Microsoft to work on one of my pet projects I would jump all over it.

    Microsoft has made steps toward opening up the .NET framework. Recent releases of much of the base class library source as well as Silverlight tooling and ASP.NET MVC source are examples of that.

    However, I don't think that the ASP.NET platform and .NET in general will reach their potential until Microsoft stops steering it and relinquishes the reigns to the community, just as SUN did with Java. They should of course continue to focus on the tooling and contribute to the framework, but they should stop controlling it. Doing so would offer the potential for true innovation and would allow the community to guide the platform to make it what we need it to be. Until then it will remain the platform for the community rather than the platform of the community.

  • Graffiti Nominated for asp.netPRO Reader's Choice Awards

    Our excellent CMS product, Graffiti, has been nominated for the asp.netPRO Reader's Choice Awards in the CMS category.

    Additionally, Community Server is in the running again in the forum category and CodeSmith is nominated as well.

    If you haven't tried Graffiti then make sure to check it out.

    And don't forget to place your votes!

  • Finally Web Services for TFF Ratio

    Over the last two weeks I've written about the beginnings of TFFRatio.com and some updates that have been made to the site like a Twitter autoresponder. One of my goals was to create a web service so that others could use TFF Ratio in interesting ways. I've been working on a Graffiti widget, which you can see in action here and will be released soon, but today I'd like to jokingly announce the CTP release of the beginnings of the TFF Ratio API. Well, I'm not joking about the announcement; I'm joking about calling it a "CTP". I'm a little tired of Web 2.0 "Beta" products so I figured I'd call it a Community Technology Preview.

    I will update the TFF Ratio site soon with this information, but for now this is the only place you can find it.

    TFF Ratio SOAP Web Service

    First, the TFF Ratio SOAP web service: http://tffratio.com/services/ws.asmx

    The only method so far is GetTFFRatio, which expects the following parameters, just like the form on the home page of the TFF Ratio site:

    • usernameToGet = the twitter username of the person you want the TFF Ratio info for (optional, if omitted then returns the TFF ratio for the username)
    • username = your twitter username
    • password = your twitter password

    The object returned is a TFF Ratio UserInfo object that includes some things from Twitter useful for building badges or whatever you can think of like followers count, friend count, TFF Ratio, and a witty "level" comment.

    TFF Ratio POX Web Service

    For those so inclined a plain old XML web service is available as well that does the same thing as the SOAP service: http://tffratio.com/services/gettffratio.ashx

    It accepts the following parameters either via GET or POST:

    • usernameToGet = the twitter username of the person you want TFF Ratio info for (optional, if omitted then returns the TFF ratio for the username)
    • username = your twitter username
    • password = your twitter password

    The returned results are the same as for the SOAP web service, but just in XML format.

    Since your Twitter username and password are submitted to this web service I recommend using this server side rather than client side. I plan on implementing an API key soon that you can submit rather than your Twitter username/password unless Twitter beats me to it (like Jaiku currently does).

    TFF Ratio Badge Service

    Finally the piece de resistance is something I spent a couple hours on last night sharpening my GDI sword. This service returns a JPEG image: http://tffratio.com/services/badge.ashx

    Example: http://tffratio.com/services/badge.ashx?handle=danhounshell

    Dan Hounshell's TFF Ratio

    It expects the following sets of parameters:

    • handle = the twitter username of the person you want the TFF Ratio badge for. If the user you are querying is public then this is all you need. If you are querying a private Twitter user, even yourself, then you should use the below parameters instead of this one (optional)

     

    • usernameToGet = the twitter username of the person you want the TFF Ratio badge for (optional, if omitted then returns the TFF Ratio for the username)
    • username = your twitter username
    • password = your twitter password

    The results are a 180x225 JPEG image. If you plan on using this image in your blog sidebar then I'd recommend using option 1 above (the handle param) otherwise your twitter username and password will be there for the world to see. If you've marked your Twitter profile and updates as private then I recommend retrieving the image server side, storing it locally, and then displaying it.

    Privacy Concerns

    The results of each of the services displays nothing more than what is publicly available from your Twitter profile plus some calculations to determine your TFF Ratio - your followers count divided by your friends count. If you are concerned about your privacy then consider changing your Twitter profile to private so that only your friends can follow you.

    TFF Ratio API Usage

    Please let me know of any cool things that you do with the API. I plan on awarding some type of prize to the most creative usage(s). I was thinking about having some TFF Ratio T-shirts created, but it may just be as simple as creating a custom comment that will always and only be served with your TFF Ratio.

  • More TFF Ratio Updates

    A few days ago I blogged about adding some cool updates to the TFF Ratio site that included adding a ReTweeter that would reply with your TFF Ratio stats if you used @tffratio in a tweet.

    I got some comments from friends and colleagues (@jfollas and @averyj) that the process should be a bit easier and that I should be able to use the Twitter replies API call to make it easier. Of course they were right and after spending about 2 minutes looking at the Twitter API I was able to make some updates to make it so.

    Now to get a TFF Ratio ReTweet all you need to do is make a tweet with @tffratio (case is not important) as the first word. This will be seen as a reply and TFFRatio will pick it up and respond to you.

  • Family Pics

      

     

     

    The top row is the three faces of Tucker. Second row is Tucker in action. Last row is all three kids: Regan, Tucker and Jared.

  • TFF Ratio Updates

    Last weekend I made some updates to the TFF Ratio site to give it a little more "oomph".

    One of the things I noticed was that people would go to the TFF Ratio site, get their ratio and then post it on Twitter with something like "Hey my TFF Ratio is up to 1.09 now". I thought it would be cool if I could bypass the step of them needing to go to the TFF Ratio site and instead have their TFF Ratio automatically posted to Twitter in some fashion.

    The solution I came up with was pretty simple: built a bot to listen for a specific word in Twitter posts and if found respond with the user's TFF Ratio stats.

    The results look like this:
    tffratio_retweeter

    You can see that Michael Eaton made a Twitter post with @tffratio in it and TFF Ratio replied about a minute later with Mike's TFF Ratio stats. I like to call this a ReTweeter, but I've been told that it is nothing more than Twitter Bot. (My Twitter client is TeleTwitter in case you're interested)

    Currently to use the @tffratio ReTweeter you should follow TFFRatio on Twitter. Once I receive the message of a new follower I will set TFFRatio to follow you back. After you get the message that TFFRatio is following you can post a tweet with @tffratio in it at any time. I know this "sign up" process is probably a little more difficult than it should be but I can't currently come up with anything easier that doesn't involve me trying to listen to the Twitter public timeline. That would be way too much info. I'm considering using hashtags instead, but I'll have to play around with them first to see if they'll work. Additionally, I plan on adding a small form to the TFF Ratio site that will allow you to enter your username so that TFFRatio will automatically start following you.

    I've got a post in the works entitled "How to built a Twitter ReTweeter" with code details for those that are interested in them. I should be able to publish it in a day or two, but for now here are the high level basics:

    To begin I created a new Twitter account, TFFRatio of course. I then built a console app that would query the Twitter API once a minute for any mention of @tffratio, look up the user's TFF Ratio who made the tweet and then send its own reply post back to twitter with that user's TFF Ratio.

    To enable the TFF Ratio Re-Tweeter the only thing I needed to do was expose a web service on the TFF Ratio site so that I could make use of the existing code base. The console app (now a Windows Service) just calls that web service. The web service does nothing more than the existing little form on the site does. It takes three input strings: the Twitter username to query, your twitter username and your twitter password and passes back the TFF Ratio stats for the user you looked up. In a few days I will make the web service public for those interested in using it.

    Since I had the web service in place on TFFRatio.com I thought it would be fun to build a Graffiti Widget to make use of it. You can see the widget in action here: http://graffiti.danhounshell.com/. I'll be releasing that widget soon as well. Once the web service is public I'm sure it will be just as easy to build a Community Server widget or a Wordpress plug-in or anything that you can think of to proudly display your TFF Ratio.

    If you have any questions, give me a shout.

    Please enjoy your TFF Ratio responsibly and remember not to take it too seriously.

  • Graffiti does eBay

    graffiti_ebay I've been jammed up with a lot of work recently, but I still make some time to play with one of my new favorite toys, Graffiti.

    After my ecommerce site built on Graffiti I tend to look for new, interesting and different things that I can do with Graffiti both for the personal fun and challenge and to help showcase the power that Graffiti wields.

    I came across a post a while back that I found interesting that I bookmarked for future reference. In it the author provided an idea to setup mini sites geared towards niche products that works as affiliate sales tools for referring people to eBay. He also laid out a decent step-by-step tutorial for doing so that involved Wordpress and a bunch of plug-ins. As a web developer I was mostly interested in the technology behind the site. I've worked with eBay's web services in the past (on the WIWM project) and I really have an interest in web services that sites like Amazon, eBay, Yahoo, etc. offer. I don't know why, but I really get geeked up by them. Maybe because they combine two of my favorite things - using 3rd party web services and search.

    A few weeks ago I began thinking about that post again and wondered if you could do the same sort of thing with Graffiti instead of Wordpress. For those looking for the short story, the answer is "Yes, you can!" Building off my previous example, BuyWoodToys.com, I put together a wood toys comparison shopping site using a stock Graffiti installation, the eBay shopping web services, and a few custom Chalk extensions. If you're itching to take look at the site, here's the URL: http://compare.buywoodtoys.com.

    The How-To

    The toughest part was finding the category ids for all the products I wanted to display on the site and categorizing them. After browsing the eBay site for an hour or so (maybe longer, I tend to get lost in all that cool stuff) I had it figured out.

    ebayURL

    The URL in the image above is for the category "Toys & Hobbies > Educational". Do you see the part of the URL that starts with "catZ" followed by a number? That number, 11731, is the ID for that category. If I remember correctly there is another way to determine the category id, but just browsing through the site and pulling it from the URL worked best for me.

    I then created a category in Graffiti for each of the eBay categories I wanted to highlight: Building Toys, Characters (Movies / TV), Handcrafted, Puzzles, etc. No real magic here - the categories simply serve as containers. My goal was to use the categories as a navigation and hierarchy tool. The category page would just display a list of product categories (Graffiti posts) that fell under it like the image below (the results after clicking on the category "Building Toys").

    categories

    All that was required for this was a change to the index.view to display only the post image and title. This was very similar to my category pages that I was already using for the BuyWoodToys site, so little change was required.

    The real meat of the work was done on the post page (or the post.view). I wanted to display a list of matching eBay products on the post page. For instance, if the user clicked "Lincoln Logs" post on the screen shown above, they would then be shown something similar to the following on the post page:

    products

    To tell the post what eBay products to display I made use of Graffiti's support for Custom Fields. After groking custom fields I've found that I use them all the time. They really offer a great way to extend Graffiti easily, quickly and without touching any code. I added two fields, EbayCategoryID and EbaySearchTerm to the posts. Below you can see that the category ID is set to 19013, which is the category for Lincoln Logs.

    customfields

    By now I knew what I wanted to display and I told Graffiti what I wanted to display, but Graffiti has no built in knowledge of eBay or the eBay web services. I needed a way to help Graffiti out a bit. I created a custom Chalk extension (see this page for a quick explanation/example of creating a chalk extension) that would take an eBay category id and a search string as input parameters, call the eBay Shopping Web service with those parameters, loop through the returned results building the HTML necessary to display those results and then return that HTML as a string to display on the post page. The method takes either the category ID, the search term, or both as input and uses those to query the eBay service. I won't go into code details here for the Chalk extension, but if you're interested hit me up and I'll give you a sample or I'll write another post with more details.

    Finally, I just needed to edit my post.view page to display the results of the eBay search. Using my new Chalk extension it was easy and the entire markup for the post.view page looks like this:

    CropperCapture[48]

    EbaySearchResults is the name I've given my custom Chalk class and HTML() is the name of the method to return the search results HTML. The method takes 3 parameters: search term, category id, and number of results to return. I told you the markup was simple. You can see that I just pass in my custom fields that I created in the Graffiti control panel, using post.Custom("EbaySearchTerm") and post.Custom("EbayCategory"), and the Chalk extension does the rest. The HTML returned by the chalk extension is clean standards-based HTML that can easily be styled via CSS.

    The Wrap

    I don't know that what I've done here has far reaching interest, other than to do exactly what I've demonstrated: building a little niche site to serve as an affiliate sales tool. I could see it as being more useful for someone who has a product-based blog (or theme-based blog) and wanted to have one category or post that listed out specific products available on eBay. One example comes to mind: a person who has a blog about cross country skiing may have a category or page that lists out ski equipment available on eBay. Alternately, you could list out a couple of eBay items at the end of any blog post that has the eBay category or search strings set for it. One similar idea that I've been playing around with is to implement this as a sidebar widget instead that shows items from Amazon or eBay if someone comes to the site via a search engine. For instance, if someone came to the site from Google by doing a search for "ASP.NET AJAX error 'xyz'" then they might be shown a list of AJAX books from Amazon.

    I hope I've been able to demonstrate the flexibility and power of Graffiti. I know that not everyone has the ability to fire up Visual Studio and build their own Chalk extensions, but at least you might now realize what is possible. If nothing else I hope you come away thinking, "that Graffiti is pretty cool". And maybe even "that Dan is pretty cool, too".

Powered by Community Server (Commercial Edition), by Telligent Systems