You are currently browsing the category archive for the 'Java' category.

Recent stock market darling VMware has just released a Perl toolkit for it’s Virtual Infrastructure virtualisation product, as well as a Perl toolkit virtual machine that you can download for free to play around with.

VMware describes the toolkit as “an easy-to-use Perl scripting interface to the VMware Infrastructure API (VI API). Administrators and developers who may be more familiar with Perl (rather than with Java, C#, or other programming languages) can readily leverage the VI API. For developers who have previously worked with the Scripting API (VmPerl API), the VI Perl Toolkit is the tool of choice.”

An example VI3 Perl script, perf.pl, can be downloaded at the VMware forums site. Perf allows you to measure the performance of your virtual machines running on ESX 2.x or 3.x servers during a specified period of time.

Related Articles:

  • Virtual Desktop Infrastructure 2.0 Download
  • The 10 Best VMware Virtual Appliances
  • VMWare relases VMWare Converter 3 Beta Refresh
  • Free Download - VMWare Introduces Virtual Lab Manager Beta
  • VMware Announces VMSafe Hypervisor Security Platform

  • del.icio.us" Digg" Reddit" Simpy" Yahoo!"

    I’ve been reading the IndieHIG (Independent Human Interface Guidelines) a lot lately, being a fan of Apple’s original HIG, and (to a lesser extent) the Sun Java HIG as well.

    While it’s great that they are taking on the Macintosh apps that are not aligning to standards, they don’t really apply anywhere else at all, and that’s a real shame. What the venerable Apple HIG really had going for it was that it could be applied anywhere, and that’s why it was so popular.

    I really think the new HIGs to be watching are those from Gnome HIG and KDE HIG as more developpers are involved and the rules can be applied to all types of applications, and in many environments.

    But hey, keep up the good work IndieHIG - just change your name to something more suitable like Indie Apple HIG.

    Related Articles:

  • Quick Tip: Eject your CD on an Apple Mac
  • About
  • Make Prototype.js TINY - Keep Compatibility
  • Make A Solaris 10 DVD Image On Windows
  • Turn off Apple Startup Sound on your Intel Mac

  • del.icio.us" Digg" Reddit" Simpy" Yahoo!"

    Prototype.js is a very popular AJAX framework used when building dynamic websites. You will find Prototype in most Ruby on Rails projects as it is included by default, and for good reason; Prototype.js is a great library that includes a lot of functionality.

    Unfortunately it is rather large in size, weighing in at roughly 50KB.

    Although many have managed to reduce the file size of Prototype by paring down the code and gzipping the file, we’re going to use an additional tool to approach the problem, one from the Mozilla foundation that appears to work very well - Rhino.

    (Oh, in the interest of full disclosure, I am a Java fanboy, having studied at a university that got a lot of Sun funding back in the day. I hope you can see past that and check out this Javascipt hack, I really do.)

    An informative quote from the Mozilla page for the Rhino project goes like this:

    “Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users.”

    Alright then, so what you have is a Java bytecode version of Javascript that will work in most browsers.

    Sounds interesting, let’s see what we can do with Protoype.js!

    I decided early on to use a Rhino tool that I found on the Dojo site that allows me to compile Javascript and make it Rhino compatible. The page give you a brief walkthrough and some examples on how to use the tool, so I won’t need to cover that here in detail.

    So we compile our Prototype Javascript file, let’s see what our results are then, shall we?

    Before: 47445

    After Rhino: 32716

    After Rhino and gzip: 9454

    So it’s at about 9KB now!

    In order to utilize the new file, upload it to the directory that houses your original Prototype javascript file, then any instances of prototype.js in your code to prototype.jgz (zipped javascript).

    You’ll also want to change your .htaccess file so that you handle the new script properly by typing pico (or nano or vi or what-have you) .htaccess:

    RewriteEngine on
    RewriteCond %{HTTP_USER_AGENT} ".*Safari.*" [OR]
    RewriteCond %{HTTP:Accept-Encoding} !gzip
    RewriteRule (.*)\.jgz$ $1\.js [L]

    AddType "text/javascript;charset=UTF-8" .jgz
    AddEncoding gzip .jgz

    You’ll notice here that we’re doing user agent detection for Safari. When I did my testing it seemed to be spotty, so what we’re doing is falling back to javascript if we see that the user is using Safari. We’re still compatible, and the code works everywhere else.

    Related Articles:

  • Design Useable Applications
  • Ruby and FTP
  • Dreamhost Stats Rewriting and Typo with .htaccess
  • Allow Multiple Logins/Users for Mint Stats Tracker
  • How do I install .kext files?

  • del.icio.us" Digg" Reddit" Simpy" Yahoo!"