Posts Tagged ‘javascript’
Safari om the iPhone is an incredible powerful browser and comes with a whole bunch of features.
Besides the amazing support for CSS3, a superfast rendering engine and great JavaScript support, there are a few hidden gems I want to explain in this (and maybe following) blogposts. If you are interested in mobile web development, maybe you will find a few features you haven’t seen before.
Making your web app iPhone ready
Note: you can visit the example used in this blog post from your iPhone here.
JavaScript allows to comma-separate multiple variable declarations, like so: var i=0, j=1. Declaring multiple variables using one var-statement accross multiple lines is a NO GO! I consider this evil. And I learned it the hard way. It might look pretty nice, looks like less code and more efficient. But it definitely is not so when writing code. If it results in more speed let your build tool, compressor or compiler do it. But don’t write code which spreads multiple variable declarations in var-statement across multiple lines!
PERIOD.
Read the rest of this entry »
During the Oredev speakers dinner last November, I was having an interesting discussion about the car industry and how Google in one swipe mangled up the turn-to-turn navigation market. During this discussion and other interesting conversations at the following JsConf, it it became more and more clear that we (web developers) should be able to write applications for instance for cars, write applications for phones we can plug into cars, and write those applications using web technologies – meaning JavaScript, HTML and CSS.
We have been developing some coding style guide lines to produce better code and make our code easier maintainable and portable. Also thinking about code inspection tools and continuous integration techniques which analyze the code will profit from a well defined and verifyable style.
While discussing a rather simple rule I thought this might be interesting to delve into a bit. You will be surprised how much you can discuss about a simple thing such as a for-loop and that is not only true for JavaScript, I am sure.
Read the rest of this entry »
It was a project last year, where yet another inline documentation syntax was “created” and suggested to be used. That triggered our brains and they started spinning caused by the unhappiness of reinventing the wheel, especially for something that is still too much of a step-child for frontend engineers and doesn’t get the necessary dedication anyway, the JavaScript inline docs. So let’s give them some love :-).
Fast forwarding … what came out of it is the API docs viewer which, we here at uxebu, built over the christmas holidays. It is completely client-based, for creating the documentation and retreiving all the information, no server-side code is needed anymore, it’s all done in dojo.
Read the rest of this entry »
In the last article I have given an introduction on how to get dtrace running in your development environment, how to compile firefox and how a simple dtrace script looks like.
Today we will take a look at how to write more useful dtrace scripts and I will show how to analyze the resulting data in a simple dojox.charting chart.
After seeing a great talk by Johannes Schlueter about dtrace, I want to pass on the information and give a short introduction on how to set up your (Firefox) JavaScript development environment on OSX so you can dive into dtrace and start exploring the powerful features of this tool.
In one of our current customer’s projects we are working with jQuery. And I am glad that the functional programming basics are already kind of standard across JS libraries. Especially with dojo I started to love the functional approaches and realized that they are really helpful in a lot of situations, especially when doing data processing. One of the best known functions is the map function, which “creates a new array with the results of calling a provided function on every element in this array” [from Mozilla's Core JS References]. Though dojo and jQuery implement this function there are slight differences.
Read the rest of this entry »
