<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dan Polant :: Web Interaction Designer</title>
	<atom:link href="http://danpolant.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://danpolant.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Nov 2011 03:55:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Switchback CMS</title>
		<link>http://danpolant.com/switchback-cms/</link>
		<comments>http://danpolant.com/switchback-cms/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 20:09:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=592</guid>
		<description><![CDATA[At Switchback, I worked primarily as a Drupal API developer, implementing custom functionality for clients and contributing back to the open-source community.]]></description>
			<content:encoded><![CDATA[<p>Switchback CMS offers two main products: custom Drupal installations and service-based Drupal-Civicrm integrations. As lead developer, I was responsible for both supporting existing accounts, implementing systems for new clients, and training new developers. The Switchback team relies and thrives on effective communication between project managers, designers and developers, and we deliver powerful, dependable Drupal applications on an efficient timeline.</p>
<p>The list below is comprised of the projects for which I did heavy feature development or ground-up implementations. I filled the support role for nearly all of the projects listed in <a href="http://switchbackcms.com/ourwork">Switchback&#8217;s portfolio</a>.</p>
<h3>Midwest Eye-Bank</h3>
<p>Midwest Eye-Bank (MEB) needed a way of organizing their internal documents &#8211; a replacement for a simple ftp server that had been used previously. Drupal offered the opportunity to allow for advanced searches and metadata, more comprehensive group management and a better overall user experience.<br />

<div class="ngg-galleryoverview" id="ngg-gallery-8-592">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-31" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/meb/meb_workflow_page_1.png" title=" " class="thickbox" rel="set_8" >
								<img title="MEB workflow" alt="MEB workflow" src="http://danpolant.com/wp-content/gallery/meb/thumbs/thumbs_meb_workflow_page_1.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-33" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/meb/screen-shot-2011-10-10-at-11-57-15-am.png" title=" " class="thickbox" rel="set_8" >
								<img title="File browser" alt="File browser" src="http://danpolant.com/wp-content/gallery/meb/thumbs/thumbs_screen-shot-2011-10-10-at-11-57-15-am.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

</p>
<p>We used Drupal 7 for MEB. We contributed testing notes and bug-fixing patches for a number of Drupal core/Organic groups issues during development. File security was an important issue, so we wrote some custom code to handle securing file downloads from private groups.</p>
<h3>Wunderground Module</h3>
<p>Weather Underground offers a comprehensive weather reporting web service that draws from thousands of personal weather stations around the country (you can think of them as &#8220;open-source&#8221; weather). Their Drupal module was in need of an upgrade. We created several new blocks that let users better leverage the power and detail of the Weather Underground data.<br />

<div class="ngg-galleryoverview" id="ngg-gallery-9-592">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-35" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/wunderground/screen-shot-2011-10-10-at-12-16-19-pm.png" title=" " class="thickbox" rel="set_9" >
								<img title="screen-shot-2011-10-10-at-12-16-19-pm" alt="screen-shot-2011-10-10-at-12-16-19-pm" src="http://danpolant.com/wp-content/gallery/wunderground/thumbs/thumbs_screen-shot-2011-10-10-at-12-16-19-pm.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-37" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/wunderground/screen-shot-2011-10-10-at-12-16-42-pm.png" title=" " class="thickbox" rel="set_9" >
								<img title="screen-shot-2011-10-10-at-12-16-42-pm" alt="screen-shot-2011-10-10-at-12-16-42-pm" src="http://danpolant.com/wp-content/gallery/wunderground/thumbs/thumbs_screen-shot-2011-10-10-at-12-16-42-pm.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

</p>
<p>Under-the-hood improvements included multiblock support and locations integration. We aimed to provide the most comprehensive weather information module for Drupal. These enhancements are currently found in the dev version of the <a href="http://drupal.org/project/wunderground">Weather Underground module</a>, pending the maintainer&#8217;s merge into the main branch.</p>
<h3>Bgreen Today</h3>
<p><a href="http://bgreentoday.com">Bgreentoday.com</a> sells sustainable building and restaurant materials. Their site is an attribute-heavy ubercart implementation, the main catalog being views embedded on template-overridden taxonomy pages.<br />

<div class="ngg-galleryoverview" id="ngg-gallery-10-592">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-38" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/bgreentoday/screen-shot-2011-10-10-at-12-27-32-pm.png" title=" " class="thickbox" rel="set_10" >
								<img title="screen-shot-2011-10-10-at-12-27-32-pm" alt="screen-shot-2011-10-10-at-12-27-32-pm" src="http://danpolant.com/wp-content/gallery/bgreentoday/thumbs/thumbs_screen-shot-2011-10-10-at-12-27-32-pm.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-39" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/bgreentoday/screen-shot-2011-10-10-at-12-27-40-pm.png" title=" " class="thickbox" rel="set_10" >
								<img title="screen-shot-2011-10-10-at-12-27-40-pm" alt="screen-shot-2011-10-10-at-12-27-40-pm" src="http://danpolant.com/wp-content/gallery/bgreentoday/thumbs/thumbs_screen-shot-2011-10-10-at-12-27-40-pm.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

</p>
<p>This project involved fairly complex data migration of products with attributes and overlapping taxonomy terms. Special url handling was added so that products would automatically generate multiple aliases if they appeared in more than one root taxonomy section.</p>
<h3>Traverse City Chamber of Commerce</h3>
<p>Switchback&#8217;s Civicrm-Drupal package powers <a href="http://tcchamber.org">tcchamber.org</a>. We added enhancements to the membership process, administrative interface, search functionality, event discounts and mass email. Many of these features were contributed back to the Civicrm project.<br />

<div class="ngg-galleryoverview" id="ngg-gallery-11-592">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-40" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/tcchamber/screen-shot-2011-10-10-at-12-32-51-pm.png" title=" " class="thickbox" rel="set_11" >
								<img title="screen-shot-2011-10-10-at-12-32-51-pm" alt="screen-shot-2011-10-10-at-12-32-51-pm" src="http://danpolant.com/wp-content/gallery/tcchamber/thumbs/thumbs_screen-shot-2011-10-10-at-12-32-51-pm.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-41" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/tcchamber/screen-shot-2011-10-10-at-12-33-36-pm.png" title=" " class="thickbox" rel="set_11" >
								<img title="screen-shot-2011-10-10-at-12-33-36-pm" alt="screen-shot-2011-10-10-at-12-33-36-pm" src="http://danpolant.com/wp-content/gallery/tcchamber/thumbs/thumbs_screen-shot-2011-10-10-at-12-33-36-pm.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/switchback-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrapwalls.com</title>
		<link>http://danpolant.com/scrapwalls-com/</link>
		<comments>http://danpolant.com/scrapwalls-com/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 19:38:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=586</guid>
		<description><![CDATA[<a href="http://scrapwalls.com">Scrapwalls.com</a> is a photo collage web application. After users have uploaded photos and chosen a shape and a format, the application arranges users' photos into the shape that they requested. Once they are satisfied, they can order a print of their collage.]]></description>
			<content:encoded><![CDATA[
<div class="ngg-galleryoverview" id="ngg-gallery-7-586">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-29" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/scrapwalls/sw2.png" title=" " class="thickbox" rel="set_7" >
								<img title="Scrapwalls finalize page" alt="Scrapwalls finalize page" src="http://danpolant.com/wp-content/gallery/scrapwalls/thumbs/thumbs_sw2.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-30" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://danpolant.com/wp-content/gallery/scrapwalls/sw3.png" title=" " class="thickbox" rel="set_7" >
								<img title="Scrapwalls homepage" alt="Scrapwalls homepage" src="http://danpolant.com/wp-content/gallery/scrapwalls/thumbs/thumbs_sw3.png" width="220" height="220" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<p>A few years ago, I joined the Scrapwalls team as a PHP and front-end developer. One of my first tasks was designing and implementing the checkout user interface, which has since helped to provide a steadily increasing conversion rate. Scrapwalls has grown from a simple collage-making tool into a successful business, integrating seamlessly with PayPal, various printing API&#8217;s and Facebook.</p>
<p>Scrapwalls is a handbuilt PHP application that uses the Smarty templating engine, jQuery and cross-browser compatible XHTML to deliver its user interface. During much of my time, I focused on creating the three-step collage creation process. The challenge here was to provide an interface that allowed users to complete a relatively lengthy and complicated task with a minimal amount of confusion. We decided to break the process down into smaller steps, with concise yet descriptive titles, icons and instructions.</p>
<p>Later, I turned my efforts to the design of the shopping cart and checkout sections of the site. We did a survey of successful e-commerce sites in order to find at set of established and trusted design patterns to use, while rethinking certain features that seemed unique to Scrapwalls, such as collage previews on the shopping cart page which weren&#8217;t always ready to view by the time a user reached that page.</p>
<p>Soon we realized that we could add significant value to Scrapwalls by allowing people to import photos from Facebook. After learning a bit about the Facebook graph API and FQL, I was able to put this feature together so that users do not have to go through the lengthy process of uploading photos if they already have them in Facebook.</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/scrapwalls-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamically creating views in Drupal</title>
		<link>http://danpolant.com/dynamically-creating-views-in-drupal/</link>
		<comments>http://danpolant.com/dynamically-creating-views-in-drupal/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 00:09:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[how to]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=547</guid>
		<description><![CDATA[The Views module can be broken down into three main parts: the query builder, the display builder and the user interface. Usually, we use the interface to control the other two parts, but sometimes situations call for query and display logic that the interface cannot provide.
A good introduction to dynamic views is the function views_embed_view(). [...]]]></description>
			<content:encoded><![CDATA[<p>The Views module can be broken down into three main parts: the query builder, the display builder and the user interface. Usually, we use the interface to control the other two parts, but sometimes situations call for query and display logic that the interface cannot provide.</p>
<p>A good introduction to dynamic views is the function <code><a href="http://drupalcontrib.org/api/drupal/contributions--views--views.module/function/views_embed_view/6">views_embed_view()</a></code>. Using this, one can render the finished display of a view stored in the database or in code. It returns rendered HTML:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$display</span> = views_embed_view<span class="br0">&#40;</span><span class="st0">&quot;name_of_view&quot;</span>, <span class="st0">&quot;display_id&quot;</span>, <span class="re0">$arg1</span>, <span class="re0">$arg2</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>Often this function is a good alternative to using views blocks, for situations where the view display should be more tightly integrated in a certain area. By using <code>func_get_args()</code>, <code>views_embed_view</code> lets you pass arguments into the view that would normally have to be in the URL. </p>
<p>However, there are situations where views_embed_view just won&#8217;t cut it. Here are some examples:</p>
<p>1) The user needs be able to choose what filters/fields exist in the view.<br />
2) Groupings need to be dynamically generated based on user input</p>
<p>The functionality listed above cannot be achieved merely by passing arguments into the view. Rather, one must employ methods of the View object ([views module]/includes/view.inc) in order to build up elements of the view from the foundation.</p>
<p>This approach starts with the function <code><a href="http://drupalcontrib.org/api/drupal/contributions--views--views.module/function/views_get_view/6">views_get_view()</a></code>. This function loads a view from any storage, but does not execute or render it. </p>
<p>Now comes the most important function to master, <code>View::add_item()</code>. The code is in views/includes/view.inc. The following snippet demonstrates how to add a node id filter to a view named &#8220;example.&#8221;</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$view</span> = views_get_view<span class="br0">&#40;</span><span class="st0">&#8216;example&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$options</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="st0">&#8216;value&#8217;</span> =&gt; <span class="nu0">5</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$view</span>-&gt;<span class="me1">add_item</span><span class="br0">&#40;</span><span class="st0">&#8216;default&#8217;</span>, <span class="st0">&#8216;filter&#8217;</span>, <span class="st0">&#8216;node&#8217;</span>, <span class="st0">&#8216;nid&#8217;</span>, <span class="re0">$options</span>, <span class="st0">&#8216;nid_identifier&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>Here is a breakdown of arguments found in <code>View::add_item</code>:</p>
<p>1) display id<br />
2) type &#8211; can be filter, relationship, field, sort<br />
3) table &#8211; can also be table alias<br />
4) options &#8211; see below<br />
5) identifier &#8211; an internal reference to this filter, useful for establishing predictable dynamic keys for fields/filters/relationships that may get added twice. If you don&#8217;t pass anything for this argument, Views will create a unique id using an incremental variable if necessary.</p>
<p>Here is a breakdown of the <code>$options</code> argument, at least that of it which I have used:</p>
<p>1) value &#8211; meaningful only to filters. Specifies the conditions that will pass the filter. This can be an array in order to imply the IN operator<br />
2) operator &#8211; may assume any of the standard db operators. It is not necessary to specify IN if you provide an array as value.<br />
3) relationship &#8211; specifies a relationship for this item to use. Remember that doing this will require that you change the table alias to reflect the relationship table alias.<br />
4) group &#8211; filters only. Specifies a group for this filter to be a part of. Numeric or string values will work.</p>
<p>The majority of the work can be done with the <code>add_item</code> function. If I were to choose one more important method to learn within this subject it would be <code>set_option()</code>. Suppose you have defined several filters as being part of groups 0 and 1. Here is how you would use <code>set_option</code> to tell Views what to do with those groupings:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$groups</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="nu0">0</span> =&gt; <span class="st0">&#8216;OR&#8217;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="nu0">1</span> =&gt; <span class="st0">&#8216;AND&#8217;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$view</span>-&gt;<span class="me1">display_handler</span>-&gt;<span class="me1">set_option</span><span class="br0">&#40;</span><span class="st0">&#8216;filter_groups&#8217;</span>, <span class="re0">$groups</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>This snippet would create two conditional groups, 0 conjoined by OR and 1 conjoined by AND.</p>
<p>Set_option is a method of the views handler, not the view. It can be used to set any of the other characteristics defined the in the options element of the handler. It can do the same things as <code>add_item</code> but <code>add_item</code> performs additional procedures that help things come out the way you want (in most cases) and is definitely more useful for adding filters, relationships, fields and sorts.</p>
<p>Once you have your view prepared the way you want it, you need to execute and probably render it. The following code will do just that:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$view</span>-&gt;<span class="me1">init_display</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$view</span>-&gt;<span class="me1">pre_execute</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$view</span>-&gt;<span class="me1">execute</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="co1">// at this point, your view will have results added</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$view</span>-&gt;<span class="me1">post_execute</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; </div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="co1">// this is the final output &nbsp;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$output</span> = <span class="re0">$view</span>-&gt;<span class="me1">display_handler</span>-&gt;<span class="me1">preview</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>There is a lot more you can do with dynamic views than I have outlined here. Generally, the best way to learn more about this is to first use the UI to build a view that contains the elements and characteristics that you want to dynamically add in your function. Then look at the export of that view. You will gain a good understanding of what the $view object and its display handler need to look like in code. Having a PHP debugger is also immensely helpful, but short of that, just use <code>dpm</code> liberally.</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/dynamically-creating-views-in-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Should I use Drupal 7?</title>
		<link>http://danpolant.com/should-i-use-drupal-7/</link>
		<comments>http://danpolant.com/should-i-use-drupal-7/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 18:24:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Information Industry]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Drupal 7]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=531</guid>
		<description><![CDATA[There are a lot of things to consider when making the decision to go with Drupal 7 or Drupal 6. I will provide some general advice, but many factors will be specific to your project. So my first piece of advice is to do a lot of research on what modules are available. This means [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of things to consider when making the decision to go with Drupal 7 or Drupal 6. I will provide some general advice, but many factors will be specific to your project. So my first piece of advice is to do a lot of research on what modules are available. This means not only looking to see if there is a 7.x code branch, but also downloading and testing each module. Very few modules are out of the development state right now. This doesn&#8217;t mean they won&#8217;t work, but it does mean they probably have quirks/bugs/missing features.</p>
<p>The bottom line is that at this time, Drupal 7 development takes a lot longer than Drupal 6 development. There are benefits of course. To me, Drupal 6 is already starting to seem cumbersome and antiquated at the architectural and UI levels. Many of the Drupal 7 features and modules are way ahead of their Drupal 6 counterparts: Commerce versus Ubercart, Field api versus CCK, Entity API versus, well, nothing &#8230; and et cetera. Soon Drupal 7 will be better supported than Drupal 6, but right now, it is not.</p>
<p>Module update lag now overshadows the benefits of using Drupal 7. I would recommend that the novice PHP/Drupal API developer not use Drupal 7 at this point in time, because the likelihood of having to debug/patch complex modules or implement functionality with little or no documentation, is high. Also, module interactions are fluid and brittle. In order to get a D7 site working that uses Views, Entity API and Date, you have to install and maintain a changing cocktail of dev, beta and RC versions. Using the wrong combination will earn you a site full of undefined function errors. Suffice it to say you had better know how to <a href="http://drupal.org/node/157632">disable modules in the database</a> before attempting to use these modules.</p>
<p>These issues should not daunt skilled developers doing work for clients with large budgets. Drupal 7 development is fun and challenging. A little bit of code goes a long way, especially when working with the entity and field API. Also, at this stage in the game, you may get a chance to write some code for the big modules or for Drupal core, because it is likely that a bug in one of these large codebases will block your way at some point and you will have to either fix it or wait for someone else to do so. One word of warning, if you are a Drupal developer who has hitherto avoided learning about Object Oriented programming (I mean beyond insofar as objects are the same as arrays in PHP), now is the time to put aside your trepidation and <a href="http://www.php.net/manual/en/language.oop5.php">learn at least a little bit</a> about class inheritance, interfaces, abstract classes, protected properties and other structural conventions for OO. Many of the big modules (Views, Rules, Entity API and others) make heavy use of OO now.</p>
<p>On the user interface side, there are two modules that are important to learn for Drupal 7: Rules and Features. Spearheaded mainly by Drupal Commerce, there seems to be an initiative for making rules events where there were once hooks, with rules action instances taking the place of hook implementations. Indeed, Commerce appears somewhat inert until you realize that most of its more advanced features are configurable as rules. If you want to write a module that adds functionality to cart events for example, you will find rules event invocations rather than module hook invocations. Fortunately, rules and hooks function similarly; the difference being that while rules are are more complex to configure in code, they, unlike hook implementations, can be customized and created in the UI and exported as Features.</p>
<p>As Rules becomes more central to the average Drupal consumer, the Features module gains significance too. Rules are beginning to describe increasingly complex procedures and business logic previously defined in module hooks, and only through Features can this functionality be packaged and reused abstractly. Features documentation is abundant and mostly good due to the fact that Features hasn&#8217;t changed much since Drupal 6. My only advice is to get to know the <a href="http://drupal.org/node/960926">drush Features commands</a>: drush fr (feature revert), drush fu (feature update), et cetera.</p>
<p>Bear in mind that as the timestamp on this post slips further into the past, Drupal 7 will have gotten better and the things written here will be less true. Until then, heed this advice: 1) introduce a healthy time/budget buffer in your Drupal 7 estimates, 2) be prepared for programming challenges, 3) do not expect everything to &#8220;just work&#8221; like it did in Drupal 6 and 4) use forums, issue queues and IRC to your advantage. The good thing is once you get into developing with Drupal 7, you will realize how much better it is as a framework compared to Drupal 6. My guess is we have about a year to wait before the old, important Drupal 6 modules are fully upgraded, and the community can return to relying on a large canon of feature-rich and largely bug-free modules.</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/should-i-use-drupal-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use the output buffer to debug a SOAP server</title>
		<link>http://danpolant.com/use-the-output-buffer-to-debug-a-soap-server/</link>
		<comments>http://danpolant.com/use-the-output-buffer-to-debug-a-soap-server/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 03:55:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[ob_start]]></category>
		<category><![CDATA[output buffer]]></category>
		<category><![CDATA[quickbooks]]></category>
		<category><![CDATA[SOAP]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=519</guid>
		<description><![CDATA[I&#8217;m working on a Quickbooks module for Drupal Ubercart. By implementing a SOAP server, it is possible to allow the Quickbooks Web Connector (QWC) to pull down XML snippets representing store information. We&#8217;re using the SOAP server module for Drupal, which extends services.
Quickbooks is the event horizon &#8211; you have know idea what it does with [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a Quickbooks module for <a href="http://www.ubercart.org/">Drupal Ubercart</a>. By implementing a SOAP server, it is possible to allow the <a href="http://developer.intuit.com/qbsdk-current/doc/pdf/qbwc_proguide.pdf">Quickbooks Web Connector</a> (QWC) to pull down XML snippets representing store information. We&#8217;re using the <a href="http://drupal.org/project/soap_server">SOAP server</a> module for Drupal, which extends <a href="http://drupal.org/project/services">services</a>.</p>
<p>Quickbooks is the event horizon &#8211; you have know idea what it does with your SOAP responses once it takes over. It is poorly documented and the Intuit developer forums are essentially derelict. Before we could even tackle the problem of getting the response data structures right, we had to make sure our SOAP server was working right. Packet sniffing was not an option for investigating our server&#8217;s responses because QWC needs to use SSL. Instead we wrote the output of the SOAP server instance to the output buffer, and logged it:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><a href="http://www.php.net/ob_start"><span class="kw3">ob_start</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$server</span> = <span class="kw2">new</span> SoapServer;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$server</span>-&gt;<span class="me1">handle</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$buffer</span> = <a href="http://www.php.net/ob_get_contents"><span class="kw3">ob_get_contents</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">watchdog<span class="br0">&#40;</span><span class="st0">&#8216;modulename&#8217;</span>, <span class="st0">&#8216;server output: &#8216;</span> . <span class="re0">$buffer</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/ob_end_flush"><span class="kw3">ob_end_flush</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
</ol>
</div>
<p>Output buffers direct the http response away from its destination and into a &#8220;buffer&#8221; where it can be retrieved later with ob_get_contents(). Using this method we were able to verify that our SOAP server was sending proper (looking) SOAP requests.</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/use-the-output-buffer-to-debug-a-soap-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Figuring out the Facebook API</title>
		<link>http://danpolant.com/figuring-out-the-facebook-api/</link>
		<comments>http://danpolant.com/figuring-out-the-facebook-api/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 03:35:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=496</guid>
		<description><![CDATA[A lot has been said about Facebook&#8217;s service oriented API, most of it bad. Recently I used the PHP Facebook SDK to make an app that gathers Facebook photos from users who want to make an online collage. The project is scrapwalls.com, and the Facebook import feature is now live. Anyway, I didn&#8217;t think the [...]]]></description>
			<content:encoded><![CDATA[<p>A lot has been said about Facebook&#8217;s service oriented API, most of it bad. Recently I used the <a href="https://github.com/facebook/php-sdk/">PHP Facebook SDK</a> to make an app that gathers Facebook photos from users who want to make an online collage. The project is <a href="http://scrapwalls.com">scrapwalls.com</a>, and the Facebook import feature is now live. Anyway, I didn&#8217;t think the Facebook API was all that bad. However, there were definitely some problematic areas which I&#8217;ll go over too. Here is what I learned:</p>
<p><strong>The random Javascript in example.php is important</strong></p>
<p>It took me a while to realize this, but you will have problems detecting a browser&#8217;s Facebook login status if you don&#8217;t have something like the following in your page:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"> &nbsp; &nbsp; &nbsp;window.<span class="me1">fbAsyncInit</span> = <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; FB.<span class="me1">init</span><span class="br0">&#40;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; appId &nbsp; : <span class="st0">&#8216;&lt;!&#8211;?php echo $facebook&#8212;&gt;getAppId(); ?&gt;&#8217;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; session : &lt;!&#8211;?php echo json_encode<span class="br0">&#40;</span>$session<span class="br0">&#41;</span>; ?&#8211;&gt;, <span class="co1">// don&#8217;t refetch the session when PHP already has it</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">status</span> &nbsp;: <span class="kw2">true</span>, <span class="co1">// check login status</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cookie &nbsp;: <span class="kw2">true</span>, <span class="co1">// enable cookies to allow the server to access the session</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xfbml &nbsp; : <span class="kw2">true</span> <span class="co1">// parse XFBML</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// whenever the user logs in, we refresh the page</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; FB.<span class="me1">Event</span>.<span class="me1">subscribe</span><span class="br0">&#40;</span><span class="st0">&#8216;auth.login&#8217;</span>, <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.<span class="me1">location</span>.<span class="me1">reload</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> e = document.<span class="me1">createElement</span><span class="br0">&#40;</span><span class="st0">&#8216;script&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; e.<span class="me1">src</span> = document.<span class="me1">location</span>.<span class="me1">protocol</span> + <span class="st0">&#8216;//connect.facebook.net/en_US/all.js&#8217;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; e.<span class="me1">async</span> = <span class="kw2">true</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; document.<span class="me1">getElementById</span><span class="br0">&#40;</span><span class="st0">&#8216;fb-root&#8217;</span><span class="br0">&#41;</span>.<span class="me1">appendChild</span><span class="br0">&#40;</span>e<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>This is from<a href="https://github.com/facebook/php-sdk/blob/master/examples/example.php"> example.php</a> in the PHP SDK. Basically this detects if the login status has changed, and reloads the page if it has. Your site&#8217;s server can&#8217;t see Facebook&#8217;s login cookies, so this snippet ensures that when the browser session changes, the pages gets reloaded. This process isn&#8217;t asynchronous (that would be cool) but simply adds an extra refresh to a page load where it detects a changed FB session. It is a bit weird, but as far as I could tell this is the only way to get it to work.</p>
<p><strong>FQL is faster than the Graph API</strong></p>
<p>Facebook&#8217;s <a href="http://developers.facebook.com/docs/reference/api/">graph API</a> reflects their current &#8220;no-sql&#8221; storage and retrieval approach. Through the graph API you see Facebook information as objects connected non-hierarchically through common id references. It is great for jumping from node to node but not so great for getting sets of nodes of one type attached to a user &#8211; e.g. &#8220;get name and url of all photos belonging to user&#8221; or &#8220;get all friends of user with IDs in a set.&#8221; For these &#8220;old school&#8221; queries, a SQL-like language is best, and that is why Facebook still supports <a href="http://developers.facebook.com/docs/reference/fql/">FQL</a>.</p>
<p>If you understand the basics of SQL, you understand FQL. FQL uses the simplest faculties of SQL (no joins) to query for specific field values within Facebook&#8217;s data store. The big advantage is it returns only as much info as you need. Responses from graph API calls are often huge and can cause slowdowns when requests are fired in a long loop, which is often necessary due to the nature of the graph API.</p>
<p><strong>Don&#8217;t forget to install the cert</strong></p>
<p>This is probably in the directions somewhere, but I wasted some time not realizing you have to put <a id="b92d7190e9fa44296b9812f507efa71213ec4b53" href="https://github.com/facebook/php-sdk/blob/master/src/fb_ca_chain_bundle.crt">fb_ca_chain_bundle.crt</a> in the same dir with <a id="d2d2e866bf0b1e6e1f030c06c5eebd87f4da1fc9" href="https://github.com/facebook/php-sdk/blob/master/src/facebook.php">facebook.php</a>.</p>
<h2>Overall impressions</h2>
<p>The most annoying thing I ran into was right at the beginning of the project. Over the span of a few days, I tried to register the app five or six times and was unsuccessful. At the time there was a lot of buzz about this. I don&#8217;t know how long it took for them to fix, because fortunately I realized one of the other developers had registered an app for us a year ago. Old apps seemed to still work fine, but the registration bug kept new ones from working for at least two or three days.</p>
<p>But hey, you have to take the bad with the good. The SDK is a well written class and provides everything you need to make API requests efficiently. I couldn&#8217;t imagine using the REST API without the SDK. On the browser side, the <a href="https://github.com/facebook/connect-js">Javascript SDK</a> has what it needs, and most importantly <a href="https://github.com/facebook/connect-js/blob/master/examples/jquery/login.html">work well with jQuery</a>.</p>
<p>Mostly I was just struck by the richness of the information that these APIs expose. I can see clever people writing apps that gather tons of information and analyze users&#8217; lives on Facebook, which today reflect quite accurately the ways in which people perceive themselves and are perceived. The security/privacy situation <a href="http://www.allfacebook.com/facebook-photos-warning-2009-02">is attrocious</a>, and it made making the app a lot easier. I worry about the potential for powerful corporate and political entities to gather information about individuals and groups &#8211; if the governments of Libya or Egypt had been effectively monitoring the revolutionary mentality as it developed on Facebook, they could have probably mounted a preemptive crackdown.</p>
<p>But insofar as code is apolitical, I say the Facebook APIs are a hit. Check out Facebook import on <a href="http://scrapwalls.com">scrapwalls.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/figuring-out-the-facebook-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSON output from Javascript</title>
		<link>http://danpolant.com/json-output-from-javascript/</link>
		<comments>http://danpolant.com/json-output-from-javascript/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 04:11:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=491</guid>
		<description><![CDATA[Have you ever wished that html forms could send more than just key value pairs to the server? While working with the Facebook API, I found that I needed to send an array of objects back to the server for processing when the user submits the form. JSON was the ideal solution, but I soon [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wished that html forms could send more than just key value pairs to the server? While working with the Facebook API, I found that I needed to send an array of objects back to the server for processing when the user submits the form. JSON was the ideal solution, but I soon discovered that neither Javascript nor jQuery have built in libraries for converting variables into JSON.</p>
<p>Fortunately, I came upon <a href="https://github.com/douglascrockford/JSON-js/blob/master/json2.js">https://github.com/douglascrockford/JSON-js/blob/master/json2.js</a>, a handy library that gives you variable.stringify(). This will output a string of JSON representing your variable. I simply used this method to create a JSON string for the data I wanted, and used jQuery to set this as the value of a hidden input. Adding a json_decode() on the server allowed me to read this data directly as a variable.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myJSONText = JSON.<span class="me1">stringify</span><span class="br0">&#40;</span>myObject, replacer<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>This method can be pretty useful if you are collecting object oriented data asynchronously and hoping to send that data back to the server. It seems like it ought to be built into jQuery at some point.</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/json-output-from-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding Cogito Ergo Sum</title>
		<link>http://danpolant.com/understanding-cogito-ergo-sum/</link>
		<comments>http://danpolant.com/understanding-cogito-ergo-sum/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 02:39:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Critical Writing]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=481</guid>
		<description><![CDATA[If one&#8217;s goal is to build up a valid understanding of human experience, one may begin by assembling the set of propositions that will serve as building materials for the foundation. Descartes believed that he could justify and vindicate our entire ontology in such a way, provided he could establish a foundational truth. &#8220;I think, [...]]]></description>
			<content:encoded><![CDATA[<p>If one&#8217;s goal is to build up a valid understanding of human experience, one may begin by assembling the set of propositions that will serve as building materials for the foundation. Descartes believed that he could justify and vindicate our entire ontology in such a way, provided he could establish a foundational truth. &#8220;I think, therefore I am&#8221; was, Descartes believed, that truth &#8211;  impervious to doubt and logically water-tight.</p>
<p>Cogito ergo sum essentially represents a logical rule. It is steeped in the proposition that if an object has a property, then it exists. Usually this proposition is meaningless: it is impossible to know if an object actually has a certain property because our perceptions are subject to error. Also the distinction between properties and objects becomes obsolete in the context of perception because we only perceive objects by their properties. If we did not perceive the color, shape or texture of a red chair, we would not perceive it at all. However, Descartes argued that the process of thinking, or the possession of the property of being a &#8220;thinking thing,&#8221; was something that we could squarely define as belonging to our consciousness.</p>
<p>Although I have wrestled with this proposition for many years, I have never been able to refute its truth. The presence of experience is the one thing that human beings know empirically. This is our one bit of knowledge, a kind of disembodied truth that we know is more than nothing but that we cannot even begin to define within a larger framework. Human experience possesses myriad internal states and possibilities, but all we can say about it from an outside perspective is that it represents something and not nothing &#8211; a 1, not a 0.</p>
<p>Descartes succeeds in bringing human experience beyond the subjective in most possible worlds except the most sollipsistic, where one&#8217;s own experience is everything and thus nothing is beyond the subjective. But in such a world there is no need to justify one&#8217;s own existence because it is assumed to be all-encompassing. In one of his central arguments, Descartes states that the irrefutability of the <em>Cogito </em>made it possible to rationalize our faith in our experience as being &#8220;real.&#8221;</p>
<p>I disagree with this proposal of Descartes, that the truth of the <em>Cogito</em> lends truth to propositions that exist within the closed system of our experience. I believe that <em>cogito ergo sum</em> is valid, but I also believe that it is a sophism &#8211; a statement whose truth is an illusion made possible by a logical trick. For the <em>cogito </em>to have meaning, the I that thinks must be the same I that exists. So what is the I that thinks? Truly, we know nothing about the I that thinks except <em>that </em>it thinks. If we knew anything else for certain, for example that we were walking, we could say <em>ambo ergo sum </em>(I walk therefore I am). But walking is a property knowable only through our error-prone impressions.</p>
<p>Moving across the word <em>ergo</em>, we find that the existence of our consciousness is steeped solely in its being a &#8220;thinking thing.&#8221; We are ignorant of all properties of our existence but this one. We do not know if our consciousness is connected to a body, or if its perceptions point to a reality that exists independent of our observation. The ontology of human existence is limited to one proposition: we possess thought; <em>cogito.</em> After refining our definitions of its terms, the <em>Cogito </em>provides us with a tautology: <em>I think therefore I think</em>, or<em> I am therefore I am.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/understanding-cogito-ergo-sum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Want to run xDebug? MAMP is the easiest way &#8230;</title>
		<link>http://danpolant.com/want-to-run-xdebug-mamp-is-the-easiest-way/</link>
		<comments>http://danpolant.com/want-to-run-xdebug-mamp-is-the-easiest-way/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 02:40:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=477</guid>
		<description><![CDATA[Just got through an epic struggle with Xdebug. It ended in victory! Some one had demonstrated this software at the last Ann Arbor Drupal Users Group meeting and it looked sweet. Xdebug provides a standard set of debugging features, like breakpoints, watch expressions, step into/through/over/out, etc. It integrates well with Netbeans and one of my co-workers [...]]]></description>
			<content:encoded><![CDATA[<p>Just got through an epic struggle with <a title="xDebug" href="http://www.xdebug.org/">Xdebug</a>. It ended in victory! Some one had demonstrated this software at the last <a title="Ann Arbor Drupal Users Group" href="http://groups.drupal.org/ann-arbor">Ann Arbor Drupal Users Group</a> meeting and it looked sweet. Xdebug provides a standard set of debugging features, like breakpoints, watch expressions, step into/through/over/out, etc. It integrates well with Netbeans and one of my co-workers runs it with Eclipse.</p>
<p>Really my struggle should have been less epic. Quite simply, if you have MAMP, don&#8217;t try to install xDebug in your MAMP Apache instance. Why? It&#8217;s already there! Just put this in your php.ini (the one in the MAMP instance, probably something like /Applications/MAMP/conf/php5.x/php.ini):</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span>xdebug<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1">zend_extension=<span class="st0">&quot;/Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so&quot;</span></div>
</li>
<li class="li1">
<div class="de1">xdebug.remote_enable=<span class="nu0">1</span></div>
</li>
<li class="li1">
<div class="de1">xdebug.remote_host=localhost</div>
</li>
<li class="li2">
<div class="de2">xdebug.remote_port=<span class="nu0">9000</span></div>
</li>
<li class="li1">
<div class="de1">xdebug.remote_handler=dbgp</div>
</li>
</ol>
</div>
<p>If you are trying to install xDebug on a linux machine, or Windows, there are tons of instructions accessible via easy googling, or on the Xdebug site.</p>
<p>If you are special like me, and managed to overwrite your original MAMP copy of xdebug.so, don&#8217;t try to re-compile it. Instead, if you find yourself down this path, simply find your original MAMP download, grab its xDebug.so and throw it where it needs to be (somewhere relatively close to the url after &#8220;zend_extension&#8221; up above). I tried to compile my own xDebug.so, but the MAMP instance of phpize would not run correctly on the Xdebug files.</p>
<p>Xdebug is great. I have no complaints, but bear in mind I am ecstatic about simply getting any PHP debugger to work. So far, Netbeans is my favorite text-editor/IDE. It has better usability than Eclipse and is faster and more reliable than Aptana. The only annoying thing is that it opens too many browser tabs while debugging. It makes a new tab for every session, as well as a whole tab for a &#8220;session ending&#8221; message. Integration with Growl or some other ambient notifier would have been better.</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/want-to-run-xdebug-mamp-is-the-easiest-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scrapwalls.com Launch!</title>
		<link>http://danpolant.com/scrapwalls-com-launch/</link>
		<comments>http://danpolant.com/scrapwalls-com-launch/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 19:33:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://danpolant.com/?p=462</guid>
		<description><![CDATA[We are excited to present <a href="http://scrapwalls.com">Scrapwalls</a>, a web application that lets you make shape collages out of your photos!]]></description>
			<content:encoded><![CDATA[<p>I have been working on <a href="http://scrapwalls.com">scrapwalls.com</a> for a few years now with my friends Kevin and Joey, and we just launched a complete redesign of the site.</p>
<p>Scrapwalls is a web application that lets you make a shape collage out of your pictures. It is written in PHP using the Smarty templating engine, and uses VIPS C++ library to manipulate the images. Scrapwalls has been around for a few years, but only in the latest release can you purchase high-resolution posters of your collages. The test orders have gone through correctly, and we&#8217;ve started promoting the site on Google and Facebook.</p>
<p>Please give us feedback if you end up using the site, by emailing me or commenting on this post.</p>
<p>Anyway, we are excited to present <a href="http://scrapwalls.com">scrapwalls.com</a> to the world!</p>
]]></content:encoded>
			<wfw:commentRss>http://danpolant.com/scrapwalls-com-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

