Introducing My Secret Project

Some friends of mine may know what I am actually working on, but the details are irrelevant here. What this topic is about is how I am developing this project. I spend a few hours on the #twisted irc channel getting a lot of help and want to give back to the community so here goes. How to make a massively cool web site on a tight budget.

1. make a directory for your project on your development computer

2. Build a prototype in HTML that has all the functional options you may want to provide. Show it to some friends and get positive feedback about all the power you can provide.

3. Start thinking about the complexity of specifying and using all those features and shove all those files into a subdirectory of your project called proto

4. check the directory into revision control. I am using subversion on my latptop to a reposiotry also on my laptop.

5. make a directory called site and make the entire HTML for your site again thinking carefullly about how much work it will take for the user to understand what you are offering and whether anyone really cares to have each bit of functionality in version 1. You want to trim to the bare minimum at this stage.

6. Make a directory called src and a directory called test.

7. choose python to develop your application because python programmers are more likely to be smart and saavy and culturally in sync with you than most other languages (because it is a little obscure and a little mainstream and very powerful).

8. Put a config.py file in your test directory. It wll be used by both your test runner and your site runner. config.py should start off looking like this:


    fileBase="../site"
    scheme="http"
    host="myhost"
    port=8080

Update your hosts file so that myhost points to localhost.

9. Create test.py and start.py in your tests direcotry which both import config.py. start.py starts the website and test.py runs tests against the website. Here is my start.py:


    import sys
    sys.path.append("../src")
    import cospend.main as main
    import config
    main.start(config)

10. Using pyunit (the unittest module), write tests of the most basic functionality that you intend to implement (e.g. authorization) in test.py. test.py should end with unittest.main(). You may want to create an HTTP client module to automate some of the HTTP stuff inherent in all of these tests. (I did.)

Next up. Choosing a site development model to satisfy the tests and other constraints.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: