A Start on a TreeTrumpet Design

Warning: Programmer Talk

In the last few days I merged a branch named mvc into the master branch. MVC, as the name implies, changes the code from a separate-file-per-page design to a Model-View-Controller design.

The code is still pretty simple, but it’s more organized. It was a tedious process, but I feel good about it. With the MVC work done I was able to quickly add some new functionality to TreeTrumpet. Most of the functionality is JavaScript and CSS enhancements that build on top of the pretty-decent HTML base.

New Features

Check out the new demo!

One of the nice features is that TreeTrumpet is now smart enough to use nice URLs when it can, like http://treetrumpet.com/demo/individual/I0096/Andrew-Fredolph-Johnson instead of http://treetrumpet.com/demo/individual.php?id=I0096. If .htaccess isn’t available then the URLs are shown as http://treetrumpet.com/demo/individual.php/I0096/Andrew-Fredolph-Johnson which is still some sort of improvement.

There’s some sort of graphical structure to TreeTrumpet now. It actually looks like something you could take home and introduce to your parents…as long as you made it shave and shower first.

The new design is somewhat flexible in its display width. Probably not flexible enough to actually be called “responsive design”, but it stretches wide when it can and goes into column mode if things get too narrow, so that’s something.

Tree View (work in progress)

Tree View (work in progress)

Family and individual pages get tabbed views of the data groupings.

Individual View (work in progress)

Individual View (work in progress)

The map navigation gets an accordion treatment.

Map View (work in progress)

Map View (work in progress)

The colors are all temporary, and the design probably is too. It’s just something to use while I work on some more JavaScript functionality and other back end features.

More features coming soon!

Tree Improvements, IIS support, PHP build script

Tree Improvements

I made several improvements to Pedigree-Viewer in the last couple of days and committed them. The main features:

  • Support for a callback function when clicking on an ancestor
  • Support for changing who is the center of the chart
  • Storing the initialization parameters inside of the PedigreeViewerTree object for later use
  • All the sharing-time*.js files pass jshint syntax validation

I combined features 1,2 and 3 to create popups with a summary of the ancestor, and to make it possible to move around the chart. Nothing too crazy, but the Pedigree-Viewer code is kind of a mess so it took way longer than it should have.


IIS Support

I stepped through the DEVELOPERS.md instructions, made some changes and TreeTrumpet now builds on Windows with IIS and PHP installed. If you follow the instructions on DEVELOPERS.md and it doesn’t build, let me know. I’ve tried to avoid any Linux/Apache specific things so that it will work on Windows too.

PHP Build Script

I thought about using Grunt or Jake or something to build this, but then I decided that since it’s a PHP project, I might as well just use PHP. It’s a pretty simple build script anyways, there’s not real logic in it, just a bunch of file copying and zipping.