How to add and use custom stereotype in ArgoUML
Adding and applying custom stereotype is little bit tricky in ArgoUML, following steps must be done:
- In class diagram, add a new stereotype (using a button labeled «»).
- Set "Base Class" property to "Class" value in the new stereotype properties window.
- Click on the class, to which you want to set the custom stereotype. Now you can see and apply the custom stereotype in the stereotype window.
timeEdition – free time management tool
Recently I found this great free tool for project-based working hours tracking. Application is displayed in compact window consisting display (showing record period and customer), button to start/stop time recording and simple interface to select/add customer, customer's project and task of project. More advanced functions and features can be found beneath the simple interface:
- integration with iCal, Outlook and Google Calendar,
- export to Excel, XML, CSV,
- advanced reporting, settings and editing.
TimeEdition tool is platform-independent, versions for Mac OS X, Windows and Linux are available to download.
IE8 CSS background flickering
Combination of white content on a black background causes an uncomfortable flickering or flashing in Internet Explorer 8. I resolved this problem adding following lines of code into head of XHTML page:
-
<meta http-equiv="Page-Enter" content="blendTrans(Duration=.01)" />
-
<meta http-equiv="Page-Exit" content="blendTrans(Duration=.01)" />
-
-
<script language="javascript" type="text/javascript">
-
try
-
{
-
document.execCommand("BackgroundImageCache", false, true);
-
}
-
catch(err) {}
-
</script>
Python virtual environment
Hosting multiple Django projects requires to keep deployment and libraries in control. Imagine, that an one year old Django application is written for Django 0.96, but new projects are written using the actual version 1.1.1. It is possible, of course, to rewrite the old applications to be compatible with the actual version, but rewriting many projects might consume a lot of time.
There is a smart solution to deploy applications using different versions of Django on only one production server. This can be done easily using the "virtualenv" library, which allows you to create unlimited number of python environments including the site-packages directory.
At first, install the virtualenv library with easy_install:
-
easy_install virtualenv
Then, create a new Python virtual environment:
-
virtualenv --no-site-packages /usr/local/lib/my_new_python_environment
The --no-site-packages parameter avoids access to the global site-packages dir to the virtual environment. Finally, activate the new python environment with command:
-
source /usr/local/lib/my_new_python_environment/bin/activate
Deactivation of the activated environment is done by following command:
-
deactivate
Detailed how-to on deploying Django project using the new virtual environment through mod_wsgi is available at http://jmoiron.net/blog/deploying-django-mod-wsgi-virtualenv/
Apache as proxy for IIS 7
Believe or not, a large scale AJAX application running on IIS 7 caused fragmentation issues at transport layer causing "connection timeout" error on the client side. An AJAX HTTP request passed to the IIS, which generated a proper response. The response was split to insufficient number of frames in the Windows net core: several frames were sent to client, but several frames were never send (and probably never generated).
The only practicable fix was to use Apache web server as proxy between the client and the IIS. There were no fragmentation issues and no timeout errors on the client side since applying and texting the proxy fix.
Apache rocks.
Business process models with open-source tools and standards
Business processes are often described by workflow, which means a sequence of operations declared as work of a person, a group of people, an organization or staff, one or more simple or complex mechanisms [1]. From the analyst point of view, suitable visualisation is often needed for analysing, projection or presentation of workflow sequences. Programmer of workflow sequence needs an effective process notation in form of source code.
There are the XPDL notation standard (XML Process Definition Language) [2] and several tools, which supports this standard fulfilling all the needs mentioned above. Please follow references at the bottom for details on XPDL standard. Let's look on several XPDL tools:
- Enhydra JaWE: an open source visual editor for workflow processes definition written in Java. I have been successfully using this editor for enterprise processes analysis. This tool is available as paid "professional edition" which contains a lot of additional features.
- JPEd: a next one open source editor based on previous editor's source code. This editor offers basically quite the same functionality as Endydra plus some useful features in addition, e.g. PDF reports, plug-in interface and SVG graph outputs.
I will appreciate comments with your own experiences and tools used for business process modeling.
References:
Apache virtual host proxy
I had to move some virtual hosts from one server (server "A") to another server (server "B") without changing DNS records for affected domains yesterday. This can be done easily with Apache's mod_proxy module. An example configuration of the server "A" is shown below:
-
<virtualhost *:*>
-
ProxyPreserveHost On
-
ProxyPass / http://192.168.111.2/
-
ProxyPassReverse / http://192.168.111.2/
-
ServerName hostname.example.com
-
</virtualhost>
The ProxyPreserveHost directive preserves the Host HTTP header, which is passed through to the proxied server configured by the ProxyPass directive. Virtual host's configuration on server "B" is the same, which was placed originally on server "A", e.g.:
-
<virtualhost *:*>
-
ServerName hostname.example.com
-
DocumentRoot /var/www/html/hostname.example.com
-
</virtualhost>
References:
Django REST applications and server with django-roa
If you are looking for ready-to-use Django REST server and clients solution, I recommend you the David Larlet's django-roa library. I have been using this library in testing environment from July 2009 with good testing results. The django-roa project is continuously improved, as can be seen on the project changelog.
VIM tab configuration for Django HTML templates
This tiny trick allows you to set tabs (and anything else of course) for Django template filetype. VIM has build-in filetype named "htmldjango", which does all the magic shown in the example configuration below.
An example .vimrc configuration file uses the "autocmd" VIM command, whis must be available in your installation.
-
if has("autocmd")
-
autocmd FileType htmldjango set tabstop=4|set shiftwidth=4|set expandtab
-
endif
Django multiple database support with DB switch feature
Our Django installation is capable to connect to as many databases as desired and switch between databases in according to session data. We reached this feature overriding several internal Django classes, according to recommendations on http://groups.google.com/group/django-users/msg/d1d7e0af565cc444?. All multiple database features are done without changes in original Django code.
Partial how-to can be found on http://kfalck.net/2009/07/01/multiple-databases-and-sharding-with-django too.
The solution is successfully tested for more than one month in real-world application and this application is going to be used into production environment soon.
For implementation details or questions leave a comment below.
