I seem to be on a roll as of late with jGrowl... Today I spent some time working on supporting multiple instances. Hypothetically, someone may want to add more then one jGrowl container to their page, perhaps one in the top left corner and also one in bottom right. With version 1.0.4 this was not possible, jGrowl created a singular instance of itself and it could be docked in only one location. Not so anymore... In what will likely be the 1.1.0 release, slated sometime this weekend - you can have as many jGrowl containers and instances as you want and position them anywhere on the screen. The API has changed quite a bit due to this, but don't worry the old API is maintained through a wrapper method. I've expanded the demo file to demonstrate some of the new possibilities, and I'll update the projects and plugin page as soon as I have finalized testing. Stay tuned...
What's been happening?
June 13th, 2008
Posted at 5:01pm by Stan
June 13th, 2008
Posted at 12:34am by Stan
I've just release jGrowl 1.0.4, this is a maintenance release that introduces full support for Internet Explorer 6 and thus making jGrowl compatible with all major web browsers. The download is available off of my projects page or at the jQuery Plugin page. If you're a user of jGrowl I strongly recommend upgrading to this release.
June 12th, 2008
Posted at 3:16pm by Stan
jGrowl support for IE6 right now stinks. It stems from two issues, the first is IE6's lack of support for "element > element" selectors in stylesheets. The jGrowl stylesheet uses this quite extensively for aligning styles to the nodes that it generates. The second is IE6's lack of support for the fixed position style. I've included some sketchy CSS hacks for IE6 in the past, but I also confess I haven't paid much attention to IE6 since my earliest release.
Today I spent some time chewing away at the IE6 issues, and I'm happy to say that I believe I'll have a new release (1.0.4) to roll out tomorrow that fully supports IE6. I continue to use CSS hacks, but this time ones that are a little more friendly and don't require Quirks Mode. I've also separated other browser's styles out using the > in selectors. Style rules that need to be applied to IE and everything else no longer have > in them. Finally, there's an IE6 class that is added to the jGrowl container by the actual plugin when the user is viewing the page in IE6. Additionally I've added the zoom fix for the deault opacity styles since jGrowl, as far as IE is concerned, has no layout.
This release should roll out tomorrow, I'll post an update here and the jQuery plugin page will have the new release as well. For serious users of jGrowl, I highly recommend this release since it opens up compatibility to a wider range of web users.
June 11th, 2008
Posted at 2:32pm by Stan
I rolled out a new version of my jGrowl plugin today. For those who aren't familiar with it, it's a jQuery plugin that generates unobtrusive user-land messages. I first created it for PageSite and it has since worked its way into just about everything I do these days. This latest release focuses on customization and also includes several bug fixes for the previous release.
May 17th, 2008
Posted at 12:00am by Stan
I've been spending any free time I have working on performance for HT's site. Over the last week with some increased traffic to the site and increased staff work for the conferences I've been noticing some serious lag. Benchmarking with Apache AB revealed how bad things were getting, and then with a little profiling love from APD I was able to identify exactly where things were going down hill.
It seems like every couple of months I find myself re-evaluating our framework and searching for bottlenecks. This time I was lead to MySQL in general, and the communication delay between PHP's MySQLi extension and the actual server. Probably 6+ months ago I implemented a caching layer into PageSite, we were still on a shared web host when I did this, so the joys of something like APC were out of my grasp. What I resorted to was a database table to store stuff in. In a single query all of the "cache" was loaded and then if changes were made things were saved when the object was destroyed at the end of execution. It worked well, I really can't complain... but there were better options available that weren't as slow as communicating with MySQL.
Welcome to APC, also known as the Alternative PHP Cache. It was designed to be a simpler solution to the problem that memcache solved, memory storage for PHP applications. Shared hosts don't use this extension for a variety of reasons, but now that HT is on a vded it makes it a possibility for ys. Thanks to APC's caching of includes, optimizing of *_once()'s and the memory storage, HT's site has sped up about 10+x from what it was last week when benchmarked by APC and I've seen execution times drop drastically on the server.
There are still some issues to be solved, including code optimization and better communication with MySQL. I'm always working to improve code performance, and as for the MySQL issue... well, I'm holding out for PHP 5.3, with the MySQL Native Driver (mysqlnd) which should cure most of my speed woes. In the meantime, if you're out there and have access to your install of PHP I highly recommend giving APC a spin, simple run pecl install apc from your command line (assuming you have PEAR installed) and you're good to go. Double props to the guys behind APC!
May 15th, 2008
Posted at 12:00am by Stan
Someone asked me the other day for an out-of-the-box working example for the jQuery Template plugin. I sent them one and thought it might come in handy for others interested in using the plugin, so here's a link If you have any questions or comments feel free to drop me a line.
April 19th, 2008
Posted at 12:00am by Stan
When Ruby came onto the scene there was a change of philosophy in shared code. Ruby, in my opinion, really helped to pioneer the idea of a fully developed framework for rapid application development. Rails is the one-stop resource for web development in Ruby, hands down. Before Ruby, the language all others looked up to was Perl and it's idea of shared code is CPAN. If you know CPAN, it's a mess - great console access, but there's no consistency amongst code, documentation is at your leisure and at times there are almost too many options.
Meanwhile, in the background is Java, which just kind of does its own thing in this area, like it always does... suffering from shared code packages and frameworks and everything in between. PHP hasn't been original in this field, for the better perhaps. Originally the big thing was PEAR, which was PHP's solution to CPAN but fixing some of the obvious flaws with CPAN (Note, the originality to this problem for PHP really lies in the PEAR-folks efforts to unify a shared code repository). Lately, though, it's been frameworks! Have you seen, Symfony, Cake, The Zend Framework or Solar?
April 15th, 2008
Posted at 12:00am by Stan
The Higher Things website uses a really cool jQuery plugin called Superfish for it's black navigational bar. I first stumbled across this plugin while dealing with an animation problem for a home-grown implementation when we were redesigning the site. Rather then re-invent the wheel I decided to just use Superfish. One of the things that I was never really keen on was the lack of an animation to close the menu when, it just disappears as opposed to when it appears it slides in to view.
As a result I've modified superfish for HT's website and thought I would share the hack here for anyone else interesting in getting superfish to animate when a menu item closes.
First, we need to change some options around, we're going to remove the "defaults" for "animation" and replace it with the following (this should be at line 20):
animationOpen : {opacity:'show'},
animationClose : {opacity:'hide'},
Second, around line 78 we need to change how the method responsible for hiding a superfish menu functions, replace the "hideSuperfishUl" and "showSuperfishUl" method with this one:
hideSuperfishUl : function(){
var o = $.superfish.op,
$ul = $('li.'+o.hoverClass,this).add(this);
$ul.find('>ul').animate(o.animationClose, o.speed, function() {
$(this).css('visibility','hidden');
$ul.removeClass(o.hoverClass);
o.onBeforeShow.call($ul);
});
return this;
},
showSuperfishUl : function(){
var o = $.superfish.op,
$ul = this.addClass(o.hoverClass)
.find('>ul:hidden').css('visibility','visible');
o.onBeforeShow.call($ul);
$ul.animate(o.animationOpen,o.speed,function(){ o.onShow.call(this); });
return this;
}
That's it! I set the above defaults following the release to use opacity for animating, however on HT's we use { height: 'show' } and { height: 'hide' } respectively for the animations. You'll note in the hide method we added an animation and then after that animation has finished executing, in a call back we remove the hover class and call the closing callback. In the show method all we did was change the name of the animation property to be used, since we now have two.
April 12th, 2008
Posted at 12:00am by Stan
Mac users usually have the best software options in the computing world. For example, iTunes is the cutting edge online music solution, or VMWare Fusion and Parallels which both put their sister Linux & Windows solutions to shame, and if you're a biblical scholar you know the BibleWorks just doesn't have anything on Accordance. One are, though, where the Mac is sorely lacking is in financial software. There are a variety of options, but each leave something to be desired in terms of features, functionality, interface and bank integration. Quicken's own product for the Mac is nothing short of insulting, but that's exactly what I've been using for the last three years.
I moved to Quicken because the Windows product was nothing short of amazing. While I have the option of running Quicken for Windows in a VM, that's just not me. I use my VM's for development and testing and that's it! I'm not one of those guys who keeps Windows running 24/7 in Unity mode. In the last couple of months I've endured just about every headache imaginable in terms of integrating with PNC Bank and then data loss. Ask my wife how happy I am when I lose a week's worth of transactions in the QuickEntry widget. This is all to say nothing of the fact that Quicken is a Rosetta-based Mac app, which means it's slow. Just not satisfactory, and I've been looking for alternatives to no avail.
March 29th, 2008
Posted at 12:00am by Stan
Earlier today I release jGrowl 1.0.2 on the jQuery plugin page, and I also uploaded the release locally as well. This release is bundled into a zip file and contained within it is a demo page and an accompanying stylesheet. There are some pretty substantial changes in this release, including...
- Styling is now done externally, not inline.
- Messages can have an optional "theme" passed in, which defines secondary classes to be applied to messages. This allows for messages to be themed on a per-message basis.
- Animation speed can be customized.
- The global closer can be disabled.
- Added an optional callback to the global closer.
- Added an optional open and close callback to the individual notifications.
- Customize the life of a message on a per-message basis.
- jGrowl automatically starts itself up with the first message.
- When there are no messages jGrowl will automatically shut itself down.
- ...fixed various bugs in 1.0.1.
Overall this release is quite a bit better then the previous one. If you have any ideas for future features, or if you discover any bugs please feel free to contact me.
Update 8/21/08: You can download jGrowl from it's jQuery plugin page at: http://plugins.jquery.com/project/jgrowl