Posts Tagged ‘javascript’
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 »
Storing data in arrays is a pretty common technique throughout various programming languages, and it’s very straight forward. Until you get to reading them, sorting, filtering and mixing them. A lot of times you have more complexity in your data and filtering them is a very usual task.
Almost every toolkit has some functional approaches to make this easier and the latest JavaScript versions also implement some of them natively. Here I will show two use cases for filtering an array of objects, different approaches and their consequences.
Read the rest of this entry »
