<?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>Brian Hartsock&#039;s Blog &#187; CSS</title>
	<atom:link href="http://blog.brianhartsock.com/category/programming/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.brianhartsock.com</link>
	<description>The exciting life of a software developer and nerd</description>
	<lastBuildDate>Thu, 29 Jul 2010 02:40:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>A better web framework &#8211; Part 1</title>
		<link>http://blog.brianhartsock.com/2007/04/09/a-better-web-framework-part-1/</link>
		<comments>http://blog.brianhartsock.com/2007/04/09/a-better-web-framework-part-1/#comments</comments>
		<pubDate>Tue, 10 Apr 2007 01:27:35 +0000</pubDate>
		<dc:creator>bhartsock</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.brianhartsock.com/?p=20</guid>
		<description><![CDATA[As I have mentioned before, design patterns are one of my favorite areas of computer science. Well, design patterns have a close association with web frameworks, so web frameworks are definitely another favorite area of mine. They both help speed up the development process by providing a structure for applications. Since Ruby on Rails took [...]]]></description>
			<content:encoded><![CDATA[<p>As I have mentioned before, design patterns are one of my favorite areas of computer science.   Well, design patterns have a close association with web frameworks, so web frameworks are definitely another favorite area of mine.  They both help speed up the development process by providing a structure for applications.  Since Ruby on Rails took off a couple years ago, other web frameworks have sprung up in many other languages.  None of these have met my needs at Webmail.us.</p>
<p>The webmail application I work on is very different than many other Web 2.0 applications, which is why most of the existing frameworks don&#8217;t work for us.</p>
<ul>
<li>There are no page refreshes and therefore:
<ul>
<li>Most drawing is done by Javascript</li>
<li>All data transfered is JSON encoded</li>
</ul>
</li>
<li>Email, Calendar, Tasks, Contacts, Settings are all combined into 1 application which means:
<ul>
<li>Large memory footprint</li>
<li>Javascript performance very important</li>
<li>On the fly loading of HTML, Javascript, and CSS is a must</li>
</ul>
</li>
</ul>
<p>For the past few months, I have been thinking about what I really need in a web framework.  Just like Rails, an MVC framework would need to be the base.  In Part 1, I will just talk about the MVC foundation for this framework.</p>
<h3>Model</h3>
<p>An ActiveRecord type object would provide the MySQL data abstraction.  I have mentioned that I have been working on my own implementation for a while, so I won&#8217;t go into too much detail on this.  Basically, for a complicated web application, most existing model abstractions don&#8217;t work very well.  With complicated JOIN&#8217;s, WHERE&#8217;s, and subquerys, something different must be used.</p>
<h3>View</h3>
<p>A templating mechanism must exist to have a complete web framework.  Current view abstractions won&#8217;t work in webmail.  Since webmail never refreshes, going to the server every time we need to populate a template is troublesome.  The templating mechanism in the better web framework would allow a template to be used in PHP or in Javascript.</p>
<p>If a template is used in Javascript, once it is downloaded once, it wouldn&#8217;t have to be downloaded again.  The hard part about a Javascript template is the inability to have loops and the need for slow regular expression parsing.</p>
<p>If a template request in Javascript has to make a server request every time a template needs to be populated, speed becomes an issue.  This is fine for large templates, but what about small widget templates?  Making a server request for a small element increases 1. latency and 2. server load which in turn increases latency even more.</p>
<h3>Controller</h3>
<p>Controllers are the backbone of a web framework.  I like how Rail works with a controller class where each data request is mapped to a function call.  This seems effective to me and needs little modification.</p>
<h3>Conclusion</h3>
<p>I know what you must be thinking: Your MVC design isn&#8217;t that much different than Rails.  Well, that&#8217;s true, but remember this is part 1.  The MVC design is just the foundation of a better web framework.  Rails is popular because it is useful, so it is definitely a good starting point for developing a new framework.</p>
<p>Shout out to Mike for his work on Javascript templates.</p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@brianhartsock+A+better+web+framework+%E2%80%93+Part+1+http://bit.ly/RcbzK" title="Post to Twitter"><img class="nothumb" src="http://blog.brianhartsock.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://blog.brianhartsock.com/2007/04/09/a-better-web-framework-part-1/&amp;title=A+better+web+framework+%E2%80%93+Part+1" title="Post to Digg"><img class="nothumb" src="http://blog.brianhartsock.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://blog.brianhartsock.com/2007/04/09/a-better-web-framework-part-1/&amp;t=A+better+web+framework+%E2%80%93+Part+1" title="Post to Facebook"><img class="nothumb" src="http://blog.brianhartsock.com/wp-content/plugins/tweet-this/icons/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://blog.brianhartsock.com/2007/04/09/a-better-web-framework-part-1/&amp;title=A+better+web+framework+%E2%80%93+Part+1" title="Post to Reddit"><img class="nothumb" src="http://blog.brianhartsock.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.brianhartsock.com/2007/04/09/a-better-web-framework-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using overflow:hidden in tables</title>
		<link>http://blog.brianhartsock.com/2007/03/21/using-overflowhidden-in-tables/</link>
		<comments>http://blog.brianhartsock.com/2007/03/21/using-overflowhidden-in-tables/#comments</comments>
		<pubDate>Thu, 22 Mar 2007 01:02:01 +0000</pubDate>
		<dc:creator>bhartsock</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://blog.brianhartsock.com/?p=16</guid>
		<description><![CDATA[Until today, I never used the CSS properties overflow: hidden and white-space: nowrap on table cells. I always thought it was useless, since it never seemed to work for me. As a disclaimer, I am not a CSS guru. In fact, CSS is probably where I am least knowledgable in web development. Fortunately, I ran [...]]]></description>
			<content:encoded><![CDATA[<p>Until today, I never used the CSS properties <em>overflow: hidden</em> and <em>white-space: nowrap</em> on table cells.  I always thought it was useless, since it never seemed to work for me.  As a disclaimer, I am not a CSS guru.  In fact, CSS is probably where I am least knowledgable in web development.</p>
<p>Fortunately, I ran across the <em>table-layout: fixed</em> property on the <a href="http://www.w3.org/TR/REC-CSS2/tables.html#fixed-table-layout" target="_blank">W3 website</a>.  This changes the table algorithm to just take into account the table cell width.  All that is required is the table have a width defined.  As with most great web development breakthroughs, it isn&#8217;t fully supported in IE.</p>
<p>In order to get IE to work, there is one small trick that must be used.  All data inside the table cells must have all spaces converted to  &amp;nbsp;.  This will prevent a nasty IE bug of wrapping even though the nowrap property was used.</p>
<p>Thanks to this <a href="http://www.blakems.com/archives/000077.html" target="_blank">article</a> for helping me figure out how to put all the CSS together.</p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=@brianhartsock+Using+overflow%3Ahidden+in+tables+http://bit.ly/2bFvyR" title="Post to Twitter"><img class="nothumb" src="http://blog.brianhartsock.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://blog.brianhartsock.com/2007/03/21/using-overflowhidden-in-tables/&amp;title=Using+overflow%3Ahidden+in+tables" title="Post to Digg"><img class="nothumb" src="http://blog.brianhartsock.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://blog.brianhartsock.com/2007/03/21/using-overflowhidden-in-tables/&amp;t=Using+overflow%3Ahidden+in+tables" title="Post to Facebook"><img class="nothumb" src="http://blog.brianhartsock.com/wp-content/plugins/tweet-this/icons/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://blog.brianhartsock.com/2007/03/21/using-overflowhidden-in-tables/&amp;title=Using+overflow%3Ahidden+in+tables" title="Post to Reddit"><img class="nothumb" src="http://blog.brianhartsock.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.brianhartsock.com/2007/03/21/using-overflowhidden-in-tables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
