Archive

Archive for the ‘JavaScript’ Category

iPhone Developer Documentation Arrives

July 4th, 2007

Apple has released a set of documents for developing your iPhone optimized web based application. I’ve been working on an iPhone styled app over the last few weeks and this document will certainly provide me some of the tools I need to provide a nice looking application.

In this document, Apple covers five areas developing and designing websites optimized for the iPhone. The areas include the new type of UI (finger events), keeping with standards, integration with iPhone apps, page readability, audio and video and safari supported technologies. In the iPhone apps integration is where you will find iPhone specific properties and meta tags you can use to control the size of your design area as well as how to talk to the phone, email and maps programs all which use basic html. The document is a must for ensuring a great user experience when browsing with Safari on your iPhone.

Enjoy.

Rich CSS, DHTML, JavaScript, iPhone

Javascript Arrays vs Object Literal

June 28th, 2007

Recently, I’ve been learning to use Javascript object literals for holding similar sets of data as opposed to using arrays. They are much more manageable and flexible than simpler than arrays and I think even easier to read. Below is an a variable holding form validation data. I can simply loop through these just like I would an array, I can output the values, check against them and even call a function or even set an event listener. With arrays I am limited to mostly common data types like string, int, boolean and such. The fact that I can make references to functions is really cool and allows a pretty flexible and powerful system. Next time you have to work with arrays, consider object literal.

var emptyValues = [{name:'firstname', id:'firstname', ce:checkEmpty, eid:'first_error', defVal: 'First'},{name:'lastname', id:'lastname', ce:checkEmpty, eid:'last_error', defVal: 'Last'},{name:'phone', id:'phone', ce:checkEmpty, eid:'phone_error', defVal:'Phone'},{name:'message', id:'message', ce:checkEmpty, eid:'message_error', defVal: 'Message'},{name:'name', id:'name', ce:checkEmpty, eid:'name_error', defVal: 'Full Name'},{name:'email', id:'email', ce:checkEmpty, eid:'error_email', defVal:'Email'}];

Rich JavaScript, programming, web

Flash or DHTML?

June 7th, 2007

Outside of designing cool Third Rail products, I design and build websites full time at my firm for small to medium sized businesses. More often than not, they have some preconceived idea of what they want their site to do, and more often than not they are thinking something along the lines of a broadway spectacle, complete with music, animation and maybe even fireworks for a finale. Then they also want to be number one on Google when someone types in ‘enter_generic_keyword’. Oy.

We of course have to explain a little on how things work and that it’s not so easy, if even possible you can get your name on top or even first few pages for such a keyword. And if they should even be so concerned about being on top at all. For the ones who do want some SEO built into their site, along with a light marketing campaign the only answer as far as I am concerned is XHTML/JS/CSS aka DHTML.

I usually tend to discount Flash for most projects partly because of SEO problems, and partly because of any possible regular maintenance. I’ll use Flash if it fits the project, and if SEO isn’t a major requirement as is with many local businesses. With so much changing happening on the web in the last year or two, you can achieve Flash like websites without sacrificing indexable content. Just to a search for CSS Javascript gallery, you’ll find dozens of excellent solutions with beautiful fades, images sliding right to left and anything else they’ve thought up. Even menu’s can be animated like FLash, I’ve seen sliding tabs, OS X dock magnification, image loupes and so forth. So with the many, many tools available you can (with some spit and bubble gum of course) get your site loaded with many of the bells and whistles Flash has to offer.

Rich CSS, DHTML, Flash, JavaScript, SEO