<?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>The Enforcer.net &#187; Sites</title>
	<atom:link href="http://theEnforcer.net/category/sites/feed/" rel="self" type="application/rss+xml" />
	<link>http://theEnforcer.net</link>
	<description>a force.com blog</description>
	<lastBuildDate>Mon, 31 Oct 2011 22:55:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Dreamforce hackathon: Voiceforce!</title>
		<link>http://theEnforcer.net/2009/11/voiceforce/</link>
		<comments>http://theEnforcer.net/2009/11/voiceforce/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 18:07:56 +0000</pubDate>
		<dc:creator>The Enforcer</dc:creator>
				<category><![CDATA[Dreamforce]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://theEnforcer.net/?p=171</guid>
		<description><![CDATA[As part of the Dreamforce 2009 Force.com campground, Salesforce hosted a hackathon with heaps of prizes. At the &#8216;beginner level&#8217;, entrants just had to code a pre-defined system. Next came the challenge to integrate with social platforms. Finally, the &#8216;Secret Agent&#8217; level required more sophisticated integration. Finalists integrated with Amazon and BaseCamp. For the hackathon, [...]]]></description>
			<content:encoded><![CDATA[<p>As part of the Dreamforce 2009 Force.com campground, Salesforce hosted a <a href="http://developer.force.com/hackathon">hackathon</a> with heaps of prizes.</p>
<p>At the &#8216;beginner level&#8217;, entrants just had to code a pre-defined system. Next came the challenge to integrate with social platforms. Finally, the &#8216;Secret Agent&#8217; level required more sophisticated integration. Finalists integrated with Amazon and BaseCamp.</p>
<p>For the hackathon, I created Voiceforce with Force.com guru David Schach (<a href="http://www.x2od.com">X Squared on Demand</a>) and defending champion of last year&#8217;s Dreamforce, Elaine Greco. We threw together a system that allows a Support Case to be lodged via a voice interface.</p>
<p>Using <a href="http://www.dial2do.com/">Dial2Do</a>, a user can place a phone call, say &#8220;Create Case&#8221; and leave a message. A minute or so later, the Case appears in Salesforce:</p>
<p><img class="aligncenter size-medium wp-image-172" title="voiceforce screen" src="http://theEnforcer.net/wp-content/uploads/2009/11/voiceforce-screen.png" alt="voiceforce screen" width="600" height="318" /></p>
<p>It was quite amazing placing a phone call and seeing the spoken message appear within a Case. Yes — Dial2Do actually transcribed the phone call directly into a case. The flow is basically:</p>
<ul>
<li>Call Dial2Do and leave a message</li>
<li>Dial2Do transcribes the message into text</li>
<li>It sends the message via a URL to a Force.com Sites page</li>
<li>The Visualforce controller extracts the message from the URL, creates a Case and inserts the message</li>
<li>Voila! It appears in the list of cases &mdash; providing a <strong>voice-to-case</strong> system</li>
</ul>
<p>Unfortunately, Dave Carroll &amp; co didn&#8217;t include us in the Top 3 entries, but if they saw our fantastic logos I think they would have changed their mind! (Yes, that &#8216;No Typing&#8217; logo was hand-created from a mouse mat! Great work, Elaine!)</p>
<p>The most fun was hacking in the company of fellow Force.com developers. It was hard to type without having somebody &#8216;auto-correct&#8217; my syntax! The M&amp;Ms and bean bags helped, too!</p>
<h3>The Bottom Line</h3>
<ul class="nomargin">
<li>Integration with Force.com is easy &mdash; both in &#038; out</li>
<li>Force.com is a community as well as a platform</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://theEnforcer.net/2009/11/voiceforce/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cloud Challenge Entry: Daily Shinro</title>
		<link>http://theEnforcer.net/2009/09/cloud-challenge-entry-daily-shinro/</link>
		<comments>http://theEnforcer.net/2009/09/cloud-challenge-entry-daily-shinro/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 22:46:03 +0000</pubDate>
		<dc:creator>The Enforcer</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Force.com Platform]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://theEnforcer.net/?p=117</guid>
		<description><![CDATA[I&#8217;m pleased to announce my entry into the 2009 Force.com Cloud Developer Challenge . The Challenge is designed to evangelize the Force.com platform, encouraging lots of people to discover, learn and use Force.com. The rules are wide open — just build something using Force.com, Visualforce and Sites (so that it is publicly accessible). It&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pleased to announce my entry into the 2009 Force.com <a href="http://developer.force.com/events/cloud_coding_challenge">Cloud Developer Challenge</a> .</p>
<p>The Challenge is designed to evangelize the Force.com platform, encouraging lots of people to discover, learn and use Force.com. The rules are wide open — just build something using Force.com, Visualforce and Sites (so that it is publicly accessible). It&#8217;s a very clever idea — sort of a small version of the <a href="http://www.xprize.org/">X-Prize</a> , with the concept that offering prizes will encourage more people to do interesting than actually directly paying people to do it!</p>
<h3>Our Entry</h3>
<p>So, would you like to know about our entry?</p>
<p>Yes, I use the word &#8216;Our&#8217; rather than &#8216;My&#8217; because I&#8217;m happy to say that I teamed up with David Schach, author of the <a href="http://www.x2od.com/blog">X-Squared on Demand blog</a> . Previous readers will remember that I met David some time ago <a href="http://theenforcer.net/2008/11/x2od-the-enforcer/">when he visited Australia</a> . Well, it just so happened that David read <a href="http://theenforcer.net/2009/07/sites-visualforce-some-early-lessons/">my previous blog entry</a> about the Cloud Developer Challenge and dropped me an email to say he was visiting Australia again, and did I want some help?</p>
<p>This was a god-send, because I had been hitting lots of brick walls in my ramp-up of Visualforce and Sites knowledge, and David is an absolute expert in the subject. So, I did all the high-level UI, he did all the low-level &#8216;engine room&#8217; stuff and we worked in the middle to make a very exciting site.</p>
<h3>Introducing Daily Shinro</h3>
<p>The site we developed is a <strong>Social Gaming Website</strong> that we call <a href="http://www.dailyshinro.com">Daily Shinro</a> .</p>
<p style="text-align: center;"><img class="aligncenter" src="http://shinro-developer-edition.ap1.force.com/resource/1252098071000/Graphics/GamePic.png" alt="Daily Shinro" /></p>
<p>The idea for the site began with my work team at <a href="http://www.atlassian.com">Atlassian</a> , where we play a daily game of <a href="http://www.setgame.com/set/puzzle_frame.htm">SET</a> , a really fun logic puzzle that changes each day. To keep track of our scores, we created a shared Google Apps spreadsheet with our scores and we soon discovered that it was actually just as fun to analyze the scores as to play the game!</p>
<p>We had been looking around for another daily puzzle that we could all play, preferably something that only took a couple of minutes and which had a scoring element. Unfortunately, very few online games took our interest. However, around that time, I had become addicted to playing <a href="http://www.shinromines.com/">Shinro Mines</a> on the iPhone. Shinro is a little-known puzzle that has been described as a cross between Minesweeper and Sudoku.</p>
<p>So, once I put together the desire to enter the Cloud Developer Challenge, the need for another team puzzle with a social scoring element and my enjoyment of Shinro Mines, the choice of project became obvious!</p>
<h3>A Social Gaming Website</h3>
<p>There&#8217;s really two parts to Daily Shinro: the game and the social aspect.</p>
<p><strong>The Game</strong><br />
I created the game in JavaScript using the <a href="http://raphaeljs.com/">fantastic open-source Raphael JavaScript graphics library</a> that provides cross-browser graphics. It renders in XML for IE (boo!) and SVG for every other browser (yay!). It even supports animation.</p>
<p>Raphael was actually written by <a href="http://dmitry.baranovskiy.com/">Dmitry Baranovskiy</a> , a colleague of mine at Altassian. I highly recommend you look at the demo pages!</p>
<p>To provide a &#8216;daily&#8217; concept for the game, a new puzzle is made available each day. The background picture for the puzzle is a daily selection from flickr, selected with the help of the beautiful <a href="http://labs.ideeinc.com/multicolr">Idée Multicolr Search Lab</a> . It just adds a bit of spice and variety to the daily puzzle!</p>
<p><strong>Social Gaming</strong><br />
From the very beginning, my intention was to create a &#8216;social&#8217; gaming experience, based upon the spreadsheet developed by my work team. Basically, scores are calculated by how well each player beats the team average. Therefore, it needs at least two people to play the puzzle and all scores net-out to zero. This has the advantage that, if somebody doesn&#8217;t play one day, they aren&#8217;t penalized.</p>
<p>This scoring system is implemented at two levels in Daily Shinro — Public and &#8216;League&#8217;.</p>
<p>At the Public level, players&#8217; scores are compared to the public average. At the League level, scores are compared only amongst your friends or office co-workers who are members of the same League.</p>
<p>Leagues are all about comparisons <em>within</em> a team rather than <em>between</em> teams — sort of like a private gaming site for friends. Thus, everyone can create their own League and invite friends to join. The score graphs then reflect the scores amongst members of the League.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://chart.apis.google.com/chart?chs=700x300&amp;chxt=x%2Cy%2Cx&amp;chco=cd5c5c&amp;chf=c%2Clg%2C30%2Cffffff%2C0%2Cf0e68c%2C1&amp;cht=lc&amp;chds=-578%2C1215&amp;chxr=1%2C-578%2C1215&amp;chg=10%2C3%2C2%2C2%2C0%2C2&amp;chco=5496ff%2C5a9e68%2Cbf6900%2C32cc85%2C804dff%2C8c7a77&amp;chxl=0%3A%7C1%7C2%7C3%7C4%7C5%7C6%7C7%7C8%7C9%7C10%7C11%7C12%7C13%7C14%7C15%7C16%7C17%7C18%7C19%7C20%7C21%7C22%7C23%7C24%7C25%7C26%7C27%7C28%7C29%7C30%7C2%3A%7CAugust%7CAugust&amp;chd=s%3ATTTTTTVVVVVVVVVVVVVVVVVVVVVVaa%2CTTTTTTVXXXXafikkkkkkolot058655%2CTTTTTRRUUUUUUUVQPRPQQTTTTPNMMM%2CTTTTTZVRRRRQRTSVTTVWTTPOLKLMMM%2CTTTTTSRRRRROKKKLONLMLMKHHHGKII%2CTTTTTRRRRRRRQLKKKJJIGGJIEDCABB&amp;chdl=Vernon%7CSteve%7CRyan%7COrson%7CParker%7CNeil" alt="League Score sample" /></p>
<p>The charts are generated with some magical Apex code that gathers up League scores, compares players to game averages and then outputs the results into a Google Charts URL.</p>
<p>I invite you all to visit <a href="http://www.dailyshinro.com/">www.dailyshinro.com</a> and play the game!</p>
<p>If you find any bugs or strange behaviors, please let us know!</p>
<h3>Will we win?</h3>
<p>Ah, that&#8217;s the big question! My personal goal is to have the site &#8216;mentioned&#8217; in the results pages of the Cloud Developer Challenge. That way, we&#8217;ll feel rewarded for the long hours that were put into the site.</p>
<p>We&#8217;ve done several things to give us an <strong>advantage </strong> in the competition:</p>
<ul>
<li>We made a fun site that is <strong>attractive and enjoyable to use.</strong></li>
<li>We utilized <strong>lots of different technologies </strong> to showcase how Force.com can &#8216;pull together&#8217; capabilities from across the web to build an even richer application environment.</li>
<li>We added <strong>lots of pages of explanations</strong> , showing how we used Force.com technology. I&#8217;m hoping that this will help the folks at Salesforce.com promote the Force.com platform, which means that they&#8217;ll want lots of people visiting our site to help promote their technology. And what better way to do this than mentioning us in the final results?! (Clever, eh!)</li>
<li>Finally, there&#8217;s this blog, which I know is read by about 1000 people per month (including some legendary Salesforce staff!). Throw in David&#8217;s blog and we&#8217;re hoping to get the attention of enough people in Salesforce that we&#8217;ll get on the short-list.</li>
</ul>
<p>Oh, one word to the judges &mdash; we fixed a few bugs in the last couple of days. So, if you visited the site already, please visit again and see it in its fully-working glory!</p>
<p>It&#8217;s been a tough Challenge, but it was great fun and an utterly fantastic way to learn Visualforce and Sites. I started with zero knowledge and now consider myself a competent user of those technologies. I&#8217;d also like to thank David Schach whose knowledge of Visualforce and Sites is just incredible. I couldn&#8217;t have done this site without him.</p>
<h3>The Bottom Line</h3>
<ul class="nomargin">
<li>Visualforce and Sites are mature and capable technologies for building websites on Force.com technology</li>
<li>The Cloud Developer Challenge was an excellent way to &#8216;spread the word&#8217; and get people to use the technologies</li>
<li>You&#8217;ve got to visit <a href="http://www.dailyshinro.com/">Daily Shinro</a>!</li>
<li>If you know the judges, please tell them how great we are! :)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://theEnforcer.net/2009/09/cloud-challenge-entry-daily-shinro/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sites &amp; Visualforce: Some early lessons</title>
		<link>http://theEnforcer.net/2009/07/sites-visualforce-some-early-lessons/</link>
		<comments>http://theEnforcer.net/2009/07/sites-visualforce-some-early-lessons/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 12:10:00 +0000</pubDate>
		<dc:creator>The Enforcer</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[Visualforce]]></category>

		<guid isPermaLink="false">http://theEnforcer.net/?p=103</guid>
		<description><![CDATA[I&#8217;ve bitten bullet! I&#8217;m currently working on an entry for the Force.com Cloud Developer Challenge, which fortunately was extended to the end of August 2009. I started a bit late because I couldn&#8217;t think of anything fun to make. Then, a few cool ideas came together and I&#8217;m spending whatever time I can on the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve bitten bullet! I&#8217;m currently working on an entry for the <a href="http://developer.force.com/events/cloud_coding_challenge">Force.com Cloud Developer Challenge</a>, which fortunately was extended to the end of August 2009.</p>
<p>I started a bit late because I couldn&#8217;t think of anything fun to make. Then, a few cool ideas came together and I&#8217;m spending whatever time I can on the effort. I&#8217;ll talk more about the entry in a later post, but thought it worthwhile posting my learnings as part of the process.</p>
<h3>Visualforce</h3>
<p>The Challenge wants something built using <a href="http://www.salesforce.com/platform/cloud-platform/sites.jsp">Force.com Sites</a> (<a href="http://developer.force.com/sites">technical stuff</a>) and that mostly uses <a href="http://www.salesforce.com/platform/application-development/visualforce/">Visualforce</a> (<a href="http://wiki.developerforce.com/index.php/Visualforce">technical stuff</a> ).</p>
<p>To date, I haven&#8217;t had a business need to justify my learning Visualforce so it remained a mystery. However, that has changed with my need to crash-learn Sites and Visualforce.</p>
<p>The first thing I realised was how reliant Visualforce is on the Apex programming language. I had <a href="http://theenforcer.net/2008/09/the-forcecom-hierarchy-of-skills/">earlier postulated</a> that Apex was at the top of the Force.com skillset, being the hardest to learn. I&#8217;m now thinking that Visualforce should be at the top, because it relies so much on Apex to add useful functionality. Using Visualforce without knowing Apex would be difficult, indeed. So, at least I did things in the &#8216;right&#8217; order.</p>
<h3>Frustration</h3>
<p>As with developing any new application, and even moreso when trying to use a new technology, there are things that take a while to figure out. Here&#8217;s some things I learned:</p>
<p><strong>Field-level security</strong> also impacts Sites. I was trying to figure out why a page wasn&#8217;t displaying some fields (they came up as blank) and why I was getting occasional &quot;unauthorized access&quot; errors. Yep, turned out to be field-level security settings for my Sites Guest Profile. I managed to debug it using the <strong>Field Accessibility</strong> function under <strong>Security Controls</strong>. It appears that &quot;Guest&quot; profiles used by Sites don&#8217;t appear in the selection set when adding a field (unless it&#8217;s a Required Field), so after creating a new field I had to go back to the Guest Profile and add access permissions. Argh!</p>
<p><em>Update:</em> In fact, it could be a bug. The Sites and Portal profiles don&#8217;t appear when creating a custom field, but if I hit &#8216;Previous&#8217; to go back to the Profiles selection screen while creating the field, the additional profiles appear. I&#8217;ve logged it as a potential bug.</p>
<p><strong>The <code>&lt;apex:page&gt;</code> tag doesn&#8217;t show the page title</strong> if <code>showHeader=&quot;false&quot;</code>. I found it <a href="http://community.salesforce.com/sforce/board/message?board.id=Visualforce&amp;message.id=15176">mentioned on a discussion board</a> and mention it here in case it frustrates you, also.</p>
<p><strong>Governor limitations are still our enemy</strong> but it&#8217;s slightly better under Visualforce. According to Apex documentation, the &quot;Total number of records retrieved by SOQL queries&quot; is <code>1000 x batch size</code> for Triggers and 10,000 for Visualforce. This becomes a real stinker when used with the <code>count()</code> function on a SOQL query since every row is counted even though the function is only returning an integer. Thus, <code>SELECT Count() from Contact</code> will fail if there are more rows than allowed by the limit. This is really, really stupid. If you agree, vote for this idea to <a href="http://ideas.salesforce.com/article/show/10089055/Count_the_SOQL_count_query_as_a_single_row_query">Count the SOQL count() query as a single row query</a>.</p>
<p><strong>Instant Apex in the System Log window is fantastic!</strong> I used it to test the Governor Limit with code like this:</p>
<pre class="brush: jscript; title: ; notranslate">
List ls = new List();
for (integer i = 0; i &lt; 1000; i++) {
  ls.add(new Test__c());
}
insert ls;
integer c = [select count() from Test__c];
System.Debug(c);
</pre>
<p><strong>The Salesforce UI was really slow.</strong> Really, really slow. I used the Net tab in Firebug to see what was slowing things down, and it was continually reloading JavaScript files that should have been cached and the wholepage was taking 15+ seconds to load. Here&#8217;s a picture of the time taken after clicking the &#8216;New&#8217; button to add a Custom Field:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://theenforcer.net/wp-content/uploads/2009/07/nettime.png" border="1" alt="" /></p>
<p>Well, I eventually discovered that Firefox was not caching SSL pages. I turned it on (enter the address <code>about:config</code> then set <code>browser.cache.disk_cache_ssl</code> to <code>true</code>  and now the pages load at a screaming pace!</p>
<p><strong>To trigger field updates via a link</strong>, look at Scott Hemmeter&#8217;s article on how to <a href="http://sfdc.arrowpointe.com/2009/01/08/invoke-apex-from-a-custom-button-using-a-visualforce-page/">Invoke Apex from a Custom Button using a Visualforce Page</a>.</p>
<p><strong>Stylesheets are always a pain</strong> but the Salesforce Unearthed blog has a good article <a href="http://salesforceexperts.blogspot.com/2009/06/style-your-visualforce-pages-for.html">Style your VisualForce Pages -for newbies</a> that was very helpful, especially the bit about <code>standardstylesheets=&quot;false&quot;</code>. I also found a good article about <a href="http://www.devarticles.com/c/a/Web-Style-Sheets/DIV-Based-Layout-with-CSS/">DIV Based Layout with CSS</a> that explains the basics of formatting a page using DIVs. Also, be sure to read the bit in the Visualforce manual that mentions how to match style <code>id</code>.</p>
<p>Static Resources have to be public. I&#8217;ll admit, I got some strange variations on this, but <a href="http://salesforceexperts.blogspot.com/2009/07/visualforce-page-with-css.html">lots</a> of <a href="http://wiki.developerforce.com/index.php/Force.com_Sites_Best_Practices">documentation</a> give this advice.</p>
<p>In fact, Salesforce Unearthed has an excellent example of <a href="http://salesforceexperts.blogspot.com/2009/07/zip-file-as-static-resource.html">how to use a Zip file as Static Resource</a>. It lets you put your stylesheet and images in a single zip file. Fascinating!</p>
<h3>The Bottom Line</h3>
<ul class="nomargin">
<li>There&#8217;s a lot to learn to get Sites and Visualforce doing what you envisage</li>
<li>You&#8217;ll need Apex and HTML skills (preferably CSS, too)</li>
<li>All time for the standard frustration of coding in new systems</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://theEnforcer.net/2009/07/sites-visualforce-some-early-lessons/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

