Author Archives: Arlan Whatling

The Danger of Carrier Objects

Arlan Whatling

Arlan Whatling

Software Engineering at Source Allies
Arlan Whatling

Latest posts by Arlan Whatling (see all)

In the everyday world, it’s usually a good thing to have what you need ahead of time, even if there’s a possibility of never using it: I’m going to school, better pack my books; I’m taking a flight this afternoon, better bring some earplugs; I’m going to a meeting, better bring a notebook, and coffee… and my phone.  If I don’t end up using these things for the task at hand, no problem.
Continue reading

Multi-Step Forms in Django

Forms in Django seem to be a relatively advanced topic if you want to do anything outside of models.  Case in point: I had to develop a multi-step form in django that would spit out a certain result.  There were only two forms that the user needed to fill out, but the second form had to change what fields it had based on the input from the first form.  Also, the form did not save anything to the database; it just created a file for the end user to download.  To solve this problem, I did research.  A lot of research.  And like any good technical topic, the information I needed was all over the place on the Internet.

Continue reading

Static Caching in Drupal

If you’re a PHP veteran, then you know static caching is a relatively simple thing to do in PHP, but it can result in inconsistent behavior and sloppy code, such as adding an extra parameter to a function for the sole purpose of resetting that function’s internal cache.

Drupal’s static caching system improves upon the old way by providing a simple and consistent way for creating your own cache store and resetting cache stores set by other systems within Drupal.  The entire functionality of this system is wrapped up in the drupal_static() function, with a side function, drupal_static_reset(), for resetting any existing cache store.
Continue reading