Following on from my recent post on Dashboard Widgets for Techies, this post previews some nice dashboard widgets for Web Developers.

Regular Expressions

We’ll start with what I consider to be the most powerful widget, the regular expression widget. Regardless of what web language you end up using and what you are doing the chances are that you will need to validate user-input and that you will need to use regular expressions to do it. There are a number of Widgets for testing regular expressions out there but of all the ones I’ve tried the RegexToolbox was by far the best. It allows you to set up a list of test cases and then match an RE off them and it tells you what it matches as well as all the matches within bracketed groups. It also allows you to test substitutions.

RegexToolbox Screen Shot

Technical References

It’s often handy to have the full spec for things at your fingertips and the Dashboard is about as ‘at your fingertips’ as things get so it makes sense to have some API specs in Widget form.

I know I hate PHP but I still have to use it quite a bit and I know a lot of other people do too so a PHP reference widget is still very useful. There are quite a few different ones but the one I found to be the best is this one: www.apple.com/downloads/dashboard/developer/phpfunctionreference.html.

Php Function Reference Widget Screen Shot

Another somewhat useful widget is the Tags – CSS widget. It sounds great and gives you a nice interface for searching for what CSS attributes there are but sadly if doesn’t give you the possible values for those attributes which is very annoying. A similarly disappointing widget is Tags – HTML.

Colour Tools

Easy access to the web-safe colour pallet is something that sounds very useful and hence you’d think there would be a very good widget for it but you’d be wrong. There are indeed many colour widgets but no very good ones. Color Safe is the best of a bad lot but it’s not perfect. I’m quite tempted to write my own Widget for this though.

ColorSafe Widget Screen Shot

Tagged with:

I recently did a post on Dashboard Widgets for techies and am working on another about Dashboard Widgets for developers. There was one important widget missing from my list of widgets for techies, one for converting Unix Time Stamps to human readable dates and vica-versa. The reason it was missing was because I couldn’t find one anywhere on the Apple site! I find this strange because I regularly need to deal with Unix Time Stamps in things like logfiles and raw data in Databases, hence I’d have expected others to need this too and hence for there to be a widget for it. Well, I decided to remedy this omission by writing my own Widget which I’ve now submitted to Apple for addition to their Widget Downloads Page. I’ve decided to release it as GPL so you can get it on the downloads page of my home page.

So, how easy was it to develop my first widget? Trivial! I went from deciding to write the widget to a fully working first implementation in about 2 hours including all reading and experimenting that I had to do to get started. IMO that’s not bad at all, in fact I can’t think of any other platform I’ve ever used where I was able to do something useful as quickly.

So, what’s involved in writing a Dashbaord Widget? TBH very little. If you are up to speed with client-side web technologies then you’ve pretty much got everything you need. Yes, there are some extensions to these technologies involved to allow you to interact with the OS and the command-line and also for 2D graphics with Quartz if you want to get fancy but they are very easy to get to grips with and there are some excellent guides on Apple’s Developer Site.

A Dashbaord Widget is basically a web page written in XHTML that is skinned with CSS and made interactive with JavaScript. There really is nothing more to it than that. If you want to give this a go yourself the links below are all you’ll need.

As I said I had a fully functional Widget in two hours, took me a little longer to get it to do cool stuff like flipping round to show the credits on the reverse side and getting it skinned in a way I was happy with but all in all that Widget was no more than 5 hours work including all the fiddly graphics and layout stuff. A screenshot of the finished product can be seen below.

Screen shot of Unix Time Stamp Converter Widget

Tagged with:

OS X is becoming a popular choice among techies these days but many of us tend to ignore the Dashboard feature introduced in OS X 10.4 Tiger. I find Dashboard quite useful and have compiled the following list of widgets you might consider installing. They range from the very simple things like password generators to nmap frontends and system monitors.

Beginners/Lazy People

Although I can now easily calculate Unix file permissions in my head I’m sure there are many people who are new to Linux/Unix who may find it helpful to get a bit of help with them so below is the nicest of the Unix Permission widgets I found on my travels.

It’s called, sensibly enough, UNIX Permissions Calculator Widget and you can get it from http://vocaro.com/trevor/software/widgets/.

Unix Permission Calculator Widget

Another handy one that I do confess to using myself from time to time is the IP Subnet Calculator Widget which you can get from www.apple.com/downloads/dashboard/networking_security/ipsubnetcalculator.html.

IP Subnet Calculator Widget

Password Generators

I’ve tried out a LOADS of password generators over the last few months and some really suck! The first one I tried always gave the same sequence of ‘random’ passwords which sorta defeats the point some what! ATM I use the rather simply named Random Password widget (www.apple.com/downloads/dashboard/networking_security/randompassword.html).

Random Password Widget

System Monitors

There are more system monitor widgets than you can shake the proverbial stick at but after much experimenting and playing around I’ve settled on iStat which comes in two versions. There is iStat Nano which is small and compact and has multiple screens you can flip between as well as a nice, compact overview, and then there is iStat Pro which is far from small but wonderfully detailed. I generally use the iStat Nano but both are very good. The screenshot below is taken on my PowerMac and shows both nano and pro in action at the same time. You can get these widgets from:

iStat Nano and iStat Pro

Network Monitors

Something I like to keep an eye on is what network connections are going to and from my machine at any time. A lovely compact little widget for doing this is called Pakze which may sound like a strange name but if you speak Dutch you’ll realise it means ‘get em’ and the background is a rather grumpy looking doggie! You can get Pakze from www.apple.com/downloads/dashboard/networking_security/pakzewidget.html.

Pakze Widget

There are also lots of other network status widgets that tell you what you internal and external IP addresses are and how much bandwidth you’re using etc but since iStat has all that information anyhow I don’t see the point in cluttering your dashboard with extra widgets that tell you nothing new.

What can be useful is a widget called Sunemo (www.apple.com/downloads/dashboard/networking_security/sunemo.html) that uses nmap to show you all the machines that are active in your subnet. I only use this widget on my home network and I would warn others to do the same. Your network administrator will probably get grumpy at you if you try using this on a corporate or university network!

Sunemo Widget

Finally, it can be useful when keeping an eye on who is accessing or attempting to access your servers to know where suspicious people are coming from, hence the GeoLocate widget can be very useful to techies. I’m not really sure how accurate it is but it tends to get the country right at least. You can download it here: www.apple.com/downloads/dashboard/networking_security/geolocate.html.

GeoLocate Widget

Final Word

Those are the techie related Dashboard Widgets I use. Of all the widgets I’ve downloaded and installed I’d say only about 25% are keepers if even that so these really are the cream of the crop that I’ve been collecting pretty much since Tiger came out. I also have other good widgets for helping web programmers so I might do a follow on article shortly on Dashboard Widgets for Web Monkeys.

Tagged with:

Des made some great points and linked to some other great blog entries on all the things that are wrong with PHP in his recent blog entry I hated php back when it was cool and I found myself agreeing with them all but I also have another gripe with PHP so I figured I may as well share mine too while the topic is hot on Planet MiNDS>.

Read more

Tagged with:

This is a step-by-step guide to installing Tomcat 5.0.x onto OS X 1.4.x. Note that this is the Tomcat branch for the 1.4 JDK and not for the 1.5 JDK. I know the latest versions of OS X now have Java 5 as part of the OS but my work is not yet ready to migrate to Java 5 so I’m staying with Tomcat 5.0 for now. The chances are that these instructions with only tiny and obvious alterations will work for Tomcat 5.5 with Java 5 but I’m not making any promises. Read more

Tagged with:

I am well aware that tables for layout are a BAD BAD idea and have stopped using them for such perverted things years ago with just one exception, forms. I started doing my forms in lists because IMO that makes sense but clients were always grumpy when web forms weren’t layed out in the traditional two column way and short of creating a mess of Divs I always ended up falling back to tables for forms. Not anymore! I’ve FINALLY found a nice way of doing forms so that the XHTML is simple, elegant and more importantly, semantically correct while still keeping to a nice two column layout.

Read more

Tagged with:

Now that the worst of the ‘browser wars’ finally seems to be behind us and now that JavaScript can easily communicate with servers to get data without page re-freshes via AJAX one has to wonder if there are any real uses left for applets. My conclusions would be that yes there are still some uses for applets on the web but they are few and far between. Anyone who uses an applet in this day and age should have a bloody good reason to do so because your browser should not have to load a JVM just to view a web page unless that JVM is providing something spectacular that actually adds something to your page and that cannot be done with the core web technologies (XHTML, CSS, JS, AJAX).

Read more

Tagged with:

When you are dealing with databases one of the most common things you have to do is to escape out all single quotes in text being entered into the DB to stop PostgreSQL/MySQL/*SQL having a cow and to prevent injection attacks.

In most languages this is trivial, take Perl for example

my $sqlText =~ s/'/\\'/g;

Could it be that easy in Java … not on your life!

Read more

Tagged with:

« go back