14 June
Pingdom has complied a list of the Javascript frameworks used by the top sites on the web (top 100 in Alexa US, Webware’s top 100 web apps). jQuery and Prototype are the top choices, getting 11 and 13 respectively.
It’s interesting to note that Dojo is not even featured on this list, though if you check the comments you’ll see that it is used partially at the apple site (in the apple store). This makes me wonder even more regarding Zend’s latest decision to integrate Dojo into their framework. As I commented in that release statement (comment #6 is mine), I feel that Dojo isn’t appropriate as the default for the framework as it is more complex and much less documented than the other top frameworks.
As a long time jQuery developer I have no intentions of integrating a new Javascript library into my development environment, so I’m obviously biased. I still feel as though Zend missed an opportunity here to better cater to the needs of a broader user base and instead chose to prioritize its partners best interests.
11 June
A common (web) interface feature is to divide a long list of items into numbered pages, a technique called pagination. I’ll describe in brief some shortcuts I use with Zend_Db_Select to retrieve the row count and calculate the number of pages for complicated queries.
Read more …
7 June
4. Testing
Testing is a software development method to increase software quality. There are several distinct types of testing which vary in granularity and purpose:
- Unit Testing: A test that validates an individual unit of source code, usually a function or a method.
- Integration Testing: A test in which a combination of components are tested together to ensure they are working well as a group. Preferably participating components are unit-tested.
- Acceptance Testing: A test in which a software system is tested as a whole. Acceptance testing declares the standards to which a software system is considered to be working (= accepted).
Read more …
29 May
I came across a cute project which implements PHP functions in Javascript (128 functions and counting). If you are one of those PHP developers that feel out of the water in Javascript, this is for you.
Plenty of useful shortcuts there regardless, especially the date functions (which is a major drag in javascript). Check it out.
28 May
There has been some discussion on the PHP internals list on adding a short syntax array seen in other languages. The short syntax array defines an array directly with the array operator brackets:
$array = array(1,4,array(5,9),array(3,'name')); // Old way
$array = [1,4,[5,9],[3,'name']]; // Shorter syntax
The shorter syntax is both more readable and more welcoming to programmers coming from other languages. I read about this on Brian Moon’s blog, and among one of the comments I read an interesting thought:
Yes, would be a nice addition. Though I’d rather the anonymous object syntax came too, would be much more useful, with callbacks etc.
visit({ function accept() { … } });
I think the commentator was actually referring to anonymous functions (which are objects in Javascript). If PHP implemented anonymous functions (and maybe closures?) it would become very powerful (callbacks anyone?), sort of like Javascript with real class based OO. Food for thought.