SitePoint Tech Times March 17th, 2004 
Issue 85 

Newsletter Archives | Advertising | Contact us  
Tips, Tricks, News and Reviews for Web Coders

In This Issue...

Introduction

Kevin Yank A mighty Saint Patrick's Day to alla de good Irish Tech Timers out d'ere - includin' de Irish at heart! Have yerselves a pint fer me, willye? An' please pardon my terrible accent!

This issue will be a more hurried affair for me than usual, as I'm very busy putting the finishing touches on yet another SitePoint book! Watch out for Build Your Own ASP.NET Website Using VB.NET and C# next month! That's all I can tell you for now, but I'll have plenty more details in the coming weeks.

Happy Reading!

Kevin Yank
techtimes@sitepoint.com
Editor, The SitePoint Tech Times

Top


PHP5 Is Just Around The Corner...
But Object Oriented PHP Is Here Today!

PHP 5.0 is only weeks away from release, and the biggest changes in this new version are in the area of object oriented programming (OOP).

Do YOU have the object oriented programming experience to take full advantage of PHP 5.0?

Photo of The PHP AnthologyThe best way to gain this knowledge is to learn by example, and the richest source of object oriented PHP examples is The PHP Anthology, by SitePoint's Expert PHP Columnist, Harry Fuecks!

Interact with MySQL, handle BBCode markup, filter coarse language, validate forms, display calendars, generate thumbnails, send advanced email, page result sets, all with object oriented PHP code... and that's just in the first volume!

And if you're completely new to object oriented programming, then Chapter 2: Object Oriented PHP, with its complete introduction to OOP, will be a godsend!

Grab The PHP Anthology today and save $20!
Or download the free sample chapters!

Top


Editorial

Macromedia Releases Major Update to Dreamweaver MX 2004

Apparently acknowledging shortcomings in the initial version of Dreamweaver MX 2004, Macromedia is making a big deal of the just-released update to version 7.0.1.

"While we were thrilled with the new features released in Dreamweaver MX 2004 this past fall," says Dreamweaver product manager Jen Taylor in a macromedia.com article about the update, "we were not as pleased with the performance and stability we heard about from customers. While we felt confident of quality with our beta customers, our larger customer base let us know we had fallen short."

This new version is supposed to correct all manner of bugs and also sports significant performance boosts (especially on Mac OS X). The Timelines feature for DHTML animation has also been reinstated by popular demand, after its removal from the MX 2004 release.

Having played with the update on Windows XP for a couple of days now, I can't say I've noticed a great deal of performance difference, but I have a pretty fast PC. That said, a number of annoying bugs and stability issues that affected my work have been corrected. In particular, the program seems a lot happier editing large XML files, whereas before, the code display tended to become corrupted.

If you own Dreamweaver MX 2004, grab the 7.0.1 update now. If not, you can take this opportunity to use it for a 30-day trial! Macromedia are granting a new trial period with this release for those who may have been put off after trialling the initial version.

Top


Quick Tip

Handheld CSS

If you believe the specs, writing CSS especially for handheld devices such as mobile phones and PDAs should be a simple matter. Unfortunately, as with many things CSS-related, this simplicity is an unrealistic ideal.

Here's how it should work. One page, two style sheets:

<link rel="stylesheet"
    src="screen.css" media="screen" />
<link rel="stylesheet"
    src="hand.css" media="handheld" />

According to the media attributes, desktop browsers should ignore the second <link> tag, which they do. Handheld browsers should ignore the first <link> tag - but they don't.

Why is this? After all, mobile phone browsers are quite new. Aren't they written with the latest standards in mind?

Let's stop and consider what would happen if mobile phones did ignore style sheets intended for desktop browsers. Since the overwhelming majority of sites today provide style sheets for desktop browsers only , the mobile Web would be a very unstylish place indeed. Not great for mobile phone sales...

So, until handheld style sheets really catch on, mobile Web browsers will probably continue to display styles intended for desktops... which, ironically, makes it more difficult for designers to implement handheld style sheets!

For now, the solution is to write in your handheld style sheet (hand.css in the above example) rules that "undo" any styling in your screen style sheet (screen.css above).

For example, say you have the following rule in screen.css that positions a list of navigation links at the top right of the page with a nice background:

#nav {
  position: absolute;
  top: 57px;
  right: 0;
  background: url(bgnavtop.gif) no-repeat;
}

Now, on a handheld device you probably want these links to appear relatively unstyled. You can use a rule in hand.css to reset the properties we set above to their initial values:

#nav {
  position: static;
  top: auto;
  right: auto;
  background-image: none;
}

Because hand.css is linked to the document last, the property values in this second rule will override those in screen.css above. This rule will not affect modern desktop browsers, however, as they correctly ignore the <link> tag with media="handheld".

Note that some older handheld browsers stubbornly ignore media="handheld" style sheets. Aside from server-side browser detection, there isn't much you can do for such browsers but hope that users will upgrade!

Top


Subscribe to php|architect and get 18% off!

Subscribe Today!php|architect is the premier PHP magazine for professionals. Each issue comes jam-packed with articles for both intermediate and advanced PHP developers, focusing on all the aspects of day-to-day programming.

Sign up today for php|architect, and get as much as $10 US off the regular subscription price for 12 issues. php|architect is available in both traditional print format or as a PDF - the choice is yours!

Visit php|architect today to claim your discounted subscription

Top


Software Review

Ultimate Drop Down Menu 4.1 by Brothercake
Free for non-commercial use
Commercial licenses from £31.99 (US$57.77)

You can have your cake and eat it too! The Web Development Division here at SitePoint has been hunting around for a DHTML navigation system to meet our strict quality standards. UDM 4 came up trumps!

UDM 4.1 Screen Shot

UDM 4 is seemingly unique in that it's the only XHTML-compliant, accessible and semantically correct dynamic menu system we could find. As an added bonus, it's also really easy to use and configure.

When we implemented a policy of coding to XHTML 1.0 and accessibility standards early in 2003, DHTML navigation systems almost disappeared from our interface repertoire. You can argue the pros and cons of whether DHTML menus are good or bad for usability, but, regardless of your particular orientation, when your client really wants one, you have to be able to deliver.

Creating a robust cross browser solution is hard work. Rather than reinvent the wheel, we decided to look for an existing system.

UDM 4.1 met or exceeded all our criteria:

  • XHTML Compliant
    All presentation elements are controlled using CSS.
  • Semantic Markup
    Menus are marked up with lists to ensure that they degrade gracefully for non-graphical browsers.
  • Scalable
    The menu system can handle an infinite level of nested lists, so it can work with even the most complex site.
  • Accessible
    Menus are usable by screen readers and users without pointing devices. 
  • Efficient DOM-Based Script
    Support for Netscape 4 and other legacy browsers is sacrificed in favour of efficient, modern code based on the W3C DOM standard.

On top of our basic requirements, we found that UDM had a lot of other handy features:

  • Extensive CSS Presentation Options
    You don't need to be a CSS guru (let alone a JavaScript pro) to configure the menus to suit your design. Simply work through the well commented config file. Layout options include horizontal, vertical and pop-up styles. Most CSS positioning requirements are also accommodated.
  • Great Keyboard Controls
    The menus are surprisingly easy to use without a mouse.  F12 sets the focus on the menu; you can then use the arrow keys to navigate.
  • Reasonable Code Size (About 40KB)
    For a DHTML nav system, that's not bad. The UDM code is mostly object oriented and should not affect your other event handlers.
  • Tech Support for Commercially Licensed Users
  • Extensible with an Integrated API
    You can write new extensions or tie in other scripting to the links and menu elements.

Costs

Single Website: £31.99 (US$57.77)
2-5 Websites: (each) £25.99 (US$46.94)
6+ Websites: (each) £21.99 (US$39.71)
Unlimited Websites: £369.99 (US$668.20)
Non-commercial: Free with a link back to UDM Website

[Review by Julian Carroll]

Top


Help Your Friends Out

People you care about can benefit from the wealth of information on new and maturing technologies available on the Internet. Help them learn how to do it by forwarding them this issue of the SitePoint Tech Times!

Send this to a friend

Download a full four free chapters from every SitePoint Book!

The PHP Anthology
by Harry Fuecks


The Web Design Business Kit
by Brendon Sinclair


HTML Utopia: Designing Without Tables Using CSS
by Dan Shafer


Build Your Own Database Driven Website Using PHP and MySQL
by Kevin Yank

!More information about SitePoint Books

 New Technical Articles

Getting Started with PEAR - PHP's Low Hanging Fruit

Harry Fuecks
By Harry Fuecks

Sick and tired of reinventing the PHP development wheel? Get to the fun stuff faster with PEAR. Harry's hands-on tute explains its pros and cons, shows how to set up and use PEAR, and might even rekindle your passion for PHP!

Review - vBulletin 3.0

David
Mytton
By David Mytton

After talking with the product's creator, David takes vB3.0 for a spin and finds it has some great benefits ... and a few pitfalls. Is it worth the money? Will David become a vBulletin convert? Read on to find out!

Cost-Effective Website Acceleration Part 3 - Server Side Modifications

Thomas
Powell &amp; Joe Lima
By Thomas Powell &amp; Joe Lima

In the third and final part of their comprehensive site acceleration primer, Thomas and Joe explain the practicalities of server side modifications, from HTTP compression, to segmentation. Don't miss their critical review of SitePoint.com!

Build a phpBB Forum in 5 Steps

Peter
Lavin
By Peter Lavin

Start that community you've always dreamed of today! With open source bulletin board script phpBB, and Peter's no-nonsense tutorial, you'll have a fully featured forum set up in minutes. Adding functionality to your site has never been so easy!

TrackBack To The Future: Next Generation Content Referencing

Dennis
Pallett
By Dennis Pallett

Is it a bulletin board? Is it an online repository? It's TrackBack, and it's set to change the face of online content referencing. This API enables Websites to communicate about similar interests and resources. Here, Dennis explains how TrackBack works, and why it will redefine your perceptions of content!

 Hot, Techy Forum Threads

Manage Your Subscription Here.

!You are currently subscribed as to the HTML edition of the Tech Times.


CHANGE your email address here

UNSUBSCRIBE from the Tech Times here.

SUBSCRIBE to the Tech Times here.

SWAP to the 'Text-Only' version of the Tech Times here.


SitePoint is Hosted by
Ventures Online


Thanks for reading!

 © SitePoint 2004. All Rights Reserved.

Back to the archives

Newsletter signup

Design, coding, community or marketing? Select the right newsletters right for your needs...