Category Archives: Software

_.js

Comments Off
Filed under JavaScript, Software

Underscore.js is self described as “a utility-belt library for Javascript that provides a lot of the functional programming that you would expect in Prototype.js, but without extending any of the built-in Javascript objects.” The usefulness of this little library becomes apparent after reading though the documentation. I’ve already integrated it into a couple of projects where I needed a robust, yet lightweight core.

GrepCode

Comments Off
Filed under Java, Software

GrepCode is an extremely cool code searching tool for open source Java.  The most useful feature, in my opinion, is the ability to find code responsible for a specific stack trace.  While they have a few usability issues to iron out, this is definitely something worth adding to your developer toolbox.

Using Bcrypt with Spring Security

4
Filed under Hibernate, Java, Software, Spring Framework, Tutorials

Password security is a popular topic. The most basic tenant of password security is to have no password at all. Wait, what? That’s right, no password should be stored in your database, ever. Instead, store it as a hash, along with the salt, and throw the original password away. Ask 10 different developers, and I’ll bet that MD5 would be offered as the most popular solution for this problem. Though, if you’ve explored the linked content, you’ll have undoubtedly noticed that Bcrypt is mentioned more than a few times.

“Bcrypt is a cross platform file encryption utility. Encrypted files are portable across all supported operating systems and processors. Passphrases must be between 8 and 56 characters and are hashed internally to a 448 bit key. However, all characters supplied are significant. The stronger your passphrase, the more secure your data.”

For us Java developers, there’s jBCrypt. It is an “implementation of OpenBSD’s Blowfish password hashing code” and offers a rather simple API. A quick web search yields a bit of information on using jBCrypt itself, but nothing on integrating it with the Spring Framework. Given that this is a topic of interest to me, I’ve put together a simple, yet comprehensive example web application to demonstrate an integration of jBCrypt, Spring MVC, Spring Security and Hibernate for hashing user passwords. There are three areas I’ve focused on in this example, user creation, user authentication and changing the user’s password. Read More »

Server-side stream recording example updated

47
Filed under ActionScript, Flash, Java, Red5, Software, Tutorials

With this being my most popular blog topic, I felt the time has come for a little update. (You can catch up on the original here.) Frankly, there’s not much too it. The server-side code didn’t change much, just an update to take advantage of the built-in logging support of Red5. Both clients have been completely rewritten using ActionScript 3. (I know, it’s about time.) Read More »

jQuery Transmit file upload plugin updated

6
Filed under ActionScript, Flash, jQuery, Software

Having finally gotten a few hours to myself, I’ve updated the jquery-transmit file upload plugin to support Flash 10. Because of the security restrictions added in the most recent revision of the flash browser plugin, the calls to trigger the file selection dialog needed to occur in the SWF itself. To achieve this, the SWF is placed on a layer above the links triggering the dialog. You should be able to successfully edit the HTML to your liking without much consequence. Though, you should be careful not to rename any of the ids or classes. The plugin relies on them to place the SWF and resize it as necessary. As with the initial release, the plugin should be considered a work in progress and is not yet suitable for a production environment. Hopefully, this fact won’t deter you from giving the plugin a try. Source and downloads are available at googlecode. As always, constructive feedback is very much appreciated.

Red5 + Hibernate Revisited

18
Filed under Flash, Hibernate, Java, Red5, Software, Spring Framework, Tutorials

It’s hard to believe that I wrote the first version of this tutorial almost a year and a half ago. That’s too long to wait for an update in my opinion and is much needed in this case. My apologies for not tending to the garden sooner. While the original article illustrated a simple method for integrating Red5[1] and Hibernate[2], by today’s standards it’s design is overly verbose and somewhat out of fashion. Not to mention the 3 major components used in this tutorial have all gone through major revisions. The primary goal for this iteration was simplification of the code as well as the XML configuration elements and results in a smaller code footprint. This is a big win in my book. Read More »

Flickr style multiple file upload with jQuery

16
Filed under ActionScript, Flash, jQuery, Software, Tutorials

A while back, Paul Gregoire introduced me to the jQuery JavaScript library. It didn’t take long for me to realize the power and elegance of this library. For the longest time, I’ve been wanting to take a shot at authoring a plugin for jQuery and I’ve finally gotten around to it. So, it is my pleasure to announce the creation of the jquery.transmit plugin. It is a flash-backed multiple file upload utility with a user experience similar to that of Flickr’s current uploader. The goals for the plugin were simple: Provide an easy-to-use interface, use flash to work around HTML and JavaScript based file upload issues, and wire it all together with jQuery. Getting started with the plugin is quite simple. Import the necessary CSS and JavaScript dependencies, edit the supplied HTML to your liking and invoke the plugin like so:

    $(document).ready(function() {
        $('#transmit').transmit('http://mysite.com/upload/');
    });

While the plugin is still very much in its infancy and should be considered a work in progress, it is my opinion that it is easier to shake out bugs using an iterative development process. So, keeping that in mind, I’m hoping that a couple of you brave souls will wander over to googlecode and give it a try. Constructive feedback is very much appreciated.

Server-side stream recording with Red5

68
Filed under ActionScript, Flash Media Server, Java, Red5, Software, Tutorials

This tutorial has been updated. Please check out the new post.NetStream.publish(“streamName”, “record”) API, it is sometimes useful to take FLV snippets from the publishing stream instead. In my opinion, this is one of the greatest features of Flash Media Server (FMS) and Red5. Utilizing this strategy allows the application developer to precisely control when and how much of the video is recorded. While recording via the NetStream function has been available in Red5 since the beginning, recording video from the server-side application has not. In this post, I’ll demonstrate Red5′s ability to record an FLV with a very simple pair of publish and subscribe flash applications. Read More »