Saturday
Aug092008

SQL Trigger: Enabling/disabling 

You may come across a time when you want to INSERT additional records into a table. But the INSERT statement may have been using a TRIGGER, which may affect other tables. In this scenario, you can use enable/disable properties of the trigger rather than deleting and re-creating it again. Just use the following:

ALTER TABLE yourtablename DISABLE TRIGGER ALL

--Here write your additional script

ALTER TABLE yourtablename ENABLE TRIGGER ALL

Friday
Jul252008

Django Subversion Installation on Mac OS X

I recently installed Django on my MacBook Pro and thought I would share my experience. This is what worked for me. I'll keep it brief, you just want to get developing right?

What you will need:

Nothing! Python and Subversion are installed by default.

Start the Terminal session:

This will take you to your user directory (not the root).

You will see something like this.

CPE-58-168-138-49:~ Dien$

Checkout/Grab the Framework Code:

Enter this at the prompt (you may need to prefix with 'sudo' if you get permission problems). I created a directory at the user level named 'Frameworks' to house it.

svn co http://code.djangoproject.com/svn/django/trunk/ /Users/[user]/Frameworks/svn_django/

Note: [User] being the current logged in user.

Linking it up:

This lets Python know where Django is.

ln -s /Users/[user]/Frameworks/svn_django/django /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django

Note: Depending on what version of Python is installed you will need to substitute the version no. e.g. '2.5'. You can see the version no. by simply entering 'Python -V' at the prompt.

Test it:

Start the Python interpreter, just type in 'Python' from the terminal.

You should see something like this.

Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

Enter 'import django' if you get no errors then Django has been installed correctly.

Linking django-admin.py:

ln -s /Users/[user]/Frameworks/svn_django/django/bin/django-admin.py /usr/local/bin

This allows you to run the 'django-admin.py' from anywhere instead of qualifying it each time.

Testing django-admin.py:

You know it works when you enter it from the command prompt and get no errors.

CPE-58-168-138-49:~ Dien$ django-admin.py
Type 'django-admin.py help' for usage.

This just means that you need to specify a switch for it e.g. 'startproject [project name]'.

All you need to do now is follow the tutorials located in found in the Django Documentation.

Tuesday
May202008

Daniel Burka - Iteration and you - FOWD London 2008

A presentation by Daniel Burka from Digg about designing through a iterative process. The low road helps clarify how being small and adaptive can achieve a better end result faster.

Daniel Burka - FOWD London 2008 from Future of Web Design on Vimeo.

[slideshare id=367496&doc=iteration-youdanielburka-1208887711479560-9&w=425]

Monday
May192008

Which back button?

There are two types of people in this camp, those that think web applications should be able to work in a browser-less environment (All toolbars, address bar, etc turned off) where the visitor has no access to the browser back button and therefore the application must compensate for this. Then there are those (like me) that feel the browser back button is already there and works fine and users know how to use it so let them use it. It seems to me that by building navigation so that the visitor can go back in the application is just re-inventing the wheel which is not really needed. Also research has shown that the browser back button is the most commonly used button on the web (around 30%).

Google provide users with a Previous button to allow users to navigate to search results on previous pages, I just wonder how many people actually use this Previous button. I must admit I would normally just hit the browser back button.

The main negative that springs to mind if you run an application in a browser-less environment then the application navigation needs to be absolutely perfect otherwise users will end up at a dead end with no way to get back.

Page 1 ... 3 4 5 6 7