JavaFX 1.0 is a big disappointment

Posted by Sam

Sun Microsystems has been doing so much right lately that I had really high hopes for JavaFX. Maybe too high. JavaFX 1.0 was released this week and I'm not ashamed to say that I'd been looking forward to it for a really long time now. A couple of really great features for GUI development were included and I THOUGHT they were making the code simpler.

First off I'd like to mention a couple of features that I think are fantastic for GUI development. Mainly binding and triggers. They do just what they sound like. For example you could have a central set of variables, say for example a bunch of preferences. Then wherever you want to use those preferences you just bind to the variable. Presto - bango. Anytime that variable changes everybody that is bound to that variable changes. Saves a TON of coding. The second feature is triggers. That is when a variable changes you can act on the knowledge that it changed. It's like creating Listeners without all the coding. And lastly being able to create applets that live beyond the browser is pretty cool. A completely separate threading model and everything. Cool indeed.

So where was I disappointed? Primarily I feel like they took a HUGE step backwards with their JSON support. Originally the examples showed that you could just make a one line JSON request and turn it into a real object. Nice huh? Simple and concise. Just how that task SHOULD be. Have a look at the ridiculous examples of using JSON in the 1.0 release. They have like 30 lines of code that say if ("string" == "value") then variable.something = json.something. It's just ridiculous. This is a very Java way to do it and something that's driven me nuts for years. There are Ruby libraries that can create first class objects from JSON and XML. Flex can do it. Why can't JavaFX. It shouldn't require so much code to do something so simple. Especially when it was doing it that way to begin with.

I've been playing with Adobe AIR lately and it's highlighted a couple of other problems that exist with JavaFX and really Java in general. I know they can be worked around with Java but I don't know how they can be worked around in JavaFX. With AIR I get a real icon for my program. It also shows up in the task list with the name that I give it. This isn't the case with Java. If you've got multiple processes running it can be hard to know which one is which. It also reinforces the Java brand more than my brand. AIR in general just has much better integration with the host OS. There are work arounds for traditional Java programs but this really needs to be something that Sun builds into Java and especially JavaFX.

I had a program that I was looking forward to using JSON, bindings and triggers on but frankly after working with Ruby on Rails for so long I have zero tolerance for excessive, silly code. I really, really wanted to use JavaFX for this app but it looks like it's going to be done in Adobe AIR. **SIGH**

Tags: javafx air rant

Snort Alert Monitor 0.4.0 Released

Posted by Sam

SAM 0.4.0 has been released. Here's a highlight of features available in this release:

  • Fixed a copy and paste bug where the dashboard only showed stats for the last 5 minutes instead of the last hour as was intended.
  • Dashboard now updates automatically.
  • And more...

Originally I had a few additional features scheduled for this release. However having the Dashboard refresh automatically seemed like something that would be useful for most people ASAP and was the driving factor that the original version of SAM was created for. So since I had this in place I decided to move the much less critical features to another release and get this one out the door.

Speaking of features - I've been able to crank through things much faster than on the previous version. This is largely in thanks to a LOT of great JQuery plugins and the fact that I switched from Java/Swing development to Ruby on Rails. If you've got ideas for things you'd like to see please let me know. Most of what's going in SAM right now is stuff that interests me. I can't promise I'll implement everything and a lot of stuff probably is better completed as plugins but if it makes sense I'll put it on the roadmap. And if it doesn't make sense but sounds like fun to me I might create a stand alone app that utilizes the API. So, give me your ideas!

Tags: sam

SAM API Examples

Posted by Sam

Since the release of SAM 0.3.0 has hot and fresh API support baked in I thought I should put up examples so that somebody besides me could use them. Here's a taste of what it might look like to use the API to get the Threat Index.

require 'rubygems'
require 'active_resource'

class Threat < ActiveResource::Base
  self.site = 'http://127.0.0.1:3000/'
end

start = ARGV[0].to_i.hours.ago.strftime('%Y-%m-%d %H:%M')
threats = Threat.find(:all,
  :from => "/dashboard/threat_indexes.xml",
  :params => { :start_date => start, :limit => 5 })
puts "Source\t\tThreat Index" 
puts "------------------------------" 
for threat in threats
  puts "#{threat.formatted_source_address}\t\t#{threat.threat_index}" 
end

Check out the rest of the API examples.

Tags: sam

Snort Alert Monitor 0.3.0 Released

Posted by Sam

Version 0.3.0 of Snort Alert Monitor was released today. You can download the files at the SAM project site as well as a full changelog. Here's a short update on what's changed with this release.

  • iPhone web version
  • Added XML and JSON API support
  • Added CSV export options

Tags: sam

Snort Alert Monitor 0.2.0

Posted by Sam

Version 0.2.0 of Snort Alert Monitor was released today. You can download the files at the SAM project site as well as a full changelog. Here's a short update on what's changed with this release.
  • Postgres support
  • Add about page with contributions
  • Show references for signatures
  • User interface tweaks

Tags: sam