Eclipse + Java + UML + RESTful, the real silver bullet

Some days ago I was just thinking about all these agile bullshit.

I mean, no matter if you do TDD or not, if you do care about continuous integration, this is all a real lose of time.

When thinking about shipping good software, the best combination is, indeed, quite simple:

  1. Use a powerful IDE. You as developer don’t even need to now how the things work, let the IDE do everything for you. Eclipse is the one you really need.
  2. Use a well known, certified and reliable language. Why using dynamic languages ? You don’t need to be agile, you need to ship something with trust value, so build it with java.
  3. Don’t code, use wizards and boilerplate generators. Once again, what is better, easy money or thousands of hours hacking things from scratch ? You can use UML-based code generators, and super-duper eclipse plugins to generate your code. Forget all stress and make your project manager happy.
  4. Prepare yourself for possible future needs. To build a real scallable application you must ALWAYS use a complex SOA approach, so you can separate business-rules in each module and distribute in many servers. A RESTful approach is even better. Forget everything about agile software development, your customer doesn’t need a term, he needs a full-featured project.

To but it bluntly, Fred Brooks was totally wrong in his book “The Mythical Man-Month”, about “no silver bullet”, the steps below are, indeed, a silver bullet and you can see proofs of this sentence in the “Martin Flawler’s” article.

Hosting and deploying django apps on Dreamhost

About two years ago, I’ve signed up to Dreamhost. My goals were and still being to host my personal projects, websites and so on.

Once I am a Django web developer, one of my first actions were to create a django deployment setup, good and flexible enough. The time passed on and have been got new experiences, and the best desision, i think, was to create a new python sandbox, i mean, a customized python environment.

How is it possible ?

Simple! Just compiling python from scratch, with a fake root path (a prefix)

Anyway, the deployment process involves more variables, like setting both htaccess and dispatch files for each project, installing some basic modules such PIL and MySQL and so on…

So, i ever wanted to create a super duper script to do all that “dirty” work. And i did it last weekend!

I were working ia a freelance job and decided to create a subdomain to host test instance of them.

A new sandbox, ready to make my tests to create the super script.

So folks, i present you the brand new: django_dreamhost.sh :)

It’s composed by 4 files:

  • django_dreamhost.sh itself
  • djangify.template – a template with will become a script to setup new projects (htaccess and dipatch files, for instance)
  • htaccess.template – a template that will become the .htaccess of each project of yours
  • dispatch.template – will become the dispatch.fcgi for your projects as well

“But do i need to download all them ?”, of course NO!

You just download the main script, and he will do all do hard work!

“I wanna contribute, modify or do anything with that script, can I ?”, of course yes! All parts of the script are GPLv2 +

You can also always get the development version through git repository:

git clone http://git.nacaolivre.org/django_dreamhost

Don’t want to get all code, just the script ?

Download it at: http://gnu.gabrielfalcao.com/django_dreamhost/django_dreamhost.sh

What does that script do ?

He will do the following steps:

  1. Download Python, Django, Python-setuptools, Python-fastcgi to a directory called downloads
  2. Extract all
  3. Create a local root at $HOME/.myroot and the subdirs etc and usr
  4. Set the new bin path to you global path through bashrc and bash_profile
  5. Compile and install python to the new prefix: $HOME/.myroot/usr
  6. Install Django, rename django-admin.py to django-admin
  7. Setup your bash-completion to support django scripts
  8. Install the python modules above with the new python
  9. Install PIL and MYSQL modules through easy_install (setuptools)
  10. Download the template scripts to $HOME/projects/script_templates
  11. Replace the custom tags in templates
  12. Move the djangify.template to the new bin PATH: $HOME/usr/bin and give it execution permission

I thinks it’s all.

I currently use Fabric to help on deployment, and i have a quite smart basic setup for it to work with this dreamhost django environment, but it will be approached in the next blog post :)

See you, folks!

Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.