Sponsor: The JavaScript Anthology
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks (external link)
Browse Blog Archives
« October 2005 November 2005 December 2005 »
Blog Entries from November 2005
-
Firefox Plans To Mass Market
For the release of Firefox 1.5, the Mozilla organization is planning a large-scale marketing plan to promote the usage of the open source web browser, Firefox. According to Christopher Beard, the vice-president of products at Mozilla, the mass marketing plans will involve the vast Firefox community, as did Mozilla's original New York Times marketing venture.
Their new marketing plan will have users posting videos of why they like Firefox. Mozilla is also planning to turn Mozilla.com into a consumer-orientated website, changing it from its current placeholder page.
On a side note, Firefox 1.5 is projected to officially release on Novemeber 29th, three days from now.
-
Templates With Savant 2
Templating engines are a great asset to any application or website maintained by a development team. It helps to separate design logic and presentation into two sections. This allows the developers to maintain the program and pass the final values to a template. Then the designers and webmasters can easily change the presentation without having to deal with any code.
Many developers use the Smarty template engine. While Smarty offers a nice amount of features that really take templating far and beyond, it is slightly bloated. PHP itself is a templating engine, and there is no need to recreate its syntax.
For templating, I have found Savant (external link) to be exactly what I need, something lightweight and easy to use. Rather than recreating a separate syntax for PHP's features, it just uses PHP. There is also no template compiling. According to Savant itself, it is a "simple, elegant, and powerful alternative to Smarty."
Savant is completely object orientated and has the ability for plugins and output filters. On top of all of this, the syntax used by Savant is extremely simple:
PHP
<?php
require_once 'Savant2.php';
$tpl =& new Savant2();
$title = 'Lowter';
$link = 'http://www.lowter.com';
// Assign values to template
$tpl->assign('title', $title);
$tpl->assign('link', $link);
$tpl->display('link.tpl.php'); // Display template
?>PHP
<a href="<?php $this->_($this->link) ?>"><?php $this->_($this->title) ?></a>As you can see, the syntax of Savant is comprehensible and not as bloated as Smarty. For any looping or conditional statements needed you simply use PHP. Some might ask, what use is Savant then? Savant does exactly what a templating engine is designed for, separating design and presentation logic, and it does so in a minimalistic manner.
If you are looking for a simple, easy to use, lightweight templating engine then Savant (external link) is exactly what you are looking for.
-
PHP 6 Already?
The release of PHP5 was just back around the corner, and discussion of PHP6 has already began. Core PHP developers meet in Paris regarding the future of PHP. The meeting minutes (external link) have been publishing, allowing you to see PHP's potential future path.
Harry Fuecks has a blog entry (external link) discussing this in great detail, if you're interested. PHP has been progressing faster than usual this year. PHP6 is plotted along the horizon, and PHP5 still has not even established itself - wow!
-
Introduction to Animation
As the name suggest, today we will look into some simple animation. Animation can be useful for making smaller graphics for your website, maybe an avatar, or even a header. Today's lesson will teach you the basics of animation, while making it all too easy.
Step 1
Open Adobe Photoshop. Press CTRL+D to reset Photoshop to the default colors. Fill the background layer with black (#000000). Create a new layer, labeling it "Line." Create an additional layer, naming it "Dot."
Note: I am using 200×120 pixels for the image's size, although you can use any size you wish.
Step 2
Select the "Rectangular Marquee Tool" and create a selection, making it the size you want your animation to be.
Note: Make sure that you have the layer "Line" selected.
Now, go to Edit -> Stroke. Use the settings below and select "OK":

Step 3
Next, select the "Dot" layer and create a small circle in the bottom corner of your square, using the "Elliptical Marquee Tool." Fill the small circle with white (#FFFFFF). Your image should look similar to below:

Step 4
You are done with Photoshop. Next, click on the Photoshop to Image Ready button, toward the bottom of the side-menu.

Step 5
When Image Ready has opened, duplicate the imported frame:

Move your dot to the next corner of your animation. After you have moved it, click on the small chain button ("Tween Button") next to the duplication button. Set the settings as follows and select "OK":

Step 6
Repeat step five until the dot has gone around the entire line, and it is back to where it started.
Note: Remember that each time you repeat step five, you have to duplicate the last frame. For example, the first time you redo step five you duplicate frame two.

Now you are done! Go to File -> Save Optimized. Next time we shall start working on more difficult animation.
-
Sony DRM Is, Well, Evil
Late last month, users discovered that Sony's copy-protected CDs would automatically install digital rights management (DRM) software onto your computers, when you played their CDs in your CD-ROM drive. This DRM software is a root kit, a type of Trojan horse. The software creeps itself onto your machine, installs itself, and then compromises the security of your computer.
The root kit could potentially allow other hackers to take complete control of your system. Users have already reported that when they attempted to remove the software it broke their CD-ROM drive. If Sony can do this, then can we even guess what hackers might be able to do?
You can read more on the topic in Molly Wood's column - DRM this, Sony! (external link)
Another scary part of the story is that Sony has been doing this for over a year, and it has just been discovered. On the up side, Sony has agreed to discontinue including the DRM software on their CDs, after thousands of CDs already have the software on them. They have provided an "uninstaller," although no one has reported that it works.
Then they wonder why CD sales are down...
-
Safari Passes Acid2
In the recent OS X update (10.4.3), Apple made a multitude of small changes and fixes. The main update (for web developers) is that Safari now passes the Acid2 (external link) test. It is the first official browser release to pass the standard's test. Both iCab and Konquerer pass in beta versions, but Safari is the first official release.
It should only be a matter of time for most browsers to pass, excluding Internet Explorer. Opera and Firefox are already working on passing the test. This will be a huge improvement in standardized rendering.
Browse Blog Archives
« October 2005 November 2005 December 2005 »
Sponsor: Sunbird Calendar Application
Manage your schedule easily and store it where you want to. (external link)

