Tuesday, June 21, 2011

PEPBrowser: Introducing the Python PEP Browser

Introduction

Weeks ago I got interested in couchdb and also weeks ago a friend asks some advice regarding possible approaches in building a simple Android application, because of this I researched two topics, Couchdb and mobile application development. In my research, I discovered that this two topics intersect at some point, because Couchdb is being promoted in the mobile application domain through mobile Couchapps. This gave me an idea to combine my current research interests and develop a simple mobile Couchapp to further learn more about my current topics of interest.

As a simple project, I plan to develop a simple mobile app which lists down all Python Enhancement Proposals (PEPs), http://www.python.org/dev/peps/,  and allow the user to read each PEP. I chose this project as I found it useful from time to time to read PEPs to further understand Python language features. I doubt if this application would really be useful to anyone aside from me, but my intention is not to build a killer mobile app, but simply learn new software technologies.

Selected Software Technologies, Libraries, etc.

To implement this small project, I have chosen Couchdb to be the central technology. I plan to implement this project as a mobile Couchapp. In my research, I discovered that there are two ways of implementing Couchapps. One approach utilizes server-side scripts; this approach is discussed in chapters 10-14 of the book, "Couchdb: The Definitive Guide" (full text available at http://guide.couchdb.org/draft/index.html). Another approach utilizes client-side scripts; this approach uses the Evently Jquery plugin and is discussed in this page, http://couchapp.org/page/evently. I decided to use the client-side approach because I think its simpler than the server-side approach. Plus, I think that the main application of the server-side approach is for building web pages that should be friendly to search engines. Since this project is just a simple application which I intend to be served by a local mobile Couchdb server, it does not have to be friendly to search engine crawlers.

To easily create mobile application interfaces, I decided to use a mobile Javascript framework such as Jquerymobile, Sencha Touch, JQ Touch, etc. In the selection of which mobile Javascript  framework to use for this project,  I just went with my gut. I don't know why, but I felt most comfortable with using Jquerymobile. So for this project, I will use Jquerymobile for no clear reason.

Initial Research, Good Materials to Checkout to Understand the Technologies to be Used

Honestly, I got confused in my research on how to build Couchapps. This is because the book, "Couchdb: The Definitive Guide", discussed the use of server-side scripts in building Couchapps. Initially, I have decided to used the book, "Couchdb: The Definitive Guide", as my main reference. However, when I reached the chapters discussing how to create Couchapps I noticed that the book discussed a different approach than the one implemented in the latest version of the example application it used, https://github.com/jchris/sofa. I thought that the book was already outdated and the newer approach should be researched elsewhere. This lead me to the couchapp.org website, where I was able to learn about Evently and the Couchapps that primarily utilized client-side scripting.

It really took me sometime before I understood how to make Couchapps using Evently. I think this is because of the arrangement of the documentation in couchapp.org. Thus to help you get started with Couchapps and Evently faster, I have some suggestions.


  1. First, read chapters 1-9 of "Couchdb: The Definitive Guide". This chapters discusses the basics of Couchdb. There are also chapters dealing with Couchapps, but if you decide to use Evently, I think those chapters won't be as much help.
  2. Next, attentively watch and follow the Evently Guided Hackalong Screencast available through this url, http://www.youtube.com/watch?v=Xk5gaUURdJI. This would give you a jump start in learning how to use Evently and making Couchapps.
  3. To further reinforce what you learned in the screencast, read and follow this tutorial, http://couchapp.org/page/evently-do-it-yourself, and its succeeding tutorial, http://couchapp.org/page/evently-do-it-yourself-ii-state.
Following the above steps would enable you to learn Couchdb and Couchapps faster and prepare you to follow my posts regarding this project.

What to Expect in My Next Post

I have been writing for about an hour now (it's quite tiring), I'll end my blog post now but I'll give you some appetizers on what to expect in my next blog post.

Below are some screenshots on what I have implemented so far. Its not much since I haven't given much time, but I think its already quite substantial as a skeleton for the application.



I have also made available the code through github, https://github.com/nieldomingo/pepbrowser.

No comments:

Post a Comment