<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-431168048244566944</id><updated>2008-11-10T15:53:00.546Z</updated><title type='text'>Facebook Trumps</title><subtitle type='html'></subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.facebooktrumps.com/atom.xml'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-2412955241551278219</id><published>2007-11-20T21:41:00.000Z</published><updated>2008-01-21T16:02:44.916Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='wideplay warp'/><category scheme='http://www.blogger.com/atom/ns#' term='guice'/><title type='text'>Time</title><content type='html'>It is amazing how much time I don't have .. it has been two months since the big push lead to th "alpha version"!&lt;br /&gt;&lt;br /&gt;At the moment I am working on a different project, a sort of web-forum based around old picture postcards - a favour for my father.&lt;br /&gt;&lt;br /&gt;All of this is to gather skills, so anything learnt about building a more conventional web app can be farmed back into Facebook Trumps.&lt;br /&gt;&lt;br /&gt;I hope a better version of Facebook Trumps will arrive soon! At the moment it averages about 1 add per day, and I do have some people who have a couple of games a week!</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/2412955241551278219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=2412955241551278219&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/2412955241551278219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/2412955241551278219'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/11/time.html' title='Time'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-7224368271280929864</id><published>2007-10-24T22:22:00.000+01:00</published><updated>2007-10-24T22:36:59.703+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='application'/><title type='text'>That old chestnut.</title><content type='html'>See: &lt;a href="http://www.facebooktrumps.com/2007/08/my-friends-are-better-than-your-friends.html"&gt;http://www.facebooktrumps.com/2007/08/my-friends-are-better-than-your-friends.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My friends are better than your friends! That was the original idea, as it came to me - and lo and behold, the subject of the first comment I have had from a stranger on the Facebook Application page:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;write.....so you dont actually play against your friends.......maybe thats the reason why im the only user [sic]&lt;/blockquote&gt;This guy has a point. The fun of it comes from challenging your friends. Thus I propose:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;When you add Facebook Trumps it will save your Trumpstack.&lt;/li&gt;&lt;li&gt;When you challenge another friend who has added Facebook Trumps you will still play against the AI (if you can call it that), but rather than the Robot you will see your friends face and play against their friends.&lt;/li&gt;&lt;li&gt;People who have the app will get a "challenge me at Facebook Trumps" button on their profile, so I can get a bit of viral growth going.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;So that's the plan. No requirement for live multiplayer, but an added dimension nonetheless.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/7224368271280929864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=7224368271280929864&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/7224368271280929864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/7224368271280929864'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/10/that-old-chestnut.html' title='That old chestnut.'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-4771726058421343395</id><published>2007-10-24T22:19:00.001+01:00</published><updated>2007-10-24T22:19:28.864+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='browser compatibility'/><title type='text'>Doesn't work with IE6!</title><content type='html'>So what have my tests determined? The game doesn't work with IE6. The problems are twofold:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Styles on Trumpcards all over the place, need to work out why as doesn't look right.&lt;/li&gt;&lt;li&gt;Timeout on first attempt to get trump cards via RPC. Not on second.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This has been one thing which has stopped me progressing this application for a month. In honesty the other things were wanting to let it gestate for a bit and spending time doing exciting things with my lovely girlfriend.&lt;/p&gt;&lt;p&gt;Given my approach has been not to leave "broken windows", I needed to fix this - until Facebook came to the rescue! They are not supporting IE6 any more, recommending an update to IE7. This is great for me - if the platform does not support IE6 then there is not necessity for my application to.&lt;/p&gt;&lt;p&gt;What I do need however, is to have a check and then display "this browser not supported" when IE6 is found. Window not so much fixed but boarded up!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/4771726058421343395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=4771726058421343395&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/4771726058421343395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/4771726058421343395'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/10/doesnt-work-with-ie6.html' title='Doesn&apos;t work with IE6!'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-7549508948576155374</id><published>2007-09-16T13:18:00.000+01:00</published><updated>2007-09-16T13:22:43.803+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facebook api'/><category scheme='http://www.blogger.com/atom/ns#' term='Gameplay'/><title type='text'>Alpha Version: Working!</title><content type='html'>I have deployed the first "fully working" test version of my game onto my webhost- and everything seems OK!&lt;br /&gt;&lt;br /&gt;I've tested it in IE7, Firefox, Safari and Opera. I've tested it on the three laptops I have access to (2x Windows XP and 1x Vista) with no issues, and also it works on my  Nintendo Wii(!). I've tried it with the two Facebook logins I have access to and 2 freinds so far have tried it out.&lt;br /&gt;&lt;br /&gt;Next thing is to get about 20-30 testers and see what their comments/issues are- whilst I think about the next iteration of the game, as initially mentioned two weeks ago.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/7549508948576155374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=7549508948576155374&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/7549508948576155374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/7549508948576155374'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/09/alpha-version-working.html' title='Alpha Version: Working!'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-174885082481422855</id><published>2007-09-16T11:30:00.000+01:00</published><updated>2007-09-16T11:37:34.710+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='approach'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook api'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>More Fixed Windows.</title><content type='html'>&lt;p&gt;I'm finding the idea of fixing everything before moving on a little tedious, but really its the right thing to do. Fixed Windows at present include:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The stylesheet on this site: why was it orange? It is now blue.&lt;/li&gt;&lt;li&gt;The link on this page now goes to "add application" rather than "play game".&lt;/li&gt;&lt;li&gt;Upgraded host to Tomcat 6 (this was very involved).&lt;/li&gt;&lt;li&gt;I can now view the Tomcat logs from the web.&lt;/li&gt;&lt;li&gt;The logfile output location no longer throws an error everytime the game is started.&lt;/li&gt;&lt;li&gt;The game is properly deployed and working.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Still more to do before I dabble with the next iteration!&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Complete "Finish Screen", displaying winner and option to restart.&lt;/li&gt;&lt;li&gt;Present "Return to Game" button on Browse Trumps screen.&lt;/li&gt;&lt;li&gt;Change last few "orange" links on this page.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So work to do ... the good thing is any of the 39 million people on Facebook can click the link on the right and actually play the game!&lt;/p&gt;&lt;p&gt; &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/174885082481422855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=174885082481422855&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/174885082481422855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/174885082481422855'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/09/more-fixed-windows.html' title='More Fixed Windows.'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-1596620068494800721</id><published>2007-09-08T20:42:00.000+01:00</published><updated>2007-09-08T20:46:11.258+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='approach'/><title type='text'>Good Principles</title><content type='html'>I was randomly reading the website for Tapestry, which is a Java web application framework. I make no use of Tapestry on this but I like their principles:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Simplicity&lt;/strong&gt; - web applications shouldn't be rocket science! &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Consistency&lt;/strong&gt; -what works in small applications should work in large applications. Different developers should find similar solutions to similar problems.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Efficiency&lt;/strong&gt; - applications should be performant and scalable&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Overall&lt;/strong&gt;: &lt;em&gt;The simplest choice should be the correct choice.&lt;/em&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Sounds good to me.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/1596620068494800721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=1596620068494800721&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/1596620068494800721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/1596620068494800721'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/09/good-principles.html' title='Good Principles'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-3700014064548916414</id><published>2007-09-08T18:27:00.000+01:00</published><updated>2007-09-08T20:04:52.961+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><title type='text'>Broken Window Number 1: Replaced.</title><content type='html'>I had a strange bug in the client part, which only occured when running the code after it was compiled to Javascript by GWT (&lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.WebMode.html"&gt;GWT Web mode&lt;/a&gt;) and not when running in hosted mode (&lt;a href="http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.HostedMode.html"&gt;GWT Hosted mode&lt;/a&gt;). It was a pain to pinpoint the location of the error - I had to place popup messages stepped through the application to determine its location as all I got from the browser was "uncaught exception" and a GUI which failed to display. When I ran it in Hosted with the Eclipse debugger for support, well it was pointless as it worked perfectly.&lt;br /&gt;&lt;br /&gt;I discovered the problem was with the code which deals the cards to the two players. This makes use of the .clone() method of the TrumpStack object, basically just an Arraylist which represents the stack of Trump Cards. Another method shuffles the cards, the deal method then gives the entire card deck to to player, clones a copy to the opponent, deletes the top half of the cards from the players deck and the bottom half from the opponent's deck.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;private void dealPack() {&lt;br /&gt;&lt;span style="color:#009900;"&gt;// Give opponent half cards.&lt;br /&gt;&lt;/span&gt;_session.setOpponentStack((TrumpStack) _session.getPlayerStack().&lt;span style="color:#ff0000;"&gt;clone()&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;br /&gt;_session.getOpponentStack().clearFirstHalf();&lt;br /&gt;_session.getPlayerStack().clearLastHalf();&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Turns out the behaviour of .clone() differs between web-mode and hosted. In the hosted implementation .clone() makes a copy of the TrumpStack object (which is basically an Arraylist) and all the elements too. In the web mode version the elements are not cloned but just the object (?!). This is doubly odd as the Sun API (&lt;/span&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html#clone()"&gt;Sun API Documentation&lt;/a&gt;) implies that the web behaviour is correct, although when running in Java that is not what happened.&lt;br /&gt;&lt;br /&gt;What happens is, when the code accesses the first card in the opponent's stack of cards it gets a null value, which causes an error in Javascript. That at least, in the absence of better Javascript debugging tools, is what I think is happening.&lt;br /&gt;&lt;br /&gt;In any case I have implemented my own method called .copy() which does copy all the elements, which I have then been able to give a return type of TrumpStack, getting rid of the need to cast in the dealing code above. I have also place a check for nullity in method which accesses the opponents first card. This might happen for example if the player only has one friend.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/3700014064548916414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=3700014064548916414&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/3700014064548916414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/3700014064548916414'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/09/broken-window-number-1-replaced.html' title='Broken Window Number 1: Replaced.'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-4577040621715473158</id><published>2007-09-08T16:46:00.000+01:00</published><updated>2007-09-08T16:47:07.615+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='google code'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><title type='text'>Google Code</title><content type='html'>I've created a Google Code project and put all the source code of my Facebook Trumps game onto it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/facebooktrumps/"&gt;http://code.google.com/p/facebooktrumps/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/4577040621715473158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=4577040621715473158&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/4577040621715473158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/4577040621715473158'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/09/google-code.html' title='Google Code'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-8178744721333989576</id><published>2007-09-02T15:44:00.000+01:00</published><updated>2007-09-08T16:45:56.777+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='guice'/><category scheme='http://www.blogger.com/atom/ns#' term='approach'/><title type='text'>Broken Windows</title><content type='html'>I read the following from a book on Safari (&lt;a href="http://safari.oreilly.com/"&gt;http://safari.oreilly.com/&lt;/a&gt;):&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;One broken window&lt;a name="length of"&gt;&lt;/a&gt;, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment- a sense that the powers that be don't care about the building. So another window gets broken&lt;a name="short space"&gt;&lt;/a&gt;. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short space of time, the building becomes damaged beyond the owner's desire to fix it, and the sense of abandonment becomes reality.&lt;br /&gt;&lt;br /&gt;Don't leave "broken&lt;a name="is discovered"&gt;&lt;/a&gt; windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then &lt;a name="board it"&gt;&lt;/a&gt;board it up.&lt;a name="out the"&gt;&lt;/a&gt; Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead. Take some&lt;a name="prevent further"&gt;&lt;/a&gt; action to prevent further damage and to show that you're on top of the situation.&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;This seems like wisdom to me and at this point in the project I need to focus on this implications of it. Before I start on adding the new features I need to deploy and iron all the creases out of the current version.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/8178744721333989576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=8178744721333989576&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/8178744721333989576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/8178744721333989576'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/09/broken-windows.html' title='Broken Windows'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-7785277419234865452</id><published>2007-09-02T12:30:00.000+01:00</published><updated>2007-09-02T12:44:38.028+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hmvc'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='guice'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook api'/><title type='text'>Third Version of the Game</title><content type='html'>I now have a "working and complete game component". I am going to deploy it to the server and perhaps get some people to try it. The architecture and logic of the application I am pleased with, however the look and feel of it is quite ropey! I need to engage in a process of gentrifying the game, which due to the component based architecture will be straight-forward.&lt;br /&gt;&lt;br /&gt;For the next version of the game, which I would want to be of a sort of "beta" quality I am after the following:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;More on the server-side. I'm already using Guice (&lt;a href="http://code.google.com/p/google-guice/"&gt;http://code.google.com/p/google-guice/&lt;/a&gt;), but I want to add things like persistence, for the game scores etc, but also to keep track of users who have successfully accessed the game (just their names and UIDs).&lt;/li&gt;&lt;li&gt;Look and feel. I need it look more polished, I want to present an option to go "full screen", using a maximized browser window with just a control bar and URL field. Need more ques for the user to orient them to where they are in the game. Especially need to be more clear during opponents turn.&lt;/li&gt;&lt;li&gt;Iron out issues which arise from testing. I need other people to test it live off the server and see what issues it throws up. &lt;/li&gt;&lt;li&gt;Client Side Refactoring - I am tempted to make some alterations to the Event code and some major work on the EventCapableComposite which all the View components inherit from. Also to move the framework code into its own package.&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/7785277419234865452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=7785277419234865452&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/7785277419234865452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/7785277419234865452'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/09/third-version-of-game.html' title='Third Version of the Game'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-2177542815212916664</id><published>2007-08-19T12:58:00.000+01:00</published><updated>2007-09-02T12:21:52.017+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hmvc'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='approach'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook api'/><title type='text'>Overlaying application flow onto HMVC</title><content type='html'>&lt;p&gt;I need to put the conclusions of the past two posts together- I need to decompose the application structure implied by my flow diagram into a set of HMVC triads as described below.&lt;/p&gt;&lt;p&gt;The top level triad will have responsibility for moving the application from one phase, i.e. the game creation stage or the end game stage, to the next, and also for providing RPC functionality - I don't want that kind of code just spotted round the place. The Root/Container Triad: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Model: Contains RPC methods and global state.&lt;/li&gt;&lt;li&gt;View: Practically none - contains "Loading..." view.&lt;/li&gt;&lt;li&gt;Controller: Co-ordinates transistions from one Triad to another.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;After the Root triad has obtained the stack of Trumps for that appropriate player, it creates a child Triad to "setup" the game: The Create Game Triad:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Model: Instantiate Game, Set players, Shuffle cards, Deal Cards, Toss Coin.&lt;/li&gt;&lt;li&gt;View: Welcome and display outcome of game initialisation. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Next the Create Game Triad signals it is finished and the Root controller destroys that entire triad, replacing it with the Game Triad, which again is a child of the root controller. Due to the complexities of this view it is decomposed into further HMVC triads which are orchestrated by the Game Triad Controller:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Player Turn VC Triad&lt;/li&gt;&lt;li&gt;Opponent Turn VC Triad&lt;/li&gt;&lt;li&gt;Show Result VC Triad&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These are "cut-d0wn" HMVC triads, consisting only a view and a controller. All of the model code however is contained within the higher level Play Game Triad. Messages are passed between components and the Play Game Controller will create and destroy the alternate child Triads as required. Therefore the Play Game Triad looks like this:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Model: Evaluate winner of turn functionality, Determine if game has been won functionality. &lt;/li&gt;&lt;li&gt;View- Several View/Controller Triads as above.&lt;/li&gt;&lt;li&gt;Controller: Manage interactions between all these! Create/Destroy child Triads.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Finally there is a End Game Triad to display the winner of the game and offer the oppotunity to return to the beginning of the game.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Model: Send result via RPC (I will actually leave this until the next iteration of the game).&lt;/li&gt;&lt;li&gt;View: Show End Result.&lt;/li&gt;&lt;li&gt;Controller: Allow to go back to the start.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The structure described above will allow me to decompose my code into disgestible modular chunks and also due to the separation of functionality and standardisation of messaging will allow easy modification and improvement later. It won't be a matt of spaghetti.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/2177542815212916664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=2177542815212916664&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/2177542815212916664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/2177542815212916664'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/overlaying-application-flow-onto-hmvc.html' title='Overlaying application flow onto HMVC'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-9141475632627686626</id><published>2007-08-19T12:34:00.001+01:00</published><updated>2007-09-16T11:29:49.259+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hmvc'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook api'/><title type='text'>Application flow</title><content type='html'>Again, with the aim of getting things straight in my mind, here is very rough and broad grained flow chart of how the client will work.&lt;br /&gt;&lt;img src="http://www.facebooktrumps.com/img/trumps_app_flow.png" /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/9141475632627686626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=9141475632627686626&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/9141475632627686626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/9141475632627686626'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/application-flow.html' title='Application flow'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-282561223299920121</id><published>2007-08-19T10:52:00.000+01:00</published><updated>2007-08-19T11:07:46.370+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='approach'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook api'/><title type='text'>The client/GUI Framework.</title><content type='html'>The model view controller pattern is the classic pattern adopted for GUI and client applications (&lt;a href="http://en.wikipedia.org/wiki/Model-view-controller"&gt;http://en.wikipedia.org/wiki/Model-view-controller&lt;/a&gt;). &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;MVC&lt;/span&gt; however, is quite a broad pattern, and so I went in search of further detailed recommendations and architectural &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;guidance&lt;/span&gt;. Luckily, Java seems to be a language which is adopted by people with an interest in software engineering principles, therefore a great many resources are &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;available&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The client component needs to obtain a stack of trumps via RPC, compute the various outcomes in the game, communicate rich perspective on the game state to the user and accept interactions from the user. The most appropriate framework I could find is the HMVC (Hierarchical MVC) which is treated at length here: &lt;a href="http://www.javaworld.com/javaworld/jw-07-2000/jw-0721-hmvc.html"&gt;http://www.javaworld.com/javaworld/jw-07-2000/jw-0721-hmvc.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Following MVC principles the view (GWT Widgets) are delineated from the controller (flow logic) and the model (rpc, game logic). HMVC however fills in some of the gaps with respect to how these elements are composed and structured, and how these elements can communicate amongst one another. The heirarchical aspect allows a root controller encapsulating global concerns (such as the game and the trump stack) to control various children, such as turn screens, scoreboards or outcome views.&lt;br /&gt;&lt;br /&gt;A concrete and usable example of HMVC is availible here, &lt;a href="http://www.thecentric.com/wiki/index.php/HMVC_Tutorial"&gt;tp://www.thecentric.com/wiki/index.php/HMVC_Tutorial&lt;/a&gt;, which can easily be adapted to work with GWT.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/282561223299920121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=282561223299920121&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/282561223299920121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/282561223299920121'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/clientgui-framework.html' title='The client/GUI Framework.'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-1621434679948721944</id><published>2007-08-18T12:12:00.000+01:00</published><updated>2007-08-19T10:50:31.837+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='approach'/><title type='text'>Building the next iteration of the Game</title><content type='html'>So far I have:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Created a foundation capable of authenticating to the Facebook API, and making extracted data availible to a GWT application.&lt;/li&gt;&lt;li&gt;Written a routine to, given a set of Facebook friend profiles, return a set of Trump cards - which is to say a set of statistics determined by the underlying profiles for each friend.&lt;/li&gt;&lt;li&gt;Developed/Stolen/Borrowed a UI framework sufficient for the Facebook Trumps game.&lt;/li&gt;&lt;li&gt;Created a module which displays a user's Facebook friends, the representation approximating a real playing card.&lt;/li&gt;&lt;li&gt;Deployed the above to a "live" host rather than a "developmental" one (i.e. webhost rather than my laptop).&lt;/li&gt;&lt;/ol&gt;All of the above is pretty solid, and was so before I started this site. In addition I also have the following:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Working but buggy and incomplete Game component.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Progress on this component has been stalled by a lack of clarity on my own behalf with respect to the two subjects taken up in previous posts. The rules of Trumps and my desire to allow you to play "against" someone, right away.&lt;/p&gt;&lt;p&gt;Having thought that through, the further steps are as follows:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Develop module to allow players to play a game of Trumps with a set of cards representing their own friends, vs. a CPU opponent.&lt;/li&gt;&lt;li&gt;Allow game to post back win/lose to server when done (and persist).&lt;/li&gt;&lt;li&gt;Deploy to webhost and ensure compatiblity with major browsers.&lt;/li&gt;&lt;li&gt;Invite people to use and deal with inevitable issues.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;At this point I can start to entertain some of the diversionary thoughts about the future:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Multiplayer (who's set of cards?)&lt;/li&gt;&lt;li&gt;Scoreboard.&lt;/li&gt;&lt;li&gt;Integrate into profile (challenge me! button).&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/1621434679948721944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=1621434679948721944&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/1621434679948721944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/1621434679948721944'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/taking-step-back-point-of-this-website.html' title='Building the next iteration of the Game'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-8331163190519095845</id><published>2007-08-18T11:32:00.001+01:00</published><updated>2007-08-19T10:38:31.514+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Trumps'/><category scheme='http://www.blogger.com/atom/ns#' term='multiplayer'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook api'/><category scheme='http://www.blogger.com/atom/ns#' term='privacy'/><title type='text'>My friends are better than your friends?</title><content type='html'>At first the idea of challenging your friends to a game of Trumps appealed to me. A "My friends are better than yours", "no they're not", "let's prove it!" scenario. This would clearly have some humourous appeal and capture the imagination, however there is tension between this goal, the actual game "Trumps", technical possibilities and the requirements of internet privacy.&lt;br /&gt;&lt;br /&gt;Playing Trumps "head to head", so far as I can reason, would require the following:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Player 1 and Player 2 each have a different set of card representing respective friends.&lt;/li&gt;&lt;li&gt;The game would need to be remotely multiplayer.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Just these two things are massively problematic. If Player 1 trumps Player 2, then does Player 1 "gain" that friend from Player 2? Player 1 could then cycle through their entire stack and trump Player 2 with one of Player 2's own cards! Completely undermines the "my friends better" principle.&lt;/p&gt;&lt;p&gt;What about privacy! Where Player 1 is playing a card who Player 2 is not friends with, or worse has blocked, you are revealing statistics derived from the private part of that friends profile. While the statistics are not going to be greatly revealing this goes against an important principle and most likely breaches the terms of the Facebook API.&lt;/p&gt;&lt;p&gt;If you were going to challenge someone to a game of "My friends are better than yours" you would want to play live. I will have more to say on this in the future, but the kind of asychoronous messaging system involved in this are beyond what my webhost can provide at present (I would probably need to use Jetty &lt;a href="http://www.mortbay.org/"&gt;http://www.mortbay.org/&lt;/a&gt; rather than Tomcat, otherwise I would need 1 thread per connection and likely the limited resources provided by my webhost would crash under load). At least for the first iteration of the game I want to play vs. a CPU.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/8331163190519095845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=8331163190519095845&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/8331163190519095845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/8331163190519095845'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/my-friends-are-better-than-your-friends.html' title='My friends are better than your friends?'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-9074563021124645621</id><published>2007-08-18T10:52:00.000+01:00</published><updated>2007-08-19T10:34:51.573+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Opponent'/><category scheme='http://www.blogger.com/atom/ns#' term='Winner'/><category scheme='http://www.blogger.com/atom/ns#' term='Trumps'/><category scheme='http://www.blogger.com/atom/ns#' term='Gameplay'/><title type='text'>Gameplay, opponents, scoring, and winners.</title><content type='html'>On the face of it Facebook Trumps is a straightforward idea. You play Trumps with cards representing Facebook friends, with statistics derived from thier Facebook profile. When you get into the detail of it, however, to implement it as a computer game, you have to flesh out a bit of the detail.&lt;br /&gt;&lt;br /&gt;Trumps is a traditional game which has been played for centuries (&lt;a href="http://www.phrases.org.uk/meanings/come-up-trumps.html"&gt;http://www.phrases.org.uk/meanings/come-up-trumps.html&lt;/a&gt;). It is suggested that "Trump" is a 17th Century abbreviation of "Triumph", plausably- and that reference is made to the game in Shakespeare. The game was played with a traditional set of cards (&lt;a href="http://en.wikipedia.org/wiki/Playing_card"&gt;http://en.wikipedia.org/wiki/Playing_card&lt;/a&gt;) with one suit being arbitarily declared as the "trump" suit. If two players hold cards of the trump suit the highest card is taken as winner. The game is more familiar when played with a set of statistics. There is more on some of the familiar modern interpretations of Trumps here: &lt;a href="http://www.ultimate-top-trumps.co.uk/"&gt;http://www.ultimate-top-trumps.co.uk/&lt;/a&gt;, the website of a modern commercial variant of the game, "Top Trumps" is availible here : &lt;a href="http://www.toptrumps.com/"&gt;http://www.toptrumps.com/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Broadly, the game is played with a stack of cards where each card displays a set of unique statistical values representing an individual entity- the statistics shown are uniform and comparable between cards. The game begins where the cards are shuffled and dealt between two or more players. A player then takes a turn, selecting the most fortuitous looking statistic on the top card of their own deck. Each other player declares their own value for that statistic, the player with the highest value winning the round. The winner of the round takes the losing cards of all the other players and places them on the bottom of their deck. The next player will then take their turn. You then lose by running out of cards. You win by collecting the entire pack.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/9074563021124645621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=9074563021124645621&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/9074563021124645621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/9074563021124645621'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/conventional-trumps-gameplay-opponents.html' title='Gameplay, opponents, scoring, and winners.'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-4953071800592607131</id><published>2007-08-12T22:50:00.001+01:00</published><updated>2007-08-12T22:50:32.141+01:00</updated><title type='text'>Server Side Technologies</title><content type='html'>Java can be used on the server side via a servlet container- I chose &lt;a href="http://tomcat.apache.org/"&gt;http://tomcat.apache.org/&lt;/a&gt; for the time being, as it is well documented, free and widely used.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/4953071800592607131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=4953071800592607131&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/4953071800592607131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/4953071800592607131'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/server-side-technologies.html' title='Server Side Technologies'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-6456275508042523514</id><published>2007-08-12T22:49:00.001+01:00</published><updated>2007-08-12T23:07:13.118+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook api'/><title type='text'>The Facebook API</title><content type='html'>Facebook is keen to allow developers to build application on top of Facebook and integrate with their site (&lt;a href="http://developers.facebook.com/"&gt;http://developers.facebook.com/&lt;/a&gt;). They have a ready made Java client library my application can use as an interface to obtain data and getting a developer key is free of charge. There is an easy web interface on Facebook for managing your application.&lt;br /&gt;&lt;br /&gt;Facebook applications can operate according to a number of models. Desktop or external web applications can make API calls - given a session has been authenticated via the Facebook site. This is the one extreme of "separateness" from the Facebook site.&lt;br /&gt;&lt;br /&gt;There is also the option of having you application generate "FBML" (&lt;a href="http://developers.facebook.com/documentation.php?v=1.0&amp;doc=fbml"&gt;http://developers.facebook.com/documentation.php?v=1.0&amp;amp;doc=fbml&lt;/a&gt;) which is passed to a Facebook server. Facebook then in turn renders this as part of the user's profile screen. This option is perhaps the other extreme, least "separate" from the Facebook site.&lt;br /&gt;&lt;br /&gt;The third option, which I have adopted, has the application run inside of a "canvas" page (&lt;a href="http://wiki.developers.facebook.com/index.php/Your_callback_page_and_you"&gt;http://wiki.developers.facebook.com/index.php/Your_callback_page_and_you&lt;/a&gt;). A user who is "on" Facebook follows a link to a specific page within of Facebook. This page appears as a normal Facebook page with menus etc, but contains an IFRAME which dominates the major content area. It is here I shall have the Facebook Trumps application run.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/6456275508042523514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=6456275508042523514&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/6456275508042523514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/6456275508042523514'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/facebook-api.html' title='The Facebook API'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-8589511600325564304</id><published>2007-08-12T22:40:00.000+01:00</published><updated>2007-08-12T22:56:27.652+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='applets'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><title type='text'>Client Side Technologies.</title><content type='html'>Facebook Trumps is a game, which would imply quite a great deal of interaction between the user and the web application. For scalability reasons I wanted the client part of the web application, running in the browser, to do a lot of the work. If a HTTP roundtrip is required everytime an action occurs or decision needs to be made my server is going to get very busy.&lt;br /&gt;&lt;br /&gt;This implies quite a "fat" client, however the option I was anxious to avoid was applets (&lt;a href="http://java.sun.com/applets/"&gt;http://java.sun.com/applets/&lt;/a&gt;). I've seen some applets which work well - but their major pitfall is that they are basically desktop applications- albeit running in a sandbox spawned "through" a browser. Also you that "clunk" delay as the JVM initialises and the applet loads (that is if the user has a JVM installed!).&lt;br /&gt;&lt;br /&gt;Much better to my mind is the Google Web Toolkit (&lt;a href="http://code.google.com/webtoolkit/"&gt;http://code.google.com/webtoolkit/&lt;/a&gt;). GWT allows GUI and other code written in the Java language to be compiled down to Javascript and then run through a browser. This seems an ideal approach for this problem, given that I have decided on Java. Any standards based browser can display the interface created, and yet I can work in the Java language.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/8589511600325564304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=8589511600325564304&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/8589511600325564304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/8589511600325564304'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/client-side-technologies.html' title='Client Side Technologies.'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-1307163609733435482</id><published>2007-08-12T15:59:00.001+01:00</published><updated>2007-08-12T22:49:14.350+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Language Choice: Java</title><content type='html'>Plain HTML would not cut it for an interactive Trumps game. Many alternate web technologies exist however, many choices. For the client the instant favorite is Flash (&lt;a href="http://en.wikipedia.org/wiki/Macromedia_Flash"&gt;http://en.wikipedia.org/wiki/Macromedia_Flash&lt;/a&gt;) and for the server most straightforward would be PHP (&lt;a href="http://en.wikipedia.org/wiki/Php"&gt;http://en.wikipedia.org/wiki/Php&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;I chose Java. Java is a "proper" programming language - it is object oriented, typesafe and it is backed by two massive corporations (&lt;a href="http://java.sun.com/"&gt;http://java.sun.com/&lt;/a&gt; and &lt;a href="http://www.ibm.com/developerworks/java"&gt;http://www.ibm.com/developerworks/java&lt;/a&gt;). As I see in my day to day job massive corporations use Java to create complex business systems.&lt;br /&gt;&lt;br /&gt;Skills gained in this language I believe will have more value than more lightweight languages such as PHP or "designer" oriented packages like Flash. Java is also free, unlike .Net, but very similar both in syntax and architecture (&lt;a href="http://www.google.com/search?q=java+c%23"&gt;http://www.google.com/search?q=java+c%23&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;The real alternate which offered itself was Ruby, or its web component, Rails (&lt;a href="http://www.rubyonrails.org/"&gt;http://www.rubyonrails.org/&lt;/a&gt;). So many comments about this language rave about it and say how productive it is, and how it encourages you not to reinvent wheels. Both of these arguments are tempting, however for now I feel Java is more established, and for now, a better skill to learn.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/1307163609733435482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=1307163609733435482&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/1307163609733435482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/1307163609733435482'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/platform-choice-java.html' title='Language Choice: Java'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-8972843379907430472</id><published>2007-08-12T15:52:00.001+01:00</published><updated>2007-08-12T22:25:18.537+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='application'/><category scheme='http://www.blogger.com/atom/ns#' term='desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Platform Choice: The Web</title><content type='html'>The cart here comes slightly before the horse. Strictly, I believe a desktop application would be a more suitable form for a game. The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Facebook&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;API&lt;/span&gt;, which is required to access the friends this game is predicated upon, supports desktop applications so this certainly would have been an option.&lt;br /&gt;&lt;br /&gt;The web, however, is the future- that is plainly how it seems to me. The web primarily is where I should like to gather skills and so I have chosen that this game will be browser based.&lt;br /&gt;&lt;br /&gt;Other &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;advantages&lt;/span&gt; exist, of course. The game becomes more accessible as the user does not have to download installation packages and run installers. The web has a far greater propensity to allow code to be platform neutral. The game must use the web as its platform.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/8972843379907430472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=8972843379907430472&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/8972843379907430472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/8972843379907430472'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/platform-choice-web.html' title='Platform Choice: The Web'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-7716186029636565376</id><published>2007-08-12T14:39:00.001+01:00</published><updated>2007-08-12T22:25:48.416+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='o&apos;reilly'/><category scheme='http://www.blogger.com/atom/ns#' term='safari'/><category scheme='http://www.blogger.com/atom/ns#' term='serverside'/><category scheme='http://www.blogger.com/atom/ns#' term='developerworks'/><category scheme='http://www.blogger.com/atom/ns#' term='approach'/><title type='text'>Sensible Design</title><content type='html'>I'm not a professional programmer, I did some programming at university and am exposed to the consequences of other people's code at work. Making a Trumps game from Facebook friends is not the most complex or difficult thing to do - however I want to do it right; as simple and as sensible as I can.&lt;br /&gt;&lt;br /&gt;This is for two purposes - First in order that I can finish it, that it does not become lumpen and unmanageable and lead me just to give up - Second to learn, to spend sometime absorbing other people's experiences and hopefully improve my own skills. I want to become a professional programmer, and perhaps this can help.&lt;br /&gt;&lt;br /&gt;My sources of wisdom, in other words what I have studied, are books blogs and articles from the Internet. O'Reilly have a service called Safari (&lt;a href="http://safari.oreilly.com/"&gt;http://safari.oreilly.com/&lt;/a&gt;) which I have been able to join. There are masses of software engineering and coding books on there. I have alse been able to follow discussions on usenet (via &lt;a href="http://groups.google.com/"&gt;http://groups.google.com/&lt;/a&gt;) and application programming discussion websites (such as &lt;a href="http://www.theserverside.com/"&gt;http://www.theserverside.com/&lt;/a&gt;). Other sources of information include developer blogs and API documents.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/7716186029636565376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=7716186029636565376&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/7716186029636565376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/7716186029636565376'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/sensible-design.html' title='Sensible Design'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-431168048244566944.post-3769188172797286646</id><published>2007-08-11T08:40:00.000+01:00</published><updated>2007-08-12T23:12:48.462+01:00</updated><title type='text'>Facebook Trumps</title><content type='html'>Facebook Trumps is a game which makes use of the Facebook platform. The client part of the game is written in GWT and the backend which queries Facebook is written in Java.&lt;br /&gt;&lt;br /&gt;I am Jim Gumbley (&lt;a href="http://www.jgumbley.com/"&gt;http://www.jgumbley.com/&lt;/a&gt;) and have been creating this game for over a month now. This page is intended to support some of the decisions I have made. To actually play the game you need to log into Facebook and add it as an application.</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/3769188172797286646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=431168048244566944&amp;postID=3769188172797286646&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/3769188172797286646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/431168048244566944/posts/default/3769188172797286646'/><link rel='alternate' type='text/html' href='http://www.facebooktrumps.com/2007/08/facebook-trumps_11.html' title='Facebook Trumps'/><author><name>Jim Gumbley</name><uri>http://www.blogger.com/profile/12570823683366887121</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>