web development

PHP 5.2 Is Dead

July 25th, 2010 0 Comments

OK, all you slow to convert technology anchors, let’s get with the program.  Reading between the lines, clearly the people developing PHP are tired of supporting the past.  And I agree.  There is no good that can come from forcing this language development to support legacy and sometimes just bad ideas unless you want to see MSs C# take over the world.  And the PHP frameworks out there still trying to put a smile on faces of 4.x users should take the hint as well.

PHP announced with its most recent sub set release of 5.2.14: This release marks the end of the active support for PHP 5.2. Following this release the PHP 5.2 series will receive no further active bug maintenance. Security fixes for PHP 5.2 might be published on a case by cases basis. All users of PHP 5.2 are encouraged to upgrade to PHP 5.3.

Use the latest or jump over to the sinking ship known as RoR… peace out.

Zend Framework The Easy Way

July 25th, 2010 0 Comments

Zend Framework changes quickly, so the easiest way to maintain your server installment for all platforms is the google code pear channel.  That’s the only channel that seem to be updated on a regular basis.

pear channel-discover zend.googlecode.com/svn
pear install zend/zend   OR   pear install zend/zend-1.10.6  (choose the version # you want)

… and at any time you can upgrade using

pear upgrade-all

Now you’ll always have the latest and greatest releases of the Zend Framework installed.  Happy coding

Top 10 Reasons Why CodeIgniter Rocks

July 13th, 2010 0 Comments

CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you’re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you’re tired of ponderously large and thoroughly undocumented frameworks, CI might be for you.

10. MVC Architecture
The model, view, controller architecture is nothing new. It seems like all the coding frameworks are MVC nowadays, and if they aren’t it can be configured easily. I have had experience building large apps the procedural way and every time they end up with unmanageable spaghetti code. The MVC way of doing things offers nice code separation and keeps things clean. Some frameworks force you to do things by the books but CI lets you use MVC in a way that makes sense you. If that means ignoring models all together then so be it.

9. Little to no server requirements.
Unlike other PHP frameworks, CI works with both PHP 4 and 5. That makes the lives of someone like me who has to be able to work seamlessly between the two environments much easier. Of course I have painted myself into a corner from time and used PHP5 techniques in my apps, but the framework itself works on either.

8. Easy to understand and extend.
CI is the first framework that I used that actually makes sense to me. I have tried Cake PHP, the Zend framework, Symfony and many others and I was able to get up and running with CI the quickest. CI is also easy to write new libraries, change the behaviour of existing libraries and just change the overall behaviour of the framework with little effort.

7. All the tools you need in one little package.
Calendar, e-mail, zip encoding, validation, uploading, sessions, unit testing… that is just a few of the built in libraries that come with CI. It also includes a boat load of default helpers for things like forms, file handling, arrays, strings, cookies, directories and more. Plus, if that wasn’t enough, you can create your own libraries and helpers or use code that has been developed by the CI community and posted to the wiki.

6. No “installation” necessary.
Believe it or not, one of the hardest things I have experienced with trying new frameworks is installing them. I am not a fan of UNIX command line so I tend to look for tools that I can install and use by just uploading files to a directory. CI fits this requirement nicely. No need for PEAR packages or server modifications to get the framework up and running. Just upload the files to your server and your off.

5. Built in security tools.
CI allows you to implement as much or as little security as you feel is necessary for your app. It does some things by default like unsetting all global variables regardless of PHPs register_globals directive and turning off the magic_quotes_runtime directive during system initialization so that you don’t have to remove slashes when retrieving data from your database. Other things can be enabled like cookie encryption, handling session data with a database and automatically escaping SQL queries.

4. Database abstraction and more.
Every decent framework has a database abstraction layer nowadays and CI is no exception. You can easily create insert, update and delete statements without needing to write raw SQL. Handle connections to multiple databases within one application and connect to any of the following database types: MySQL (4.1+), MySQLi, MS SQL, Postgre, Oracle, SQLite, or ODBC. CI also lets you manipulate your database like add/remove columns from tables, create new tables and remove old ones using it’s new database forge library.

3. Large and active user community.
The last time I checked, there were over 57,000 registered members on the CI forums. That is a nice and big user community to work with when you have a problem or question. The CI website has a forum and wiki when your looking for answers. No confusing group mailing lists or chat channels just to get a quick answer to a question.

2. Excellent documentation.
By far, the biggest advantage of CI over any other framework is it’s documentation. I will admit to trying some other frameworks while they were still in BETA and under development. But, CIs documentation is 10 times better than other framework documentation I have come across and I strongly think thats because CI is backed by a company and not just a community. EllisLab, the company behind CI, takes a lot of pride in CI and they have big plans for it and thats why they don’t have a problem in spending the time that is necessary to come up with quality documentation for the user community.

1. One in the same with ExpressionEngine.
The #1 reason why CI rocks is that ExpressiongEngine, EllisLabs content management system, is currently being built on the framework. This means that whatever libraries, helpers, etc. that you develop for CI you can use with EE in the future and vice versa. This also means that whatever EE needs to operate, CI gets. This could means things like an improved parser class, built in user authentication, ability to easily program modular applications and more.

If you like to development using an OO framework… there’s no better place to start then CodeIgniter.

Photoshop vs. Fireworks vs. Illustrator – Design For The Web

July 13th, 2010 2 Comments

How many years will web designers use the wrong tools for the job?  There are a lot of great softwares from Adobe, but they are designed for certain tasks.  Sometimes it’s money, sometimes it lack of knowledge, sometimes it’s fear of the unknown when a work load is reigning down, but it’s important for all of us that design for the web to understand what tools are available, and when to use them.

Are you still using Illustrator, software that should be used to create vector graphics for logo design, animation, and flash?

Are you still using Photoshop, software that is unrivaled and superior in it’s creative abilities of images, but with little to no consciousness of the web environment.

Then you have Fireworks, a software designed to do nothing else but rapid prototype design for the web.  Seems pretty logical right?

So many designers not only continue to use the wrong tools, they also lack the knowledge of what tools are available and what they are meant for in the first place.  Now, of course, Adobe has done a great job of blending the power of these softwares together for multi-use roles, but I wouldn’t use a paintbrush when I need a roller or vice versa, whether I can MAKE them work for the job or not.  Hey, at least Photoshop and Fireworks can swap files all day long with little drama, but Illustrator was so clearly NOT designed for the task of non-flash web design, that it doesn’t even play nicely with these other softwares.

OK, so now you know, but you can’t decide between the best image software in the history of the planet, Photoshop, and the web prototyping genius of Fireworks, is the right choice for you.  It’s a tough decision, but let’s look at some details that may demonstrate a clear winner.

1. Multiple Pages (With Master Page)
A Photoshop file consists of a single image with multiple layers. A Fireworks file on the other hand allows multiple pages with multiple layers per page. When working on a multi-page mock-up for a site design, the advantages of having all your assets contained within a single file are enormous. Although having 5 different PSD files may be workable initially, once edits and changes are required, for example changing text in a consistent header or footer, things can soon get messy and time-consuming as changes have to be made across all files. It’s also very nice that each page can be a different size, perfect for the different sizing which is often required between home pages and content pages.

As well as having multiple pages within the Fireworks .png file (the native file format) the powerful Master Page allows you to define consistent template elements which appear across all other pages. This is very powerful for defining a consistent header/footer which appears on each page and only needs to be edited on the Master Page to be updated across the design. A single page can also be detached from the Master Page if there is a unique page requirement.

2. Symbols
Symbols allow you to define an element or group of elements into a single object which can then be used all over your design across all your pages. This symbol can then be edited in a single place and all changes are reflected throughout your document. Imagine a graphic for a bullet icon which is used in many places across the design. To change the colour or shape of the icon within Photoshop may require lengthy manual editing and copying and pasting across multiple files. But with a multi-page Fireworks document using symbols, the change is only required in a single place for all the icons to be changed instantly across the design. This is a very powerful feature enabling design tweaks which may have otherwise been abandoned due to the time and effort involved.

3. Styles
Styles are to Fireworks as a CSS style sheet is to a web page. An items fill, stroke, font and effects can be defined into a style. These styles appear on the styles list and can be applied to other elements in the document. The real power lies in the fact that these styles can be amended and the changed cascading across the multi-page document automatically. Imagine a style of image with a particular border and drop shadow used in many places which you decide would look better with a different border colour and no drop shadow at all. If you have defined this image with your own style a single update will change all instances without all the pain. Like with symbols this can be a huge time saver whilst encouraging design experimentation and consistency.

4. Vector Objects
Fireworks offers the same basic tools as Photoshop for Bitmap editing but also has many extra vector tools. Lots of vector shapes are welcome with many control points for creating stars, polygons and regular shapes. In addition the Autoshapes panel provides a more diverse collection ranging from stick men with moveable bones, to clocks, calendars and title blocks.

My personal favorite or at least the one I have used the most so far, however, is the humble rounded rectangle which has control points for individual corners making a single rounded corner on a rectangle a simple task compared to Photoshop.

I also like the precise pixel control over each of fireworks elements in the Properties toolbar which makes sizing of images and vector objects a breeze to set to required sizes.

5. Libraries
Both symbols, styles and vector shapes can be saved for re-use and collected into useful library resources. In addition Fireworks ships with a common library of useful objects including buttons, browser and application elements for both Mac and Windows look and feel. A number of pre-defined styles are also provided ranging from Chrome and wood styles to more useful line shading and tool-tip styles.

6. Grouping
In more recent versions of Photoshop layer groups have allowed you to virtually group objects together. Though this works well, it requires a certain level of organisation moving individual layers into folders manually. Unfortunately, I have never liked working this way. I like to work quickly as inspiration guides me without having to laboriously put everything into layers and name them. Though the layer group model is still present in Fireworks it allows you to quickly select individual elements and group them together. The necessity to name layers is lessened by the fact they can be directly clicked on as in most vector packages, unlike Photoshop’s right click and ‘guess the layer’ (which didn’t get named!) method.

7. Interactive Gradients
Fireworks’s Interactive gradients are a simple enhancement to what is already available in Photoshop, but the gradient being used has control handles allowing it to be moved and sized within the object. A very simple enhancement but it works well and allows fine control and becomes particularly useful with using rectangular shading styles.

8. Web Layers
The web layer allow you to quickly add hotspot areas and links between the pages in your Fireworks document, or external URLs. Whilst being useful for linking together simple wireframes, it can also be applied to fully designed mockup pages illustrating how a finished site may navigate.

Fireworks’ initial conception was to help designers produce quick web sites with its ability to output html, rollovers and interactivity. All those features are still there and whilst you may not want to use the code it produces for final sites, for outputting your designs as an interactive mockup site, for example, Fireworks does a great job of exporting your images and html.

9. 9-Slice Scaling
This scaling technique can be applied to bitmaps as well as to vector objects. This allows intelligent scaling areas when the image is resized, leaving the remaining areas untouched. This can be applied to dialogues boxes, headers, scroll bars, anything which you would want to scale, but to scale non-uniformally.

10. Small Learning Curve
Lots of things are just the same as in Photoshop – lots of keyboard shortcuts, tools palette – windows, toolbars, panel layouts etc. but it’s more intuitive for users then Photoshop and Illustrator could ever be.

DING DING DING…. The do all staple Photoshop taps out from overwhelming evidence of web prototyping, and Illustrator never showed up to the fight.  We have a winner.  Happy designing…