<?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>Identity Interface &#187; technology</title>
	<atom:link href="http://jonshern.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonshern.com</link>
	<description>I should know better</description>
	<lastBuildDate>Sat, 21 Jan 2012 23:10:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Letter to Rookie Developers</title>
		<link>http://jonshern.com/2008/10/07/letter-to-rookie-developers/</link>
		<comments>http://jonshern.com/2008/10/07/letter-to-rookie-developers/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 05:34:53 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/?p=148</guid>
		<description><![CDATA[Dear Rookie Developers
First off let me start by saying I am still a Rookie in a lot of ways. I still make plenty of stupid mistakes and I still forget to submit my hours on time:)
I have been on a few development projects and have learned a lot about how to develop software. Admittedly I [...]]]></description>
			<content:encoded><![CDATA[<p>Dear Rookie Developers</p>
<p>First off let me start by saying I am still a Rookie in a lot of ways. I still make plenty of stupid mistakes and I still forget to submit my hours on time:)</p>
<p>I have been on a few development projects and have learned a lot about how to develop software. Admittedly I still am not sure on what is the best way to develop software, but I have some advice on the pitfalls and things that I think were bright spots on my rise to programming mediocrity.</p>
<p><strong>Get help early and often. </strong></p>
<p>Don't be embarrased to ask a senior developer how he/she would implement a solution. I do it all of the time. None of us really know the best solution, we just know the best solution in relation to the solutions that we have seen.  Push for code reviews they are an invaluable tool into the mind of another developer, try and study the code before hand so you have some context on the problem at hand.</p>
<p><strong>Read code </strong></p>
<p><a href="http://www.hanselman.com/blog/CategoryView.aspx?category=Source+Code">Scott Hanselman </a>talks about it all of the time.</p>
<p>Code is interesting, how else are you going to get the best practices that are going to keep you on the good side of your developer comrades.</p>
<p><strong>Be proud of your work, but don't be afraid to throw it in garbage.</strong></p>
<p>It is great to be proud, but we need a healthy mix of pride and realism.  A lot of times I will write a method and just delete it and rewrite it. It you are doing TDD then the second time your code will probably be a lot cleaner and more efficient.</p>
<p><strong>Read <a href="http://cc2e.com/">Code Complete</a></strong></p>
<p>There is a lot of great advice in <a href="http://cc2e.com/">Code Complete</a> that every developer should be familiar with.</p>
<p><strong>Start out thinking about testing</strong></p>
<p>When you start coding, think about how easy it will be test this method. The more you do that the easier the jump TDD will become.</p>
<p><strong>Learn new languages </strong></p>
<p>As computer scientists we are abstract thinkers. That is one of the many reasons that math is taught to us.  It gears us up for the abstractions that are on the horizon. By learning new programming languages we learn on how to approach a problem on a whole new level. It can also help us identify improvements that can be made in our process. Just look at what has happened in the Java world, and the .net world. Seems like we have a constant trickle of Java tools being ported over to the .net world.</p>
<p>These are just a couple of things you can do to improve your craft. But keep in mind development is like a trade. When you first start out we are all just apprentices, we learn from others on the best ways to approch problems, and code. We perfect our craft and hopefully one day we will be masters at our trade.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2008/10/07/letter-to-rookie-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database Edition now available from msdn</title>
		<link>http://jonshern.com/2008/10/01/database-edition-now-available-from-msdn/</link>
		<comments>http://jonshern.com/2008/10/01/database-edition-now-available-from-msdn/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 20:28:39 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/?p=146</guid>
		<description><![CDATA[Just noticed that Database Edition is available to download with my msdn subscription.
Before it was about $3000 to buy, I wonder why there are just giving it away now?
I supect it has to do with the fact that currect dbas are heavily entrenched in their tools and practices, and don't want to change.  By giving [...]]]></description>
			<content:encoded><![CDATA[<p>Just noticed that Database Edition is available to download with my msdn subscription.</p>
<p>Before it was about $3000 to buy, I wonder why there are just giving it away now?</p>
<p>I supect it has to do with the fact that currect dbas are heavily entrenched in their tools and practices, and don't want to change.  By giving it away for free, they can get the developers on board and get them to show the dbas how nice the tool works.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2008/10/01/database-edition-now-available-from-msdn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conveying Complexity with Simple examples or analogies</title>
		<link>http://jonshern.com/2008/09/04/conveying-complexity-with-simple-examples-or-analogies/</link>
		<comments>http://jonshern.com/2008/09/04/conveying-complexity-with-simple-examples-or-analogies/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 02:00:31 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/?p=144</guid>
		<description><![CDATA[Google just released there new browser Google Chrome
It is beatifully simple piece of coding, in which each tab is broken into its own process.
Each process can then spawn child process which correspond to various plugins, such as shockwave flash, etc.
This is a great way to isolate your processes from other errors, essentially it is a [...]]]></description>
			<content:encoded><![CDATA[<p>Google just released there new browser <a href="http://www.google.com/chrome">Google Chrome</a></p>
<p>It is beatifully simple piece of coding, in which each tab is broken into its own process.</p>
<p>Each process can then spawn child process which correspond to various plugins, such as <a href="http://www.adobe.com/products/shockwaveplayer/">shockwave flash</a>, etc.</p>
<p>This is a great way to isolate your processes from other errors, essentially it is a mini-os wrapped in a browser.</p>
<p>This can be a difficult concept to wrap your head around and the cartoon that was produced is an excellent way to understand the nuts and bolts.</p>
<p><strong>Some cartoons that convey difficult concepts.</strong></p>
<p><a href="http://www.google.com/googlebooks/chrome/">Google Chrome</a></p>
<p><a href="http://www.skyscrapr.net/blogs/video/archive/2006/03/10/46.aspx">Why we need architects</a></p>
<p><a href="http://www.hitachigst.com/hdd/research/recording_head/pr/PerpendicularAnimation.html">What is perpendicular storage</a></p>
<p><a href="http://www.amazon.com/Head-First-Design-Patterns/dp/0596007124">Design Patterns</a></p>
<p>SOA is something that is often defined using analogies such as Legos,  Transportation, or the post office.</p>
<p>It pays to think of things at their simplest level, it will really be helpful for you when attempting to convince others or your brilliance:)</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2008/09/04/conveying-complexity-with-simple-examples-or-analogies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with the Google App Engine.</title>
		<link>http://jonshern.com/2008/05/18/getting-started-with-the-google-app-engine/</link>
		<comments>http://jonshern.com/2008/05/18/getting-started-with-the-google-app-engine/#comments</comments>
		<pubDate>Sun, 18 May 2008 11:30:43 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/?p=105</guid>
		<description><![CDATA[The tutorial goes over some basic concepts surrounding Google's App Engine Framework, demonstrates using the Google App Engine to store data, and using Django templates to create a GeoRss feed that is consumed by Google maps.
Setup your environment
I chose eclipse as my ide.
The nice thing about eclipse is if you add the lib directories of [...]]]></description>
			<content:encoded><![CDATA[<p>The tutorial goes over some basic concepts surrounding Google's App Engine Framework, demonstrates using the Google App Engine to store data, and using Django templates to create a GeoRss feed that is consumed by Google maps.</p>
<p><strong>Setup your environment</strong></p>
<p>I chose eclipse as my ide.<br />
The nice thing about eclipse is if you add the lib directories of whatever you are using (including the Google App Engine) you will get some intellisense.</p>
<p>Download the necessary components.<br />
<a href="https://www.google.com/accounts/ServiceLogin?service=ah&#038;continue=http://appengine.google.com/_ah/login%3Fcontinue%3Dhttp://appengine.google.com/&#038;ltmpl=ae&#038;sig=2441550b0617bb4eb9e7f8c3eb9e63b1">Google app engine</a><br />
<a href="http://www.eclipse.org/downloads/">Eclipse</a><br />
<a href="http://www.fabioz.com/pydev/manual_101_install.html">Installing Pydev</a><br />
The documentation helped, but the link was bad. I used http://pydev.sf.net/updates/.</p>
<p><strong>The guts of the python file</strong></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">cgi</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> wsgiref.<span style="color: black;">handlers</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> google.<span style="color: black;">appengine</span>.<span style="color: black;">api</span> <span style="color: #ff7700;font-weight:bold;">import</span> users
<span style="color: #ff7700;font-weight:bold;">from</span> google.<span style="color: black;">appengine</span>.<span style="color: black;">ext</span> <span style="color: #ff7700;font-weight:bold;">import</span> webapp
<span style="color: #ff7700;font-weight:bold;">from</span> google.<span style="color: black;">appengine</span>.<span style="color: black;">ext</span> <span style="color: #ff7700;font-weight:bold;">import</span> db
<span style="color: #ff7700;font-weight:bold;">from</span> google.<span style="color: black;">appengine</span>.<span style="color: black;">ext</span>.<span style="color: black;">webapp</span> <span style="color: #ff7700;font-weight:bold;">import</span> template
&nbsp;
_DEBUG=<span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Business<span style="color: black;">&#40;</span>db.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    ......
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    application = webapp.<span style="color: black;">WSGIApplication</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>
            <span style="color: black;">&#40;</span><span style="color: #483d8b;">'/'</span>,MainPage<span style="color: black;">&#41;</span>,
            <span style="color: black;">&#40;</span><span style="color: #483d8b;">'/createbusiness.do'</span>,BusinessSignup<span style="color: black;">&#41;</span>,
            <span style="color: black;">&#40;</span><span style="color: #483d8b;">'/georssfeed.xml'</span>,GeoRssFeed<span style="color: black;">&#41;</span>
            <span style="color: black;">&#93;</span>,debug=_DEBUG<span style="color: black;">&#41;</span>
    wsgiref.<span style="color: black;">handlers</span>.<span style="color: black;">CGIHandler</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">run</span><span style="color: black;">&#40;</span>application<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">&quot;__main__&quot;</span>:
    main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>The main method is where we map our urls to the classes we have defined within the python file.<br />
Each class that handles requests should have a get or a post method.<br />
When a get or a post occurs it will be routed automagically to the appropriate method.</p>
<p><strong>Creating the table</strong></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> Business<span style="color: black;">&#40;</span>db.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    name = db.<span style="color: black;">StringProperty</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    description = db.<span style="color: black;">StringProperty</span><span style="color: black;">&#40;</span>multiline=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
    url = db.<span style="color: black;">URLProperty</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    location = db.<span style="color: black;">StringProperty</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    latitude = db.<span style="color: black;">StringProperty</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    longitude = db.<span style="color: black;">StringProperty</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    address = db.<span style="color: black;">StringProperty</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    created = db.<span style="color: black;">DateTimeProperty</span><span style="color: black;">&#40;</span>auto_now_add=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Description can contain line breaks so we specify multiline=True<br />
Created is of type DateTime and has the property auto_now_add set to true<br />
created is set to the current time the first time the model instance is stored in the datastore, unless the property has already been assigned a value.</p>
<p>There is also an auto_now property that can be used to set the current time each time the record is created or updated. Useful for modified dates.</p>
<p><strong><br />
Handling the request</strong></p>
<p>In one of googles examples(Task List) they used a base class for the request.<br />
Here is my modified version.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> BaseRequestHandler<span style="color: black;">&#40;</span>webapp.<span style="color: black;">RequestHandler</span><span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;Supplies a common template generation function&quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> generate<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,template_name,template_values=<span style="color: black;">&#123;</span><span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>:
        values = <span style="color: black;">&#123;</span>
                  <span style="color: #483d8b;">'request'</span>: <span style="color: #008000;">self</span>.<span style="color: black;">request</span>,
                  <span style="color: #483d8b;">'debug'</span>: <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'deb'</span><span style="color: black;">&#41;</span>,
                  <span style="color: #483d8b;">'application_name'</span>: <span style="color: #483d8b;">'Local Business Directory'</span>
                  <span style="color: black;">&#125;</span>
&nbsp;
        values.<span style="color: black;">update</span><span style="color: black;">&#40;</span>template_values<span style="color: black;">&#41;</span>
        directory = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">dirname</span><span style="color: black;">&#40;</span>__file__<span style="color: black;">&#41;</span>
        path = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>directory,<span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'templates'</span>,template_name<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">response</span>.<span style="color: black;">out</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span>template.<span style="color: black;">render</span><span style="color: black;">&#40;</span>path,values,debug=_DEBUG<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>This does a few nice things.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">        values = <span style="color: black;">&#123;</span>
                  <span style="color: #483d8b;">'request'</span>: <span style="color: #008000;">self</span>.<span style="color: black;">request</span>,
                  <span style="color: #483d8b;">'debug'</span>: <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'deb'</span><span style="color: black;">&#41;</span>,
                  <span style="color: #483d8b;">'application_name'</span>: <span style="color: #483d8b;">'Local Business Directory'</span>
                  <span style="color: black;">&#125;</span>
        values.<span style="color: black;">update</span><span style="color: black;">&#40;</span>template_values<span style="color: black;">&#41;</span></pre></div></div>

<p>This sets up an array of base values that will be passed into the template.<br />
In other methods that use base request, we will add other objects to this array. So our html templates can process data.<br />
The last line values.update is where the two arrays gets merged.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">        path = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>directory,<span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'templates'</span>,template_name<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>In this application I created a templates folder to separate the html from the code. This line just adds the template_name to the /templates path.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">    <span style="color: #008000;">self</span>.<span style="color: black;">response</span>.<span style="color: black;">out</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span>template.<span style="color: black;">render</span><span style="color: black;">&#40;</span>path,values,debug=_DEBUG<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>And finally<br />
Write the request out.</p>
<p>Using the BaseRequestHandler</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> MainPage<span style="color: black;">&#40;</span>BaseRequestHandler<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> get<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
&nbsp;
        <span style="color: #808080; font-style: italic;">#Get all of the businesses</span>
        businesses = Business.<span style="color: #008000;">all</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">order</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-created'</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #008000;">self</span>.<span style="color: black;">generate</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'index.html'</span>, <span style="color: black;">&#123;</span>
                                     <span style="color: #483d8b;">'businesses'</span>: businesses
                                     <span style="color: black;">&#125;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Here is a simple example of querying all of the businesses ordered by created date.<br />
We then call the generate method on the BaseRequestHandler, passing in our additional objects, along with the template name.</p>
<p><strong>Using Templates</strong><br />
The Google App Engine uses the Django templating engine.  W00t</p>
<p>The for loop</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> <span style="color: #ff7700;font-weight:bold;">for</span> athlete <span style="color: #ff7700;font-weight:bold;">in</span> athlete_list <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
    <span style="color: #66cc66;">&lt;</span>li<span style="color: #66cc66;">&gt;</span><span style="color: black;">&#123;</span><span style="color: black;">&#123;</span> athlete.<span style="color: black;">name</span> <span style="color: black;">&#125;</span><span style="color: black;">&#125;</span><span style="color: #66cc66;">&lt;</span>/li<span style="color: #66cc66;">&gt;</span>
<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> endfor <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span></pre></div></div>

<p>The if statement(there are several varieties)</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> <span style="color: #ff7700;font-weight:bold;">if</span> athlete_list <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
    Number of athletes: <span style="color: black;">&#123;</span><span style="color: black;">&#123;</span> athlete_list|length <span style="color: black;">&#125;</span><span style="color: black;">&#125;</span>
<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> <span style="color: #ff7700;font-weight:bold;">else</span> <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
    No athletes.
<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> endif <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
&nbsp;
<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> ifequal <span style="color: #dc143c;">user</span>.<span style="color: #008000;">id</span> comment.<span style="color: black;">user_id</span> <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
    ...
<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> endifequal <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span></pre></div></div>

<p>In the spirit of python, there are a lot of functions that Django gives you.<br />
Examples:<br />
timesince: Formats a date as the time since that date (e.g., “4 days, 6 hours”).<br />
phone2numeric: Converts a phone number (possibly containing letters) to its numerical equivalent. For example, '800-COLLECT' will be converted to '800-2655328'.</p>
<p><a href="http://www.djangoproject.com/documentation/templates/">More Information on Django templates</a></p>
<p>In order to display a list of businesses I am just using a simple for loop and creating a row each time.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;table&quot;&gt;
	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Business Name&lt;/th&gt;
			&lt;th&gt;Address(Address, City, State)&lt;/th&gt;
			&lt;th&gt;Description&lt;/th&gt;
			&lt;th&gt;Url&lt;/th&gt;
			&lt;th&gt;Location&lt;/th&gt;
			&lt;th&gt;Latitude&lt;/th&gt;
			&lt;th&gt;Longitude&lt;/th&gt;
		&lt;/tr&gt;
		&lt;/tr&gt;
		{% for business in businesses %}
		&lt;tr id=&quot;row{{ forloop.counter}}&quot;&gt;
		&lt;td class=&quot;main&quot; 
		  &lt;div class=&quot;name&quot;&gt;{{ business.name }}&lt;/div&gt;
		&lt;/td&gt;
		&lt;td class=&quot;members&quot;&gt;
			{{ business.address }}
		&lt;/td&gt;
		&lt;td class=&quot;members&quot;&gt;
			{{ business.description }}
		&lt;/td&gt;
		&lt;td class=&quot;members&quot;&gt;
			{{ business.url }}
		&lt;/td&gt;
		&lt;td class=&quot;members&quot;&gt;
			{{ business.location }}
		&lt;/td&gt;
		&lt;td class=&quot;members&quot;&gt;
			{{ business.latitude }}
		&lt;/td&gt;
		&lt;td class=&quot;members&quot;&gt;
			{{ business.longitude }}
		&lt;/td&gt;
&nbsp;
		&lt;/tr&gt;
		{% endfor %}
	&lt;/table&gt;
&lt;/div&gt;</pre></div></div>

<p><strong>Entering Data</strong></p>
<p>Two pieces of code were necessary for this<br />
Plumbing in the python file</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> BusinessSignup<span style="color: black;">&#40;</span>webapp.<span style="color: black;">RequestHandler</span><span style="color: black;">&#41;</span>:    
    <span style="color: #ff7700;font-weight:bold;">def</span> post<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        business = Business<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
        business.<span style="color: black;">name</span> = <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;txtBusinessName&quot;</span><span style="color: black;">&#41;</span>
        business.<span style="color: black;">address</span> = <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'txtAddress'</span><span style="color: black;">&#41;</span>
        business.<span style="color: black;">description</span> = <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'txtDescription'</span><span style="color: black;">&#41;</span>
        business.<span style="color: black;">url</span> = <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'txtUrl'</span><span style="color: black;">&#41;</span>
        business.<span style="color: black;">location</span> = <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'txtLocation'</span><span style="color: black;">&#41;</span>
        business.<span style="color: black;">latitude</span> = <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'txtLatitude'</span><span style="color: black;">&#41;</span>
        business.<span style="color: black;">longitude</span> = <span style="color: #008000;">self</span>.<span style="color: black;">request</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'txtLongitude'</span><span style="color: black;">&#41;</span>
&nbsp;
        business.<span style="color: black;">put</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">redirect</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'/'</span><span style="color: black;">&#41;</span></pre></div></div>

<p>This just grabs from the data from the request and sets each property on our business object.<br />
Then calls put.<br />
put is an instance method that saves the data to the database.<br />
delete, to_xml, is_saved, are a couple of other useful instance methods.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">    &lt;form action=&quot;/createbusiness.do&quot; method=&quot;post&quot; id=&quot;businessform&quot;&gt;</pre></div></div>

<p>Tells the form to post to the specified address.</p>
<p><strong>Bringing it all together</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">application: yourapplication
version: 1
runtime: python
api_version: 1
&nbsp;
handlers:
- url: /static
  static_dir: static
&nbsp;
- url: /.*
  script: localbusinesslocator.py</pre></div></div>

<p>The app.yaml is where your external url mapping occurs.<br />
If you wanted to use several python files, this is where that would happen.<br />
More Info can be found <a href="http://code.google.com/appengine/docs/configuringanapp.html">here</a></p>
<p>Testing the application<br />
usr/local/google_appengine/dev_appserver.py /sourcedirectory/</p>
<p>Hopefully this fills in some gaps left by <a href="http://code.google.com/appengine/docs/gettingstarted/">Googles tutorial.</a></p>
<p>The next installment of the series will go over displaying the data in the GeoRss format and displaying it on google maps.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2008/05/18/getting-started-with-the-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Modeling using Enterprise Architect</title>
		<link>http://jonshern.com/2008/04/12/modeling-using-enterprise-architect/</link>
		<comments>http://jonshern.com/2008/04/12/modeling-using-enterprise-architect/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 19:47:11 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/2008/04/12/modeling-using-enterprise-architect/</guid>
		<description><![CDATA[Recently I have been introduced to a new modeling tool called Enterprise Architect.
It is truly a great product for a great price.
It has full support for UML 2.1.
They have a robust and easy solution for distributed teams that have a need to access design artifacts.
Artifact Store
Local File or Shared Network Store
As with any modeling software [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have been introduced to a new modeling tool called <a href="http://www.sparxsystems.com.au/">Enterprise Architect</a>.<br />
It is truly a great product for a great price.<br />
It has full support for UML 2.1.</p>
<p>They have a robust and easy solution for distributed teams that have a need to access design artifacts.</p>
<p><strong>Artifact Store</strong></p>
<p>Local File or Shared Network Store<br />
As with any modeling software you can store a file containing your models.</p>
<p>DBMS<br />
You can easily configure SQL server to be your backend store, which allows a multi-user access to your modeling projects.</p>
<p><strong>Source Control</strong><br />
Either you can use a DBMS in conjuction with a Version Control Product (Shared Model)<br />
or you<br />
use a local file based solution with a Version Control.<br />
The major source control providers are supported out of the box, and you can add support for work item tracking in tfs with an optional plugin.</p>
<p>The price is very reasonable at $250 for an enterprise seat.<br />
Compared with $5000 for Rational Software Architect, which is comparable to Power Designer and ErWin.</p>
<p>If you want to do some serious modeling without having to sacrifice your yearly budget. I would suggest getting a few copies of enterprise architect for your team.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2008/04/12/modeling-using-enterprise-architect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time Tracking and Timing</title>
		<link>http://jonshern.com/2008/03/17/time-tracking-and-timing/</link>
		<comments>http://jonshern.com/2008/03/17/time-tracking-and-timing/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 05:01:50 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/2008/03/17/time-tracking-and-timing/</guid>
		<description><![CDATA[Slim Timer is great web based task tracker and timer.
It also has some great reporting built in.
Check it out.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.slimtimer.com">Slim Timer</a> is great web based task tracker and timer.<br />
It also has some great reporting built in.<br />
Check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2008/03/17/time-tracking-and-timing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recovering data from a computer that won&#8217;t boot and has a bad dvd rom</title>
		<link>http://jonshern.com/2007/12/03/recovering-data-from-a-computer-that-wont-boot-and-has-a-bad-dvd-rom/</link>
		<comments>http://jonshern.com/2007/12/03/recovering-data-from-a-computer-that-wont-boot-and-has-a-bad-dvd-rom/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 04:13:04 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/2007/12/03/recovering-data-from-a-computer-that-wont-boot-and-has-a-bad-dvd-rom/</guid>
		<description><![CDATA[If the computer will not boot and the dvd drive is bad. You will have to find an alternate way to boot the computer.
I used a thumbdrive since the bios supported it.
First get the thumbdrive bootable.
In order to get access to the windows drives you should do a
fdisk -l to see the physical devices.
You will [...]]]></description>
			<content:encoded><![CDATA[<p>If the computer will not boot and the dvd drive is bad. You will have to find an alternate way to boot the computer.</p>
<p>I used a thumbdrive since the bios supported it.</p>
<p><a href="http://www.pendrivelinux.com/2007/01/02/all-in-one-usb-dsl">First get the thumbdrive bootable.</a></p>
<p>In order to get access to the windows drives you should do a<br />
fdisk -l to see the physical devices.</p>
<p>You will have to mount whichever drive you need to get the data from.<br />
mkdir /mnt/windows1<br />
    mount /dev/hda1 /mnt/windows1 -t ntfs -r</p>
<p>Once you have the drive you need you can get your backup device setup.</p>
<p>I used a <a href="http://linuxhelp.blogspot.com/2007/03/steps-to-manually-mount-usb-flash-drive.html">usb hard drive</a>(beware some only turn on when active --MyBook)</p>
<p>Now you can do a copy<br />
cp -r /mnt/windows1 /mnt/usbharddrive</p>
<p>Voila you have your valuable data again.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2007/12/03/recovering-data-from-a-computer-that-wont-boot-and-has-a-bad-dvd-rom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio Freebies</title>
		<link>http://jonshern.com/2007/11/19/visual-studio-freebies/</link>
		<comments>http://jonshern.com/2007/11/19/visual-studio-freebies/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 17:50:14 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/2007/11/19/visual-studio-freebies/</guid>
		<description><![CDATA[If you register the Visual Studio 2008 Express edition.
You can get some nice freebies.
]]></description>
			<content:encoded><![CDATA[<p>If you register the Visual Studio 2008 Express edition.<br />
You can get some nice <a href="http://www.microsoft.com/express/registration/">freebies.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2007/11/19/visual-studio-freebies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grand Central Beta</title>
		<link>http://jonshern.com/2007/10/20/grand-central-beta/</link>
		<comments>http://jonshern.com/2007/10/20/grand-central-beta/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 19:43:58 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/2007/10/20/grand-central-beta/</guid>
		<description><![CDATA[Well I just got my invitation for the Grand Central Beta
Seems pretty cool so far.
The only problem I see, is google owns my number.
Would I really want to distribute it, if it can be taken away?
Probably not.
For a small business with a website, the call me button is nice.

Your customer can click the button, and [...]]]></description>
			<content:encoded><![CDATA[<p>Well I just got my invitation for the <a href="http://www.grandcentral.com">Grand Central Beta</a></p>
<p>Seems pretty cool so far.<br />
The only problem I see, is google owns my number.<br />
Would I really want to distribute it, if it can be taken away?<br />
Probably not.</p>
<p>For a small business with a website, the call me button is nice.<br />
<embed src="http://embed.grandcentral.com/webcall/068f46e07970f2cd919b0f849d51ca7b" width="227" height="93" wmode="transparent"></embed></p>
<p>Your customer can click the button, and call all of the phones you have setup.<br />
For that customer that keeps having issues, you can set them up with a peaceful ring, or just send him directly to voicemail.</p>
<p>It will nice to see some integration with google talk. When someone calls you from google talk, it can go to your grand central account.  If you are not online, it can ring your phone.</p>
<p>Seems like a nice way to blur the distinction between internet voice communication and traditional voice communication.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2007/10/20/grand-central-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Model View Presenter made easy using the Web Client Software Factory</title>
		<link>http://jonshern.com/2007/07/12/model-view-presenter-made-easy-using-the-web-client-software-factory/</link>
		<comments>http://jonshern.com/2007/07/12/model-view-presenter-made-easy-using-the-web-client-software-factory/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 03:39:06 +0000</pubDate>
		<dc:creator>Jon Shern</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jonshern.com/2007/07/12/model-view-presenter-made-easy-using-the-web-client-software-factory/</guid>
		<description><![CDATA[The Web Client Software Factory was recently released.
In past couple of weeks I have been tinkering around with Ruby on Rails and have become convinced that MVC, MVP, Supervising Controller, or Passive View is the way to go.
It is a giant step in the right direction for testability and it really makes code a lot [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.codeplex.com/websf">Web Client Software Factory</a> was recently released.</p>
<p>In past couple of weeks I have been tinkering around with Ruby on Rails and have become convinced that MVC, <a href="http://msdn.microsoft.com/msdnmag/issues/06/08/DesignPatterns/default.aspx">MVP</a>, Supervising Controller, or Passive View is the way to go.<br />
It is a giant step in the right direction for testability and it really makes code a lot easier to read.</p>
<p>I have always had a hard time implementing these patterns in asp.net. Not necessarily because it is hard, but because it is such a manual process.<br />
I tried monorail and it made me feel a little better, but it still felt a little like a hack.</p>
<p>Recently I downloaded Microsoft's Web Client Software Factory.<br />
I am very impressed. It is <a href="http://www.m-w.com/dictionary/ginormous">ginormous </a>step in the right direction.(Yep it is officially a word so I had to use it)<br />
Microsoft has really put MVP in the hands of the everyday developer.</p>
<p>Just open a project of type Web Client Factory and the whole project will be generated. </p>
<p>The Web Client Software Factory provides wizards for adding:</p>
<p>Views -- Creates a page, interface and corresponding class<br />
Business Modules -- Module that contains web pages, page flows, business logic, etc.<br />
Foundational Modules  -- Module that does not contain web pages. </p>
<p>Test projects can be automatically generated for the Business Modules and Foundational Modules.</p>
<p>The test project contains mocked tests for the view, controller, and a mock for the underlying data.</p>
<p><a href="http://www.codeplex.com/websf/Wiki/View.aspx?title=Developing%20Web%20Client%20Applications&#038;referringTitle=Getting%20Started">Summary of encapsulated functionality</a></p>
<p>The timing is perfect.<br />
I still have a few days to get to Barnes and Noble and return my Rails books:)</p>
]]></content:encoded>
			<wfw:commentRss>http://jonshern.com/2007/07/12/model-view-presenter-made-easy-using-the-web-client-software-factory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

