<?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>Hugo Bonacci&#039;s Blog</title>
	<atom:link href="http://lostechies.com/hugobonacci/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/hugobonacci</link>
	<description>Designer, Developer, Geek dad</description>
	<lastBuildDate>Sat, 27 Aug 2011 16:34:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Sorting Spaces In Lion</title>
		<link>http://lostechies.com/hugobonacci/2011/08/27/sorting-spaces-in-lion/</link>
		<comments>http://lostechies.com/hugobonacci/2011/08/27/sorting-spaces-in-lion/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 16:34:41 +0000</pubDate>
		<dc:creator>Hugo Bonacci</dc:creator>
				<category><![CDATA[General Posts]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Organization]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Wallpapers]]></category>

		<guid isPermaLink="false">http://lostechies.com/hugobonacci/?p=29</guid>
		<description><![CDATA[I&#8217;ve made quite a few changes to how I work over the years, specifically my monitor count. I&#8217;ve tried varieties of one, two and even three monitors. But interestingly, for me, one large monitor seems perfect&#8230; well, almost&#8230; Obviously, you&#160;&#8230; <a href="http://lostechies.com/hugobonacci/2011/08/27/sorting-spaces-in-lion/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made quite a few changes to how I work over the years, specifically my monitor count. I&#8217;ve tried varieties of one, two and even three monitors. But interestingly, for me, one large monitor seems perfect&#8230; well, almost&#8230;</p>
<p>Obviously, you can only fit so much on a single screen before you end up with a noisy mess of windows and documents.</p>
<p>This is one of the reasons why I like Spaces so much and they work even better(ish) in the most recent version of OSX Lion.</p>
<p><a href="http://hugoware.com/blog/sorting-spaces-in-lion/desktop-full.png"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/mission-control.jpg" width="600px" /></a></p>
<p>What I&#8217;ve done is set a unique background to a desktop and then assigned related apps so that they stay with the view. This makes it easy to keep my desktop organized without needing multiple monitors.</p>
<p><a href="http://hugoware.com/blog/sorting-spaces-in-lion/assign.png"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/assign.png" /></a></p>
<p>Some apps I don&#8217;t assign to a specific desktop (browsers). In some cases it might make sense to assign them to all desktops so they are easier to access (for example, Finder).</p>
<h3>The Wallpapers</h3>
<p>Feel free to use the wallpapers and if you can think of one that is missing, let me know (Include the text and a link to the icon use). Obviously, you can use any apps for the backgrounds but below are some suggestions.</p>
<style type="text/css" >
#wallpapers img { width : 240px; }
</style>
<table id="wallpapers" cellpadding="0" cellspacing="0" >
<tr>
<td><a href="http://hugoware.com/blog/sorting-spaces-in-lion/code.jpg"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/code-preview.jpg" /></a></td>
<td><a href="http://hugoware.com/blog/sorting-spaces-in-lion/design.jpg"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/design-preview.jpg" alt="" /> </a></td>
</tr>
<tr>
<td><a href="http://hugoware.com/blog/sorting-spaces-in-lion/explore.jpg"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/explore-preview.jpg" /></td>
<td><a href="http://hugoware.com/blog/sorting-spaces-in-lion/markup.jpg"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/markup-preview.jpg" alt="" /> </a></td>
</tr>
<tr>
<td><a href="http://hugoware.com/blog/sorting-spaces-in-lion/command.jpg"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/command-preview.jpg"/> </a></td>
<td><a href="http://hugoware.com/blog/sorting-spaces-in-lion/communicate.jpg"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/communicate-preview.jpg" /> </a></td>
</tr>
<tr>
<td><a href="http://hugoware.com/blog/sorting-spaces-in-lion/music.jpg"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/music-preview.jpg" /> </a></td>
<td><a href="http://hugoware.com/blog/sorting-spaces-in-lion/unassigned.jpg"> <img src="http://hugoware.com/blog/sorting-spaces-in-lion/unassigned-preview.jpg" /> </a></td>
</tr>
</table>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/hugobonacci/2011/08/27/sorting-spaces-in-lion/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Templates With Razor</title>
		<link>http://lostechies.com/hugobonacci/2011/07/11/templates-with-razor/</link>
		<comments>http://lostechies.com/hugobonacci/2011/07/11/templates-with-razor/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 05:05:33 +0000</pubDate>
		<dc:creator>Hugo Bonacci</dc:creator>
				<category><![CDATA[General Posts]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Razor]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://lostechies.com/hugobonacci/?p=8</guid>
		<description><![CDATA[Razor is a great way to create views with ASP.NET MVC. One feature I use quite often are custom helpers. Instead of duplicating the same few lines of markup I simply create a reusable helper to generate HTML. For example,&#160;&#8230; <a href="http://lostechies.com/hugobonacci/2011/07/11/templates-with-razor/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Razor is a great way to create views with ASP.NET MVC. One feature I use quite often are custom helpers. Instead of duplicating the same few lines of markup I simply create a reusable helper to generate HTML.</p>
<p>For example, you could create a helper to do something simple like render out a series of values&#8230;</p>
<pre class="brush: csharp" >@helper tabs(params Tab[] tabs) {
&lt;ul>
  @foreach(var tab in tabs) {
  &lt;li>&lt;a href="@tab.Url" >@tab.Text&lt;/a>&lt;/li>
  }
&lt;/ul>
}</pre>
<p>Then use the helper by providing the parameters it needs&#8230;</p>
<pre class="brush: csharp" >@tabs(
  new Tab { Text = "Google.com", Url = "http://google.com" },
  new Tab { Text = "Hugoware.net", Url = "http://hugoware.net" },
  new Tab { Text = "LosTechies.com", Url = "http://lostechies.com" })</pre>
<p>This works pretty well for the most part but it is pretty limited in what it can do. Lets look at another approach.</p>
<h3>Providing A &#8216;Template&#8217;</h3>
<p>In the previous example values were passed into the helper and used to generate the markup required. This time, the helper accepts slightly different arguments that will allow a bit more control.</p>
<pre class="brush: csharp" >@helper dialog(string title, 
    Func&lt;object, object> content) {
    &lt;div class="dialog-box" >
      &lt;h3>@title&lt;/h3>
      &lt;div class="dialog-box-content" >
        @content(null)
      &lt;/div>
    &lt;/div>
    }</pre>
<p>This example uses a simple lambda (Func&lt;object, object>) as an argument to provide markup to render. This allows the Razor block (@&lt;text>&#8230;&lt;/text>) to be passed in as an argument for the helper.</p>
<pre class="brush: csharp" >@dialog("User Status", 
  @&lt;strong>User is offline!&lt;/strong>
  )</pre>
<p>Now, the content is generated by an external source!</p>
<h3>Using Types With Your Templates</h3>
<p>So far the examples have used Func&lt;object,object> as a template argument and then invoked the method with null as the argument. As it turns out, not only can you provide a value for that argument, if the argument type for the Func&lt;&#8230;> is provided then it can be used from within a template.</p>
<pre class="brush: csharp" >@helper user_status(IEnumerable&lt;User> users, 
  Func&lt;User, object> online, 
  Func&lt;User, object> offline) {
   
  &lt;div class="user-status-list" >
      &lt;div class="user-status" >
      @foreach(var user in users) {
          &lt;h3>@user.Username&lt;/h3>
           
          if (user.IsOnline) { @online(user); } 
          else { @offline(user); }
      }
      &lt;/div>
  &lt;/div>
}</pre>
<p>The helper above passes each User into the correct template. Now, a User can be referenced by using <strong>item</strong> from within the template.</p>
<pre class="brush: csharp" >@user_status(users, 
     
    online:@&lt;div class="user-online" >
      User @item.Username is online!
    &lt;/div>,
     
    offline: @&lt;div class="user-offline" >
        User @item.Username is offline!
        &lt;a href="#" >Send a message!&lt;/a>
        &lt;/div>
        )
</pre>
<p>Now, the contents of each template is unique to the User that was provided!</p>
<p><script type="text/javascript" > window.setTimeout(function() { disqus_identifier = "blog_templates_with_razor_7_12_2011"; }, 1); </script></p>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/hugobonacci/2011/07/11/templates-with-razor/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Joining Los Techies!</title>
		<link>http://lostechies.com/hugobonacci/2011/06/27/joining-los-techies/</link>
		<comments>http://lostechies.com/hugobonacci/2011/06/27/joining-los-techies/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 13:49:40 +0000</pubDate>
		<dc:creator>Hugo Bonacci</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lostechies.com/hugobonacci/?p=1</guid>
		<description><![CDATA[I&#8217;ve had a busy past couple of weeks &#8211; I&#8217;ve started a new job, packed and prepared to finalize the sale of my house &#8211; and now, I&#8217;m joining Los Techies! My name is Hugo Bonacci &#8211; I work for&#160;&#8230; <a href="http://lostechies.com/hugobonacci/2011/06/27/joining-los-techies/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a busy past couple of weeks &#8211; I&#8217;ve started a new job, packed and prepared to finalize the sale of my house &#8211; and now, <strong>I&#8217;m joining Los Techies!</strong></p>
<p>My name is Hugo Bonacci &#8211; I work for <a href="http://xamarin.com">Xamarin</a> as a designer/developer and in my spare time I write code or work on geek projects with my kids.</p>
<p>It&#8217;s hard to sum up the sorts of topics you&#8217;ll see out of me but I&#8217;ll probably be mostly focused on UI and client facing interactions with web development. You&#8217;ll see a lot of JavaScript and ASP.NET MVC (maybe a hint of Ruby from time to time until I have something worth sharing <img src='http://lostechies.com/hugobonacci/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>I&#8217;m not particularly opinionated so I won&#8217;t be posting much about the right or wrong way to do things &#8211; just interesting tips and tricks that might help as you&#8217;re creating web sites.</p>
<p>My personal site can be found at <a href="http://hugoware.com">hugoware.com</a> where you can look at some of <a href="http://hugoware.com/projects">my projects</a> and <a href="http://hugoware.com/blog">other blog posts</a>. You can also <a href="http://twitter.com/hugoware">follow me on Twitter</a>.</p>
<p>Anyways, I&#8217;m looking forward to blogging here and I&#8217;ll have more soon!
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/hugobonacci/2011/06/27/joining-los-techies/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
