<?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"
	>

<channel>
	<title>AaronHardy.com :: For all your Aaron Hardy needs.</title>
	<atom:link href="http://aaronhardy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://aaronhardy.com</link>
	<description>For all your Aaron Hardy needs.</description>
	<pubDate>Sat, 04 Oct 2008 23:35:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6-beta2</generator>
	<language>en</language>
			<item>
		<title>The Bailout Blame Game</title>
		<link>http://aaronhardy.com/life-in-general/the-bailout-blame-game/</link>
		<comments>http://aaronhardy.com/life-in-general/the-bailout-blame-game/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 20:24:46 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Life in General]]></category>

		<category><![CDATA[Politics]]></category>

		<category><![CDATA[bailout]]></category>

		<category><![CDATA[bankruptcy]]></category>

		<category><![CDATA[Community Reinvestment Act]]></category>

		<category><![CDATA[foreclosure]]></category>

		<category><![CDATA[mortgage]]></category>

		<category><![CDATA[responsibility]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=103</guid>
		<description><![CDATA[Unless you&#8217;ve lived under a rock over the last year, you&#8217;ve heard our economy is in a heap of trouble mainly due to mortgages our country&#8217;s homebuyers can&#8217;t pay for.  And if you actually have lived under a rock, I salute you for not being part of the problem.
So who&#8217;s to blame?  Oh, there&#8217;s plenty [...]]]></description>
			<content:encoded><![CDATA[<p>Unless you&#8217;ve lived under a rock over the last year, you&#8217;ve heard our economy is in a heap of trouble mainly due to mortgages our country&#8217;s homebuyers can&#8217;t pay for.  And if you actually have lived under a rock, I salute you for not being part of the problem.</p>
<p>So who&#8217;s to blame?  Oh, there&#8217;s plenty to go around alright. Jimmy Carter?  Ronald Reagan?  Bill Clinton?  George Bush?  Franklin Raines?  Jamie Gorelick?  Chris Dodd?  Barney Frank?  Phil Graham?  The plethora of banks?  Wall street?  Predatory lendors?</p>
<p>Let me share a reader&#8217;s comment I found online while reading <a href="http://www.cnn.com/2008/POLITICS/09/29/miron.bailout/index.html?iref=mpstoryview" target="_blank">Bankruptcy, not Bailout, is the Right Answer</a> that I believe encompasses the mindset of many American citizens:</p>
<p><span id="more-103"></span></p>
<blockquote><p><em>Perhaps you should spend less time criticizing individuals for taking chances at success, and instead focus your unwarranted hostility at the corporations that took advantage of those people. It is perhaps quite easy for you to be so smug, when it may not be you that would rely on such a system in the first place.</em></p>
<p><em>Americans are struggling every day, and instead of acknowledging that and trying to understand the situation - you refer to them as &#8220;stupid&#8221;. I beg to differ, these individuals are losing everything because of corporate, and government, greed&#8230; not stupidity.</em></p>
<p><em>I would suggest that in the future you spend less time attacking the people that are suffering, and place a little more focus on the cause of the problem.</em></p>
<p><em>Within the scope of your mindset it was not Hitler and the Nazi regime that was responsible for the Holocaust, but the Jewish people for being Jewish.</em></p></blockquote>
<p>When will we start accepting responsibility for our own actions?  When will we start to understand that being a Jew in the Holocaust is different than borrowing more than we can afford?  Who&#8217;s fault is this mess?  Sure, the <a href="http://en.wikipedia.org/wiki/Community_Reinvestment_Act" target="_blank">Community Reinvestment Act of 1977</a> allowed credit-unworthy citizens to take out loans over their heads at sub-prime levels.  Yes, Jimmy Carter was the one who signed it, Bill Clinton was the one who enforced it, and George Bush didn&#8217;t do anything about it.  Fannie Mae, Freddie Mac, and banks throughout the country did indeed enhance the problem due to greed and lax oversight.  Does this excuse us from the responsibility of wisely managing our own money?</p>
<p>Let me illustrate.  If every bank around the country said, &#8220;Hey, come on in.  You qualify for a gabajillion dollars and here it is!  It&#8217;s a 30-year mortgage locked in at today&#8217;s mortgage rates. Nah, don&#8217;t worry about your credit.  Here&#8217;s the check.  Enjoy your new home!&#8221;  Today&#8217;s market, in my view, proves the average American would spend more of that gabajillion dollars than he/she could actually afford.  But who&#8217;s fault is it?  The lender&#8217;s fault, of course!  How dare they put a gabajillion dollars in front of my nose!  Take it or leave it, that&#8217;s what&#8217;s happened.  <a href="http://aaronhardy.com/life-in-general/thank-you-for-sharing/" target="_blank">That&#8217;s our society</a>.</p>
<p>Over the last couple weeks I&#8217;ve spent about ten hours talking to lenders so I can buy a home.  I&#8217;ve spent many more hours researching mortgages online and understanding the terminology.  The majority of my time spent has been looking for answers to my questions.  I ask questions because it&#8217;s <strong>my</strong> fault if I don&#8217;t understand what I&#8217;m getting into.  It&#8217;s <strong>my </strong>responsibility to figure out how much can I afford.  When the lender says I qualify for a gabajillion dollars, it&#8217;s <strong>my </strong>responsibility to only take what I can pay back.  Regardless of government policy, greedy banks, or what my neighbor owns, my loans are <strong>my </strong>responsibility.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/life-in-general/the-bailout-blame-game/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adobe Flex Certification Study Materials</title>
		<link>http://aaronhardy.com/flex/adobe-flex-certification-study-materials/</link>
		<comments>http://aaronhardy.com/flex/adobe-flex-certification-study-materials/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 18:45:04 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[certification]]></category>

		<category><![CDATA[exam]]></category>

		<category><![CDATA[study]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=99</guid>
		<description><![CDATA[Yesterday I took the Adobe Flex Certification exam.  I did pretty well and passed, so I thought I&#8217;d share the resources I used to study:
http://partners.adobe.com/public/en/ace/ACE_Exam_Guide_Flex2.pdf
This will give you a brief intro to the exam, a few ideas of where to start your studying, and a short sample of questions to get you into the testing [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I took the Adobe Flex Certification exam.  I did pretty well and passed, so I thought I&#8217;d share the resources I used to study:</p>
<p><a href="http://partners.adobe.com/public/en/ace/ACE_Exam_Guide_Flex2.pdf" target="_blank">http://partners.adobe.com/public/en/ace/ACE_Exam_Guide_Flex2.pdf</a><br />
This will give you a brief intro to the exam, a few ideas of where to start your studying, and a short sample of questions to get you into the testing rhythm.  The questions on there are a fairly good representation of what you might find on the exam.</p>
<p><a href="http://office.realeyesmedia.com/blogs/jun/samples/certification/Flex20Blueprint.htm" target="_blank">http://office.realeyesmedia.com/blogs/jun/samples/certification/Flex20Blueprint.htm</a><br />
This does a good job of breaking down all the topics that might show up on the exam.  It would be helpful to look through the various items and focus on your particular weaknesses.</p>
<p><span id="more-99"></span></p>
<p><a href="http://www.lynda.com/" target="_blank">http://www.lynda.com/</a><br />
Lynda.com was invaluable to understanding Flex Data Services.  If you haven&#8217;t used FDS, this will give you a good idea of its abilities, how to implement each component, how to set up the server, etc.  Even if you&#8217;ve used FDS, you may have found yourself copying basic architecture code from one project to another.  It wouldn&#8217;t hurt to freshen up.  You can sign up for a week-long trial (usually they&#8217;re 24-hour trials) if you head over to this address: <a href="http://www.lynda.com/deke" target="_blank"><span class="code">http://www.lynda.com/deke</span></a>.</p>
<p><a href="http://www.amazon.com/Adobe-Flex-2-Training-Source/dp/032142316X" target="_blank">http://www.amazon.com/Adobe-Flex-2-Training-Source/dp/032142316X</a><br />
I&#8217;m too cheap and digital to purchase this book on my own, but my work already had it so I thought I&#8217;d give it a read.  It ended up being a nice way to get a brief review of the various Flex topics.  A lot of times picking through stuff online only leads you to topics you&#8217;re interested in or can think of off the top of your head.  By flipping through a book like this from front to back, you can make sure you cover your bases.  Also, I don&#8217;t know that this is the best book option, it&#8217;s just what I had immediately available.  I did think it was well-written though.</p>
<p><a href="http://livedocs.adobe.com/flex/2/langref/" target="_blank">http://livedocs.adobe.com/flex/2/langref/</a><br />
This is the language reference that, if you&#8217;re a Flex developer, you probably sift through every day.  This is the Flex 2 version to match the exam.  Think of some of the functions where you generally would rely on code completion.  Look up their actual signatures to get a little more familiar with them. I definitely wouldn&#8217;t spend a lot of time on this since the possibility of what Adobe can test on is so varied.</p>
<p><a href="http://www.informit.com/articles/article.aspx?p=98144&amp;seqNum=6" target="_blank">http://www.informit.com/articles/article.aspx?p=98144&amp;seqNum=6</a><br />
<a href="http://www.objectmentor.com/resources/articles/umlClassDiagrams.pdf" target="_blank">http://www.objectmentor.com/resources/articles/umlClassDiagrams.pdf</a><br />
I briefly read these to freshen up on basic UML (yes, there&#8217;s UML on the exam.)</p>
<p>Finally, practice.  If you haven&#8217;t even cracked open Flex Builder, don&#8217;t mess with the exam.  While you could memorize everything and still pass, your head will explode first (you&#8217;ll also look stupid having a certification and not knowing what you&#8217;re doing.) Experience allows you to innately know when something looks right or wrong and you can spare the memorizing as much as possible.</p>
<p>Good luck!  If anyone else has tips or tricks to studying for the exam, please share in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/adobe-flex-certification-study-materials/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Thank You for Sharing</title>
		<link>http://aaronhardy.com/life-in-general/thank-you-for-sharing/</link>
		<comments>http://aaronhardy.com/life-in-general/thank-you-for-sharing/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 15:26:45 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Life in General]]></category>

		<category><![CDATA[Politics]]></category>

		<category><![CDATA[bankruptcy]]></category>

		<category><![CDATA[debt]]></category>

		<category><![CDATA[education]]></category>

		<category><![CDATA[health care]]></category>

		<category><![CDATA[hurricanes]]></category>

		<category><![CDATA[lobbyists]]></category>

		<category><![CDATA[nuclear energy]]></category>

		<category><![CDATA[social security]]></category>

		<category><![CDATA[taxes]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=92</guid>
		<description><![CDATA[Fellow citizens and countrymen, I feel like I&#8217;ve had bounteous opportunities to express my gratitude for your zeal for sharing, but never so much as now.  Please, allow me.
Thank you.  Thank you for ignoring evacuation notices so the coast guard can come rescue you at 100x the cost just a few days later.  Thank you [...]]]></description>
			<content:encoded><![CDATA[<p>Fellow citizens and countrymen, I feel like I&#8217;ve had bounteous opportunities to express my gratitude for your zeal for sharing, but never so much as now.  Please, allow me.</p>
<p>Thank you.  Thank you for ignoring evacuation notices so the coast guard can come rescue you at 100x the cost just a few days later.  Thank you for living below sea level where hurricanes rip through several times in a decade.  Thank you for coming back after each one, rebuilding, and pretending it won&#8217;t happen again in the next few years.  I can&#8217;t express enough how I love  paying for levies and FEMA trailers.  We just don&#8217;t have enough open land in this great country of ours&#8211;what better way to make use of our scarcities than to create artificial ground!</p>
<p>Thank you for purchasing homes and cars that far exceed your income.  Thank you for simultaneously opening multiple credit card accounts and filling them to the brim with the latest designer fashions.  Thank you for racking up bills into the hundreds of dollars for your ten-year-old&#8217;s text messages.  Thank you for participating in lotteries, gambling, and pyramid schemes.  After all that, could you do me a favor and turn around and declare bankruptcy?  I just love paying for this stuff!  I can&#8217;t get enough of it!</p>
<p><span id="more-92"></span></p>
<p>Thank you for supporting outlandish proposals your political leadership offers for free.  Thank you for supporting socialized education to help narrow down the options of where our children should go to school.  Thank you for letting me help pay for your college tuition.  There just aren&#8217;t enough jobs and low-and-deferred-interest loans out there for you these days.  I wouldn&#8217;t want you to have to appreciate your education. Thank you for entertaining the idea of free health care so we can all get fatter because we know the remedy comes free.  I love trusting politicians with my education and medical problems.  I love it when hospitals and schools don&#8217;t have to compete for my money.  And I absolutely LOVE<strong> </strong>to pay for your smoking and disease-ridden sexcapades and stand in line while I do so.  Seriously, can I get some more?  I&#8217;m going through withdrawals here.</p>
<p>Oh, and that&#8217;s not all.  Thank you for letting me help pay for your retirement through social security.  I love how we can all share one with another.  I likewise appreciate how instead of saving for my own retirement I can offer that role to the government so they can do it for me.  There&#8217;s just no better investment than government agencies and national debt.  Thank you for hooking my salary up to a drip tube straight to D.C. so I don&#8217;t have to pay attention to what comes out.  Thank you for supporting labor unions and lobbyist groups. I&#8217;m just overwhelmed with appreciation when politicians represent them and not me.  Can we order up another bridge to Ketchikan please?</p>
<p>Thank you for fighting against nuclear energy and putting our Middle East friends first.  I&#8217;d hate to take advantage of our technology and I&#8217;d much rather launch bombs than drill around some antelope and tundra foliage.</p>
<p>Thank you for crossing the borders and allowing me to host you.  Please, feel free not to tell anyone and make yourself at home.  This is a no-pay zone for you and if we&#8217;re lucky we can keep it that way forever.</p>
<p>Keep it up everyone.  Thank you once more for sharing and I, too, will do my best to share for many years to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/life-in-general/thank-you-for-sharing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Why, What, and Where of Custom AMF Class Adapters</title>
		<link>http://aaronhardy.com/flex/the-why-what-and-where-of-custom-amf-class-adapters/</link>
		<comments>http://aaronhardy.com/flex/the-why-what-and-where-of-custom-amf-class-adapters/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 04:04:07 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[General Programming]]></category>

		<category><![CDATA[amf]]></category>

		<category><![CDATA[class adapters]]></category>

		<category><![CDATA[coupling]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=77</guid>
		<description><![CDATA[If you&#8217;ve read my article on Action Message Format (AMF) you&#8217;ll already know that AMF is a super-duper way to transfer data between a Flex/Flash/AIR application and its server-side counterpart.  Essentially when the client application makes a call to a service, the server can return a Java (or PHP, Python, .NET) object and when it [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">If you&#8217;ve read <a href="/flex/simple-amfphp-example/" target="_blank">my article</a> on <a href="http://en.wikipedia.org/wiki/Action_Message_Format" target="_blank">Action Message Format</a> (AMF) you&#8217;ll already know that AMF is a super-duper way to transfer data between a Flex/Flash/AIR application and its server-side counterpart.  Essentially when the client application makes a call to a service, the server can return a Java (or PHP, Python, .NET) object and when it gets back to the Flex application, wallah, its converted into an identical object in ActionScript.  Similarly, if the client application sends an ActionScript object to the server during a service call, it arrives as an identical Java object.</p>
<p style="text-align: left;">While that&#8217;s impressive, when it comes to implementation in a medium-to-high complexity system there are questions that still need to be answered.   In this article, I&#8217;d like to address where to translate custom AMF classes.</p>
<p style="text-align: left;"><span id="more-77"></span></p>
<p style="text-align: left;"><strong>The Why</strong></p>
<p style="text-align: left;">When server-side code accesses data from a database, it generally converts the data in the recordset into data objects (sometimes called beans, business objects, or one of many other names.)  These are basic objects that often, though not always, represent the shema of the database.  In other words, if there&#8217;s a table named <em>customer</em> in the database, there will likely be a class named <em>customer </em>as well.  One customer object instance represents one customer record in the database.  With frameworks like Rails, Cake, and Django, this is almost always true.</p>
<p style="text-align: left;">If a Flex application is requesting all customers, the process of retrieving the data is fairly simple: Flex makes a call to the service, the service retrieves all customer records from the database, the service converts each customer record into an customer object, and finally the service returns the array of customer objects back to the Flex application.</p>
<p style="text-align: left;">In order for the previous example to function correctly, an ActionScript customer class must exist on the Flex client as well as an identical Java customer class on the server.  Considering the most common case, these two classes will have properties that match the fields in the customer table.  In other words, both of these classes as well as the customer table will have properties such as firstName, lastName, phoneNumber, address, zipcode, etc.  With that in mind, what happens when a developer begins to refactor the application and chooses to rename the <em>phoneNumber </em>database field to <em>homePhone</em>?  The phoneNumber property in both the ActionScript customer class and the Java customer class will need to be renamed to homePhone.  This means there is <a href="http://en.wikipedia.org/wiki/Coupling_(computer_science)" target="_blank">high coupling</a> among the database, the backend application, and the frontend application.  In other words, each part needs to know about the other two parts.  This breaks good programming principles because it results in more difficult maintenance.</p>
<p style="text-align: left;">This high coupling magnifies itself further if we wish to have the Flex application&#8217;s needs drive the design of the data objects.  Lets say we as Flex developers are creating a Flex application and know we want a salesperson&#8217;s first name, last name, sales code, and whether the salesperson is a system admin.  Now let&#8217;s say the database has already been designed and for whatever reason the salesperson&#8217;s firstName and lastName are in one table, the sales code is in a different table, and the system admin rights are in another.  Without some sort of conversion adapter, we will be shipping objects created from three different classes (Class A related to Table A, Class B related to Table B, and Class C related to Table C) from the server to the Flex frontend.  The following diagram illustrates the data flow.</p>
<p style="text-align: left;"><a href="http://aaronhardy.com/wp-content/uploads/2008/09/no-adapter.gif"><img class="aligncenter size-full wp-image-83" title="No Adapter" src="http://aaronhardy.com/wp-content/uploads/2008/09/no-adapter.gif" alt="" width="500" height="376" /></a></p>
<p style="text-align: left;">Why does this high coupling present a problem?  Here are a few issues to think about:</p>
<p style="text-align: left;">(1) If the backend developer chooses to refactor the database table by combining Table A and Table B, the Java classes AND the ActionScript classes must also be refactored.  If we&#8217;re talking about production code, that means refactoring ActionScript code and redeploying the SWF.  In the case of an AIR app, the AIR application on each client computer must be upgraded.</p>
<p style="text-align: left;">(2) The Flex frontend probably does not, and to promote low coupling, <em>should not</em>, care about how the database was designed.  This is more an issue of principle, but if the frontend developer is mentally detached from the database schema, the frontend application&#8217;s modeling, logic, and architecture will in general likely also be decoupled from the database schema.</p>
<p style="text-align: left;">(3) Having three different ActionScript classes to get our salesperson information doesn&#8217;t necessarily make sense.  Maybe there was a reason to have the information in three different database tables, but the reasoning may not apply when it comes to the Flex frontend.  Having three different classes means more overhead and maintenance.</p>
<p style="text-align: left;">(4) Even simple differences such as coding style must be maintained across the database, backend code, and frontend code.  If the database fields were creating using underscores such as first_name, last_name, home_phone, etc., this style must be also be used in the backend code and the frontend code.  Considering most Flex developers use camelCase name styling (firstName, lastName, homePhone,) this coupling presents an inconsistency in style.</p>
<p style="text-align: left;"><strong>The What</strong></p>
<p style="text-align: left;">So, how do we deal with these issues?  Generally the best solution is to create an adapter or layer that converts objects the backend uses to objects the frontend needs.  The backend and frontend agree on the classes that will be sent across the wire and those classes essentially become a contract&#8211;an agreement between the frontend and backend on what will be sent and received.  These classes should be designed without regard to database schema or the classes the backend uses within its own domain.  In our example, Flex needs objects of Class X which includes a salesperson&#8217;s first name, last name, sales code, and whether the salesperson is a system admin.  The backend is already using Class A, Class B, and Class C that contain these various properties.  The adapter would take objects of Class A, Class B, and Class C and combine the needed properties into an object of Class X.  Class X is essentially the contract&#8211;both the backend and frontend have agreed that Class X is what will be sent and received.</p>
<p style="text-align: left;">Not only does an adapter allow for the creation of objects that are slim-and-trim and customized for Flex&#8217;s needs, but of even greater importance is it provides a point of decoupling.  If the field in a database table gets renamed, the related property in the frontend class does not need to be renamed.  Instead, only the adapter needs modified so the <em>new backend property name</em> is mapped to the <em>old frontend property name</em>.  This adapter also provides for a place to convert programming style (<em>first_name</em> on the backend would be mapped to <em>firstName</em> on the frontend.)</p>
<p style="text-align: left;"><strong>The Where</strong></p>
<p style="text-align: left;">Now that you (hopefully) understand what adapters are and why they&#8217;re helpful, the remaining question is where the adapter should be implemented.  Two possible locations are the most logical: (1) on the backend immediately before sending objects to the frontend or (2) on the frontend immediately after receiving objects from the backend.  The data flow process for each of these adapter locations is illustrated in the following diagrams.</p>
<p style="text-align: left;"><a href="http://aaronhardy.com/wp-content/uploads/2008/09/backend-adapter.gif"><img class="aligncenter size-full wp-image-84" title="Backend Adapter" src="http://aaronhardy.com/wp-content/uploads/2008/09/backend-adapter.gif" alt="" width="500" height="376" /></a></p>
<p style="text-align: left;"><a href="http://aaronhardy.com/wp-content/uploads/2008/09/frontend-adapter.gif"><img class="aligncenter size-full wp-image-85" title="Frontend Adapter" src="http://aaronhardy.com/wp-content/uploads/2008/09/frontend-adapter.gif" alt="" width="500" height="376" /></a></p>
<p style="text-align: left;">Here are the benefits of each location as I see them:</p>
<p style="text-align: left;">On the backend immediately before sending objects to the frontend:</p>
<ul>
<li>Database schema changes do not have any affect on frontend code (except for changes fundamental to application logic.)  This means when the database schema changes, the Flex/Flash/AIR application does not need to be recompiled and redeployed.  If the adapter were on the frontend, the adapter would need to be updated, resulting in the need to be recompiled and redeployed.</li>
<li>In a team environment, a backend developer can modify the database schema and commit changes to the backend classes and accompanying adapter almost simultaneously. Frontend development remains virtually uninterrupted.  If the adapter was on the frontend, the backend developer would make the change to the database schema and commit the changes to the backend classes.  The backend developer would then need to notify the frontend developer of the change.  The frontend developer would then modify the adapter and commit its change.   Throughout the duration between the backend developer&#8217;s commit and the frontend developer&#8217;s commit, the Flex application would not function correctly. Because the frontend is generally more concerned with the presentation of data rather than heavy analysis, data mining, integration with ecommerce, and other data-centric tasks, frontend developers will likely require less refactoring of data models than backend developers.  By having the adapter on the backend, less communication between developers will be required when refactoring.</li>
<li>Keeping adapter code out of the frontend results in a smaller SWF/AIR file size.</li>
<li>Conversion tasks carried out by the adapter require processing.  By keeping processing on the server, processing time is more predictable and manageable than if the processing were performed on the client.</li>
</ul>
<p>On the frontend immediately after receiving objects from the backend:</p>
<ul>
<li>The backend does not need to know how frontend data is modeled.  In other words, if a frontend developer would like to rename a property in the data model&#8217;s class or combine two classes, the backend does not need to be notified.  If the adapter were instead on the backend, the application would be broken during the duration between when the frontend developer commits the data model&#8217;s class change and the backend developer commits the backend class and adapter change.  However, like I mentioned previously, it&#8217;s been my experience that the frontend requires less data model refactoring than the backend.</li>
</ul>
<p>As you may have concluded from the analysis, it&#8217;s fairly clear the best location for the adapter is on the backend just before sending objects to the frontend.  While having an adapter or at least some level of abstraction in the first place is certainly the most important concept, having an adapter in the right location can also help.</p>
<p style="text-align: left;">Do you disagree or have a perspective not addressed in my analysis?  Do you have questions regarding the why, what, and where of custom class adapters?  I invite you to join in on the conversation by responding below.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/the-why-what-and-where-of-custom-amf-class-adapters/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The best Flex MVC framework</title>
		<link>http://aaronhardy.com/flex/the-best-flex-mvc-framework/</link>
		<comments>http://aaronhardy.com/flex/the-best-flex-mvc-framework/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 02:26:32 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[cairngorm]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[guasax]]></category>

		<category><![CDATA[mate]]></category>

		<category><![CDATA[model view controller]]></category>

		<category><![CDATA[mvc]]></category>

		<category><![CDATA[nimbus]]></category>

		<category><![CDATA[puremvc]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=68</guid>
		<description><![CDATA[There isn&#8217;t one.  At least not for everyone.  That&#8217;s the bottom line and hours of googling won&#8217;t change it.  I&#8217;ll explain what I mean&#8211;but first, here&#8217;s a real intro:

If you&#8217;re not acquainted with what MVC is and are interested in learning more, I&#8217;d recommend starting off with Wikipedia&#8217;s Model-view-controller entry.   Simply put, MVC is a [...]]]></description>
			<content:encoded><![CDATA[<p>There isn&#8217;t one.  At least not for everyone.  That&#8217;s the bottom line and hours of googling won&#8217;t change it.  I&#8217;ll explain what I mean&#8211;but first, here&#8217;s a real intro:</p>
<p><span id="more-68"></span></p>
<p>If you&#8217;re not acquainted with what MVC is and are interested in learning more, I&#8217;d recommend starting off with <a href="http://en.wikipedia.org/wiki/Model-view-controller" target="_blank">Wikipedia&#8217;s Model-view-controller entry</a>.   Simply put, MVC is a pattern of keeping portions of code where they belong, especially when it comes to code dealing with the model (data), view (user interface), and controller (operations/communication).  While MVC can simply be a development process or how a developer thinks while creating an application, communities of developers have often formed frameworks, or basic code structures, whereon a developer can base his/her code when creating an application.  They&#8217;re not always necessary, but many developers have favored frameworks because they <strong><em>help</em></strong> enforce good coding practices, eliminate &#8220;boiler-plate code&#8221; (repetitive code needed in each application), and create standards whereby developers can easily catch up to speed when joining a new, unfamiliar project.</p>
<p>With Flex, it seems there are more MVC architectures than there are developers and their dogs.  There are plenty to choose from and their implementation can vary widely.  With so many frameworks, the inevitable question seems to always pop up: Which is the best one?  To truly find an answer, you have to consider who&#8217;s asking the question.</p>
<p>For a great illustration of this point, take a look at <a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm" target="_blank">Cairngorm</a>, the most widely-used Flex MVC framework.  It&#8217;s supported by Adobe so many developers naturally gravitate toward it.  It also uses, by most accounts, great programming principles.  By great principles I mean the ones you might learn in a programming theory computer science course.  And just as you might expect for feedback from students in a programming theory course, you can expect similar responses from developers who use Cairngorm.  Most of the time, such developers appreciate the fact that such a framework exists and that it promotes good coding principles.  However, if you ask them if they actually enjoy developing with Cairngorm, you&#8217;ll usually hear a an animate &#8220;no.&#8221;  Why?  Because theory does not always mean practicality or productivity.  This is even more true when dealing with projects of varying complexity, timeframe, maintenance, and team size.</p>
<p>The most often-heard complaint about Cairngorm is that it requires too much code duplication.  For most development teams (including my own,) this is certainly true.  The various layers, from the Cairngorm events, to the controller, to the commands, to the delegate, require a lot of code duplication for little gain&#8230;<em>for us</em>.  For those with large systems, heterogenous backend services, high employee turnover, long-term maintenance, or other such attributes (what Adobe consultants might be dealing with,) such a framework may be exactly the ticket.  When it comes down to it, your choice of MVC framework should come down to what drives <em>your</em> bottom line, not what others consider to be good theory or what works for them.</p>
<p>Because of this disparity in needs vs. fulfillment, each MVC framework is going to have a bucketload of both good reviews and bad reviews.  Some frameworks may be better than others at solving problems for the greatest number of developers.  In such a case, ask yourself if a good generic solution is really better than a not-as-good customized solution.  What may be &#8220;not-as-good&#8221; for others may be exactly what you need.</p>
<p>Many other questions can help pinpoint what you&#8217;re really looking for in a framework.  Does one framework have a strong following that will fix bugs and implement functionality when needed?  How much is this development community worth?  Is the framework too heavy for your application&#8217;s simple needs?  Can your application really take advantage of a large number of code layers or does it make sense to cut out the plumbing?  How difficult will it be for new hires to grasp the application&#8217;s architecture?  Are you handing the application off to a team that&#8217;s acquainted with a specific framework?  Are your developers skilled enough to recognize when they&#8217;re writing spaghetti code or do they need strong guidance and tight restrictions from the get-go?</p>
<p>To sum up and repeat what I&#8217;ve said before, there is no <em>best </em>Flex MVC framework.  First determine what your development team really needs and then find the framework that best fulfills those needs.</p>
<p>So you may be wondering what my team over at <a href="http://www.mediarain.com/" target="_blank">Rain</a> chose for our MVC needs.  After researching and evaluating Cairngorm, PureMVC, Mate, Guasax, and Fake, amongst others, we decided to go with a solution built in-house and customized for <em>our </em>needs called <a href="http://code.google.com/p/nimbus-as3/" target="_blank">Nimbus</a>.  It&#8217;s based off Cairngorm with a couple layers cut out as well as a few features tossed in (such as undoable commands.)  It&#8217;s completely open source though we&#8217;re not pushing it be the solve-all-problems framework prescribed for every Flex developer.  I do believe, however, it will aide others in solving needs similar to ours.  With that said, good luck on your quest to find &#8220;the best&#8221; Flex MVC framework!</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/the-best-flex-mvc-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wireless Power</title>
		<link>http://aaronhardy.com/technology/wireless-power/</link>
		<comments>http://aaronhardy.com/technology/wireless-power/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 18:17:51 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[cables]]></category>

		<category><![CDATA[power]]></category>

		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://aaronhardy.com/?p=63</guid>
		<description><![CDATA[A couple weeks ago I was talking with some family about technological advancements and our predictions of what the future holds.  I predicted in 20 years we would have wireless power.  What does this mean?  It means no cables and no outlets.  Free from tangles, power strips, power converters, three-pronged plugs, and restrictive tethers.  True [...]]]></description>
			<content:encoded><![CDATA[<p>A couple weeks ago I was talking with some family about technological advancements and our predictions of what the future holds.  I predicted in 20 years we would have wireless power.  What does this mean?  It means no cables and no outlets.  Free from tangles, power strips, power converters, three-pronged plugs, and restrictive tethers.  True wireless.  As you might imagine, quite a few obstacles stand in the way of wireless power, number one being how to do it without the consequences of giving birth to kids with five legs and a nose growing out the elbow.</p>
<p>As it turns out, just a few days ago Intel showed off its new wireless power transfer gizmo:</p>
<p><span id="more-63"></span></p>
<p><a href="http://aaronhardy.com/wp-content/uploads/2008/08/wirelesspower.jpg"><img class="alignnone size-medium wp-image-64" title="wirelesspower" src="http://aaronhardy.com/wp-content/uploads/2008/08/wirelesspower-300x230.jpg" alt="" width="300" height="230" /></a></p>
<p>So what&#8217;s the difference between these odd-looking coils and previous advancements in wireless power?  As Intel&#8217;s CTO Justin Rattner put it, &#8220;It turns out the human body is not affected by magnetic fields; it is affected by elective fields.  So what we are doing is transmitting energy using the magnetic field not the electric field.&#8221;</p>
<p>While this is a very promising advancement and pretty exciting all around, I was slightly disappointed that most of the seminar revolved around applying the technology to supply power to laptops, mobile telephones, or other such devices.  As Rob Enderle of Enderle Group stated, &#8220;Initially it eliminates chargers and eventually it eliminates batteries all together.&#8221;</p>
<p>Batteries?  We&#8217;re talking about a breakthrough as big as wireless power and it will &#8220;eventually eliminate&#8221;&#8230;..<em>batteries</em>!?  And the CTO&#8217;s talking about technological transformations he expects by the year <em>2050</em>.  I&#8217;ve got power cords and outlets covering my desktop, surrounding my entertainment center, sprawling over my kitchen and bathroom counters, and oozing out of my wazoo and we&#8217;re talking about 42 years before I can merely ditch my cell phone battery?  Here&#8217;s to hoping for a modern-day Thomas Edison!</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/technology/wireless-power/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Utah&#8217;s Greatest Gift to Mankind</title>
		<link>http://aaronhardy.com/life-in-general/utahs-greatest-gift-to-mankind/</link>
		<comments>http://aaronhardy.com/life-in-general/utahs-greatest-gift-to-mankind/#comments</comments>
		<pubDate>Mon, 26 May 2008 01:47:39 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Life in General]]></category>

		<category><![CDATA[Arctic Circle]]></category>

		<category><![CDATA[fries]]></category>

		<category><![CDATA[fry sauce]]></category>

		<category><![CDATA[Utah]]></category>

		<guid isPermaLink="false">http://intimateconversations.aaronhardy.com/uncategorized/utahs-greatest-gift-to-mankind/</guid>
		<description><![CDATA[One of the great things about running a blog is the ability to share with random, distant strangers ideas that only a decade earlier would have been sequestered by a particular region or culture.  Today, I&#8217;m officially declaring to the world one of the Utah&#8217;s greatest gifts to mankind: fry sauce.  Utah&#8217;s mountains, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great things about running a blog is the ability to share with random, distant strangers ideas that only a decade earlier would have been sequestered by a particular region or culture.  Today, I&#8217;m officially declaring to the world one of the Utah&#8217;s greatest gifts to mankind: fry sauce.  Utah&#8217;s mountains, fluffy snow, KFC, and rock climbing don&#8217;t hold a candle to the gift of fry sauce.  Fry sauce is a brilliant, salmon-colored mixture of ketchup and mayonnaise, often creatively enhanced with BBQ sauce, garlic, chilies, and/or seasoning.  Think I&#8217;m pulling your chain?  <a href="http://www5.google.com/search?q=fry%20sauce" target="_blank">Google frysauce</a> and you&#8217;ll find hundreds of others who will never go back to plain ketchup for fry sousing.<span id="more-37"></span></p>
<p>According to <a href="http://en.wikipedia.org/wiki/Fry_sauce" target="_blank">Wikipedia&#8217;s Fry Sauce article</a>, Arctic Circle (a Utah-based company) lays claim to being the inventors of fry sauce in 1948.  Sixty years later, fry sauce remains a relatively undiscovered treasure and is only commonly found in Utah, Nevada, Idaho, Washington, and Oregon.  While most all fast food chains in Utah now provide fry sauce liberally, Arby&#8217;s still hasn&#8217;t caught onto the concept.  Oh no, instead their alternative is horsey sauce.  Come on.  Horsey sauce?  Can anyone really go into a restaurant thinking, hmm&#8230;I&#8217;d really like to bathe my fries in horsey sauce today.  In contrast, a special effort of dedication goes out to Red Robin for providing large buckets of perfectly-blended fry sauce with unlimited fries to complement.  Bless your souls.</p>
<p>So my fellow citizens, venture out and discover for yourselves Utah&#8217;s greatest gift to mankind: fry sauce.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/life-in-general/utahs-greatest-gift-to-mankind/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Running the Zecco Gauntlet</title>
		<link>http://aaronhardy.com/investing/running-the-zecco-gauntlet/</link>
		<comments>http://aaronhardy.com/investing/running-the-zecco-gauntlet/#comments</comments>
		<pubDate>Mon, 26 May 2008 00:19:48 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Investing]]></category>

		<category><![CDATA[free trades]]></category>

		<category><![CDATA[stocks]]></category>

		<category><![CDATA[Zecco]]></category>

		<guid isPermaLink="false">http://intimateconversations.aaronhardy.com/investing/running-the-zecco-gauntlet/</guid>
		<description><![CDATA[Like many of the readers that will probably come across this article, I too was intrigued by the notion of the free trades that Zecco offers.  Can it be true?  What am I sacrificing in exchange?   Is the pain worth it?  I did my fair share of research by sifting [...]]]></description>
			<content:encoded><![CDATA[<p>Like many of the readers that will probably come across this article, I too was intrigued by the notion of the free trades that Zecco offers.  Can it be true?  What am I sacrificing in exchange?   Is the pain worth it?  I did my fair share of research by sifting through numerous blog posts and found a wide variety of opinions and experiences.  I have now had over three months of the Zecco experience with two different trading accounts and am ready to add my story to the pile.</p>
<p>Having read about many difficulties opening Zecco accounts, I made sure I gave myself plenty of time to open my Roth IRA account at Zecco in order to fund it for the 2007 tax year by April 15.  Here&#8217;s my journey of running the Zecco Gauntlet.<span id="more-36"></span></p>
<p><b>January 5</b><br />
I filled out the online forms at Zecco.com to start (and was hoping to end) the application process.  It was simple enough.  Quite straightforward and nothing really to complain about.  At the time, I didn&#8217;t notice a way to print off my completed form nor did I think much about it.  I should&#8217;ve known better.  I immediately received an email that said:</p>
<blockquote><p>
Welcome to Zecco Trading! We&#8217;re processing your application. Look for an email with your account informatino or a request for more information shortly.</p>
<p>IMPORTANT NOTE FOR ALL IRA APPLICANTS AND APPLICANTS WITHOUT US SSN:</p>
<p>We need signed application documents to approve and open your account:</p>
<p>1.      MAIL ALL OF YOUR ORIGINAL SIGNED NEW ACCOUNT DOCUMENTS AND SIGNED SIGNATURE PAGE along with a photocopy of your Government issued photo I.D. to our offices at the address below:</p>
<p>Zecco Trading<br />
P.O. Box 4328<br />
Ontario, CA 91761
</p></blockquote>
<p>At this point, I didn&#8217;t have any application documents or a &#8220;signed signature page&#8221; and frankly didn&#8217;t know what they really were.  Again, I hadn&#8217;t seen anywhere to print them off at the end of the application process and there were no links to go back and print them off from the Zecco website.</p>
<p>At the time, I was pretty busy with school and just hoped I would receive another email with my account documents or that I wouldn&#8217;t need them.  I had read other blog posts stating that in their sign-up experience they didn&#8217;t need to mail anything in; however, they were probably referring to a regular trading account and not an IRA account.</p>
<p><b>January 15</b><br />
I hadn&#8217;t received any other communication from Zecco so I thought I would inquire about my account status.  I sent an email to the customer service address listed on the website.  Here&#8217;s my email:</p>
<blockquote><p>
Hey there,</p>
<p>I signed up for an IRA account more than a week ago and haven&#8217;t heard anything back.  Can you give me an update please?  What kind of information do you need to check on that?  My name is Aaron Hardy and my username is [username].  Thanks!</p>
<p>Aaron Hardy
</p></blockquote>
<p><b>January 16</b><br />
I received the following email back from customer service:</p>
<blockquote><p>
Dear Aaron,</p>
<p>	Thank you for contacting Zecco Trading.  After researching your<br />
account information it appears we will need a signed customer agreement<br />
application, Roth IRA simplifier, and a copy of your ID.</p>
<p>We hope this information has been helpful.  If you have any additional<br />
questions please contact us.  We are here to help.  We hope you have a<br />
great day.</p>
<p>Best Regards,</p>
<p>      Heather
</p></blockquote>
<p>I didn&#8217;t have a customer agreement application and I didn&#8217;t know what a Roth IRA Simplifier was so I immediately emailed them back requesting the customer agreement application and a Roth IRA Simplifier.</p>
<p><b>January 17</b><br />
I received the following email from customer service:</p>
<blockquote><p>
Dear Valued Customer,</p>
<p>Thank you for contacting Zecco trading. We require all paperwork be<br />
received prior to activating IRA accounts. If you did not save your<br />
application to your hard drive, there will be no way to retrieve it. We<br />
will have to send you a copy via mail per your request. You should have<br />
completed an IRA Roth simplifier with you online application, I have<br />
attached this form to this email.</p>
<p>I hope his has been helpful; we look forward to your business.</p>
<p>Sincerely,</p>
<p>Zecco Team Member</p>
<p>Meredith
</p></blockquote>
<p><b>January 20</b><br />
I responded with the following:</p>
<blockquote><p>
Yes, please send me a copy of my application through the mail.  Thank you.  My address is as follows:</p>
<p>Aaron Hardy<br />
[my address]
</p></blockquote>
<p><b>January 22</b><br />
I received the following email from customer service:</p>
<blockquote><p>
Dear Aaron,</p>
<p>Thank you for contacting Zecco Trading. We will be more than happy to<br />
mail you a copy of your application. However, we still need your<br />
reference number to access your account.</p>
<p>Hope this has been helpful. Should you have any further questions or<br />
concerns, please feel free to contact us again.</p>
<p>Thank you for your interest in Zecco Trading.</p>
<p>Sincerely,</p>
<p>An T.
</p></blockquote>
<p>From what I knew, I didn&#8217;t have a reference number.  I responded with the following:</p>
<blockquote><p>
I don&#8217;t have any reference number.  What now?</p>
<p>Aaron
</p></blockquote>
<p><b>January 23</b><br />
I received the following from customer service:</p>
<blockquote><p>
Aaron,</p>
<p>	Thank you for contacting Zecco Trading.  Your reference number<br />
is at the top right hand corner of your customer agreement application.</p>
<p>We hope this information has been helpful.  If you have any additional<br />
questions please contact us.  We are here to help.  We hope you have a<br />
great day.</p>
<p>Best Regards,</p>
<p>      Heather
</p></blockquote>
<p>What!?  Isn&#8217;t the customer agreement application what I&#8217;m requesting in the first place? How can I get my reference number from my application so they can send me my application?</p>
<p>I responded with the following:</p>
<blockquote><p>
I don&#8217;t have a customer agreement application.  I did everything online and didn&#8217;t print anything off.  What now?</p>
<p>Aaron
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/investing/running-the-zecco-gauntlet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Simple AMFPHP Example</title>
		<link>http://aaronhardy.com/flex/simple-amfphp-example/</link>
		<comments>http://aaronhardy.com/flex/simple-amfphp-example/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 04:24:14 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[amf]]></category>

		<category><![CDATA[AMFPHP]]></category>

		<category><![CDATA[serialization]]></category>

		<guid isPermaLink="false">http://intimateconversations.aaronhardy.com/php/simple-amfphp-example/</guid>
		<description><![CDATA[With the advent of Flex and RIA (Rich Internet Application) development came AMF (Action Message Format).  Flex, in general, focuses only on front-end functionality, meaning it does not directly hit a database to store or retrieve persistent data.  Instead, database calls are written in a more traditional back-end language like Java, PHP, Python, [...]]]></description>
			<content:encoded><![CDATA[<p>With the advent of Flex and RIA (Rich Internet Application) development came AMF (Action Message Format).  Flex, in general, focuses only on front-end functionality, meaning it does not directly hit a database to store or retrieve persistent data.  Instead, database calls are written in a more traditional back-end language like Java, PHP, Python, or .NET and such services are then exposed to be &#8220;consumed&#8221; (used) by the Flex front-end.</p>
<p>AMF is a protocol that allows ActionScript (the language of Flash/Flex) to call services exposed by the back-end.  Additionally, if you choose, AMF allows you to translate a programmer-defined object between ActionScript and your back-end language of choice.  In other words, if you have a customer class in ActionScript and you want to pass an instantiated customer object to the back-end, you simply call the exposed back-end service and pass the customer object as a parameter.  The AMF layer transparently translates the ActionScript customer object into, let&#8217;s say, a customer object in Java.  This functionality isn&#8217;t required.  Instead of using a class you have defined, you could instead just send an integer to the backend as a parameter and, after processing, send a string back to the front-end.<span id="more-33"></span></p>
<p>Before checking out my example, I recommend checking out the <a href="http://en.wikipedia.org/wiki/Action_Message_Format" target="_blank">Wikipedia Action Message Format article</a> to get a basic description of AMF and links to implementations for various back-end languages.  I also recommend reading <a href="http://nothinghappens.net/?p=198" target="_blank">AMFPHP class mapping explained</a> by Chuck Hoffman to get a good understanding of the object translation I just described.  Finally, head on over to <a href="http://amfphp.org/" target="_blank">amfphp.org</a> (the creators of AMFPHP) to get a glimpse of available documentation, files, etc.  I might add that if any of the folks over at amfphp.org don&#8217;t like me distributing AMFPHP code, let me know and I&#8217;ll modify the files I&#8217;ve posted for download.  The zip file below currently contains everything you&#8217;ll need to get a simple example up and running.  Now to the example&#8230;</p>
<p><a href='/wp-content/uploads/2008/02/simpleamfphp.zip' title='Simple AMFPHP Example'>Simple AMFPHP Example Zip File</a></p>
<p>For the example, I made a Kite Finder.  Basically, you enter in a kite pilot&#8217;s name and Flex populates a person object with the pilot name entered.  Flex then calls a PHP service function using AMFPHP which translates the ActionScript person object to a PHP person object on the backend.  In a real environment, you would then use information from the person object to hit a database to find the pilot&#8217;s kite.  In our example, we just build a kite object using dummy data.  Our PHP function then returns the kite object, which AMFPHP ships back to the Flex front-end, translating it to an ActionScript kite object.  In reality, the person and kite classes might be a little overboard for such a simple example.  I could&#8217;ve just passed two string parameters (the pilot&#8217;s first and last name) to the PHP function and an associative array (kite info) back to the front-end, but I wanted to demonstrate AMFPHP&#8217;s object translation.</p>
<p>Setting up the example is fairly easy:</p>
<ol>
<li>Upload the amfphp directory to the root directory of your website.</li>
<li>Open the SimpleAMFPHP project in FlexBuilder and modify the &#8220;gateway&#8221; variable in FindKiteCommand to point to your new gateway address.</li>
</ol>
<p>That&#8217;s all!  You should be able to deploy the project from within FlexBuilder and see it in action.  If you have questions on where code is, what&#8217;s happening, how to do something, or anything else, please&#8230;join the intimate conversation!</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/flex/simple-amfphp-example/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SmoothGallery fixes</title>
		<link>http://aaronhardy.com/general-programming/smoothgallery-fixes/</link>
		<comments>http://aaronhardy.com/general-programming/smoothgallery-fixes/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 23:38:11 +0000</pubDate>
		<dc:creator>Aaron Hardy</dc:creator>
		
		<category><![CDATA[General Programming]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[SmoothGallery]]></category>

		<guid isPermaLink="false">http://intimateconversations.aaronhardy.com/general-programming/smoothgallery-fixes/</guid>
		<description><![CDATA[Recently I implemented Jonathan Schemoul's SmoothGallery and ran into a few issues.  I'm certain there's at least one other person out there searching desparately for answers, so here they are:
Issue #1
First of all, I was getting a Type Mismatch error when trying to use the timed gallery.  It looks like the error was [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I implemented Jonathan Schemoul's <a href="http://smoothgallery.jondesign.net/">SmoothGallery</a> and ran into a few issues.  I'm certain there's at least one other person out there searching desparately for answers, so here they are<span id="more-31"></span>:</p>
<p><strong>Issue #1</strong></p>
<p>First of all, I was getting a Type Mismatch error when trying to use the timed gallery.  It looks like the error was due to some conflict with MooTools...I'm not really sure but I didn't want to spend hours trying to figure out the cause exactly.  Luckily, I found this post: <a href="http://smoothgallery.jondesign.net/forums/viewtopic.php?pid=2246">http://smoothgallery.jondesign.net/forums/viewtopic.php?pid=2246</a> describing a workaround.  The workaround essentially calls myGallery.showCarousel(); which opens up the carousel (aka the thumbnail thing) right from the get-go.  That fixes the error issue, but now the carousel is open indefinitely.  To fix the issue, I ended up with the following code:</p>
<div class="igBar"><span id="ljavascript-7"><a href="#" onclick="javascript:showPlainTxt('javascript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-7">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> myGallery;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> startGallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; myGallery = <span style="color: #003366; font-weight: bold;">new</span> gallery<span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'myGallery'</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; timed: <span style="color: #003366; font-weight: bold;">true</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; myGallery.<span style="color: #006600;">showCarousel</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> hideCarousel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; myGallery.<span style="color: #006600;">hideCarousel</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">window.<span style="color: #006600;">addEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'domready'</span>,startGallery<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">setTimeout<span style="color: #66cc66;">&#40;</span>hideCarousel, <span style="color: #CC0000;color:#800000;">3000</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Basically, it still opens up the carousel initially, but sets up a timer to close it after 3 seconds.  After implementing it, I actually like it...it kind of gives the user a peek of the carousel functionality and then gets out of the way.</p>
<p><strong>Issue #2</strong></p>
<p>When I try to use the flag showArrows:false, it not only removes my arrows, but it also removes the pictures.  By using the flag I mean this:</p>
<div class="igBar"><span id="ljavascript-8"><a href="#" onclick="javascript:showPlainTxt('javascript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">myGallery = <span style="color: #003366; font-weight: bold;">new</span> gallery<span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'myGallery'</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; timed: <span style="color: #003366; font-weight: bold;">true</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; showArrows: <span style="color: #003366; font-weight: bold;">false</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>To fix this, open up jd.gallery.js and find this line:</p>
<div class="igBar"><span id="ljavascript-9"><a href="#" onclick="javascript:showPlainTxt('javascript-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-9">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">galleryElement</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">options</span>.<span style="color: #006600;">withArrowsClass</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and move it to directly after the if statement that it's currently in. That should do it!  The code will now look like this:</p>
<div class="igBar"><span id="ljavascript-10"><a href="#" onclick="javascript:showPlainTxt('javascript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-10">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">galleryData</span>.<span style="color: #006600;">length</span>&gt;<span style="color: #CC0000;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>&amp;&amp;<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">options</span>.<span style="color: #006600;">showArrows</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> leftArrow = <span style="color: #003366; font-weight: bold;">new</span> Element<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addEvent</span><span style="color: #66cc66;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">'click'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">prevItem</span>.<span style="color: #006600;">bind</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">injectInside</span><span style="color: #66cc66;">&#40;</span>element<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> rightArrow = <span style="color: #003366; font-weight: bold;">new</span> Element<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addEvent</span><span style="color: #66cc66;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">'click'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">nextItem</span>.<span style="color: #006600;">bind</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">injectInside</span><span style="color: #66cc66;">&#40;</span>element<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">galleryElement</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">options</span>.<span style="color: #006600;">withArrowsClass</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Issue #3</strong></p>
<p>In the how-to guide for installing SmoothGallery, Jon's instructions aren't very clear about how to use thumbnails.  I tried using the   useThumbGenerator: true flag but couldn't get it to work.  Rather than digging through his code, I decided to directly use the resizer.php file that's included in the script files.  I'm sure there are multiple ways of doing this, but I took the resizer.php file, moved it into the root directory of my website.  Then where I set up my "image elements" for SmoothGallery, I call it like so:</p>
<div class="igBar"><span id="lhtml-11"><a href="#" onclick="javascript:showPlainTxt('html-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-11">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"imageElement"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">&lt;h3&gt;</span></a></span>GT-7 Black<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h3&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>A description about the GT-7 black table stand.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"gt7.php"</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">"open image"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"open"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">&lt;img</span></a> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"/images/products/gt7_black_slide.jpg"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"full"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">&lt;img</span></a> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"/resizer.php?imgfile=images/products/gt7_black_slide.jpg"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"thumbnail"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I then edited a couple variables in resizer.php so they are now:</p>
<div class="igBar"><span id="lphp-12"><a href="#" onclick="javascript:showPlainTxt('php-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-12">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$max_height</span> = <span style="color:#CC66CC;color:#800000;">75</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$max_width</span> = <span style="color:#CC66CC;color:#800000;">100</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You should be good to go now.  Feel free to give me a hollar if you can't get it to work.  If you have other tips...please, join the intimate conversation.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronhardy.com/general-programming/smoothgallery-fixes/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
<br />
<b>Warning</b>:  stristr() [<a href='function.stristr'>function.stristr</a>]: Empty delimiter in <b>/home/.navyblue/aaronius/aaronhardy.com/wp-content/plugins/wassup/wassup.php</b> on line <b>2093</b><br />
