June 30, 2006

Creating icons

You will find other articles relevant to this document in these sections:
Richard Lee @ 11:59 am

Recently I had to create some icons for a website I’m working on, so I thought this would be a great opportunity to demonstrate how easy this is.

There seems to be many icon generation tools out their, but it’s just as easy to create icons in Fireworks (or Photoshop).

Creating an icon in Fireworks
Before starting your icon should have a design in mind - remembering there are very few pixels to work with. A good point of reference is the Webdings and Wingdings font-families (I use the Accessories > Character Map).  In this case I am creating an icon for my “Email a Friend” tool.
Sample design

Now I have my design I create a new 16px by 16px document at 72dpi in Fireworks:

Fireworks New Doc

I also want to have some sort of guide when I’m tracing this image so i’ll turn on the grid and set it to 1px by 1px boxes: View > Grid > Edit Grid then View > Grid > Show Grid. I now have a 16px by 16px document divided into 1px squares.

Fireworks 16 x 16 doc

Next I import my design (File > Import), and scale it to the 16px by 16px canvas. You will notice the design is quite aliased, but thats okay, as I only plan to use it as a guide.
Fireworks design import
The last thing I do before starting my icon is create a working-layer (Layers > New Layer) .
Using the Pencil tool (Tip: chose a different outline colour to the design) I start to trace my design to the nearest pixel (re-click pixels to erase them). Every so often I  zoom out to 100% to check how my outline looks to the naked eye. You’ll notice there is a certain level of optical illusion going on, what is actually steps of pixels at 3200% looks like a curved edge to the naked eye.

Finally I have finished the outline of my design. Notice I also decided to fill the background image to create some contrast.
Fireworks icon 3200%And here is the final icon in all it’s glory

Fireworks final icon

For more inspiration I suggest you checkout the IconFactory.com.

June 29, 2006

Lots on

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 5:40 pm

Currently working on a fair few different sites, all trying to get out of the way by tomorrow! Sorry I will be posting articles once I am all finished up :-)

Speak soon

June 27, 2006

Socceroos luck out - 0 - 1 against Italy

You will find other articles relevant to this document in these sections:
Richard Lee @ 11:09 am

Another passionate effort from the Socceroos this morning. Australia, ranked 43rd in the world suffered a cruel exit after a questionable penalty was awarded to Italy (ranked 12th) within the dier moments of the match. Substitute Francesco Totti was awarded a penatly shot 15 seconds before the whistle after tripping on Australian defender Lucas Neill in the penalty area. You really had to really see it to understand the frustration felt by many Aussie’s today.

Anyway, congrats Italy, I’m sure many Australians are proud of this years sqad. It has been 32 years since Australia last made the Cup.

June 23, 2006

Socceroos draw 2 - 2 against Croatia enough to advance!

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 8:38 am

Great game this morning, starting at 5am EST here. An absolutely stunning first goal by Croatia in the first 2 minutes from 25m out looked like a strong start but Australia kept tight and kept control. Two handballs in the goal box not awarded to Australia and 3 yellow cards issued to a single Croatian behind some drama of the game. Harry Kewell Well and Craig Moore and behind the scoring for Australia.

Well done socceroos!

Australia now face Italy in 4-5 days and it will be straight away back into camp training for them.

View the age summary here.

June 21, 2006

SOAP vs Flash Remoting - Flash Player 7

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 1:06 pm

An interesting article I came across some time ago I just came across again now. Visit http://www.flashorb.com/articles/soap_vs_flash_remoting_benchmark.shtml to have a look at some benchmarks between using Web Service API vs Flash Remoting. Very significant speed differences were evident.

Their conclusion to the article as as follows:

“Macromedia has done an outstanding job making its SOAP integration as simple as possible. Our experience using the WebServices APIs was very positive. However, there are several drawbacks in the current Flash Player SOAP implementation. The most noticeable drawback is the memory leak, which makes the approach to be impractical. The Flash Remoting approach is by far more stable and has better performance. The SOAP approach results in larger payloads and greater CPU processing resulting from the XML Schema validation and XML parsing. The Flash Remoting approach benefits from a binary representation of request/response as well as the invocation-batching feature. For any application that  requires moderate to high remote invocation volume and/or involving complex data types and large arrays, Flash Remoting is a better fit.”

It makes an interesting read and the results are very well presented.

June 20, 2006

Flash Remoting with PHP

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 3:00 pm

After delving into a bit of research today into the advancements of the Adobe Flex framework I came across a way to perform Flash Remoting with PHP via an Open Source package called AMFPHP. Flash Remoting is a bridge between the Flash movie and your web application server. Typically this can be done with a REST-like remote procedure call where you invoke a method with parameters through $_GET/$_POST (maybe through a LoadVars call) and your response is XML.

Example: A way of making a HTTP-Request and returning a XML document into a typecasted ActionScript XML Element

// Create the Load Vars invocation class
myVars = new LoadVars();
myVars.action = "pingback"; // My RPC method
myVars.message = "hello world"; // My method parameters
 
// Create the XML response
myXML = new XML; // This is our target object, which the results from sendAndLoad are loaded into
myXML.onLoad = function(success) {
trace(this); // This is where we can process the required assets
}
 
// Invoke the command
myVars.sendAndLoad("PingBack.php", myXML, "POST");

Flash Remoting

Flash Remoting is apparently faster and more efficient to use than this method (or webservices), and will return native objects for you to work with.

On the Adobe site they mention under their Macromedia Flash Remoting MX product (which gets replaced with full functionality for PHP with AMFPHP):

Macromedia Flash Remoting MX provides the connection between Macromedia Flash and your web application server, making it fast and easy to create Rich Internet Applications. With its powerful yet simple programming model, you can easily integrate rich Macromedia Flash content with applications built using Macromedia ColdFusion MX, Microsoft .NET, Java, and SOAP-based web services.

A simple example may be creating a database query and relaying the result to Flash. With Flash Remoting you can simply perform your SQL statement and return a record set to Flash which can then be used in many different GUI components.

AMFPHP

AMFPHP is a framework that allows you to invoke Flash Remoting to PHP without requiring the Macromedia Flash Remoting product offered by Adobe. On their website they describe AMFPHP as:

AMFPHP is an open-source Flash Remoting gateway. It’s fast, reliable, 100% free and open-source. Flash Remoting is a technology built into the Flash player core that enables sending data between the server and the client seemlessly. If you’ve built XML-based RIAs you know how much of a pain it can be to serialize the data, debug, and integrate into your application.With Flash Remoting, you can call remote methods from the Flash client and the arguments will end up in the native remote language, and will come back to Flash correctly typed, so there’s no messing with serialization at all.

You will be able to see in their documentation how quickly you can get Flash Remoting up and working and they provide good resources to tutorials online for ways to interact with Flash Remoting.

AMFPHP automatically creates the ActionScript classes that you need to interact with your Services that you make. You can also test your Flash Remoting without even requiring Flash to be installed through a very handy Service Browser which comes packaged, and you can debug your connections through another NetConnection Debugger. After reading over this package and the documentation, and having my first play with the PingBack application, I think this is a very well made/simple framework to make life easier for PHP developers and further demonstrate the capabilities of PHP for Web Application Development.

Turbo Charging Firefox

You will find other articles relevant to this document in these sections:
Richard Lee @ 12:29 pm

Seems everybody wants a turbo nowdays, so what about boosting your browser? This is where pipelining comes into play. You see normally HTTP requests are issued sequentially but with HTTP/1.1 pipelining multiple HTTP requests can made without waiting for the corresponding responses. The client then waits for the responses to arrive in the order in which they were requested. Pipelining the requests can result in a dramatic improvement in page loading times especially over a broadband connection. Below are some settings you may wish to try out (at your own risk). If you are uncomfortable with changing these settings I recommend using the Fasterfox Add-on by Tony Gentilcore.

Enabling Pipelining in Firefox

1.Type “about:config” into the address bar and hit return. Scroll down and look for the following entries:

network.http.pipelining network.http.proxy.pipelining network.http.pipelining.maxrequests

Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.

2. Alter the entries as follows:

Set “network.http.pipelining” to “true”

Set “network.http.proxy.pipelining” to “true”

Set “network.http.pipelining.maxrequests” to some number like 30. This means it will make 30 requests at once.

3. Lastly right-click anywhere and select New-> Integer. Name it “nglayout.initialpaint.delay” and set its value to “0″. This value is the amount of time the browser waits before it acts on information it receives.

For more information on pipelining please visit the Mozilla FAQ

Windows Vista Beta 2

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 12:06 pm

I haven’t been reading up on the new Vista o/s, but it appears that you are able to download the Beta 2 from http://www.microsoft.com/windowsvista/default.aspx.

Their website looks like it is chasing the home user, with lots of big glossy shots of people in fields. It will be interesting to see how the Operating System is taken up, and whether it is worth the upgrade from windows XP to Vista.

Adobe Blogs - Mike Potter on PHP Conference in NY

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 11:26 am

I am planning next year to travel to the PHP NY Conference and was excited to hear about the sort of demonstrations that were presented. Mike Potter and Allen Seirafi presented a talk on Flex and PHP. I had originally heard about Flex back at Uni where we had a presentation from a Macromedia rep and it looked quite promising. The Flex works by allowing developers to code a View component of an MVC framework in XML that would translate to Flash interfaces with rich components (such as datagrids etc). He mentioned in his notes about the Flex SDK being provided for free, but the interface ‘Flex Builder’ would not be. I am still interested to know how the application is deployed, at the time it was on a Java Web Container server (BEA/Tomcat) and costed a lot of money. He also provided a link to AMFPHP which is Flash Remoting for PHP, perfect for my research!
Have a look at his blog here: http://blogs.adobe.com/mikepotter/2006/06/php_conference.html

PHP Framework - The Zend Framework

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 10:17 am

I read over an article last month in my PhpArch magazine which demonstrated some of the capabilities of the new Zend Framework (currently Preview version 0.1.3). The article demonstrated creating a Invoice PDF based on a database call, adding it to a lucene search engine and then emailing it to a client. The article wasn’t too long but gave a quick overview of some of the nice features of the framework.

The framework comprises of several different modules which are plugged together, with an underlying set of utility methods for locating and including classes/files. The framework includes such packages as:

  • Controller - Part of the Zend MVC framework
  • DB - Database Abstraction with OO hanlding for database records
  • Feed - Creating RSS/Atom feeds and also reading in from them
  • Filters - Reading in from user input (Chris Shifflet provides some good details about the security when using filters)
  • JSON - Simple JavaScript Object Notation for lightweight data exchange from PHP to JavaScript (great for AJAX)
  • Log - A Logging class providing logging with level/severity
  • Mail - Sending mail with PHP, similar to the PHPMailer alternative, supports alternate SMTP servers, HTML emails, attachments
  • PDF - For generating PDF’s from PHP
  • Search - Lucene based search engine where you create indexes and can later search
  • View - Simple wrapper for a view/template - Part of the Zend MVC framework
  • XmlRPC - Classes for creating RPC

(They are also asking for develop helps with the modules). The framework is currently only support version PHP5+ and will not work (ever) on PHP4, which is a real annoyance to me at the moment (this whole issue of PHP5 vs 4 and hosting services making the switch). Overall it seems to be quite friendly to use. From what I read about the View/Controller I think I prefer using the Struts based frameworks as they have been hard tested and have survived many years of application development.

The goals of the Zend Framework are:

  • Provide a repository of high quality components that are actively supported (PHP5 in E_STRICT)
  • Provide a complete system for developing web applications powered by PHP5
  • Don’t change the PHP - it’s already a great platform
  • Embrace collaboration and community to further advanced PHP5 programming
  • Positively contribute to the PHP 5 ecosystem and the PHP collaboration project

These all will help do great things for PHP and hopefully start to help its up take for a decent web application development environment.

Have a read about the Zend Framework here.

Next Page »