/latest_posts
tagged: glassfish javaee development
I've been building a new system with Java EE 5, particularly GlassFish which is the open source version of Sun Application Server, and have come away with a few thoughts.
First of all, Java EE (formerly J2EE) has come a long way. A real long way. Obviously someone noticed a lot of mindshare gravitating towards simpler persistence frameworks (Hibernate), so it's good to see movement on making things easier for the developer as opposed to the god-awful tediousness ...
Read More...
tagged: python php development
While perusing the interwebs I came across an interesting thread regarding Python advantages over PHP.
I have to agree with the general consensus there; that Python is more compact and easier to read. I think the choice quote there is:
I have come to hate PHP now, it's pseudo-OOP is awful, it's dog slow at
handling XML, it's so easy to use that most of the programmers I've had
contact with are very sloppy and do ...
Read More...
/latest_sites
created 2007_october_31st
tagged: gaming
Gossip, news and leaks for obsessive gamers. Don't get a life just yet.
created 2007_march_24th
tagged: ubuntu linux
/latest_comments
Dude! You should have waited, prices on the PS3 will be dropping by $100 in a few weeks.
I stay with the symlinks, because I tend to use a lot of dumpdata's and loaddata's, and setting env vars for apache or changing the settings file for mod_python does not affect the command line.
It's a pretty simple approach. Keep a master settings file, and make a default symlink to it, so nothing breaks. For other environments, create env_settings.py and import the master file. Then change the symlink to point to the env file.
:)
I took things yet a step further and made it so that an data in an apps '/media/' directory was automatically served up, and could have its location overridden in the server settings file.
To round things out the template tag looks like:
{% load appmedia %}
{% app_media_prefix "myapp" %}
The source code is here:
https://svn.python.org/conference/django/trunk/
https://svn.python.org/conference/django/trunk/pycon/templatetags/appmedia.py
https://svn.python.org/conference/django/trunk/pycon/urls.py
Project information:
http://us.pycon.org/TX2007/PyConTech
If you want to get really really fancy, there is a context processor which safely brings in all of django.conf.settings in a lazy way (and disallows access to sensitive information).
It still needs some work, but it allows for packaging up the media in the apps so they can be moved to different sites easier.
Very well thought out. I like ideas that when I hear them I think "Damn! Why didn't I think of that!"
I use the ENV vars as well for a large chunk of the settings.py file. I find it's cleaner to have a single settings.py file. It keeps things unified when the environment dictates your settings file. Moving from production/dev/test setups require different user accounts but not different settings.py files.
I find it removes an element of human error and causes no surprises when you release new software or add new developers.
My 2cents