January 19, 2009 Newer release

This minor release has initial orbited support, heartbeats, and timers. Stomp over comet is used to communicate from the server to the browser and the background process running is used to handle heartbeats. In this case heartbeats simply mean functions run at regular intervals to keep the system tidy.

One of the heartbeats is the timer functionality, using timers it's relatively easy to configure reminder emails, and automate other long running processes.

Orbited is currently only used to update a banner with random information that it's useful to sometime be reminded about. There's only a few banners available now and more is required, however, it's easy to add more.

Olof Tjerngren

December 28, 2008 New release

It took longer than I planned, but Orders, Invoices, PDF files, updates to document handling, fixes to the customer screen, pdf templates and a few other odds and ends is finally ready.

In in end it turned out that I felt more things should be fixed the more I worked on it. As is often the case when there are no fixed deadlines.

The new customer screen especially is much smoother than the old one, but I feel there is still some work to do on that, some time actually using it should is the best test.

The order/invoice system needs more work, I'd estimate it's about half done. The half already done makes it functional enough to actually be used but it lacks some features that are sometimes needed.

Olof Tjerngren

October 26, 2008 Finally: Orders

The first iteration of orders is now in the demo. It's possible to add orders from a customer screen, either as a ready order or as a quote.

It should be possible to generate a quote or an invoice based on an order.

In two-spot, the order is the working document describing the current status of the sales process. You start out directly as a sale or by sending a quote, the order will show where you are and quotes and invoices will be recorded to mark what happens until it's paid.

Olof Tjerngren

October 12, 2008

There's no demo update this Sunday, I'm working on orders and It'll take at least one more week.

Some controllers for orders will probably spill over to be used elsewhere, so if everything is not ready next week, I'll add that to show how it will look.

Olof Tjerngren

October 5, 2008 How adaptation works

One goal for Two-spot is to be easily modified for local use. This is fundamentally true for any free or open source software. It's also true for any software that allows you to keep local configuration files the software reads and that can be kept when you update to a newer version. The extra mile Two-Spot goes is to specifically support local software changes in addition to local configuration.

I wanted to change the login form for the demo to show some additional information, but that functionality was not adaptable so the first step was to make it adaptable.

The original was to print out the login form, the updated version will look for a login file starting with an application specific version, then a local version and finally a default fall back version.

After this was done and the demo installation updated it was simple to copy over the login form from share/ to local/ and add the instruction that I wanted to have. I could also have switched the login you a drop-down for the name and switch the password to a fixed hidden field but I also wanted to show a little of how it normally looks so I left that alone.

Simply looking for a local file is the simplest method used and it has the undesirable effect that it will prevent mainline Two-Spot changes to the login form in this case to be propagated to the local installation when the system is updated. For the login form it's probably suitable however.

If we wanted to make sure most mainline updates where carried over to a local adaptation, then using a class allows for more fine grained control.

We could create a loginFormClass for example.

	    class LoginFormClassStd {
	      function getPreText() {
	        return "<form>";
	      function getLogin() {
	        return '<span class="label">Login</span>
	        <input type="text" name="login">
	      function getPassword() {
	        return '<span class="label">Password</span>
	        <input type="text" name="password">
	      function getPostText() {
	        return '<span class="label"> </span>
	        <input type="submit" value="Login">
	      function getLoginForm() {
	        return $this->getPreText().
	    if (file_exists("../local/loginFormClass.php")) {
	    } else {
	      class LoginFormClass extends LoginFormClassStd {};

The system would then open the file and call getLoginForm() to get the form. With this setup, we'd create a local/loginFormClass.php that could look like this.

	    class LoginFormClass extends LoginFormClassStd {
	      function getPreText() {
	        return 'Hello World, welcome to my local version!<br>'.

The above would be a very non intrusive, changing the output on any part would keep the adaption while still letting new functionality shine through. Of course, for a login form it's overkill and a simple file level replacement is enough.

Olof Tjerngren

September 30, 2008 Customers and graph library

Customers are on the way to OK editing, it's now editable directly from the role view page that is the default, but only to edit existing values, not to add more so the older editing page is still there. I suspect it will get many more revisions until it's completely done.

On the first page is now a very simple graph, only to show that a graph library is now in place. Currently there isn't much to show in graph form, but that should change and the graph will get some more attention then.

I also fixed a few setup bugs, not it should be possible to install without too much trouble.

Olof Tjerngren

September 21, 2008 Calendar is now almost nice

The calendar got some more attention this week, I added the long missing subscription model. You pick up to five sets of data you're interested in having included on the web calendar and each set will show in a different colour so that you can see at a glance who is doing what.

I also added weekly and daily views, and added non working days since they should show on those views.

On the actual activity form I added the control where you can pick who should attend the activity.

Finally I built a makefile to generate tar files with everything so it's possible to download a package and install it. It was possible from the hg repository but using an archive file is simpler, and it includes the pdf version of the manual so it's easily available.

The hardest part of the makefile was getting a docbook tool-chain in place. I'm not sure why that should be so difficult in 2008. The Ubuntu versions available straight away does not include screen shots, and returned an error code that stopped make from completing everything. I set up a script that runs outside the environment using fop to get something that worked. I hope the next release of Ubuntu works better so I can discard that. I think Fedora handles docbook better, but sadly I'm all out of Fedora machines these days.

Anyway, back on track, this website now has a tarball download and the manual you can download includes the picture that was added long ago.

Olof Tjerngren

September 14, 2008 Products and Calendar

Inspired by the new date entry and needing to test it some more, the calendar got some attention this week. The timezone stuff was broken for example and needed to be fixed, the default grey got dull after testing so I switched to a different colour.

I also moved the validation code to be run before new forms data is entered to allow defaults to be set and be visible as defaults when the form data is entered. This is initially used for the calendar, but will be useful in other forms as well.

A simple check for tables not tracked by the system - older tables no longer used or other tables being left over from testing was added, I simply found it lacking and wanted something there to better track what's going on.

The last new bit is a sketch of products and related tables. It's still very lacking, the db structure required a bit of an interface to be effective, but that's not there yet. But it's possible to enter products and prices, so I'll get back to reformat that after orders are done, probably combined with adding price modifiers (special sales, volume discounts and so on.)

Olof Tjerngren

September 7, 2008 Dates

After some testing back and forth with different ways to enter date I finally picked the datejs library to parse free text dates and times for entry. The limited testing so far suggests it sweet. I will probably add a calendar drop-down as an alternative way to enter as soon as I find a decent one that allows time entry at the same time.

Apart from that, a few bug fixes and an update to version 2.2 of extjs is everything accomplished this week.

Olof Tjerngren

Older posts