Let the games begin: VirtualBox + Ubuntu and installing bits and pieces.

Setting up the VM :
1. Downloaded VirtualBox.
2. Downloaded Ubuntu ( ubuntu-11.10-desktop-amd64 ).
3. Created a new virtual machine and installed Ubuntu. Rather painless, virtual box was very handy.

Setting up Django and Python environments:
1. Got pip which is a Python package installer, also virtualenv and virtualenvwrapper:

$ sudo apt-get install python-pip pip install virtualenv pip install virtualenvwrapper

2. Edited the bashrc file with vim, added these 2 lines at the bottom:

$ export WORKON_HOME=~/dev/py
$ source /usr/local/bin/virtualenvwrapper.sh

Note that if you’ve read other articles on how to install/configure virtualenv and virtualenvwrapper they tend to set up the WORKON_HOME as something like ~/.virtualenvs which I don’t like. Why should your virtualenvs be hidden? No point…
Also, that might not be where your virtualenvwrapper.sh got installed to, you might have to do a little look around.

4. Then refreshed bashrc by reloading the bash:

$ source ~/.bashrc

5. Created a new virtualenv with no site packages to start with a clean slate. That way I can later save a list of the packages required by the project without worrying about any other unrelated packages.

$ mkvirtualenv --no-site-packages django_mongo1

6. Tried to get pip to install stuff straight from repos online but it spat errors back at me. Apparently Ubuntu didn’t come with Git or Mercurial pre-installed so I had to get those and then get the pip packages required. Remembering always to force pip to only install to the virtualenv I want by using the -E option.

What I’m installing: http://django-mongodb.org/topics/setup.html

$ sudo apt-get install git
$ sudo apt-get install Mercurial
$ pip install hg+https://bitbucket.org/wkornewald/django-nonrel -E ~/dev/py/django_mongo1
$ pip install hg+https://bitbucket.org/wkornewald/djangotoolbox -E ~/dev/py/django_mongo1
$ pip install git+https://github.com/django-nonrel/mongodb-engine -E ~/dev/py/django_mongo1

Starting e-commerce website development from scratch.

After doing some deep Googling I’ve decided the technology stack I’ll use to support an e-commerce website I have in mind. This is the list and some quick notes on why I made these choices:

1. Infrastructure: Amazon Cloud Services

  1. The pricing model is simple and elastic.
  2. They just opened a data centre in São Paulo and Brasil is my target market.
  3. Good community support.
  4. Big names are using it. ( foursquare, airbnb, reddit )
  5. If there is something I don’t know how to do, they probably offer it as a service.

2. Web Development Framework: Django

  1. Has a bunch of wheels I don’t need to re-invent. ( eg: admin console )
  2. Has an ORM which makes sense for me.
  3. I learn Python.
  4. Amazing community around it.
  5. Big names are using it. ( Disqus )
  6. Plays nice with MongoDB.

3. Operating System: Ubuntu on a virtual machine running on VirtualBox

  1. Free to acquire and cheap to run on Amazon.
  2. Friendliest of Linux distros.
  3. Again a very big community.
  4. VirtualBox is a free virtualisation software similar to VMWare or Parallels.

4. Database: A mix of MongoDB, Redis and PostgreSQL

  1. 3 different tools for 3 different jobs.
  2. Need scalability and flexibility: MongoDB.
  3. Raw speed and simplicity: Redis.
  4. Transactions and ACID compliance: PostgreSQL
  5. PostgreSQL over MySQL: More feature rich, better admin tools, easier replication. ( to be confirmed )

5. Integrated Development Environment: Aptana

  1. Free.
  2. Python code completion and highlighting.
  3. Based on Eclipse so works anywhere.
Follow

Get every new post delivered to your Inbox.