New release, new site, new blog

I have deployed a new website for Dex which also contains a new release (dex-0.9.0.0).

I will deprecate this blog and instead start blogging about Dex on the new site’s blog.

 

Advertisements
Posted in General | Leave a comment

Checking In

The past couple of weeks have been a flurry of activity and productivity; enough to merit checking in with folks and sharing what I have been up to and what I have learned.

I’ve been busy refactoring the core views which drive Dex visualizations; spending a ton of time in the Javascript visuals.  I’m like a kid in a candy story, excited about how things are coming together.

I finally decided to share small examples of the work via gists and blocks.  Here is a series of them that I have created in the past week or so:

Click the image below to go there:

blocks

Most of the changes have already found their way into Dex and I’ve checked in a ton of changes into the github site.  If you get your Dex release via git, its worth checking out.

Assuming you have git installed and Java 8 (I use revision 121 currently, but lower versions of Java 8 will probably work), installation can be done in 3 steps.

  1. git clone https://github.com/PatMartin/Dex.git
  2. cd Dex
  3. java -jar Dex.jar

If you get it via official releases, it’ll be awhile before I package another one up.  It’s time consuming and I don’t feel like breaking stride just yet.

Next, I’ve been putting effort into the dexjs site.  I think that I prefer it as both a website and blogging facility.  Once I work all the kinks out of it, I’ll be migrating Dex into something separate,but similar.

The main reason for the move is control.  I am using Hugo to deploy the static site and I end up having much more control over the content.  It’s not as polished looking as wordpress.com but I feel it can be as good or better in the long run.

Most importantly, rather than linking to external sites for live content, I can embed it directly into the discussion.  As the blog posts I’ve been writing over there indicate.  Here are a few of them:

  • Introducing the new Treemap – Here I introduce a new Treemap which is also available in Dex.  Having live examples inline in the blog article really makes a difference.
  • D3 v3/v4 Cohabitation – Here I discuss a technique for mixing two incompatible versions of the same library (D3) into the same framework and getting them actually to interact well weith one another.
  • Treemap Bar Chart – Here I introduce a brand new visual which will be coming to Dex soon.  Check it out, it’s awesome!

Now on Github

  • Lots of bug fixes, including the ability to cleanly terminate a flow.
  • All of the dexjs charts are vastly improved and some new ones are here
    • Network
    • Ring Network
    • Treemap
  • You can now script in Ruby within Dex!
  • Line Chart Multiples
  • Database interaction improvements such as strict type creation for HyperSQL
  • Selenium updates
  • Much more…

Coming soon…

  • Maps and the ability to visualize them in all sorts of ways
  • Better documentation, I can barely keep up!

Final Thoughts

Lastly, now that ANTLR has a Javascript target, I am considering writing a web based language for data visualization.  I haven’t forgotten the dream that Brett Victor left me with in his series on Drawing Dynamic Visualizations and Stop Drawing Dead Fish.  I feel that a more expressive language might be the gateway to achieving this.

While Dex provides an easy way to manipulate data and a wide variety of output templates, it falls very short of Brett’s vision.

Lastly, just so this idea doesn’t die, I was thinking about creating a tool which allows Force Tree visualization of the DOM tree in realtime.  This would come in handy for debugging other visuals which manipulate the DOM and allow me a tool for quickly understanding the anatomy of a visual and how it changes as one interacts with it.  Maybe tieing the Player and Network components together from dex.js and storing DOM changes in frames so that I could play through them.

Oh, and Happy New Year!!

  • Pat
Posted in General | Leave a comment

dexjs.net is live!

In the spirit of promoting dex.js as a separate but foundation technology of Dex, I have created a new site called dexjs.net which is fully dedicated to sharing information pertaining to the javascript framework.

There are also a number of tutorials and live examples on the site.

I really struggled and spent tons of my vacation time trying to figure out which static site generator I could get most productive with.  I wanted to be able to write documentation, blog entries and such with live javascript embedded within rather than through remotely hosted links like I have to do with wordpress.

The verdict?  I finally decided on Hugo in spite of the seemingly greater popularity of Jekyll.  The main reason for me was ease of use and much fewer dependencies.  It’s also super-fast with a live-update option I’ve grown to love.

If everything works out, I’ll also be migrating this blog over as well.  But first, I want to work the kinks out of using Hugo with dexjs.net for awhile.

In case you missed it:

Click here to visit dexjs.net.

  • Pat
Posted in General | Leave a comment

dex.js presentation

dex.js has been becoming a foundation visualization technology in Dex for the past year or so.  However, as is common with coders, I realized that I haven’t really done much to market it whatsoever.  So I figured I’d put a presentation together using reveal.js and host it via github pages.  Relevant links can be found here:

All of this is a work in progress, but I hope this helps bridge the awareness gap some.

Posted in General | Leave a comment

Domain Change

If you recently tried to go to the main Dex site and saw GoDaddy Cash Parking advertisements instead; here is why:

GoDaddy apparently has set up a program for domain squatters to gain revenue from previously active domains.  The domain owner (in my case a squatter who pounced on my domain once GoDaddy failed to auto-renew it) then makes revenue off of a parked site based upon advertisement.  In turn, GoDaddy gets a nominal monthly fee for the Cash Parking service.

Basically, they create a market for this bad behavior.

So I switched my registrar and the domain which ties to the Dex project.

Here is the new site for Dex.

Posted in General | Leave a comment

Running JavaFX in a Docker container

There’s lots of talk nowdays about the cloud, containerization, so I decided to see what it would take to run a JavaFX application within a docker container.

It took a bit of work to figure out, but it works great.

Due to some Oracle licensing requirements the version of Oracle Java 8 is not bundled like normal linux packages, but rather has to be downloaded and installed from a special repository called webupd8.  This small amount of additional complexity is also reflected in the Dockerfile we will cover below.

Why Docker?

Why bother bundling an application with Docker?  Well, there are many reasons.

  1. Reproducible installations — Since docker ships a machine with the application, if it runs on the source application container, it’s almost guaranteed to run on the target environment.
  2. Easy installations.
  3. Doesn’t touch your machine directly.
  4. It seems to be the emerging defacto cloud containerization standard.

Without further adieu, here’s my Dockerfile, let’s walk through it.

###
#
# Dex Dockerfile installation:
#
# build:
#
# docker build -t dex .
#
# run:
#
# docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY dex
#
###

# pull base image
FROM debian:jessie

RUN \
    echo "===> add webupd8 repository..."  && \
    echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list  && \
    echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list  && \
    echo "deb http://ftp.de.debian.org/debian jessie main" >> /etc/apt/sources.list && \
    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 && \
    apt-get update && \
    apt-get install -y gtk2-engines libxtst6 libxxf86vm1 freeglut3 libxslt1.1 && \
    apt-get update  && \
    \
    echo "===> install Java"  && \
    echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections  && \
    echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections  && \
    DEBIAN_FRONTEND=noninteractive  apt-get install -y --force-yes oracle-java8-installer oracle-java8-set-default  && \
    \
        apt-get install -y git && \
        cd ~ && git clone https://github.com/PatMartin/Dex.git && \
    \
    echo "===> clean up..."  && \
    rm -rf /var/cache/oracle-jdk8-installer && \
    apt-get clean  && \
    rm -rf /var/lib/apt/lists/*

# cd to the Dex directory and execute the jar.
CMD cd ~/Dex && java -jar Dex.jar

Step 1:

In line 16 we see:

FROM debian:jessie

This simply tells docker to download, install and use a base debian installation using the jesse release as our base imate.

Step 2:

Next on lines 18 through 39 we see a pretty intimidating command:

RUN \
 echo "===> add webupd8 repository..." && \
 echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
 echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
 echo "deb http://ftp.de.debian.org/debian jessie main" >> /etc/apt/sources.list && \
 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 && \
 apt-get update && \
 apt-get install -y gtk2-engines libxtst6 libxxf86vm1 freeglut3 libxslt1.1 && \
 apt-get update && \
 \
 echo "===> install Java" && \
 echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
 echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && \
 DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes oracle-java8-installer oracle-java8-set-default && \
 \
 apt-get install -y git && \
 cd ~ && git clone https://github.com/PatMartin/Dex.git && \
 \
 echo "===> clean up..." && \
 rm -rf /var/cache/oracle-jdk8-installer && \
 apt-get clean && \
 rm -rf /var/lib/apt/lists/*

It would be nice to break it up some, but there’s a good reason that we don’t.  Multiple RUNs within a Dockerfile will cause the creation of multiple layers; one per RUN.  We’re trying to minimize this, and the objective causes some ugliness.  It’s necessary though.

Basically, this command is performing the following task:

  1. Lines 19-23 are setting up some repositories.
  2. Line 24 updates the packages.
  3. Line 25 installs a few necessary dependencies required for JavaFX libprism dependencies.
  4. Lines 29-30 automate the acceptance of conditions and lines 31 performs a headless installation of Java8.
  5. Line 33-34 installs git then uses it to download the Dex repository, code and all to the current directory.
  6. Lines 36-39 perform some cleanup.
  7. Line 42 specifies the command we will run by default when executing this application container.

Building from Dockerfile

Assuming docker is installed and running, drop the Dockerfile described above into an empty directory somewhere.

Issuing the command:

docker build -t dex .

Will create a dex image.  It’ll take a few minutes to run.  Remember, it’s creating a vm image, updating it to spec, installing oracle and dex.  That’s a lot!

Next, we can run it from an X11 capable linux client like this:

xhost +
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY dex

It should be possible to run like this from Windows or OSX, but I haven’t tried it personally.

Anyway, that’s it for now…Good luck!

  • Pat
Posted in General | 8 Comments

Dex code on github!

Finally, we are truly open source software.  The source code for Dex is now on github.  The repository can be found here.

Also, the living documentation is in gitbook form and can be found here.

Posted in Dex | 2 Comments