<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>110j</title>
	<atom:link href="http://110j.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://110j.wordpress.com</link>
	<description>When people talk, listen completely. Most people never listen. (Ernest Hemingway)</description>
	<lastBuildDate>Mon, 12 Oct 2009 04:59:23 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='110j.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/bb8af4931d63c75dfd200b44e2e75881?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>110j</title>
		<link>http://110j.wordpress.com</link>
	</image>
			<item>
		<title>The Stripes framework</title>
		<link>http://110j.wordpress.com/2009/10/03/the-stripes-framework/</link>
		<comments>http://110j.wordpress.com/2009/10/03/the-stripes-framework/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 23:59:54 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Stripes]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Stripes Features]]></category>
		<category><![CDATA[Stripes Framework]]></category>
		<category><![CDATA[Tec]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=310</guid>
		<description><![CDATA[Choosing a java web framework is somehow a complex process, not because they are difficult to evaluate but because there are so many of them (in fact it seems that there are more java frameworks than java developers :) but having many frameworks is a good thing. It means that there is a lot of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=310&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Choosing a java web framework is somehow a complex process, not because they are difficult to evaluate but because there are so many of them (in fact it seems that there are more java frameworks than java developers :) but having many frameworks is a good thing. It means that there is a lot of competition and the competition seems to be healthy since most of the frameworks are open source, so competition is based on quality and features instead of marketing and lobbing.</p>
<p>Different people have different criteria on selecting a framework and probably different needs, so I will list my criteria an the reasoning behind them for choosing Stripes.<br />
(Disclaimer: this expresses only my views on what I expect from a framework, I don&#8217;t think there are good or bad frameworks, from my point of view there are only convenient frameworks &#8211; just trying to avoid flame war here, although flame wars entertains me a lot!).</p>
<p>I would like to start with what I consider the most annoying thing when working with a Java framework which is not other than XML configuration files. Having worked with JSF and Struts where you need to configure all your managed-beans/action-beans and pretty much everything else into an xml configuration file, which during development becomes a mess to keep it in sync, I enjoy that Stripes removes all this configuration hassle with <strong>autoloading</strong> feature. The only xml configuration file that you need is the web.xml but that is required by the Servlet specification. Configuration by exception (a.k.a convention over configuration) is the way to go, developers should focus on business solutions and not in framework configuration details that will just disturb the flow of thinking. Hopefully other framework will follow &#8211; or maybe some already does.</p>
<p>Testing is the most important part of development and therefore frameworks should come with a build-in support for testing to make this process easy. So Stripes comes with a set of mock objects that help developers to easily write unit tests.</p>
<p>Easy extension and customization. Stripes is designed in modular form it is quite easy to add a customization plugin to change the behavior of any part of the framework, because of this modular design the extensibility of Stripes is trivial. Actually This is one of the areas that the framework really make the difference.</p>
<p>I don&#8217;t think that there&#8217;s a need to explain why internationalization of web application is important, all frameworks need to have a built-in support for i18n. Stripes tags comes with a default bundle lookup strategy so that i18n is just a mutter of adding key/value pairs in the resource bundle.</p>
<p>Never trust the user input, therefore a strong and flexible validation mechanism is needed. Stripes provides a powerful validation mechanism which is based on annotations (remember there is no XML configuration).</p>
<p>When working with request parameters the most annoying process is converting Strings to objects and vise versa, the Stripes support for this process is just amazing. But it is not just conversion there is also support for formating an object to string and that&#8217;s as easy as the conversion process.</p>
<p>Stripes comes with a built in support for layouts, with three tags you can achieve pretty much everything. If the built in support for templating is not enough you can use freemarker.</p>
<p>Since we are talking about web framework and web applications it would be a pity to not take advantage of Ajax. Any Ajax framework can be used due to Stripes simple and transparent request/response nature.</p>
<p>These are some of the features that I like to see in a framework and surely you can find this features in most frameworks and probably more but the difference is that with Stripes is easy and development is fun again as the book of Frederic Daoud suggests and proves it.</p>
<p>If you want to learn Stripes I suggest the &#8220;Stripes &#8230; and Java web development is fun again&#8221; from The Pragmatic Programmers, in fact this is the only book about Stripes but even if there were more books I am totally sure that I would suggest this book again, it is very well written and it covers everything about Stripes.</p>
<p>The following is a quick list of Stripes features, which I will try to explain and give an example in future post for each one of them and link them back to this page:</p>
<p>URL Binding<br />
Built in Validation<br />
Custom Validation<br />
Type Conversion<br />
Formatting<br />
Layouts<br />
Using Freemarker<br />
Localization<br />
Exception Handling<br />
Interceptors<br />
URL Customization<br />
Ajax Integration<br />
Framework Extension<br />
Framework Customization<br />
Testing<br />
Dependency Injection (Giuce/Spring)<br />
JPA Integration<br />
Security and Encryption<br />
Cache-ing</p>
<p>The examples will be deployed on google app engine.</p>
<p>P.S: Now that the jsr 330 is approved maybe the next version of Stripes will come with build in Dependency Injection.</p>
<p>If you would like to start playing with Stripes and google app engine have a look at the following links:<br />
<a href="http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/" target="_blank">http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/</a><br />
<a href="http://110j.wordpress.com/2009/09/20/redoing-guestbook-example-with-stripes/" target="_blank">http://110j.wordpress.com/2009/09/20/redoing-guestbook-example-with-stripes/</a></p>
<p>Stripes resources:<br />
<a href="http://www.stripesframework.org/display/stripes/Home" target="_blank">Stripes Home Page</a><br />
<a href="http://www.pragprog.com/titles/fdstr/stripes" target="_blank">Stripes &#8230; and Java development is fun again</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/310/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=310&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/10/03/the-stripes-framework/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>
	</item>
		<item>
		<title>Redoing Guestbook example with Stripes</title>
		<link>http://110j.wordpress.com/2009/09/20/redoing-guestbook-example/</link>
		<comments>http://110j.wordpress.com/2009/09/20/redoing-guestbook-example/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 17:48:29 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[App Engine]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Stripes]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[JDO]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Stripes Framework]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=316</guid>
		<description><![CDATA[Google has created an example on how to use google app engine with java. In this example they demonstrate the basic usage of Servlet API and JDO, it&#8217;s a simple example that stores, retrieves and renders entities in google app engine.
After the first tutorial on how to deploy Stripes in google app engine I decided [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=316&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Google has created an example on how to use google app engine with java. In this example they demonstrate the basic usage of Servlet API and JDO, it&#8217;s a simple example that stores, retrieves and renders entities in google app engine.<br />
After the <a href="http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/" target="_blank">first tutorial</a> on how to deploy Stripes in google app engine I decided to re-write this example using the Stripes framework of course.</p>
<p><a href="http://guestbook-stripes.googlecode.com/files/Guestbook.zip" target="_self"><strong>Download the source code!</strong></a></p>
<p>Steps:</p>
<p>1. Create a project and name it Guestbook</p>
<p>2. Follow the <a href="http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/" target="_blank">Getting started with Stripes and google app engine</a> to configure Stripes</p>
<p>3. Add the JSTL jars (standard.jar and jstl.jar) in the lib directory</p>
<p>4. Create an ActionBean that will handle the greeting requests</p>
<blockquote>
<pre><code>
package com.guestbook.action;

import java.util.Date;
import java.util.List;

import javax.jdo.PersistenceManager;

import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.guestbook.manager.PMF;
import com.guestbook.model.Greeting;

/**
 * @author 110j
 */
public class GreetingActionBean implements ActionBean {
	private static final String VIEW = "/guestbook.jsp";
	private ActionBeanContext ctx;
	private UserService userService = UserServiceFactory.getUserService();
	private Greeting greeting;

	@DefaultHandler
	public Resolution welcome() {
		return new ForwardResolution(VIEW);
	}

	public Resolution addGreeting() {
		if (greeting != null) {
			greeting.setAuthor(getUser());
			greeting.setDate(new Date());

			PersistenceManager pm = PMF.get().getPersistenceManager();
	        try {
	            pm.makePersistent(greeting);
	        } finally {
	            pm.close();
	        }
		}
		return new ForwardResolution(VIEW);
	}

	public Resolution signin() {
		ForwardResolution fd = new ForwardResolution(VIEW);
		if (!userService.isUserLoggedIn())
			fd = new ForwardResolution(userService.createLoginURL("/Greeting.action"));
		return fd;
	}

	public Resolution signout() {
		ForwardResolution ForwardResolution "&gt;fd = new ForwardResolution(VIEW);
		if (userService.isUserLoggedIn())
			fd = new ForwardResolution(userService.createLogoutURL("/Greeting.action"));
		return fd;
	}

	@SuppressWarnings("unchecked")
	public List getGreetings() {
		PersistenceManager pm = PMF.get().getPersistenceManager();
		String query = "select from " + Greeting.class.getName() + " order by date desc range 0,5";
	    return (List) pm.newQuery(query).execute();
	}

	public Greeting getGreeting() {
		return greeting;
	}

	public void setGreeting(Greeting greeting) {
		this.greeting = greeting;
	}

	public User getUser() {
		return userService.getCurrentUser();
	}

	public ActionBeanContext getContext() {
		return this.ctx;
	}

	public void setContext(ActionBeanContext ctx) {
		this.ctx = ctx;
	}
}
</code></pre>
</blockquote>
<p>5. Create the model class called Greeting (as described in the google example, no changes here!)</p>
<blockquote>
<pre><code>
package com.guestbook.model;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import com.google.appengine.api.users.User;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Greeting {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private User author;

    @Persistent
    private String content;

    @Persistent
    private Date date;

    public Greeting() {}

    public Greeting(User author, String content, Date date) {
        this.author = author;
        this.content = content;
        this.date = date;
    }

    public Long getId() {
        return id;
    }

    public User getAuthor() {
        return author;
    }

    public String getContent() {
        return content;
    }

    public Date getDate() {
        return date;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}
</code></pre>
</blockquote>
<p>6. Create the utility class that will instantiate the EntityManager (no changes here also!)</p>
<blockquote>
<pre><code>package com.guestbook.manager;
import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;

public final class PMF {
    private static final PersistenceManagerFactory pmfInstance =
        JDOHelper.getPersistenceManagerFactory("transactions-optional");

    private PMF() {}

    public static PersistenceManagerFactory get() {
        return pmfInstance;
    }
}
</code></pre>
</blockquote>
<p>7. Modify the guestbook.jsp, there are a lot of changes here since in their example google uses scriptlets, I have replaced the scriptlets with jstl tags and Stripes tags, all the logic has moved to the ActionBean.</p>
<table style="width:auto;" border="0">
<tbody>
<tr>
<td><img src="http://lh4.ggpht.com/_zJMWXmr_TzU/SrY15HMZ85I/AAAAAAAAACg/yvsAnK5kwi8/s800/guest_book.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>8. Modify the welcome file list in the web.xml and set as welcome file the <strong>Greeting.action</strong></p>
<p><a href="http://guestbook-stripes.googlecode.com/files/Guestbook.zip" target="_self"><strong>Download the source code!</strong></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=316&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/09/20/redoing-guestbook-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>

		<media:content url="http://lh4.ggpht.com/_zJMWXmr_TzU/SrY15HMZ85I/AAAAAAAAACg/yvsAnK5kwi8/s800/guest_book.png" medium="image" />
	</item>
		<item>
		<title>Getting started with Stripes &amp; Google App Engine</title>
		<link>http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/</link>
		<comments>http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 01:29:48 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[App Engine]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Stripes]]></category>
		<category><![CDATA[GAE]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=298</guid>
		<description><![CDATA[This is a basic example of using Stripes Framework with the cloud infrastructure of Google. I am using Stripes in one of my projects that I am thinking to move it to google app engine so I decided to experiment before the migration. More posts will follow in this topic as I progress with it. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=298&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a basic example of using Stripes Framework with the cloud infrastructure of Google. I am using Stripes in one of my projects that I am thinking to move it to google app engine so I decided to experiment before the migration. More posts will follow in this topic as I progress with it. The first objective is to create the basic project structure, configure and deploy, well&#8230; a hello world web application. This is a trivial application but there are some limitations using google app engine so trying to use the framework as is will fail with some non-sense stack traces.</p>
<p>The following is a list of things that we will be need to complete this application:<br />
1. Stripes Framework (home page: <a href="http://www.stripesframework.org/display/stripes/Home" target="_blank">http://www.stripesframework.org/display/stripes/Home</a> )<br />
2. Google app engine sdk &#8211; if you use eclipse and google plugin the sdk is included in the plugin.<br />
3. Eclipse (you can use whatever IDE or environment you like, it&#8217;s not mandatory to use eclipse, it&#8217;s just easier).</p>
<p>Note: For information on how to install the google plugin visit <a href="http://code.google.com/appengine/docs/java/tools/eclipse.html" target="_blank">http://code.google.com/appengine/docs/java/tools/eclipse.html</a></p>
<p>I assume you are familiar with java web frameworks and that you will use eclipse with the google plugin.</p>
<p>The first step is to create a project in the eclipse IDE:<br />
<img class="alignnone" title="new project" src="http://lh3.ggpht.com/_zJMWXmr_TzU/SrQo4zxDU-I/AAAAAAAAABo/QpE0JFRNJd4/s800/1_new_project.png" alt="" width="605" height="580" /></p>
<p>Give a name to the project and an initial package name. For the moment we do not need GWT so just deselect it.<br />
<img class="alignnone" title="settings" src="http://lh3.ggpht.com/_zJMWXmr_TzU/SrQo5LvetyI/AAAAAAAAABs/H5xuyMV2cIk/s800/2_project_settings.png" alt="" width="605" height="671" /></p>
<p>After pressing finish we have the following project structure.<br />
<img class="alignnone" title="structure" src="http://lh4.ggpht.com/_zJMWXmr_TzU/SrQo5Fq_d2I/AAAAAAAAABw/j8eBGQ_6CoA/s800/3_project_stucture.png" alt="" width="388" height="521" /></p>
<p>Before continuing copy the Stripes jars in the the lib directory under hello_project/web/WEB_INF/lib and add them to the project&#8217;s build path by selecting them, right click-&gt; Build Path -&gt; Add to Build Path. Also copy and paste the StripesResources.properties in the directory &#8220;src&#8221; (not in a package).</p>
<p>By default the google plugin will generate a servlet for us, under the package name that we entered in the previews step. It will also generate the following configuration files:<br />
Servlet spec requirement:<br />
1. web.xml (this is the well known deployment descriptor required by the servlet specification)</p>
<p>Google App engine specific (we will not use them for this application):<br />
1. appengine-web.xml<br />
2. jdoconfig.xml</p>
<p>Logging property files:<br />
1. log4j.properties<br />
2. logging.properties</p>
<p>For the purpose of this trivial application we will only need to edit the web.xml (a.k.a Deployment Descriptor so from know on I will call it DD).<br />
By default the plugin registers the generated servlet in the DD, so open the DD and delete the servlet and servlet-mapping it&#8217;s not needed.</p>
<p>The following is the generated DD that need to be edited:</p>
<table style="width:auto;" border="0">
<tbody>
<tr>
<td><img src="http://lh6.ggpht.com/_zJMWXmr_TzU/SrQo5Fd9NuI/AAAAAAAAAB0/YZ-SN85McUU/s800/4_generated_web_xml.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>The following is the new and final DD containing the Stripes filter and dispatcher servlet:</p>
<table style="width:auto;" border="0">
<tbody>
<tr>
<td><img src="http://lh4.ggpht.com/_zJMWXmr_TzU/SrQo5cQuGrI/AAAAAAAAAB4/mlWZPJg_79o/s800/5_new_web_xml.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>Note that the web-app tag version has changed from 2.5 to 2.4 there are some jsp exceptions with the 2.5.</p>
<p>The Stripes filter includes two initial parameters the <strong>ActionResolver.Packages </strong>which tells Stripes where to find the ActionBeans (more on this in next post or in Stripes documentation) and the <strong>MultipartWrapperFactory.Class, </strong>a factory class used to upload files, but uploading files is not supported by google app engine and the Stripes filter will fail to initialize. Therefore we need to disable this by providing an empty configuration.</p>
<p>The first step to disable file uploading is to add MultipartWrapperFactory.Class initial parameter to the Stripes filter as shown in the DD and the second step is to create the appropriate class. So create a package in the project (I created the com.helloworld.exclude but you can create anything that make sense for your project) and add the following class:</p>
<blockquote>
<pre><code>
import java.io.IOException;

import javax.servlet.http.HttpServletRequest;

import net.sourceforge.stripes.config.Configuration;
import net.sourceforge.stripes.controller.FileUploadLimitExceededException;
import net.sourceforge.stripes.controller.multipart.MultipartWrapper;
import net.sourceforge.stripes.config.ConfigurableComponent;
import net.sourceforge.stripes.controller.multipart.MultipartWrapperFactory;

/**
 * GAE does not support file uploading so we need to disable this feature from Stripes.
 *
 * @author 110j
 */
public class EmptyMultipartWapper implements ConfigurableComponent, MultipartWrapperFactory {

	/**
	 * @see net.sourceforge.stripes.config.ConfigurableComponent#init(net.sourceforge.stripes.config.Configuration)
	 */
	public void init(Configuration conf) throws Exception {
	}

	/**
	 * @see net.sourceforge.stripes.controller.multipart.MultipartWrapperFactory#wrap(javax.servlet.http.HttpServletRequest)
	 */
	public MultipartWrapper wrap(HttpServletRequest request) throws IOException, FileUploadLimitExceededException {
		return null;
	}
}
</code></pre>
</blockquote>
<p>Now that we disabled the file uploading lets create an ActionBean that will handle our request. Create a package in the project called com.helloworld.action and add the following class:</p>
<blockquote>
<pre><code>
package com.helloworld.action;

import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;

/**
 * The action bean that will handle the our simple request.
 *
 * @author 110j
 */
public class EasyActionBean implements ActionBean {
	private static final String VIEW = "/WEB-INF/jsp/hello_world.jsp";
	private static final String MY_MESSAGE = "hello world";
	private ActionBeanContext ctx;

	private String message;

	@DefaultHandler
	public Resolution showMe() {
		this.setMessage(MY_MESSAGE);
		return new ForwardResolution(VIEW);
	}

	/**
	 * @see net.sourceforge.stripes.action.ActionBean#getContext()
	 */
	public ActionBeanContext getContext() {
		return this.ctx;
	}

	/**
	 * @see net.sourceforge.stripes.action.ActionBean#setContext(ActionBeanContext)
	 */
	public void setContext(ActionBeanContext ctx) {
		this.ctx = ctx;
	}

	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}
}
</code></pre>
</blockquote>
<p>Next lets create a jsp file that will render the response, create the hello_world.jsp under WEB_INF/jsp/ and add the following content:</p>
<table style="width:auto;" border="0"><img src="http://lh6.ggpht.com/_zJMWXmr_TzU/SrQpE4WyYSI/AAAAAAAAAB8/3de0C5b5iok/s800/6_hello_world_jsp.png" alt="" /></table>
<p>Finally create a welcome file called index.jsp if it does not exist or rename the index.html to index.jsp and add just a forward to the action:</p>
<table style="width:auto;" border="0">
<tbody>
<tr>
<td><img src="http://lh5.ggpht.com/_zJMWXmr_TzU/SrQpE4_FTbI/AAAAAAAAACA/BPpemvYTUkc/s800/7_index_jsp.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>You can delete the servlet generated by the google plugin there is no need for it.</p>
<p>In order to test it you just need to run the hello_world in the Run history of eclipse as the google plugin will create one for us, or under the run button in the toolbar, and then visit the address localhost:8080</p>
<p>NOTE: if your application require session you need to enable it in the appengine-web.xml since it is disabled by default (but keep in mind the implication it may have in a distributed environment such as google app engine, maybe your attributes will need to implement the HttpSessionActivationListener if you plan to add them in the session).</p>
<p>You can upload your application by using eclipse or the command line tool, for more information visit <a href="http://code.google.com/appengine/docs/java/gettingstarted/uploading.html" target="_blank">http://code.google.com/appengine/docs/java/gettingstarted/uploading.html</a></p>
<p>To be continued!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=298&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>

		<media:content url="http://lh3.ggpht.com/_zJMWXmr_TzU/SrQo4zxDU-I/AAAAAAAAABo/QpE0JFRNJd4/s800/1_new_project.png" medium="image">
			<media:title type="html">new project</media:title>
		</media:content>

		<media:content url="http://lh3.ggpht.com/_zJMWXmr_TzU/SrQo5LvetyI/AAAAAAAAABs/H5xuyMV2cIk/s800/2_project_settings.png" medium="image">
			<media:title type="html">settings</media:title>
		</media:content>

		<media:content url="http://lh4.ggpht.com/_zJMWXmr_TzU/SrQo5Fq_d2I/AAAAAAAAABw/j8eBGQ_6CoA/s800/3_project_stucture.png" medium="image">
			<media:title type="html">structure</media:title>
		</media:content>

		<media:content url="http://lh6.ggpht.com/_zJMWXmr_TzU/SrQo5Fd9NuI/AAAAAAAAAB0/YZ-SN85McUU/s800/4_generated_web_xml.png" medium="image" />

		<media:content url="http://lh4.ggpht.com/_zJMWXmr_TzU/SrQo5cQuGrI/AAAAAAAAAB4/mlWZPJg_79o/s800/5_new_web_xml.png" medium="image" />

		<media:content url="http://lh6.ggpht.com/_zJMWXmr_TzU/SrQpE4WyYSI/AAAAAAAAAB8/3de0C5b5iok/s800/6_hello_world_jsp.png" medium="image" />

		<media:content url="http://lh5.ggpht.com/_zJMWXmr_TzU/SrQpE4_FTbI/AAAAAAAAACA/BPpemvYTUkc/s800/7_index_jsp.png" medium="image" />
	</item>
		<item>
		<title>tail the log file inside eclipse</title>
		<link>http://110j.wordpress.com/2009/07/08/tail-the-log-file-inside-eclipse/</link>
		<comments>http://110j.wordpress.com/2009/07/08/tail-the-log-file-inside-eclipse/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 22:55:55 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[eclipse tools]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[tail]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=293</guid>
		<description><![CDATA[Most common tool to follow the logs of the application is tail at least under unix, linux and probably mac osx operating systems. So we just need to open a console and type tail -f path/app.log. Fairly simple but it would be nice to have it inside eclipse, which turns out to be also very simple to configure it with the external tools of eclipse.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=293&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Most common tool to follow the logs of the application is tail at least under unix, linux and probably mac osx operating systems. So we just need to open a console and type tail -f path/app.log. Fairly simple but it would be nice to have it inside eclipse, which turns out to be also very simple to configure it with the external tools of eclipse.</p>
<p>Open External Tools Configurations:</p>
<div class="wp-caption alignnone" style="width: 810px"><img title="External tool configuration" src="http://lh4.ggpht.com/_y9ipUdwtLqo/SlUhJ-tnlkI/AAAAAAAAAUw/ic25lpFUpEA/s800/Picture%202.png" alt="External tool configuration" width="800" height="655" /><p class="wp-caption-text">External tool configuration</p></div>
<p>Hit Run and that&#8217;s it. Windows users should install a tail for windows first!</p>
<p>Enjoy!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/293/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=293&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/07/08/tail-the-log-file-inside-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>

		<media:content url="http://lh4.ggpht.com/_y9ipUdwtLqo/SlUhJ-tnlkI/AAAAAAAAAUw/ic25lpFUpEA/s800/Picture%202.png" medium="image">
			<media:title type="html">External tool configuration</media:title>
		</media:content>
	</item>
		<item>
		<title>image-a-nation challenge &#8211; using Java</title>
		<link>http://110j.wordpress.com/2009/06/30/image-a-nation-challenge-using-java/</link>
		<comments>http://110j.wordpress.com/2009/06/30/image-a-nation-challenge-using-java/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 22:29:23 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[image-a-nation]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=284</guid>
		<description><![CDATA[Interesting challenge from google image team… here’s an attempt to create the image using java,
(more work is needed to make it more resposive while reading the image files, also reading the clues directly from the web would be better! :)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=284&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Interesting challenge from google image team&#8230; here&#8217;s an attempt to create the image using java,<br />
(more work is needed to make it more resposive while reading the image files, also reading the clues directly from the web would be better! :)</p>
<div class="wp-caption alignnone" style="width: 396px"><img title="Sceenshot" src="http://lh6.ggpht.com/_y9ipUdwtLqo/SkqPhumNqJI/AAAAAAAAAUQ/zU-BldEYV-c/s400/Picture%201.jpg" alt="Screenshot" width="386" height="400" /><p class="wp-caption-text">Screenshot</p></div>
<pre>import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;

import javax.imageio.ImageIO;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

@SuppressWarnings("serial")
public class GoogleImageBuilder extends JComponent {

	private static final String GOOGLE_URL = "http://google.com/images?q=tbn:";
    private static BufferedImage picture = null;

    public GoogleImageBuilder() {
    	setPreferredSize(new Dimension(16 * 32, 16 * 32));
    }

    public void paintComponent(Graphics g) {
    	Map clues = HardCodedClues.getClues();
    	SortedSet keys = new TreeSet(clues.keySet());

        int x = 0;
        int y = 0;

        for (Integer key : keys) {
			try {
				URL url = new URL(GOOGLE_URL  + clues.get(key));
				System.out.println("reading: " + url.toString());
				URLConnection uc = url.openConnection();
				picture = ImageIO.read(uc.getInputStream());

			} catch (MalformedURLException e) {
				System.out.println("The following error occured!: " + e);
	            System.exit(0);

			} catch (IOException e) {
				System.out.println("The following error occured!: " + e);
	            System.exit(0);
			}

			x = (key % 16) * 32;
            y = (key / 16) * 32;

			g.drawImage(picture, x, y, 32, 32, null);
		}
    }

    private static void createAndShowGUI() {
        JFrame f = new JFrame("Google images");
        f.setLayout(new BorderLayout());
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        GoogleImageBuilder test = new GoogleImageBuilder();
        f.add(test);
        f.validate();
        f.pack();
        f.setVisible(true);
    }

    public static void main(String args[]) {
        Runnable doCreateAndShowGUI = new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        };
        SwingUtilities.invokeLater(doCreateAndShowGUI);
    }
}</pre>
<p>Here are the clues hardcoded:</p>
<pre>import java.util.HashMap;
import java.util.Map;

public class HardCodedClues {
	private static final int RADIX_16 = 16;

    public static Map getClues() {
    	String [] clues = {
			 "28:Kx7vy-VBtpYJ", "7B:PyDg0PjbgxkJ", "F3:Rd1xXw4alLkJ", "31:FeaBmsxfey8J",

			  "20:YsNAjeTGJVEJ", "A9:leYDU1RuuwIJ", "81:jufN-4x1RnAJ", "CB:IhifTIhRpmoJ",

			  "87:8Maz8upc508J", "FA:5dh9_zqVdkIJ", "BA:xyZftsH8RFsJ", "50:L_zmPN_48bMJ",

			  "49:iLtQE1Q7CWMJ", "D6:TuKm3fTasSYJ", "FE:pls5MhpkpK8J", "60:thDCBIkyQ2EJ",

			  "85:CizK2j2yCBIJ", "23:IkmAcC6lNjIJ", "F8:kRRYwomQWhIJ", "8E:_v-YolETks4J",

			  "E1:Bf8Ltpee0v4J", "D0:0YM5CoDmx8MJ", "92:D9zUj4QVc2sJ", "0C:FsKZkZ1R7t4J",

			  "45:NVX4OCi9WXAJ", "A7:aQAFb1464l4J", "68:aej8Xg6iVhkJ", "A5:EHkO0tMtSN4J",

			  "F6:49-gxPeD0IwJ", "5E:bpLwYqr-990J", "C0:mawuaWJa1boJ", "00:NEU6wRmGVq4J",

			  "28:Kx7vy-VBtpYJ", "7B:PyDg0PjbgxkJ", "F3:Rd1xXw4alLkJ", "31:FeaBmsxfey8J",

			  "20:YsNAjeTGJVEJ", "A9:leYDU1RuuwIJ", "81:jufN-4x1RnAJ", "CB:IhifTIhRpmoJ",

			  "87:8Maz8upc508J", "FA:5dh9_zqVdkIJ", "BA:xyZftsH8RFsJ", "50:L_zmPN_48bMJ",

			  "49:iLtQE1Q7CWMJ", "D6:TuKm3fTasSYJ", "FE:pls5MhpkpK8J", "60:thDCBIkyQ2EJ",

			  "85:CizK2j2yCBIJ", "23:IkmAcC6lNjIJ", "F8:kRRYwomQWhIJ", "8E:_v-YolETks4J",

			  "E1:Bf8Ltpee0v4J", "D0:0YM5CoDmx8MJ", "92:D9zUj4QVc2sJ", "0C:FsKZkZ1R7t4J",

			  "45:NVX4OCi9WXAJ", "A7:aQAFb1464l4J", "68:aej8Xg6iVhkJ", "A5:EHkO0tMtSN4J",

			  "F6:49-gxPeD0IwJ", "5E:bpLwYqr-990J", "C0:mawuaWJa1boJ", "00:NEU6wRmGVq4J",

			  "84:h5LxuUdV03oJ", "D9:-Eup1YnE6-0J", "FC:7fjrc7LzjskJ", "03:LJouzaZ6nakJ",

			  "C3:3cyoIZdesRYJ", "EB:GumIzK6Xwv8J", "12:KYkKkVzbW-UJ", "AB:EHkO0tMtSN4J",

			  "30:vrZQ1rXJEg4J", "CE:AbXWG_eCFZYJ", "6B:EOhnwwtJMz4J", "5F:PyDg0PjbgxkJ",

			  "62:zzxVlWrc94AJ", "F2:CwpwlljQ5RUJ", "7F:9aqBJNfDaUEJ", "EE:CWVFy5sgo9MJ",

			  "4C:JDNgZADQwGkJ", "58:uJB16vUcH38J", "3D:Jij2JFUry5gJ", "C8:v7juRN1cZ4EJ",

			  "1E:16e59DDxd1QJ", "69:y1f3FuaNqhEJ", "B0:4cYEeKseVRYJ", "37:Hnm8AysFIvgJ",

			  "1D:qFpNdOAQ868J", "21:Ypml6jLyoaEJ", "34:UhJBrAWg8MAJ", "A0:xTaArVPF51IJ",

			  "EF:14kwBS4zH4kJ", "ED:eUzfBgFaYAYJ", "51:1RWzov84HGsJ", "72:WRUq1C2UF7YJ",

			  "28:Kx7vy-VBtpYJ", "7B:PyDg0PjbgxkJ", "F3:Rd1xXw4alLkJ", "31:FeaBmsxfey8J",

			  "20:YsNAjeTGJVEJ", "A9:leYDU1RuuwIJ", "81:jufN-4x1RnAJ", "CB:IhifTIhRpmoJ",

			  "87:8Maz8upc508J", "FA:5dh9_zqVdkIJ", "BA:xyZftsH8RFsJ", "50:L_zmPN_48bMJ",

			  "49:iLtQE1Q7CWMJ", "D6:TuKm3fTasSYJ", "FE:pls5MhpkpK8J", "60:thDCBIkyQ2EJ",

			  "85:CizK2j2yCBIJ", "23:IkmAcC6lNjIJ", "F8:kRRYwomQWhIJ", "8E:_v-YolETks4J",

			  "E1:Bf8Ltpee0v4J", "D0:0YM5CoDmx8MJ", "92:D9zUj4QVc2sJ", "0C:FsKZkZ1R7t4J",

			  "45:NVX4OCi9WXAJ", "A7:aQAFb1464l4J", "68:aej8Xg6iVhkJ", "A5:EHkO0tMtSN4J",

			  "F6:49-gxPeD0IwJ", "5E:bpLwYqr-990J", "C0:mawuaWJa1boJ", "00:NEU6wRmGVq4J",

			  "84:h5LxuUdV03oJ", "D9:-Eup1YnE6-0J", "FC:7fjrc7LzjskJ", "03:LJouzaZ6nakJ",

			  "C3:3cyoIZdesRYJ", "EB:GumIzK6Xwv8J", "12:KYkKkVzbW-UJ", "AB:EHkO0tMtSN4J",

			  "30:vrZQ1rXJEg4J", "CE:AbXWG_eCFZYJ", "6B:EOhnwwtJMz4J", "5F:PyDg0PjbgxkJ",

			  "62:zzxVlWrc94AJ", "F2:CwpwlljQ5RUJ", "7F:9aqBJNfDaUEJ", "EE:CWVFy5sgo9MJ",

			  "4C:JDNgZADQwGkJ", "58:uJB16vUcH38J", "3D:Jij2JFUry5gJ", "C8:v7juRN1cZ4EJ",

			  "1E:16e59DDxd1QJ", "69:y1f3FuaNqhEJ", "B0:4cYEeKseVRYJ", "37:Hnm8AysFIvgJ",

			  "1D:qFpNdOAQ868J", "21:Ypml6jLyoaEJ", "34:UhJBrAWg8MAJ", "A0:xTaArVPF51IJ",

			  "EF:14kwBS4zH4kJ", "ED:eUzfBgFaYAYJ", "51:1RWzov84HGsJ", "72:WRUq1C2UF7YJ",

			  "24:TkF3I-3AqsoJ", "6E:Cxb4nb_-6wQJ", "CC:Cfwjydcm5VUJ", "94:3V77coCFoyUJ",

			  "0E:lfqBck_AckoJ", "C7:qTuFDoAZZAIJ", "E4:X9O9H0rf7UwJ", "A1:dh_aVJQg-fQJ",

			  "1B:SSUHFP88ICIJ", "9A:8LRpia1kQyoJ", "A8:6OB8e96ajfIJ", "8D:sekIn_D0FY4J",

			  "9D:sQbLyZCjcMwJ", "9C:at2mlybzsckJ", "2D:gagHFe3EgRcJ", "7C:sbERUkuwrgkJ",

			  "DF:jIbY1S4jGOQJ", "15:sQ5gc2skXDoJ", "B5:qpQ_jThwIfwJ", "E7:bujGGLRs6f8J",

			  "B9:FC8WDc6FfQAJ", "AC:7PqlCpunKtMJ", "90:6bCXBm-ZoeMJ", "05:kUDeAWh_o54J",

			  "46:BTA_qt_HhUkJ", "3E:3fscTyozTmYJ", "14:dsppEkkJ6vIJ", "AA:q8Xw6c1aDJQJ",

			  "5C:1Yy-Elilf_wJ", "67:sYb7HA_7lCwJ", "99:kPiuzGwRUKIJ", "E2:3NCEoBX-P-gJ",

			  "28:Kx7vy-VBtpYJ", "7B:PyDg0PjbgxkJ", "F3:Rd1xXw4alLkJ", "31:FeaBmsxfey8J",

			  "20:YsNAjeTGJVEJ", "A9:leYDU1RuuwIJ", "81:jufN-4x1RnAJ", "CB:IhifTIhRpmoJ",

			  "87:8Maz8upc508J", "FA:5dh9_zqVdkIJ", "BA:xyZftsH8RFsJ", "50:L_zmPN_48bMJ",

			  "49:iLtQE1Q7CWMJ", "D6:TuKm3fTasSYJ", "FE:pls5MhpkpK8J", "60:thDCBIkyQ2EJ",

			  "85:CizK2j2yCBIJ", "23:IkmAcC6lNjIJ", "F8:kRRYwomQWhIJ", "8E:_v-YolETks4J",

			  "E1:Bf8Ltpee0v4J", "D0:0YM5CoDmx8MJ", "92:D9zUj4QVc2sJ", "0C:FsKZkZ1R7t4J",

			  "45:NVX4OCi9WXAJ", "A7:aQAFb1464l4J", "68:aej8Xg6iVhkJ", "A5:EHkO0tMtSN4J",

			  "F6:49-gxPeD0IwJ", "5E:bpLwYqr-990J", "C0:mawuaWJa1boJ", "00:NEU6wRmGVq4J",

			  "84:h5LxuUdV03oJ", "D9:-Eup1YnE6-0J", "FC:7fjrc7LzjskJ", "03:LJouzaZ6nakJ",

			  "C3:3cyoIZdesRYJ", "EB:GumIzK6Xwv8J", "12:KYkKkVzbW-UJ", "AB:EHkO0tMtSN4J",

			  "30:vrZQ1rXJEg4J", "CE:AbXWG_eCFZYJ", "6B:EOhnwwtJMz4J", "5F:PyDg0PjbgxkJ",

			  "62:zzxVlWrc94AJ", "F2:CwpwlljQ5RUJ", "7F:9aqBJNfDaUEJ", "EE:CWVFy5sgo9MJ",

			  "4C:JDNgZADQwGkJ", "58:uJB16vUcH38J", "3D:Jij2JFUry5gJ", "C8:v7juRN1cZ4EJ",

			  "1E:16e59DDxd1QJ", "69:y1f3FuaNqhEJ", "B0:4cYEeKseVRYJ", "37:Hnm8AysFIvgJ",

			  "1D:qFpNdOAQ868J", "21:Ypml6jLyoaEJ", "34:UhJBrAWg8MAJ", "A0:xTaArVPF51IJ",

			  "EF:14kwBS4zH4kJ", "ED:eUzfBgFaYAYJ", "51:1RWzov84HGsJ", "72:WRUq1C2UF7YJ",

			  "24:TkF3I-3AqsoJ", "6E:Cxb4nb_-6wQJ", "CC:Cfwjydcm5VUJ", "94:3V77coCFoyUJ",

			  "0E:lfqBck_AckoJ", "C7:qTuFDoAZZAIJ", "E4:X9O9H0rf7UwJ", "A1:dh_aVJQg-fQJ",

			  "1B:SSUHFP88ICIJ", "9A:8LRpia1kQyoJ", "A8:6OB8e96ajfIJ", "8D:sekIn_D0FY4J",

			  "9D:sQbLyZCjcMwJ", "9C:at2mlybzsckJ", "2D:gagHFe3EgRcJ", "7C:sbERUkuwrgkJ",

			  "DF:jIbY1S4jGOQJ", "15:sQ5gc2skXDoJ", "B5:qpQ_jThwIfwJ", "E7:bujGGLRs6f8J",

			  "B9:FC8WDc6FfQAJ", "AC:7PqlCpunKtMJ", "90:6bCXBm-ZoeMJ", "05:kUDeAWh_o54J",

			  "46:BTA_qt_HhUkJ", "3E:3fscTyozTmYJ", "14:dsppEkkJ6vIJ", "AA:q8Xw6c1aDJQJ",

			  "5C:1Yy-Elilf_wJ", "67:sYb7HA_7lCwJ", "99:kPiuzGwRUKIJ", "E2:3NCEoBX-P-gJ",

			  "7D:gOHngHfzX8YJ", "2C:1j66DXvpuf8J", "07:rWnu8lphvZcJ", "CA:PFnVqjCPIKIJ",

			  "D7:ydg0kWMXDeoJ", "5A:n33l1U6zbEIJ", "57:hKzAPG_v3g4J", "3F:XGwx9FgVixQJ",

			  "36:abLa4yOIyW4J", "10:sMDENsqLts0J", "D2:gJsgjLw3nSQJ", "E0:Z_K4hdZq7h8J",

			  "75:3C-XszC6kyMJ", "77:rtHRfe9A27YJ", "97:-eflxIU8g04J", "F0:SwVcyzirnnQJ",

			  "65:7-hjyVDnHjEJ", "A3:hruuOW22_L8J", "F9:lEPeKx6ket4J", "88:M3DdYOcDTWwJ",

			  "FD:Cfwjydcm5VUJ", "42:HNXS6FBy7AUJ", "4A:-n4dEXmbmyMJ", "F7:IPDuatbjjRoJ",

			  "52:2xrwdGDvyaEJ", "5B:vEMG_nMaZygJ", "27:hfidgDDREMsJ", "70:DJ1-bAcdQE8J",

			  "78:aej8Xg6iVhkJ", "61:4SHBf-6ctTQJ", "BF:oJWMF8g4n98J", "3C:wbyliY5Fw7cJ",

			  "28:Kx7vy-VBtpYJ", "7B:PyDg0PjbgxkJ", "F3:Rd1xXw4alLkJ", "31:FeaBmsxfey8J",

			  "20:YsNAjeTGJVEJ", "A9:leYDU1RuuwIJ", "81:jufN-4x1RnAJ", "CB:IhifTIhRpmoJ",

			  "87:8Maz8upc508J", "FA:5dh9_zqVdkIJ", "BA:xyZftsH8RFsJ", "50:L_zmPN_48bMJ",

			  "49:iLtQE1Q7CWMJ", "D6:TuKm3fTasSYJ", "FE:pls5MhpkpK8J", "60:thDCBIkyQ2EJ",

			  "85:CizK2j2yCBIJ", "23:IkmAcC6lNjIJ", "F8:kRRYwomQWhIJ", "8E:_v-YolETks4J",

			  "E1:Bf8Ltpee0v4J", "D0:0YM5CoDmx8MJ", "92:D9zUj4QVc2sJ", "0C:FsKZkZ1R7t4J",

			  "45:NVX4OCi9WXAJ", "A7:aQAFb1464l4J", "68:aej8Xg6iVhkJ", "A5:EHkO0tMtSN4J",

			  "F6:49-gxPeD0IwJ", "5E:bpLwYqr-990J", "C0:mawuaWJa1boJ", "00:NEU6wRmGVq4J",

			  "84:h5LxuUdV03oJ", "D9:-Eup1YnE6-0J", "FC:7fjrc7LzjskJ", "03:LJouzaZ6nakJ",

			  "C3:3cyoIZdesRYJ", "EB:GumIzK6Xwv8J", "12:KYkKkVzbW-UJ", "AB:EHkO0tMtSN4J",

			  "30:vrZQ1rXJEg4J", "CE:AbXWG_eCFZYJ", "6B:EOhnwwtJMz4J", "5F:PyDg0PjbgxkJ",

			  "62:zzxVlWrc94AJ", "F2:CwpwlljQ5RUJ", "7F:9aqBJNfDaUEJ", "EE:CWVFy5sgo9MJ",

			  "4C:JDNgZADQwGkJ", "58:uJB16vUcH38J", "3D:Jij2JFUry5gJ", "C8:v7juRN1cZ4EJ",

			  "1E:16e59DDxd1QJ", "69:y1f3FuaNqhEJ", "B0:4cYEeKseVRYJ", "37:Hnm8AysFIvgJ",

			  "1D:qFpNdOAQ868J", "21:Ypml6jLyoaEJ", "34:UhJBrAWg8MAJ", "A0:xTaArVPF51IJ",

			  "EF:14kwBS4zH4kJ", "ED:eUzfBgFaYAYJ", "51:1RWzov84HGsJ", "72:WRUq1C2UF7YJ",

			  "24:TkF3I-3AqsoJ", "6E:Cxb4nb_-6wQJ", "CC:Cfwjydcm5VUJ", "94:3V77coCFoyUJ",

			  "0E:lfqBck_AckoJ", "C7:qTuFDoAZZAIJ", "E4:X9O9H0rf7UwJ", "A1:dh_aVJQg-fQJ",

			  "1B:SSUHFP88ICIJ", "9A:8LRpia1kQyoJ", "A8:6OB8e96ajfIJ", "8D:sekIn_D0FY4J",

			  "9D:sQbLyZCjcMwJ", "9C:at2mlybzsckJ", "2D:gagHFe3EgRcJ", "7C:sbERUkuwrgkJ",

			  "DF:jIbY1S4jGOQJ", "15:sQ5gc2skXDoJ", "B5:qpQ_jThwIfwJ", "E7:bujGGLRs6f8J",

			  "B9:FC8WDc6FfQAJ", "AC:7PqlCpunKtMJ", "90:6bCXBm-ZoeMJ", "05:kUDeAWh_o54J",

			  "46:BTA_qt_HhUkJ", "3E:3fscTyozTmYJ", "14:dsppEkkJ6vIJ", "AA:q8Xw6c1aDJQJ",

			  "5C:1Yy-Elilf_wJ", "67:sYb7HA_7lCwJ", "99:kPiuzGwRUKIJ", "E2:3NCEoBX-P-gJ",

			  "7D:gOHngHfzX8YJ", "2C:1j66DXvpuf8J", "07:rWnu8lphvZcJ", "CA:PFnVqjCPIKIJ",

			  "D7:ydg0kWMXDeoJ", "5A:n33l1U6zbEIJ", "57:hKzAPG_v3g4J", "3F:XGwx9FgVixQJ",

			  "36:abLa4yOIyW4J", "10:sMDENsqLts0J", "D2:gJsgjLw3nSQJ", "E0:Z_K4hdZq7h8J",

			  "75:3C-XszC6kyMJ", "77:rtHRfe9A27YJ", "97:-eflxIU8g04J", "F0:SwVcyzirnnQJ",

			  "65:7-hjyVDnHjEJ", "A3:hruuOW22_L8J", "F9:lEPeKx6ket4J", "88:M3DdYOcDTWwJ",

			  "FD:Cfwjydcm5VUJ", "42:HNXS6FBy7AUJ", "4A:-n4dEXmbmyMJ", "F7:IPDuatbjjRoJ",

			  "52:2xrwdGDvyaEJ", "5B:vEMG_nMaZygJ", "27:hfidgDDREMsJ", "70:DJ1-bAcdQE8J",

			  "78:aej8Xg6iVhkJ", "61:4SHBf-6ctTQJ", "BF:oJWMF8g4n98J", "3C:wbyliY5Fw7cJ",

			  "BD:dyCQwPoi_QoJ", "6D:ROtjpJaaM3AJ", "D1:u77vCPi7NX4J", "DA:jr7lZOIXHE4J",

			  "80:hvDWT2JOOHIJ", "48:hfidgDDREMsJ", "8B:TMDNdWekwlEJ", "73:13SgY09fd9QJ",

			  "7E:tx3mt6GYR5oJ", "B3:JTLUoSksUFAJ", "63:DyaRtEUhtg4J", "0B:1q-lkiRNa7kJ",

			  "93:L3R7clDgu44J", "F5:o-lzUg48_5UJ", "01:6YJy7S3OGt8J", "26:vs3cbrj7Bi0J",

			  "7A:C6L9XGQS6i8J", "A4:iMWi3RNzLHUJ", "8F:2ELg7mGC5yUJ", "1A:rZEfAj2wHgYJ",

			  "A6:kP-bP5hmF9cJ", "18:KcznZAsaAk0J", "FF:kp-fx5_9CzsJ", "6C:5I-cinT_0_4J",

			  "8C:zaUGihUPAJwJ", "0F:AIt7UQkMmZkJ", "9B:FYtibg-zD20J", "B7:A2SiPb4NwWQJ",

			  "89:isoWmMm2QssJ", "C5:CibMCkpl2kAJ", "0D:g9lghtXOAFMJ", "38:gWcquZBJFPIJ",

			  "28:Kx7vy-VBtpYJ", "7B:PyDg0PjbgxkJ", "F3:Rd1xXw4alLkJ", "31:FeaBmsxfey8J",

			  "20:YsNAjeTGJVEJ", "A9:leYDU1RuuwIJ", "81:jufN-4x1RnAJ", "CB:IhifTIhRpmoJ",

			  "87:8Maz8upc508J", "FA:5dh9_zqVdkIJ", "BA:xyZftsH8RFsJ", "50:L_zmPN_48bMJ",

			  "49:iLtQE1Q7CWMJ", "D6:TuKm3fTasSYJ", "FE:pls5MhpkpK8J", "60:thDCBIkyQ2EJ",

			  "85:CizK2j2yCBIJ", "23:IkmAcC6lNjIJ", "F8:kRRYwomQWhIJ", "8E:_v-YolETks4J",

			  "E1:Bf8Ltpee0v4J", "D0:0YM5CoDmx8MJ", "92:D9zUj4QVc2sJ", "0C:FsKZkZ1R7t4J",

			  "45:NVX4OCi9WXAJ", "A7:aQAFb1464l4J", "68:aej8Xg6iVhkJ", "A5:EHkO0tMtSN4J",

			  "F6:49-gxPeD0IwJ", "5E:bpLwYqr-990J", "C0:mawuaWJa1boJ", "00:NEU6wRmGVq4J",

			  "84:h5LxuUdV03oJ", "D9:-Eup1YnE6-0J", "FC:7fjrc7LzjskJ", "03:LJouzaZ6nakJ",

			  "C3:3cyoIZdesRYJ", "EB:GumIzK6Xwv8J", "12:KYkKkVzbW-UJ", "AB:EHkO0tMtSN4J",

			  "30:vrZQ1rXJEg4J", "CE:AbXWG_eCFZYJ", "6B:EOhnwwtJMz4J", "5F:PyDg0PjbgxkJ",

			  "62:zzxVlWrc94AJ", "F2:CwpwlljQ5RUJ", "7F:9aqBJNfDaUEJ", "EE:CWVFy5sgo9MJ",

			  "4C:JDNgZADQwGkJ", "58:uJB16vUcH38J", "3D:Jij2JFUry5gJ", "C8:v7juRN1cZ4EJ",

			  "1E:16e59DDxd1QJ", "69:y1f3FuaNqhEJ", "B0:4cYEeKseVRYJ", "37:Hnm8AysFIvgJ",

			  "1D:qFpNdOAQ868J", "21:Ypml6jLyoaEJ", "34:UhJBrAWg8MAJ", "A0:xTaArVPF51IJ",

			  "EF:14kwBS4zH4kJ", "ED:eUzfBgFaYAYJ", "51:1RWzov84HGsJ", "72:WRUq1C2UF7YJ",

			  "24:TkF3I-3AqsoJ", "6E:Cxb4nb_-6wQJ", "CC:Cfwjydcm5VUJ", "94:3V77coCFoyUJ",

			  "0E:lfqBck_AckoJ", "C7:qTuFDoAZZAIJ", "E4:X9O9H0rf7UwJ", "A1:dh_aVJQg-fQJ",

			  "1B:SSUHFP88ICIJ", "9A:8LRpia1kQyoJ", "A8:6OB8e96ajfIJ", "8D:sekIn_D0FY4J",

			  "9D:sQbLyZCjcMwJ", "9C:at2mlybzsckJ", "2D:gagHFe3EgRcJ", "7C:sbERUkuwrgkJ",

			  "DF:jIbY1S4jGOQJ", "15:sQ5gc2skXDoJ", "B5:qpQ_jThwIfwJ", "E7:bujGGLRs6f8J",

			  "B9:FC8WDc6FfQAJ", "AC:7PqlCpunKtMJ", "90:6bCXBm-ZoeMJ", "05:kUDeAWh_o54J",

			  "46:BTA_qt_HhUkJ", "3E:3fscTyozTmYJ", "14:dsppEkkJ6vIJ", "AA:q8Xw6c1aDJQJ",

			  "5C:1Yy-Elilf_wJ", "67:sYb7HA_7lCwJ", "99:kPiuzGwRUKIJ", "E2:3NCEoBX-P-gJ",

			  "7D:gOHngHfzX8YJ", "2C:1j66DXvpuf8J", "07:rWnu8lphvZcJ", "CA:PFnVqjCPIKIJ",

			  "D7:ydg0kWMXDeoJ", "5A:n33l1U6zbEIJ", "57:hKzAPG_v3g4J", "3F:XGwx9FgVixQJ",

			  "36:abLa4yOIyW4J", "10:sMDENsqLts0J", "D2:gJsgjLw3nSQJ", "E0:Z_K4hdZq7h8J",

			  "75:3C-XszC6kyMJ", "77:rtHRfe9A27YJ", "97:-eflxIU8g04J", "F0:SwVcyzirnnQJ",

			  "65:7-hjyVDnHjEJ", "A3:hruuOW22_L8J", "F9:lEPeKx6ket4J", "88:M3DdYOcDTWwJ",

			  "FD:Cfwjydcm5VUJ", "42:HNXS6FBy7AUJ", "4A:-n4dEXmbmyMJ", "F7:IPDuatbjjRoJ",

			  "52:2xrwdGDvyaEJ", "5B:vEMG_nMaZygJ", "27:hfidgDDREMsJ", "70:DJ1-bAcdQE8J",

			  "78:aej8Xg6iVhkJ", "61:4SHBf-6ctTQJ", "BF:oJWMF8g4n98J", "3C:wbyliY5Fw7cJ",

			  "BD:dyCQwPoi_QoJ", "6D:ROtjpJaaM3AJ", "D1:u77vCPi7NX4J", "DA:jr7lZOIXHE4J",

			  "80:hvDWT2JOOHIJ", "48:hfidgDDREMsJ", "8B:TMDNdWekwlEJ", "73:13SgY09fd9QJ",

			  "7E:tx3mt6GYR5oJ", "B3:JTLUoSksUFAJ", "63:DyaRtEUhtg4J", "0B:1q-lkiRNa7kJ",

			  "93:L3R7clDgu44J", "F5:o-lzUg48_5UJ", "01:6YJy7S3OGt8J", "26:vs3cbrj7Bi0J",

			  "7A:C6L9XGQS6i8J", "A4:iMWi3RNzLHUJ", "8F:2ELg7mGC5yUJ", "1A:rZEfAj2wHgYJ",

			  "A6:kP-bP5hmF9cJ", "18:KcznZAsaAk0J", "FF:kp-fx5_9CzsJ", "6C:5I-cinT_0_4J",

			  "8C:zaUGihUPAJwJ", "0F:AIt7UQkMmZkJ", "9B:FYtibg-zD20J", "B7:A2SiPb4NwWQJ",

			  "89:isoWmMm2QssJ", "C5:CibMCkpl2kAJ", "0D:g9lghtXOAFMJ", "38:gWcquZBJFPIJ",

			  "11:_TotMQXuZdgJ", "6A:24tx-mIpwmwJ", "8A:-FAi_YRhbrgJ", "1F:kQEIlYRdi2QJ",

			  "41:FoWhbx2IxiUJ", "4E:XFlq06C_YeMJ", "13:vKSdbEgs9aoJ", "D5:m415gDZ2B-UJ",

			  "AD:hWBrF9YLK78J", "2B:HqEtb7AADmMJ", "DE:eCFYrqg0WsEJ", "16:QLTeOYg-yB8J",

			  "BB:jk-d_Ua8BtIJ", "C9:u0J9izcWwvAJ", "91:NM3JgAgreZQJ", "04:sYb7HA_7lCwJ",

			  "08:VwTb3zO7tL8J", "DD:kwlsYdonpIgJ", "F4:_LIV45PtumsJ", "EC:rpMyxZmO6LwJ",

			  "54:bDNO5Nsce9EJ", "2A:XFgcPHiQ6SYJ", "71:b8UD6gHfO6IJ", "9E:rwusJNoWjiQJ",

			  "FB:c-wHLtEdkf0J", "AE:brdZuMrvAMQJ", "E8:mzaxbrVLBOUJ", "4B:6ye4zJaCE_oJ",

			  "22:6fwxGNK3bJgJ", "B8:jwvALeEfsbcJ", "33:Yqx6f_8RvNgJ", "C2:sxB_6QG_Qb4J",

			  "28:Kx7vy-VBtpYJ", "7B:PyDg0PjbgxkJ", "F3:Rd1xXw4alLkJ", "31:FeaBmsxfey8J",

			  "20:YsNAjeTGJVEJ", "A9:leYDU1RuuwIJ", "81:jufN-4x1RnAJ", "CB:IhifTIhRpmoJ",

			  "87:8Maz8upc508J", "FA:5dh9_zqVdkIJ", "BA:xyZftsH8RFsJ", "50:L_zmPN_48bMJ",

			  "49:iLtQE1Q7CWMJ", "D6:TuKm3fTasSYJ", "FE:pls5MhpkpK8J", "60:thDCBIkyQ2EJ",

			  "85:CizK2j2yCBIJ", "23:IkmAcC6lNjIJ", "F8:kRRYwomQWhIJ", "8E:_v-YolETks4J",

			  "E1:Bf8Ltpee0v4J", "D0:0YM5CoDmx8MJ", "92:D9zUj4QVc2sJ", "0C:FsKZkZ1R7t4J",

			  "45:NVX4OCi9WXAJ", "A7:aQAFb1464l4J", "68:aej8Xg6iVhkJ", "A5:EHkO0tMtSN4J",

			  "F6:49-gxPeD0IwJ", "5E:bpLwYqr-990J", "C0:mawuaWJa1boJ", "00:NEU6wRmGVq4J",

			  "84:h5LxuUdV03oJ", "D9:-Eup1YnE6-0J", "FC:7fjrc7LzjskJ", "03:LJouzaZ6nakJ",

			  "C3:3cyoIZdesRYJ", "EB:GumIzK6Xwv8J", "12:KYkKkVzbW-UJ", "AB:EHkO0tMtSN4J",

			  "30:vrZQ1rXJEg4J", "CE:AbXWG_eCFZYJ", "6B:EOhnwwtJMz4J", "5F:PyDg0PjbgxkJ",

			  "62:zzxVlWrc94AJ", "F2:CwpwlljQ5RUJ", "7F:9aqBJNfDaUEJ", "EE:CWVFy5sgo9MJ",

			  "4C:JDNgZADQwGkJ", "58:uJB16vUcH38J", "3D:Jij2JFUry5gJ", "C8:v7juRN1cZ4EJ",

			  "1E:16e59DDxd1QJ", "69:y1f3FuaNqhEJ", "B0:4cYEeKseVRYJ", "37:Hnm8AysFIvgJ",

			  "1D:qFpNdOAQ868J", "21:Ypml6jLyoaEJ", "34:UhJBrAWg8MAJ", "A0:xTaArVPF51IJ",

			  "EF:14kwBS4zH4kJ", "ED:eUzfBgFaYAYJ", "51:1RWzov84HGsJ", "72:WRUq1C2UF7YJ",

			  "24:TkF3I-3AqsoJ", "6E:Cxb4nb_-6wQJ", "CC:Cfwjydcm5VUJ", "94:3V77coCFoyUJ",

			  "0E:lfqBck_AckoJ", "C7:qTuFDoAZZAIJ", "E4:X9O9H0rf7UwJ", "A1:dh_aVJQg-fQJ",

			  "1B:SSUHFP88ICIJ", "9A:8LRpia1kQyoJ", "A8:6OB8e96ajfIJ", "8D:sekIn_D0FY4J",

			  "9D:sQbLyZCjcMwJ", "9C:at2mlybzsckJ", "2D:gagHFe3EgRcJ", "7C:sbERUkuwrgkJ",

			  "DF:jIbY1S4jGOQJ", "15:sQ5gc2skXDoJ", "B5:qpQ_jThwIfwJ", "E7:bujGGLRs6f8J",

			  "B9:FC8WDc6FfQAJ", "AC:7PqlCpunKtMJ", "90:6bCXBm-ZoeMJ", "05:kUDeAWh_o54J",

			  "46:BTA_qt_HhUkJ", "3E:3fscTyozTmYJ", "14:dsppEkkJ6vIJ", "AA:q8Xw6c1aDJQJ",

			  "5C:1Yy-Elilf_wJ", "67:sYb7HA_7lCwJ", "99:kPiuzGwRUKIJ", "E2:3NCEoBX-P-gJ",

			  "7D:gOHngHfzX8YJ", "2C:1j66DXvpuf8J", "07:rWnu8lphvZcJ", "CA:PFnVqjCPIKIJ",

			  "D7:ydg0kWMXDeoJ", "5A:n33l1U6zbEIJ", "57:hKzAPG_v3g4J", "3F:XGwx9FgVixQJ",

			  "36:abLa4yOIyW4J", "10:sMDENsqLts0J", "D2:gJsgjLw3nSQJ", "E0:Z_K4hdZq7h8J",

			  "75:3C-XszC6kyMJ", "77:rtHRfe9A27YJ", "97:-eflxIU8g04J", "F0:SwVcyzirnnQJ",

			  "65:7-hjyVDnHjEJ", "A3:hruuOW22_L8J", "F9:lEPeKx6ket4J", "88:M3DdYOcDTWwJ",

			  "FD:Cfwjydcm5VUJ", "42:HNXS6FBy7AUJ", "4A:-n4dEXmbmyMJ", "F7:IPDuatbjjRoJ",

			  "52:2xrwdGDvyaEJ", "5B:vEMG_nMaZygJ", "27:hfidgDDREMsJ", "70:DJ1-bAcdQE8J",

			  "78:aej8Xg6iVhkJ", "61:4SHBf-6ctTQJ", "BF:oJWMF8g4n98J", "3C:wbyliY5Fw7cJ",

			  "BD:dyCQwPoi_QoJ", "6D:ROtjpJaaM3AJ", "D1:u77vCPi7NX4J", "DA:jr7lZOIXHE4J",

			  "80:hvDWT2JOOHIJ", "48:hfidgDDREMsJ", "8B:TMDNdWekwlEJ", "73:13SgY09fd9QJ",

			  "7E:tx3mt6GYR5oJ", "B3:JTLUoSksUFAJ", "63:DyaRtEUhtg4J", "0B:1q-lkiRNa7kJ",

			  "93:L3R7clDgu44J", "F5:o-lzUg48_5UJ", "01:6YJy7S3OGt8J", "26:vs3cbrj7Bi0J",

			  "7A:C6L9XGQS6i8J", "A4:iMWi3RNzLHUJ", "8F:2ELg7mGC5yUJ", "1A:rZEfAj2wHgYJ",

			  "A6:kP-bP5hmF9cJ", "18:KcznZAsaAk0J", "FF:kp-fx5_9CzsJ", "6C:5I-cinT_0_4J",

			  "8C:zaUGihUPAJwJ", "0F:AIt7UQkMmZkJ", "9B:FYtibg-zD20J", "B7:A2SiPb4NwWQJ",

			  "89:isoWmMm2QssJ", "C5:CibMCkpl2kAJ", "0D:g9lghtXOAFMJ", "38:gWcquZBJFPIJ",

			  "11:_TotMQXuZdgJ", "6A:24tx-mIpwmwJ", "8A:-FAi_YRhbrgJ", "1F:kQEIlYRdi2QJ",

			  "41:FoWhbx2IxiUJ", "4E:XFlq06C_YeMJ", "13:vKSdbEgs9aoJ", "D5:m415gDZ2B-UJ",

			  "AD:hWBrF9YLK78J", "2B:HqEtb7AADmMJ", "DE:eCFYrqg0WsEJ", "16:QLTeOYg-yB8J",

			  "BB:jk-d_Ua8BtIJ", "C9:u0J9izcWwvAJ", "91:NM3JgAgreZQJ", "04:sYb7HA_7lCwJ",

			  "08:VwTb3zO7tL8J", "DD:kwlsYdonpIgJ", "F4:_LIV45PtumsJ", "EC:rpMyxZmO6LwJ",

			  "54:bDNO5Nsce9EJ", "2A:XFgcPHiQ6SYJ", "71:b8UD6gHfO6IJ", "9E:rwusJNoWjiQJ",

			  "FB:c-wHLtEdkf0J", "AE:brdZuMrvAMQJ", "E8:mzaxbrVLBOUJ", "4B:6ye4zJaCE_oJ",

			  "22:6fwxGNK3bJgJ", "B8:jwvALeEfsbcJ", "33:Yqx6f_8RvNgJ", "C2:sxB_6QG_Qb4J",

			  "C1:RDCyEcRfSgYJ", "AF:crKfJjXw_5MJ", "53:0DMvhUWTKb8J", "DC:e91ckrM89cEJ",

			  "B4:WDoT2alpGIUJ", "4D:bFmzm_4qu2kJ", "C4:0vD_dZABzHMJ", "1C:sz33mz3wOUQJ",

			  "C6:E7OZk_UQ4CkJ", "98:cLfnrVphpKwJ", "06:oZjZXvq5HtcJ", "64:iVU_MpjctIIJ",

			  "9F:X-bZvp5icB4J", "95:fNZpE0lgEn8J", "A2:RxHFAXHJtyAJ", "E3:6HrAalsLflAJ",

			  "3B:KqNbjwDqqCMJ", "BE:0RUKM-BlaPsJ", "0A:1q-lkiRNa7kJ", "76:m1ROBo00yiEJ",

			  "32:SkX0iYQQY_AJ", "40:vl95ZOX_Q4IJ", "09:ep_I291MX2cJ", "2F:2H1dZ2lZ248J",

			  "D4:N-GQv-Nx1z8J", "19:f561wYNWgkEJ", "D3:UON-_Wr60O8J", "74:KQJPHtyNoj4J",

			  "3A:lzls7PYvd34J", "F1:yQFSR4MaUpwJ", "CF:oRRo9yGdXSQJ", "4F:W6-iAz1ZqaUJ",

			  "28:Kx7vy-VBtpYJ", "7B:PyDg0PjbgxkJ", "F3:Rd1xXw4alLkJ", "31:FeaBmsxfey8J",

			  "20:YsNAjeTGJVEJ", "A9:leYDU1RuuwIJ", "81:jufN-4x1RnAJ", "CB:IhifTIhRpmoJ",

			  "87:8Maz8upc508J", "FA:5dh9_zqVdkIJ", "BA:xyZftsH8RFsJ", "50:L_zmPN_48bMJ",

			  "49:iLtQE1Q7CWMJ", "D6:TuKm3fTasSYJ", "FE:pls5MhpkpK8J", "60:thDCBIkyQ2EJ",

			  "85:CizK2j2yCBIJ", "23:IkmAcC6lNjIJ", "F8:kRRYwomQWhIJ", "8E:_v-YolETks4J",

			  "E1:Bf8Ltpee0v4J", "D0:0YM5CoDmx8MJ", "92:D9zUj4QVc2sJ", "0C:FsKZkZ1R7t4J",

			  "45:NVX4OCi9WXAJ", "A7:aQAFb1464l4J", "68:aej8Xg6iVhkJ", "A5:EHkO0tMtSN4J",

			  "F6:49-gxPeD0IwJ", "5E:bpLwYqr-990J", "C0:mawuaWJa1boJ", "00:NEU6wRmGVq4J",

			  "84:h5LxuUdV03oJ", "D9:-Eup1YnE6-0J", "FC:7fjrc7LzjskJ", "03:LJouzaZ6nakJ",

			  "C3:3cyoIZdesRYJ", "EB:GumIzK6Xwv8J", "12:KYkKkVzbW-UJ", "AB:EHkO0tMtSN4J",

			  "30:vrZQ1rXJEg4J", "CE:AbXWG_eCFZYJ", "6B:EOhnwwtJMz4J", "5F:PyDg0PjbgxkJ",

			  "62:zzxVlWrc94AJ", "F2:CwpwlljQ5RUJ", "7F:9aqBJNfDaUEJ", "EE:CWVFy5sgo9MJ",

			  "4C:JDNgZADQwGkJ", "58:uJB16vUcH38J", "3D:Jij2JFUry5gJ", "C8:v7juRN1cZ4EJ",

			  "1E:16e59DDxd1QJ", "69:y1f3FuaNqhEJ", "B0:4cYEeKseVRYJ", "37:Hnm8AysFIvgJ",

			  "1D:qFpNdOAQ868J", "21:Ypml6jLyoaEJ", "34:UhJBrAWg8MAJ", "A0:xTaArVPF51IJ",

			  "EF:14kwBS4zH4kJ", "ED:eUzfBgFaYAYJ", "51:1RWzov84HGsJ", "72:WRUq1C2UF7YJ",

			  "24:TkF3I-3AqsoJ", "6E:Cxb4nb_-6wQJ", "CC:Cfwjydcm5VUJ", "94:3V77coCFoyUJ",

			  "0E:lfqBck_AckoJ", "C7:qTuFDoAZZAIJ", "E4:X9O9H0rf7UwJ", "A1:dh_aVJQg-fQJ",

			  "1B:SSUHFP88ICIJ", "9A:8LRpia1kQyoJ", "A8:6OB8e96ajfIJ", "8D:sekIn_D0FY4J",

			  "9D:sQbLyZCjcMwJ", "9C:at2mlybzsckJ", "2D:gagHFe3EgRcJ", "7C:sbERUkuwrgkJ",

			  "DF:jIbY1S4jGOQJ", "15:sQ5gc2skXDoJ", "B5:qpQ_jThwIfwJ", "E7:bujGGLRs6f8J",

			  "B9:FC8WDc6FfQAJ", "AC:7PqlCpunKtMJ", "90:6bCXBm-ZoeMJ", "05:kUDeAWh_o54J",

			  "46:BTA_qt_HhUkJ", "3E:3fscTyozTmYJ", "14:dsppEkkJ6vIJ", "AA:q8Xw6c1aDJQJ",

			  "5C:1Yy-Elilf_wJ", "67:sYb7HA_7lCwJ", "99:kPiuzGwRUKIJ", "E2:3NCEoBX-P-gJ",

			  "7D:gOHngHfzX8YJ", "2C:1j66DXvpuf8J", "07:rWnu8lphvZcJ", "CA:PFnVqjCPIKIJ",

			  "D7:ydg0kWMXDeoJ", "5A:n33l1U6zbEIJ", "57:hKzAPG_v3g4J", "3F:XGwx9FgVixQJ",

			  "36:abLa4yOIyW4J", "10:sMDENsqLts0J", "D2:gJsgjLw3nSQJ", "E0:Z_K4hdZq7h8J",

			  "75:3C-XszC6kyMJ", "77:rtHRfe9A27YJ", "97:-eflxIU8g04J", "F0:SwVcyzirnnQJ",

			  "65:7-hjyVDnHjEJ", "A3:hruuOW22_L8J", "F9:lEPeKx6ket4J", "88:M3DdYOcDTWwJ",

			  "FD:Cfwjydcm5VUJ", "42:HNXS6FBy7AUJ", "4A:-n4dEXmbmyMJ", "F7:IPDuatbjjRoJ",

			  "52:2xrwdGDvyaEJ", "5B:vEMG_nMaZygJ", "27:hfidgDDREMsJ", "70:DJ1-bAcdQE8J",

			  "78:aej8Xg6iVhkJ", "61:4SHBf-6ctTQJ", "BF:oJWMF8g4n98J", "3C:wbyliY5Fw7cJ",

			  "BD:dyCQwPoi_QoJ", "6D:ROtjpJaaM3AJ", "D1:u77vCPi7NX4J", "DA:jr7lZOIXHE4J",

			  "80:hvDWT2JOOHIJ", "48:hfidgDDREMsJ", "8B:TMDNdWekwlEJ", "73:13SgY09fd9QJ",

			  "7E:tx3mt6GYR5oJ", "B3:JTLUoSksUFAJ", "63:DyaRtEUhtg4J", "0B:1q-lkiRNa7kJ",

			  "93:L3R7clDgu44J", "F5:o-lzUg48_5UJ", "01:6YJy7S3OGt8J", "26:vs3cbrj7Bi0J",

			  "7A:C6L9XGQS6i8J", "A4:iMWi3RNzLHUJ", "8F:2ELg7mGC5yUJ", "1A:rZEfAj2wHgYJ",

			  "A6:kP-bP5hmF9cJ", "18:KcznZAsaAk0J", "FF:kp-fx5_9CzsJ", "6C:5I-cinT_0_4J",

			  "8C:zaUGihUPAJwJ", "0F:AIt7UQkMmZkJ", "9B:FYtibg-zD20J", "B7:A2SiPb4NwWQJ",

			  "89:isoWmMm2QssJ", "C5:CibMCkpl2kAJ", "0D:g9lghtXOAFMJ", "38:gWcquZBJFPIJ",

			  "11:_TotMQXuZdgJ", "6A:24tx-mIpwmwJ", "8A:-FAi_YRhbrgJ", "1F:kQEIlYRdi2QJ",

			  "41:FoWhbx2IxiUJ", "4E:XFlq06C_YeMJ", "13:vKSdbEgs9aoJ", "D5:m415gDZ2B-UJ",

			  "AD:hWBrF9YLK78J", "2B:HqEtb7AADmMJ", "DE:eCFYrqg0WsEJ", "16:QLTeOYg-yB8J",

			  "BB:jk-d_Ua8BtIJ", "C9:u0J9izcWwvAJ", "91:NM3JgAgreZQJ", "04:sYb7HA_7lCwJ",

			  "08:VwTb3zO7tL8J", "DD:kwlsYdonpIgJ", "F4:_LIV45PtumsJ", "EC:rpMyxZmO6LwJ",

			  "54:bDNO5Nsce9EJ", "2A:XFgcPHiQ6SYJ", "71:b8UD6gHfO6IJ", "9E:rwusJNoWjiQJ",

			  "FB:c-wHLtEdkf0J", "AE:brdZuMrvAMQJ", "E8:mzaxbrVLBOUJ", "4B:6ye4zJaCE_oJ",

			  "22:6fwxGNK3bJgJ", "B8:jwvALeEfsbcJ", "33:Yqx6f_8RvNgJ", "C2:sxB_6QG_Qb4J",

			  "C1:RDCyEcRfSgYJ", "AF:crKfJjXw_5MJ", "53:0DMvhUWTKb8J", "DC:e91ckrM89cEJ",

			  "B4:WDoT2alpGIUJ", "4D:bFmzm_4qu2kJ", "C4:0vD_dZABzHMJ", "1C:sz33mz3wOUQJ",

			  "C6:E7OZk_UQ4CkJ", "98:cLfnrVphpKwJ", "06:oZjZXvq5HtcJ", "64:iVU_MpjctIIJ",

			  "9F:X-bZvp5icB4J", "95:fNZpE0lgEn8J", "A2:RxHFAXHJtyAJ", "E3:6HrAalsLflAJ",

			  "3B:KqNbjwDqqCMJ", "BE:0RUKM-BlaPsJ", "0A:1q-lkiRNa7kJ", "76:m1ROBo00yiEJ",

			  "32:SkX0iYQQY_AJ", "40:vl95ZOX_Q4IJ", "09:ep_I291MX2cJ", "2F:2H1dZ2lZ248J",

			  "D4:N-GQv-Nx1z8J", "19:f561wYNWgkEJ", "D3:UON-_Wr60O8J", "74:KQJPHtyNoj4J",

			  "3A:lzls7PYvd34J", "F1:yQFSR4MaUpwJ", "CF:oRRo9yGdXSQJ", "4F:W6-iAz1ZqaUJ",

			  "29:C-dd67rIqqwJ", "66:GO4Tc1u-ugYJ", "DB:eC0ElD1t9J0J", "43:d6NIXjVJ7KUJ",

			  "82:Io93RHeLXQEJ", "CD:NXjNyJgzy4IJ", "25:_n6PawUEkHcJ", "B2:Lc1qYSv3UhUJ",

			  "BC:I-13107CCxIJ", "83:Y61PENPCqEkJ", "EA:9TqNFzh4Z_oJ", "47:NwDZxatOEc4J",

			  "B1:B-TsYBhWagAJ", "6F:fHVktF7dziUJ", "D8:xzpGFu00WYwJ", "35:9Rk1mF1piREJ",

			  "E9:JFkbdecjI8MJ", "96:CBItbsrnoXMJ", "55:noMLzjxCNboJ", "86:sKdRXX1_KzwJ",

			  "B6:VUPwfdt9GXQJ", "39:rCHm8PFbAI8J", "5D:4NwxRMobURQJ", "79:kiWLB6a7E5MJ",

			  "02:wS3Nm-eK00cJ", "E5:eRnVynYCgSsJ", "2E:Pus5p0uY2KkJ", "17:tOuRl4j_h8EJ",

			  "56:YmAwCsJOu2kJ", "59:zl6uZ0sBNPkJ", "E6:gDEADZ7sg_4J", "44:IrzQsQh4XsIJ",

			};

		Map entries = new HashMap();
		for (String clue : clues) {
			String key = clue.substring(0, clue.indexOf(':'));
			String val = clue.substring(clue.indexOf(':') + 1, clue.length());

			entries.put(Integer.parseInt(key, RADIX_16), val);
		}
		return entries;
    }
}</pre>
<p>Enjoy!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/284/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=284&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/06/30/image-a-nation-challenge-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>

		<media:content url="http://lh6.ggpht.com/_y9ipUdwtLqo/SkqPhumNqJI/AAAAAAAAAUQ/zU-BldEYV-c/s400/Picture%201.jpg" medium="image">
			<media:title type="html">Sceenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up logging mechanism in Django</title>
		<link>http://110j.wordpress.com/2009/06/27/setting-up-logging-mechanism-in-django/</link>
		<comments>http://110j.wordpress.com/2009/06/27/setting-up-logging-mechanism-in-django/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 22:30:28 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=277</guid>
		<description><![CDATA[Coming from a Java world where projects and libraries without logging are unheard, it was a big surprise to see that all django apps that I have downloaded so far do not include logging, even though Python has a very good support for logging, it was inspired by the log4j. For a reason that I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=277&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Coming from a Java world where projects and libraries without logging are unheard, it was a big surprise to see that all django apps that I have downloaded so far do not include logging, even though Python has a very good support for logging, it was inspired by the log4j. For a reason that I do not know they choose not to log, I suppose it is a kind of situation where everyone else knows but me!</p>
<p>So as a java developer used to work with a lot of logging I decided to put in place a logging mechanism for my django project and fortunately python has great support for that:<br />
1. create a logging.conf file for the logging options<br />
2. configuring the logging module<br />
3. using the logger in my modules</p>
<p>So here is my simple set up:<br />
1. create a logging.conf file for the logging options with the following content:</p>
<pre>[loggers]
keys=root,core_view_logger

[handlers]
keys=consoleHandler,core_view_handler

[formatters]
keys=simpleFormatter

[logger_root]
level=NOTSET
handlers=consoleHandler

[logger_core_view_logger]
level=DEBUG
handlers=core_view_handler
qualname=core_view_logger
propagate=0

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)

[handler_core_view_handler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=simpleFormatter
args=('logs/core_logger.log', 'a', 1000000, 4)

[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=</pre>
<p>2. configuring the logging module in the settings.py</p>
<pre>import logging
import logging.config

LOGGING_CONFIG = 'logging.conf' # logging configuration file
logging.config.fileConfig(LOGGING_CONFIG)</pre>
<p>3.use the logger in your modules</p>
<pre>import logging 

logger = logging.getLogger('core_view_logger');

def doSomething(request):
    logger.debug('This is a debug message')
    logger.info('This is an info message')
    logger.warning('This is a warning message')
    logger.error('This is an error message')
    logger.critical('Yes it is so simple :)')</pre>
<p>That&#8217;s all folks!<br />
But of course this is a simple set up and you can do more much more:</p>
<ul>
<li>Logging to multiple destinations</li>
<li>Adding contextual information to the output</li>
<li>Send and receive logging information across network</li>
<li>Send logging information through email</li>
</ul>
<p>Check the python official documentation for all the options <a title="Python Docs" href="http://docs.python.org/library/logging.html" target="_blank">http://docs.python.org/library/logging.html</a></p>
<p>Enjoy!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=277&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/06/27/setting-up-logging-mechanism-in-django/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>
	</item>
		<item>
		<title>Organize django applications in packages and modules</title>
		<link>http://110j.wordpress.com/2009/06/17/organize-django-applications/</link>
		<comments>http://110j.wordpress.com/2009/06/17/organize-django-applications/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 21:55:49 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[django models]]></category>
		<category><![CDATA[oraganizing code]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=246</guid>
		<description><![CDATA[When you create a django application you have one module to add your model classes the models.py and one module to add your views the views.py (also called actions in other web frameworks), and there are possibly other modules like forms.py and admin.py. This is perfectly fine when you have a small application with a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=246&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When you create a django application you have one module to add your model classes the models.py and one module to add your views the views.py (also called actions in other web frameworks), and there are possibly other modules like forms.py and admin.py. This is perfectly fine when you have a small application with a couple of classes in your models.py and few functions  in your views.py. However, this files start to become unmanageable when adding more and more code. For example, in one of my projects the views.py is more than 600 lines and the models.py contains more than 20 classes. For that reason I decided to split the models.py and put each class in its won module, and also organize the views.py in more modules depending on related functionality.</p>
<p>To split the views.py in more modules it&#8217;s a no brain task, it is simply a python module and there is nothing that can prevent you from doing so. However, the models.py needs more attention and few more steps to accomplish the task since this module is used by the manage.py module.</p>
<p>Lets take an example and organize the code so it is more manageable.<br />
Here&#8217;s how my application looks like at first, there is only one module for all model classes and one module for all views (actions):<br />
<img class="alignnone" title="initial project" src="http://lh6.ggpht.com/_y9ipUdwtLqo/Sjlgl2FhZfI/AAAAAAAAATc/6BAW5SbRLZU/s800/django_project.jpg" alt="" width="382" height="174" /><br />
This is how the models.py looks like<br />
Note that the code example is from the book &#8220;Learning Website Development with Django&#8221;:</p>
<pre>from django.db import models
from django.contrib.auth.models import User

class Link(models.Model):
    url = models.URLField(unique = True)

    def __str__(self):
        return self.url

class Bookmark(models.Model):
    title = models.CharField(max_length = 200)
    user = models.ForeignKey(User)
    link = models.ForeignKey(Link)

    def __str(self):
        return "%s, %s" % (self.user.username, self.link.url)

class Tag(models.Model):
    name = models.CharField(max_length = 64, unique = True)
    bookmarks = models.ManyToManyField(Bookmark)

    def __str__(self):
        return self.name

class SharedBookmark(models.Model):
    bookmark    = models.ForeignKey(Bookmark, unique = True)
    date        = models.DateTimeField(auto_now_add = True)
    votes       = models.IntegerField(default = 1)
    users_voted = models.ManyToManyField(User)

    def __str__(self):
        return '%s, %s' % self.bookmark, self.votes</pre>
<p>This is only a small part of the views.py module, in the real example there are more than 200 lines of code:</p>
<pre>from django.core.exceptions import ObjectDoesNotExist
from django.template import Context
from django.template import RequestContext
from django.template.loader import get_template
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.contrib.auth import logout
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from bookmarks.forms import *
from bookmarks.models import * 

def main_page(request):
    shared_bookmarks = SharedBookmark.objects.order_by('-date')[:10]
    variables = RequestContext(request,
                {'shared_bookmarks': shared_bookmarks})
    return render_to_response('main_page.html', variables)

@login_required()
def user_page(request, username):
    user = get_object_or_404(User, username=username)
    bookmarks = user.bookmark_set.order_by('-id')
    variables = RequestContext(request,
                {'bookmarks': bookmarks,
                 'username': username,
                 'show_tags': True,
                 'show_edit': username == request.user.username, })
    return render_to_response('user_page.html', variables)

def logout_page(request):
    logout(request)
    return HttpResponseRedirect('/')

def register_page(request):
    form = RegistrationForm(request.GET)
    if request.method == 'POST':
        form = RegistrationForm(request.POST)
    if form.is_valid():
        user = User.objects.create_user(username=form.cleaned_data['username'],
                                        password=form.cleaned_data['password1'],
                                        email=form.cleaned_data['email'])
        return HttpResponseRedirect('/register/success/')
    else:
        form = RegistrationForm()
        variables = RequestContext(request, {'form': form})
    return render_to_response('registration/register.html', variables)</pre>
<p>So I will take a more Java approach and create two packages one for the model and one for the views:<br />
<img class="alignnone" title="refactored project" src="http://lh3.ggpht.com/_y9ipUdwtLqo/SjlW0jwjkcI/AAAAAAAAATA/iAT-Z64u9aI/s800/refactored_project.jpg" alt="" width="382" height="328" /><br />
As I said, there is no problem whatsoever to organize the views.py into more modules, the authentication.py module is an example of the separated functionality:</p>
<pre>from django.template import RequestContext
from django.template.loader import get_template
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.contrib.auth import logout
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404

@login_required()
def user_page(request, username):
    user = get_object_or_404(User, username=username)
    bookmarks = user.bookmark_set.order_by('-id')
    variables = RequestContext(request,
                {'bookmarks': bookmarks,
                 'username': username,
                 'show_tags': True,
                 'show_edit': username == request.user.username,})
    return render_to_response('user_page.html', variables)

def logout_page(request):
    logout(request)
    return HttpResponseRedirect('/')</pre>
<p>Separating model classes and placing them into their won module follows, for brevity only the Bookmark class will be shown but all the other classes are separated in similar way. The difference now is that we have added a class inside Bookmark class called Meta with the field called app_label where we define the name of the application, if you do not add this field then the separation will not work, there is a workaround which requires to modify the the manage.py. Note that the Meta class can be used for a lot more things, like the ordering of objects for example. Here is the bookmark module:</p>
<pre>from django.db import models
from django.contrib.auth.models import User

from media.bookmarks import *

class Bookmark(models.Model):
    title = models.CharField(max_length = 200)
    user = models.ForeignKey(User)
    link = models.ForeignKey(Link)

    def __str(self):
        return "%s, %s" % (self.user.username, self.link.url)

    class Meta:
        app_label = 'bookmarks'</pre>
<p>Another thing that should be done is to add the following import lines in the __init__.py, this way the manage.py can find your classes and you can import your model classes as you did previously:</p>
<pre>from bookmarks import Bookmark
from link import Link
from sharedbookmark import SharedBookmark
from tag import Tag</pre>
<p>The same for the views, I use the * here since I want to import every function from the modules but you can define the function names there:</p>
<pre>from authentication import *
from registration import *
from search import *</pre>
<p>Of course the admin.py and the forms.py modules can be organized in the same way.</p>
<p>The concept of django applications is to be small and focused on certain and related functionality so that they can be plugged in different projects without tweaking and maybe that is the reason that the code is organized in a simple modules instead of packages.  But I think this way the application looks cleaner and more manageable even for the small ones, or maybe I have been exposed to Java for a long time and it looks more like a Java application&#8230;</p>
<p>Enjoy!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/246/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=246&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/06/17/organize-django-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>

		<media:content url="http://lh6.ggpht.com/_y9ipUdwtLqo/Sjlgl2FhZfI/AAAAAAAAATc/6BAW5SbRLZU/s800/django_project.jpg" medium="image">
			<media:title type="html">initial project</media:title>
		</media:content>

		<media:content url="http://lh3.ggpht.com/_y9ipUdwtLqo/SjlW0jwjkcI/AAAAAAAAATA/iAT-Z64u9aI/s800/refactored_project.jpg" medium="image">
			<media:title type="html">refactored project</media:title>
		</media:content>
	</item>
		<item>
		<title>django books</title>
		<link>http://110j.wordpress.com/2009/05/11/django-books/</link>
		<comments>http://110j.wordpress.com/2009/05/11/django-books/#comments</comments>
		<pubDate>Mon, 11 May 2009 13:09:19 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=211</guid>
		<description><![CDATA[Django is a popular python web framework. It is relatively easy and you can learn it from the tutorials that are provided by the django team. Although the tutorials are very good, for a more professional and in depth learning one should consider to buy a book or two. In the market there are excellent [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=211&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Django is a popular python web framework. It is relatively easy and you can learn it from the tutorials that are provided by the django team. Although the tutorials are very good, for a more professional and in depth learning one should consider to buy a book or two. In the market there are excellent books for django.</p>
<p><strong>Apress has already three titles and two of them are preparing their second edition:</strong></p>
<p><a href="http://www.apress.com/book/view/1590597257"><img class="alignleft" title="djago book image" src="http://www.apress.com/resource/bookcover/9781590597255" alt="" width="77" height="101" />The Definitive Guide to Django: Web Development Done Right</a></p>
<p>The first part of the book introduces Django fundamentals like installation and configuration. You’ll learn about creating the components that power a Django–driven web site. The second part delves into the more sophisticated features of Django, like outputting non–HTML content (such as RSS feeds and PDFs), plus caching and user management. The third part serves as a detailed reference to Django’s many configuration options and commands. The book even includes seven appendixes for looking up configurations options and commands. Anyone that does serious development with django must have this book. In June 2009 the <a href="http://www.apress.com/book/view/143021936x" target="_blank">second edition</a> is coming out.<br />
<img class="alignleft" title="Practical Django Projects" src="http://www.apress.com/resource/bookcover/9781590599969" alt="" width="77" height="101" /></p>
<p><a href="http://www.apress.com/book/view/1590599969">Practical Django Projects</a></p>
<p>Build a django content management system, blog, and social networking site with <strong>James Bennett</strong> as he introduces the popular Django framework.<br />
You’ll work through the development of each project, implementing and running the applications while learning new features along the way. In June 2009 the <a href="http://www.apress.com/book/view/1430219386" target="_blank">second edition</a> is coming out.</p>
<p><a href="http://www.apress.com/book/view/1430210478"><img class="alignleft" title="Pro Django" src="http://www.apress.com/resource/bookcover/9781430210474" alt="" width="77" height="101" />Pro Django</a></p>
<p><em>Pro Django</em> more or less picks up where <em>The Definitive Guide to Django</em> left off and examines in greater detail the unusual and complex problems that Python web application developers can face and how to solve them. This book is for companies looking for a framework capable of supporting enterprise needs, as well as advanced Python or web developers looking to solve unusual, complex problems.</p>
<p><strong>Packt Publishing has also three titles:</strong></p>
<p><a title="Learning Website Development with Django" href="http://www.packtpub.com/django-website-development-tutorial/book"><img class="alignleft" title="Learning website development" src="http://images.packtpub.com/images/100x123/1847193358.png" alt="" width="100" height="123" />Learning Website Development with Django</a></p>
<p>This is an excellent book to begin djano, it also contain a chapter on how to integrate django with jQuery. This book will show you how to assemble Django’s features and leverage its power to design, develop, and deploy a fully-featured website. It will walk you through the creation of an example web application, with lots of code. Each chapter will add new features to the site, and show what parts of Django to work on to build these features.</p>
<p><a title="Django 1.0 Template Development" href="http://www.packtpub.com/django-1.0-template-design-practical-guide/book"><img class="alignleft" title="Template development" src="http://images.packtpub.com/images/100x123/1847195709.png" alt="" width="100" height="123" />Django 1.0 Template Development</a></p>
<p>This book will help you to master the Django template system. Built-in template tags and filters are explained with examples and usage notes, as well as information on building custom tags and filters to extend the system for your needs. You will learn to use inheritance to create modular templates that are easy to maintain. You will learn how to serve multiple templates from within the same Django project, with an example of how to serve different templates for a mobile version of your site without having to change any code in your views. Pagination, internationalization, caching, and customization of the automatic admin application are also covered.</p>
<p><a title="Django 1.0 Website Development" href="http://www.packtpub.com/django-1-0-website-development-2nd-edition/book"><img class="alignleft" title="Web site development" src="http://images.packtpub.com/images/100x123/1847196780.png" alt="" width="100" height="123" />Django 1.0 Website Development</a><br />
This book will show you how to assemble Django&#8217;s features and take advantage of its power to design, develop, and deploy a fully-featured web site. It will walk you through the creation of an example web application, with lots of code examples. Specially revised for version 1.0 of Django, the book starts by introducing the main design concepts in Django. Next, it leads you through the process of installing Django on your system. After that, you will start right away on building your social bookmarking application using Django. Various Django 1.0 components and sub-frameworks will be explained during this process, and you will learn about them by example.</p>
<p><strong>Addison-Wesley Professional:</strong></p>
<p><a class="title" href="http://www.informit.com/title/0132356139"><img class="alignleft" title="addison-wesley" src="http://www.informit.com/ShowCover.aspx?isbn=0132356139&amp;type=f" alt="" width="160" height="206" />Python Web Development with Django<br />
</a>This complete guide starts by introducing Python, Django, and Web development concepts, then dives into the Django framework, providing a deep understanding of its major components (models, views, templates), and how they come together to form complete Web applications. After a discussion of four independent working Django applications, coverage turns to advanced topics, such as caching, extending the template system, syndication, admin customization, and testing. Valuable reference appendices cover using the command-line, installing and configuring Django, development tools, exploring existing Django applications, the Google App Engine, and how to get more involved with the Django community.</p>
<p><strong>Sams Publishing:</strong><br />
<a class="title" href="http://www.informit.com/title/067232959X"><img class="alignleft" title="sams publishing" src="http://www.informit.com/ShowCover.aspx?isbn=067232959X&amp;type=f" alt="" width="160" height="209" />Sams Teach Yourself Django in 24 Hours</a><br />
Designed for experienced website developers who have at least some familiarity with the Python programming language, this book uses a straightforward, step-by-step approach. Each lesson builds on the previous ones, enabling you to learn the essentials of implementing the Django framework on a website from the ground up.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=211&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/05/11/django-books/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>

		<media:content url="http://www.apress.com/resource/bookcover/9781590597255" medium="image">
			<media:title type="html">djago book image</media:title>
		</media:content>

		<media:content url="http://www.apress.com/resource/bookcover/9781590599969" medium="image">
			<media:title type="html">Practical Django Projects</media:title>
		</media:content>

		<media:content url="http://www.apress.com/resource/bookcover/9781430210474" medium="image">
			<media:title type="html">Pro Django</media:title>
		</media:content>

		<media:content url="http://images.packtpub.com/images/100x123/1847193358.png" medium="image">
			<media:title type="html">Learning website development</media:title>
		</media:content>

		<media:content url="http://images.packtpub.com/images/100x123/1847195709.png" medium="image">
			<media:title type="html">Template development</media:title>
		</media:content>

		<media:content url="http://images.packtpub.com/images/100x123/1847196780.png" medium="image">
			<media:title type="html">Web site development</media:title>
		</media:content>

		<media:content url="http://www.informit.com/ShowCover.aspx?isbn=0132356139&#38;type=f" medium="image">
			<media:title type="html">addison-wesley</media:title>
		</media:content>

		<media:content url="http://www.informit.com/ShowCover.aspx?isbn=067232959X&#38;type=f" medium="image">
			<media:title type="html">sams publishing</media:title>
		</media:content>
	</item>
		<item>
		<title>django template tag for active CSS class</title>
		<link>http://110j.wordpress.com/2009/01/25/django-template-tag-for-active-class/</link>
		<comments>http://110j.wordpress.com/2009/01/25/django-template-tag-for-active-class/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 12:02:54 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[active link]]></category>
		<category><![CDATA[django template]]></category>
		<category><![CDATA[navigation bar]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=198</guid>
		<description><![CDATA[Navigation bar is an important part of the web application since it is the map that guides the users in different parts of the application. For better user experience navigation bars should indication which option is currently selected by the user. A common way to indicate which option is selected is by simply changing the CSS [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=198&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Navigation bar is an important part of the web application since it is the map that guides the users in different parts of the application. For better user experience navigation bars should indication which option is currently selected by the user. A common way to indicate which option is selected is by simply changing the CSS style of the selected option.</p>
<p><a title="Vincent Foley blog" href="http://gnuvince.wordpress.com" target="_blank">Vincent Foley</a> has a very good article in his blog of how to implement a navigation bar in django. I include the latest paragraph of his post here, so if you are not familiar with url patterns and django template tags please read the full <a title="post on navigation bar in django" href="http://gnuvince.wordpress.com/2007/09/14/a-django-template-tag-for-the-current-active-page/" target="_blank">article of Vincent:</a></p>
<blockquote>
<pre><code>## tags.py
@register.simple_tag
def active(request, pattern):
    import re
    if re.search(pattern, request.path):
        return 'active'
    return ''

&lt;!-- navigation --&gt;

{% load tags %}
&lt;div id="navigation"&gt;
    &lt;a class="{% active request "^/$" %}" href="/"&gt;Home&lt;/a&gt;
    &lt;a class="{% active request "^/services/" %}" href="/services/"&gt;Services&lt;/a&gt;
    &lt;a class="{% active request "^/contact/" %}" href="/contact/"&gt;Contact&lt;/a&gt;
&lt;/div&gt;</code></pre>
</blockquote>
<p>This is a pretty good implementation but from my point of view it has one problem. It binds the url patterns with the template page. If you need to change the url pattern you must not forget to change the template also. Furthermore, what happens if you ship the application and the client decides to change the urls of the application.</p>
<p>Fortunately django has two features that allows to push this implementation one step further.<br />
The first feature is that in django we can name the the url patterns, so the urls.py will look something like this:</p>
<blockquote><p><code>## urls.py<br />
urlpatterns += patterns('',<br />
(r'/$', view_home_method, '<strong>home_url_name</strong>'),<br />
(r'/services/$', view_services_method, '<strong>services_url_name</strong>'),<br />
(r'/contact/$', view_contact_method, '<strong>contact_url_name</strong>'),<br />
)<br />
</code></p></blockquote>
<p>The second feature is that we can create variables in the template page, the following code creates three variables (home, services and contact) these variables holds the url patterns for the respective names:</p>
<blockquote><p>{% url home_url_name as home %}<br />
{% url services_url_name as services %}<br />
{% url contact_url_name as contact %}</p></blockquote>
<p>Combining these two features of django we can modify the code of Vincent as follows:</p>
<blockquote>
<pre><code>{% load tags %}
</code>
<code>{% url home_url_name as home %}
{% url services_url_name as services %}
{% url contact_url_name as contact %}</code>
<code>
&lt;div id="navigation"&gt;
    &lt;a class="{% active request <strong>home</strong> %}" href="<strong>home</strong>"&gt;Home&lt;/a&gt;
    &lt;a class="{% active request <strong>services</strong> %}" href="<strong>services</strong>"&gt;Services&lt;/a&gt;
    &lt;a class="{% active request <strong>contact</strong> %}" href="<strong>contact</strong>"&gt;Contact&lt;/a&gt;
&lt;/div&gt;</code></pre>
</blockquote>
<p>As you can see we have totally decoupled the url patters from the template page. I know we have coupled it with the url names but there are no reasons whatsoever to change the url names since they are not visible anywhere, from now on we can change the url patterns as we wish.<br />
Also note that the <strong>href</strong> tag has changed to the new variable that we created so it points to the correct url.</p>
<p>Important: There is not need to change the template tag.</p>
<p>Enjoy.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=198&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2009/01/25/django-template-tag-for-active-class/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>
	</item>
		<item>
		<title>javafx on google app engine</title>
		<link>http://110j.wordpress.com/2008/12/31/javafx-on-google-app-engine/</link>
		<comments>http://110j.wordpress.com/2008/12/31/javafx-on-google-app-engine/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 03:43:27 +0000</pubDate>
		<dc:creator>Omer Haderi</dc:creator>
				<category><![CDATA[App Engine]]></category>
		<category><![CDATA[JavaFX Script]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[javafx demo]]></category>
		<category><![CDATA[javafx example]]></category>
		<category><![CDATA[JavaFX Technology]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://110j.wordpress.com/?p=182</guid>
		<description><![CDATA[Two weeks ago I started to work with python and the django framework in order to deploy a web application in google app engine. (I am really amazed of how fast you can build web applications with python &#38; django &#8211; but this will be another post :)
Since JavaFX is my favorite RIA technology I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=182&subd=110j&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Two weeks ago I started to work with python and the django framework in order to deploy a web application in google app engine. (I am really amazed of how fast you can build web applications with python &amp; django &#8211; but this will be another post :)</p>
<p>Since JavaFX is my favorite RIA technology I was wondering if we can deploy javafx applications on google app engine. So I started a new project and after 20 minutes it was ready. What surprised me the most is the fact that it is really easy to deploy javafx applications into google app engine. Keep in mind, however, that this is a simple example and I don&#8217;t  access the database or other services that are offered by google app engine (maybe I will try that next year ;) .</p>
<p>What you really need to do is to pack your javafx application as an applet and place it under a folder in the google app engine application, declare that folder as a static resource in the app.yaml configuration file and finally use python to write it to the response.</p>
<p>Lets go through it step by step:</p>
<p>1. Create your javafx application and pack it as applet. For this example I will use the SpringAnimation of Josh Marinacci which you can find it here <a href="http://javafx.com/samples/SpringAnimation/index.html" target="_blank">http://javafx.com/samples/SpringAnimation/index.html<br />
</a></p>
<p>2. Create a google app engine application. Instructions on how to create an app engine application can be found <a href="http://code.google.com/appengine/docs/gettingstarted/" target="_blank">here</a><br />
I have ported the google app engine application into eclipse and it looks something like this:<br />
<img class="alignnone" title="application structure" src="http://lh4.ggpht.com/_y9ipUdwtLqo/SVrfJwXaZjI/AAAAAAAAAQ0/eA4JxYogSMA/s400/project-structure.PNG" alt="" width="333" height="225" /></p>
<p>The most important files are the app.yaml where we need to declare that the javafx folder will serve static files and the mainapp.py python file which will serve our application.</p>
<p>Lets see the app.yaml file<br />
<img class="alignnone" title="app-yaml file" src="http://lh3.ggpht.com/_y9ipUdwtLqo/SVrfJZLvo6I/AAAAAAAAAQk/0QZSR21oHZE/s400/app-yaml.PNG" alt="" width="400" height="267" /></p>
<p>So in the app.yaml configuration file we tell app engine that the application name is javafxtest, we declare the static folder under the handlers and we configure all the urls to be forwarded to the python file mainapp.py</p>
<p>Lets have a look at the python file<br />
<img class="alignnone" title="python" src="http://lh6.ggpht.com/_y9ipUdwtLqo/SVrfJ5acL5I/AAAAAAAAAQs/nn8rBzCNpbs/s800/mainapp_py.PNG" alt="" width="589" height="612" /></p>
<p>The content of this file is straightforward, we just write html code to the response. Note how we refer to the jar file and the folder that servers the static files. In the same folder with the jar file there is also the SpringAnimation_browser.jnlp file, we have to edit this file and change the <strong>codebase </strong>to the appropriate one (for me it was <strong>codebase=&#8221;http://localhost:9999/javafx/</strong>&#8220;) to test the application locally before uploading it, when you are about to upload it, change the codebase to the url of the app engine (for me it is <strong>codebase=&#8221;http://javafxtest.appspot.com/javafx&#8221;</strong>)</p>
<p>3. Upload the application in the app engine. The command to upload the application is <strong>python appcfg.py update<em> &lt;PROJECT_PATH&gt;\JavaFXonGAE\src</em></strong> enter the email address and the password. You need to create an account if you do not have one.<br />
You can find more info on how to deploy app engine applications <a href="http://code.google.com/appengine/docs/gettingstarted/uploading.html" target="_blank">here</a></p>
<p>You can access the application at <a href="http://javafxtest.appspot.com/" target="_blank">http://javafxtest.appspot.com/</a></p>
<p>Resources:<br />
Google app engine: http://code.google.com/appengine/docs/gettingstarted/<br />
JavaFX: http://javafx.com/samples/SpringAnimation/index.html</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/110j.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/110j.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/110j.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/110j.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/110j.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/110j.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/110j.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/110j.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/110j.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/110j.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=110j.wordpress.com&blog=4040246&post=182&subd=110j&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://110j.wordpress.com/2008/12/31/javafx-on-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c36e5681a3f88b95dd5d402fb2baf01?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">110j</media:title>
		</media:content>

		<media:content url="http://lh4.ggpht.com/_y9ipUdwtLqo/SVrfJwXaZjI/AAAAAAAAAQ0/eA4JxYogSMA/s400/project-structure.PNG" medium="image">
			<media:title type="html">application structure</media:title>
		</media:content>

		<media:content url="http://lh3.ggpht.com/_y9ipUdwtLqo/SVrfJZLvo6I/AAAAAAAAAQk/0QZSR21oHZE/s400/app-yaml.PNG" medium="image">
			<media:title type="html">app-yaml file</media:title>
		</media:content>

		<media:content url="http://lh6.ggpht.com/_y9ipUdwtLqo/SVrfJ5acL5I/AAAAAAAAAQs/nn8rBzCNpbs/s800/mainapp_py.PNG" medium="image">
			<media:title type="html">python</media:title>
		</media:content>
	</item>
	</channel>
</rss>