More Good Sites

April 1, 2007

http://www.w3schools.com

http://mezzoblue.com/css/cribsheet/

Login vs. Total Anonymity

April 1, 2007

I have decided to make it really simple, no login, to use the most basic features in my app. Then there will be an enormous value leap if you decide to login. Then there will be another 10-fold leap in value for the pay account. The ability to login is a prerequisite for initial launch. Pay accounts, if they happen will be way in the future.

I am beginning to think about the business model. Google Adsense, right? That is the obvious default. But maybe I should use Yahoo. I am using YUI. Who do I want to get bought by anyway?

I will strive for the following model. Some sort of contextual ads. The more you contribute the less ads you have to put up with. Pay accounts will be for those wishing to make use of features that don’t benefit the community, i.e. private features.

Django has user management built-in, so I have some reading to do.

Another Good Site for Links on WebDev

April 1, 2007

http://icant.co.uk/

Cool Sites

April 1, 2007

I cam across these two sites. They have helped me a lot.

http://kuler.adobe.com/

http://www.culturedcode.com/css/reference.html

Increment 2 Complete

April 1, 2007

I just finished another story, this completes increment 2. I probably have a couple more increments before this is ready to go online. I will stay in stealth mode until I have a working version online.

This is a pretty simple app but I think it will prove interesting.

I had a little trouble getting the AJAX working. Since I only need to update a single number on the screen, I pass the number back as text. Then I need to update the element. Turns out I can do this with the following call.

element.get(‘element’).lastChild.nodeValue = o.responseText;

element is a YAHOO.util.Element calling get(‘element’) gives me the DOM element. The next two calls get me to the text element I was updating. o.responseText is the number passed by the Django server.

Interesting Post

March 31, 2007

I just came across this post.

http://www.lecturefox.com/blog/top-10-resources-for-django-newbies

Dev Environment

March 31, 2007

I am a Product Operations Manager at a BioTech company. When I was a developer we used Eclipse on Ubuntu to develop enterprise Java apps. My current setup for this Django development is VIM on MacOSX. I am pretty happy with VIM but I have a lingering thought that my productivity would be so much higher with a decent text editor. Something with support for Python, Javascript, HTML, and CSS.

What is everyone else using?

Using Ajax

March 31, 2007

I have a server function for incrementing a counter and I need to expose this in the web interface again. The old routine used Javascript to make a server call. The server call updated the data on the back end and then the whole page was reloaded.

By my own previous definition this is when you want to use full Ajax. So my plan is to use Javascript to make the server call, get the result as JSON (may choose a different transport) and then use the JSON to rebuild the small section of the current page.

I haven’t used Django to serve up anything other than HTML before but I am sure it is pretty straight forward. It looks like there are methods for producing the JSON.

I should add another point. I take an incremental approach to this. I get it working old school first. Then I refactor to implement the AJAX.

When to Use Ajax

March 31, 2007

I am working on this new site and avoiding the temptation to solve every problem with Ajax. The way I see it, Ajax is the solution if you are updating data and plan to show the same screen after the update.

Unit Testing

March 26, 2007

My next story was setting up unit testing. Turns out Django has you taken care of in that department as well.

http://www.djangoproject.com/documentation/testing/

There are a couple of options, docstring testing or classic unit tests. I like the idea of the docstring but don’t want my classes to get that cluttered. I am opting for the classic unit testing and I am going to take advantage of the fact that Django will look for a file called tests.py in my apps’ directories.

I am just running into the classic first try errors with the unit tests. I have a dummy test written but it doesn’t seem to be getting picked up. Additionally, I need to do more reading about fixtures so that I can take advantage of that feature for populating the DB.

One of the challenges/blessings with Django is that the documentation matches the version of Django you get from SVN. I am using the latest build 0.96 but haven’t moved to using the latest from SVN. I think the tests.py stuff may not be in 0.96. I have moved my dummy test to the models.py file and the test harness catches it just fine.

Now I can write test cases till my heart contents.