Archive for the ‘Web Development’ Category

Book Review: jQuery 1.3 with PHP

Sunday, December 13th, 2009

jQuery 1.3 with PHP

jQuery 1.3 with PHP

Before I start this review proper, I need to disclose one nugget of information first: The author, Kae Verens, and I are both currently serving as members of the Irish PHP Users Group Committee and have known each other for quite a few years. If you believe I can remain impartial and objective (as I hope you do – because I am), read on:

This is the first book sent to me from Packt where I wasn’t left dizzy from trying to understand just what it is the author was trying to get across. It looks like their proof-reader was awake for this one – totally awesome.

jQuery, as the vast majority of us already know, is a JavaScript library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. In other words it does all the heavy lifting and takes care of cross-browser compatibility issues so you don’t have to and thus allows you to focus on the work that you need to do without all those distractions.

“jQuery 1.3 with PHP” is aimed “for PHP application developers who want to improve their user interfaces through jQuery’s capabilities and responsiveness”. Over the course of ten chapters Verens starts the off with an introduction, then a series of ‘Quick Tricks’ that almost immediately help you add some measure of “Web 2.0″ functionality to what I’d term a “web 0.2 application” rather sharply.
The book ends with a chapter on Optimization – some of which you are bound to already know and some which are complete gems.

In the middle are chapters with mini-projects on tabs and accordians, forms and form validation, file management, calendars (and how to make your own google-calendar-like application), image manipulation, drag and drop and data tables.
In each case, projects are analysed and the required steps for each are outlined in the simplest terms – no extraneous buzzwords are used or are the projects over-analysed for the sake of pedantry.

I was a little surprised in some places where, for example, the json encoded output was not created via json_encode; but then thought not everyone is going to have PHP 5.2 or greater installed. Thumb forward a few pages and this is mentioned. So all’s o k.

It was good to see Kae suggesting use of the PEAR Validate package (or similar) in the Forms and Forms Validation chapter (chapter 4). I had to wonder if there was a PEAR package for creating and shunting down jQuery validation rules to the client – and found that there isn’t. That’s something to consider for later on, I guess.

The rest of the book is similarly both easy to read and easy to understand – my first port of call for learning how to do something that I’d almost term exotic with jQuery and with PHP in the background is usually Google but that is going to change (actually it already has).

Honestly, I wouldn’t be surprised if this books working title was “JQuery and PHP: The HowTo” – it is that good.
Now, this book is not for learning jQuery – that is not within its remit, but I would heartily recomend “jQuery 1.3 with PHP” by Kae Verens to anyone wanting to utilise jQuery from a PHP background.

PHP Team Development by Samisa Abeysinghe

Sunday, November 15th, 2009

PHP Team Development by Samisa Abeysinghe

A few weeks ago I received a copy of “PHP Team Development” from Packt.
Split into seven chapters, all equally sprinkled with phrases that are disjointly written and that don’t get a point across, and some that make you think the book was written using some speech-to-text software (“Vendor locking” anybody?) , this book which “is for PHP developers who work in teams on complex projects” has given me an aversion to seeing three little words printed alongside each other (“the PHP code”).
If you have read this book you too will develop this aversion. I think Lorna Jane Mitchell and Brandon Savage who both bravely reviewed this book before me might be inclined to agree.

Published only in September of this year, I found it surprising that its section on coding standards and best practices does not suggest the use of phpCodeSniffer (for checking the adherence to coding standards, and which, incidentally, has been available in one form or the next for the last three years). Nor does Samisa suggest the use of phpUnit or SimpleTest for unit testing (Actually, nothing is mentioned for unit testing – the concept isn’t even described, nor is Test Driven Development). These tools have been around for a very long time and I was honestly startled by their ommission.

In a way that’s fine – these are only tools and the book is about team development – not about listing and reviewing each and every tool that could be used to help team members make more efficient use of their time.
But I’d rather use these tools during peer review to help highlight what a team member may be doing wrong in an efficient use of my time, than have to analyse the code myself.

So, moving on, there’s a section explaining that frameworks should also be assessed on the basis of the various open source licenses they are distributed under but the author doesn’t really explain why this is important – or discuss what the prevalent FLOSS licences are (MIT, BSD, GPL etc), or what issues they each attempt to address and what they are best suited for.

The NIH (Not Invented Here) Syndrome is mentioned and to be fair the author does give a long list of frameworks to be considered; probably the one detailed list in the book, to be honest.

PEAR had been mentioned in passing elsewhere in the book so I was expecting it to be listed in the frameworks section too, as I was expecting ezComponents to be referenced somewhere as well – but then, these are a component framework/libraries so perhaps he thought it did not belong in such a list.

To be honest, I think that is part of the problem. The book focuses on what the author thinks and his thoughts on the subject are written in such a manner, that once you put in the immense effort in trying to understand what he is attempting to communicate, that you are left with the impression that
there are no alternatives; that X & Y & Z are the true and tested ways of doing things in PHP and there are no two ways about it.

This is a complete shame.

Some other observances about this book;

  • Continuous Integration is mentioned; but CruiseControl and PHP-Under-Control are not.
  • Source Code Control is mentioned, and here Subversion and GIT are covered. CVS is mentioned elsewhere, under a section, and chapter, far-far-away. Mercurial, bazaar and others don’t even get a look-in.
  • There is no mention of how approaches to Team Development might vary depending on whether some team members might be working remotely, Pair Programming is barely mentioned let alone suggested as one way of ensuring that each team member is learning from the other and reviewing the code that his partner has written.
  • Under issue- or bug-tracking, jira and bugzilla are mentioned as two popular bug tracking tools, and although Abeysinghe states “there are numerous tools that are available, both opensource and commercial for bug tracking”, no others are listed. Fogbugz, Mantis, RT, Trac, and plenty others get left by the wayside.
    Actually, I’m wrong. Sorry. Trac is mentioned – at the other end of the book; though not in the glossary or index.

I honestly considered giving up on reading this book and not writing this review. The book truly is that bad. The thought of someone paying out close to thirty euro for a book that I’d call poorly researched, badly proof-read, woefully incomplete, badly structured at worst and self-opinionated at best did force me to reconsider.

Nobody should spend close to thirty euro on a book and get so little in return.

So my oneliner opinion of PHP Team Development by Samisa Abeysinghe?
I’d seriously suggest you give it a miss – do something more meaningful with the money and buy bread to bring your team on a duck-feeding-mission.

Beginning Joomla! (Second Edition); A review

Tuesday, October 27th, 2009

A while ago I was sent a complimentary review copy of “Beginning Joomla! (Second Edition)” by Dan Rahmel and published by Apress.

In a clear non-patronising and concise manner the author explains to the reader just what Joomla is (a content management system), how to install, add content, administer, design templates and write extensions for it. He touches on SEO and covers the aspects of both deploying Joomla on Windows, Linux and Mac.
Done in a gentle manner with graceful explanations along the way, he explains everything in a clear manner: how to troubleshoot not being able to access the web or database servers and even mentioning the password system differs from version 4 to version 5 of mysql, for example.

There are a few points in the book that startled me however; Rahmel informs the reader in chapter three that if XAMPP is used as a means of installing the base requirements then certain security concerns need to be addressed. In chapter two he states PHP 4.3.10 as the lowest version required – I’m surprised that a later version of PHP 4 wasn’t recommended, even though 4.3.10 may be the lowest required version – version 4.4.10 4.4.9 for example which is the very last version of PHP to ever be released. I hope this is just a typo that hadn’t been caught in time.
If it was not, then I’d have to express a certain level of professional disappointment; the security enhancements and bug fixes in PHP 4.4.10 should definitely have been enumerated. While it is true to say that most installs of Joomla are into shared hosting environments where such changes can not be implemented, I also would have expected the author to have mentioned that Apache, and by implication Joomla, performs better when configuration directives are specified in the httpd.conf files rather than .htaccess files which must first be scanned for at a directory-by-directory level.

I had been looking forward to reading the chapter on creating extensions (chapter thirteen) but was rather disappointed. I had expected Rahmel to go into much more depth, especially as the blurb on the back of the book mentions how he has coded other solutions from scratch in PHP and ASP, so surely there would be hard-learned tips and some advice that he could share? Instead he hardly mentions the Joomla API nor does he provide a reference or link to where further information on the subject could be found.

I would like to say that the second edition of “Beginning Joomla!” is well rounded but the lack of detail on creating extensions and the differing levels of detail regarding security and performance tips makes me shy from saying that.

Also, I do wish that there was a list of recommended reading and a glossary in the book too – it is invaluable to have a “cheat sheet” of what different terms mean and also to know what other bodies of work are available to help you learn more.

To summarise – “Beginning Jooma! Secong Edition” is a well-written book aimed at (surprise) people new to using Joomla – it just could be better and the section on developing plugins or components should simply be dropped as it is not adequate and probably could have an entire book devoted to the subject.

Book Review: Learning jQuery 1.3

Tuesday, June 16th, 2009

A while ago I was sent a review copy of “Learning JQuery 1.3” by Jonathan Chaffer and Karl Swedberg, as published by Packt. I’ve now had a chance to read it objectively and compare it against the original “Learning JQuery” which Packt also sent me to review about a year ago. That earlier edition covered a much less mature version (version 1.1.3.1 to be precise) of this popular Javascript framework.

Aimed at web developers and designers with a basic understanding of HTML and CSS (and some level of comfort with Javascript), the later book is thicker than the original – it weights in at some 440 pages compared to the 360 pages that were required for the first. A new chapter, “Developing Plugins” covers how to write plugins for the framework and how to “share it with the world” – naming conventions, documentation style and other advice are included. There is also a new “Quick Reference” appendix which just begs to be reproduced in “Cheat-sheet” format for pinning up on your wall. Chapters already present in the earlier book are more detailed and read better.

The subject matter is expertly covered and unless you were aware of the changes in jQuery 1.3, compared to the older version that the original was focused it would be difficult to tell which portions of the book are new – the revision and updates to the original are seamless.

Quite rightly, Swedberg and Chaffer do not explain all differences between jQuery 1.3 and its predecessors – they rightly assume that if you’re reading “Learning JQuery 1.3″ then you don’t need to be informed of exactly how jQuery 1.3 differs from the version they previous covered. The book flows better because of this and remains very easy to understand because of this approach.

There is no hint of the selector engine in 1.3 being any different than what was already covered. The language used for explaining the different concepts to the reader is more precise, especially so in the Events chapter and this makes understanding the concepts being covered much more easy – for this reason alone buying the revised edition is well worth the money.

The book doesn’t focus on new additions that were freshly added to jQuery 1.3 but also ones that had been added to jQuery since the first edition was published; JSONP, which was introduced in jQuery 1.2 is covered in the chapter on AJAX, as is the more low-level $.ajax() method; it also mentions which features have been removed from jQuery since the first edition was published – XPath being one such example. The listing of development tools has also been reworked, as has the Online Resources section. These listings mention resources that are current and up-to-date.

I remember mentioning in my review of the first book (trying hard not to use the word ‘original’ again!) that until a later edition of it was released that you wouldn’t be able to find a better book on the subject. I stand by that assertion – the only book that covers jQuery better than the first edition of “Learning jQuery” is the second edition of the same.

Book Review: Learning Facebook Application Development

Friday, August 29th, 2008

It’s been a while since I posted a review about a packt published book.
I was sent a copy of “Learning Facebook Application Development” by Hasin Hayder and Dr Mark Alexander Bain a while ago. The by-line description of the book is “A step-by-step tutorial for creating custom facebook applications using the Facebook platform and PHP”. It is precisely that.

Here’s my review of it:

The book was published prior to Facebook’s facelift but this doesn’t really impact on the usefulness of the book.
An overview of FBML, FQL, FBJS (a restricted subset of JavaScript and enforced for security reasons) are given along with information on how to use the test consoles, publish to news feeds, some multimedia aspects of what can be done in Facebook applications and more.

Happily the book focuses on using PHP5 for developing Facebook Applications – while there are classes available for developing FB apps with PHP4 there really is no point in doing so; especially now that official support for PHP4 was withdrawn last month.
MySQL appears to be the database system of choice for the examples and Linux/Unix oriented solutions for scheduling tasks to occur regularly are given – some Windows screenshots feature in chapter one with regard to setting up the client libraries for local development but other than that everything else is unix-centric.

I found “Facebook Application Development” more useful than facebook’s own documentation with regard to the main aspects of developing a Facebook application – it is written well and easier to follow than the online documentation and while it is true to say that the Facebook Platform is evolving I am of the opinion that Heyder and Bain’s work will still be applicable for a long time.

Is PHP vulnerable software?

Tuesday, August 26th, 2008

Thanks to Ivo Jansch, I spotted Matt Assay mentioning in his article on cnet that PHP headlines in IBM’s list of most vulnerable software and I have to say this is complete balderdash on the part of IBM.

He quotes from the report:

Another commonality between these three vendors is that they are all written in PHP. If we look back over last year’s disclosures and apply the new CPE methodology to them, we would uncover another newcomer to the top five list, PHP itself, which would rank number four in the 2007 top five vendor list.

What are featuring in IBM’s top ten of vulnerable that makes the report insinuate that the PHP language is a security risk are Jooma, WordPress and Drupal. How PHP would feature in a list of “vendors” is beside the point – if a construction company were to build a house where the windows don’t close fully, the security alarm doesn’t work and where bare wires are exposed you don’t “blame” the windows, alarm system and cabling. The responsibility rests with the construction company and/or the individual contractors hired by that company. Similarly, we can’t “blame” PHP for bad software architecture and security risks present in Joomla, WordPress or Drupal – the onus is on the software developers and architects to design secure [web] applications.

They should, at the least, ensure input data is of the expected type, of certain values; handle uploaded files in a secure and cautious manner that they don’t overwrite files crucial to the health/security of the system running the application or the application itself; use an audit trail for checking against attacks, ensure security in depth against SQL injections, Cross Site Vulnerabilities, Command Injection and … I could go on but won’t – search for php security best practices, get the Zend PHP 5 Certification Study Guide, check out the library resource at the PHP Security Consortium.

Now where’s ruby, cobol, C, and z80A assembly language on that list? And why is Linux mentioned there as a vendor?

Irish PHP User Group: Committee Forming

Wednesday, August 20th, 2008

Yesterday. a few weeks after much discussion and evolution of the constitution of the Irish PHP Users’ Group I suggested that we should get our skates on and get to forming a committee.
Nominations were made today for all of the posts but there’s a week left before the results are ‘official’ – the cut off is to have a committee voted in by next wednesday so there is still plenty of time left if you think you are better suited for the tasks at hand.

PHP 4 – this parrot is deceased!

Friday, August 8th, 2008

I woke this morning with a grin. Nope, nothing to with the Olympics; PHP 4 is dead and by that I mean it is no longer supported – no more official security updates for PHP 4 – or backports from PHP 5 or PHP 6.
The last release of PHP 4.4 occurred yesterday.
Why is this important – and why am I grinning?

PHP 5 has improved support for Object Oriented Programming, PDO, numerous performance and security enhancements that make continuing to maintain or develop PHP4 specific code a mugs game.
The enhancements in PHP 5.3, which is scheduled to be released in October, and those in PHP6 make it all the more compelling to move from PHP4.
If you are a developer and are unaware of this or are clinging on to PHP4 for dear life, you’d do yourself a favour by evaluating all options open to you – including a change of career.

The hosting market may be slow to catch up but remember this: there will be no more security updates for PHP4 and there are security enhancements in PHP5. Compelling reasons to ask your hosting provider if they do PHP5 hosting. Web hosts who are dedicated to supporting PHP 5.2 or later are listed on the gophp5 website.
Blacknight are the only Irish hosting company listed there.

Ivo Jansch, CTO of iBuildings painted a fairly bleak picture a month ago regarding continued PHP4 usage; poising the question “what if there’s an exploit for PHP4 and the bad guys are waiting until after 8/8/8 to make malicious use of it”. This is just scare-mongering but he does make a valid point, after today it will take longer than usual, if at all, for a fix against such expoints to be made available. So if you’re in business it would be wise to consult with your hosting company ASAP.

LinkedIn Usability Woes (or “How come there are two Irish Linux Users Groups?”)

Thursday, July 10th, 2008

One of my fellow members of the Irish Linux Users Group posted a link to a newly created LinkedIn Group so that members could connect to each other using the Group as a reference point.
It’s a shame that LinkedIn don’t [yet] provide a search facility for locating such groups as I had already created such a group for ILUG back in October last year – however it does prove a point that it hadn’t been getting much publicity for ILUG members to make use of it.
To prevent this from happening again I’ve placed prominent links for the linkedin and facebook groups on the linux.ie website.
Thankfully there were only a handful of people that joined the second group before we noticed this gaff but it does highlight yet another usability issue with linkedin, which is this:

  1. Importing a CSV file requires you to have firstname, lastname and email address in the file. Why? The people you reference in the file must already be on linkedin so just providing their email address should suffice.
  2. Manually entering this data on the linkedin website can only be done one record at a time; and again you must provide the persons firstname, surname and email address – heaven help you if you enter Thom E. Gemcitty rather than Thom E Gemcitty for example – round trips to the server for adding such data is so web 0.1; I would expect this data to be entered in a spreadsheet-like-grid that the user then verifies and saves.

Book Review: Learning jQuery

Saturday, July 5th, 2008

Packt sent me a copy of “Learning jQuery” by Jonathan Chaffer and Karl Swedberg. jQuery is a javascript library that I have been using on and off and was delighted to be given a chance to review this book and have a chance to read through and learn about jQuery in a less urgent manner than I had initially.

With a tag-line of “Better Interaction Design and Web Development with Simple JavaScript Techniques” and some 376 pages long (split into 10 chapters, along with three appendices) the book excels at fulfilling that promise.

From the chapter on Getting Started through selectors (css, dom, xpath), Chaffer and Swedberg examine and show how to use jQuery for animations, ajax and manipulating tables to the all important client-side form validation with disarmingly concise eloquence and skill. They also detail how to use and develop jQuery Plug-ins.

Any of the required server-side code examples, for the AJAX chapter, are in PHP but that doesn’t make the book any less relevant or more specialised towards PHP – it should be trivial to rework them for any language.

The authors use an example based approach and this works very well as they continue to progressively enhance each example with additional features and functionality – you can really see their shopping cart and image carousel examples really build up into very well formed examples of what can be done with jQuery.

If you haven’t already been turned on to jQuery by it’s excellent on-line documentation and fluent API (method chaining), this is the book that will do it.

There is one caveat though: “Learning jQuery” was written for jQuery v1.1 and published in June 2007; version 1.2 of jQuery was released four months later with some substantial changes to the API.
This doesn’t matter all that much to be honest; obviously this book doesn’t cover what’s available in v1.2 but until there’s a second edition of this book (and wouldn’t that be great?) you won’t find a better book on the subject.

There’s a new planet – planet.php.ie

Wednesday, April 16th, 2008

After a bit of discussion on the php.ie mailing list, Kae Verens and David Coallier set up http://planet.php.ie to bundle together blog postings from people within the Irish PHP community – a big thank you is deserved for them.

If you want your blog added to this ‘planet’ please contact either Kae or myself.

On other news, I’m going to start documenting PEAR_Size real soon.

Book Review: The PEAR Installer Manifesto

Tuesday, March 11th, 2008

Book Review: The PEAR Installer Manifesto by Gregory BeaverPackt Publishing.

When I was asked by a Packt representative if I would review the book “SOA Approach to Integration” by Poornachandra Sarang, Frank Jennings, Matjaz Juric and Ramesh Loganathan I was told I could pick a book of my choice as a “thank-you” for writing that review.

I jumped at the chance to obtain a copy of “The PEAR Installer Manifesto” – and have now been asked to write a review of it, so here goes:

The book is approximately 270 pages long, split into six chapters, and is aimed at PHP developers who “want to understand how the PEAR Installer works and what it can do for them” and also for those “seeking a better way to deploy their applications and manage updates”.

The six chapters are:

  1. What is it and how do I get it?
  2. Managing PHP Software Management with the PEAR Installer
  3. Leveraging Full Application Support with the PEAR installer
  4. Clever Website Coordination using the pear Installer
  5. Releasing to the world: PEAR Channels
  6. Embedding the PEAR Installer: Designing a Custom Plugin System

Chapter one explains what PEAR is, how to install the PEAR installer and how to deploy PEAR packages remotely onto a server over FTP – proving that no matter what way you access your production servers you can, and should, be using the PEAR installer.

Chapter two covers versioning, package.xml and roles; teaching how to turn software written in PHP into discrete distributable packages.

Chapter three focuses more on version two of package.xml (chapter two briefly covered both versions 1 and 2 of the package definition file) and explains how to bundle a package with its dependancies.

Chapter four is about source code control and performing roll-backs on pear packages – essential tasks when it comes to managing a complex website.

Chapter five details how to set up a channel server, outlines various ways to distribute packages and applications using channel servers and discusses related security issues.

Chapter six closes the book with an explanation of why you might want to embed the PEAR installed, a discussion of several methods of handling plug-in systems and designing a custom PEAR channel-based plugin system.

As a PEAR developer who’s going through the process of getting a new package proposed and accepted I found the discussion of package.xml enlightening – much more so than the current online documentation.

As a developer who has occasionally needed to rollback changes pushed to a production server… well, if chapters two and three weren’t eye-opening enough; chapter four definitely was as it details how to employ the PEAR installer to update and rollback live code so you can quickly revert back to a known working version of the site.

Though they are relatively few the book is not without its flaws: there is a small number of spelling mistakes present and considering the book was published in 2006 I don’t think it unrealistic to expect these to be corrected in an on-line errata. Other than that I found “The PEAR Installer Manifesto” to be a nicely focused, well written book grounded with good case studies and real world examples.

Authored by the authority on the PEAR installer the book couldn’t get much better. Highly recommended.

Book Review: SOA Approach to Integration

Wednesday, February 6th, 2008

Book Review: SOA Approach to Integration by Poornachandra Sarang, Frank Jennings, Matjaz Juric, Ramesh Loganathan – (Packt Publishing)

I was recently asked by a representative of Packt Publishing to review this book on Service Oriented Architecture and I looked forward to reading the review copy they sent me.

While I waited for the book to arrive I searched the packt website for the errata for it – and found none. I thought “Either the book is perfect or they haven’t gotten around to publishing a list of corrections yet”. Quite an omen.

The blurb on the back of the book says that it is intended for “architects and senior developers who are responsible for setting up SOA for integration for applications within the enterprise and applications across the enterprise”.

The 360 or so pages are split into six chapters:

  1. Integration Architecture, Principles and Patterns
  2. Service- and Process-Oriented Architectures for Integration
  3. Best Practices for Using XML for Integration
  4. SOA and Web Services Approach for Integration
  5. BPEL and the Process-Oriented Approach to Integration
  6. Service- and Process-Oriented Approach to Integration Using Web Services

Chapter one focuses on integration technologies, approaches and patterns – pretty much laying the groundwork as you would expect an introductory chapter to do.
The second chapter attempts to drill down deep into what SOA is about.
Chapter three details the Best Practices that should be followed when using XML for Integration and seems completely out of place considering the intended audience that this book is written for – it is far to low-level for a book aimed at software architects.
Chapter four focuses on web services and does a very good job of it, advising for example to stick with approved Standards rather than using proprietary extensions of say SOAP and WSDL. Amusingly though, while advising that web services should remain independent of programming languages and application platforms the book soley gives examples in Java and .net.
Chapter five details BPEL (Business Process Execution Language) and the Process-Oriented Approach to Integration in a rather comprehensive manner.
Chapter six, discusses the Enterprise Service Bus (ESB) in depth. Just as with chapter 4 I was amused with this one. There is a subsection to it about how ESB helps avoid vendor lock-ins yet there is no discussion of open source offerings that are available for EBS, BPEL etc etc.

“SOA Approach to Integration” focuses in detail on the WS-* standards and references SOAP very often. There is an anomaly in that there is no mention of REST and while the authors, with their collective experience in Java and .NET, focus on detailing use and interoperability between those platforms I would have expected at least some Open Source technologies and programming languages to be referred to – the ESBs Apache Service Mix, Mule for example; along with perl, PHP and python as some of the programming languages that can be used.
If PHP was to be mentioned I would expect the “WSO2 Web Services Framework for PHP” to be listed as well as, perhaps, the SOAP and UDDI packages from PEAR.

I found myself reading some sections of the book repeatedly – not because the technical content was too complex to understand; but due to it being too verbose, due to bad grammar, spelling mistakes and poor punctuation. I also felt that the diagrams and figures in the book should have been identified better, both in the text and individually. A glossary and a more complete index would have been nice too.

On the whole, although I did enjoy reading portions of the book, it seems to be a lacklustre introduction for software architects and senior developers that are new to Service Oriented Architecture but that’s pretty much all that it is.

Integrating JavaScript lint with vim

Sunday, March 18th, 2007

After looking for a lint program for JavaScript, I’ve found JavaScript Lint and after a few pokes around the documentation and forum, got it installed and integrated with vim.
I posted this information to the Irish PHP Users’ Group mailing list on Wednesday – thought I’d share it to a wider audience tonight.

This is how I did it, note this process now only works with the downloaded package JavaScript Lint 0.3.0:

I got, compiled and installed javascriptlint:
$ svn co https://svn.sourceforge.net/svnroot/javascriptlint/trunk javascriptlint
$ cd javascriptlint
$ make -f Makefile.ref all
$ cd Linux_All_DBG.OBJ/
$ sudo cp jsl jscpucfg /usr/local/bin/
$ #generate default config file (and edit to taste)
$ jsl -help:conf > /etc/jsl.conf

I added the following lines to the “Defining identifiers” section of jsl.conf, as JavaScript Lint
doesn’t know anything about DOM objects in web browsers.

+define window
+define document
+define alert
+define XMLHttpRequest
+define ActiveXObject
+define Image
+define parent
+define dispatchEvent
+define screen
+define navigator
+define setTimeout

I also turned on the ‘option explicit’ settingÅŸ which causes the linter to catch undeclared variables in the “Defining identifiers” section.

For integrating with vim I added these lines to my ftplugin/javascript.vim file:

set makeprg=jsl\ -nologo\ -nofilelisting\ -nosummary\ -nocontext\ -conf\ '/etc/jsl.conf'\ -process\ %
set errorformat=%f(%l):\ %m
"make F10 call make for linting etc.
inoremap <silent> <F10> <C-O>:make<CR>
map <silent> <F10> :make<CR>

Irish PHP Users Group; the first meeting.

Friday, January 26th, 2007

On Wednesday I had the pleasure of attending the first meeting of IEPHPUG – the Irish PHP Users Group; with thanks to AJ McKee for organising it and our new friends in Zend for providing the drink :-)

It was an interesting chat and quite a bit was discussed: Zend Certification, which frameworks are being used, various CMSs and forking [of Mambo/Joomla and OSCommerce/ZenCart] were all touched on. It was also very interesting to hear of the different solutions deployed that were implemented in PHP.

This will hopefully be the first meeting of many.

Infoworld AJAX toolkit review

Tuesday, August 8th, 2006

Infoworld is carrying a review of six AJAX toolkits, some of which are OpenSource, determining whether they might be ‘Enterprise Ready’. It certainly makes for interesting reading; at the very least demonstrating that the author has no clue as to what makes a software package ‘OpenSource’ – he thinks all 6 toolkits are.
It also serves as a ‘call-to-action’ for the DoJo guys to also concentrate on documentation.

Irish PHP Users’ Group

Wednesday, May 3rd, 2006

AJ McKee has kickstarted an Irish PHP Users’ Group mailing list. Not a bad idea at all – there’s already a frappr/Google map for members.

Feed Validator

Monday, April 24th, 2006

If you use PHP (or any other language) to develop Atom or RSS feeds, you really should use feedvalidator.org periodically to ensure no problems pop up.

Usability for older users

Thursday, April 13th, 2006

Tim Fidgeon raises some good points in his article on usability for older users, though I’m not inclined to agree with all of them. For example he states instructions should be phrased imperatively; I disagree there’s nothing wrong with tight copy so long as it isn’t cryptic.

AJAX Security

Wednesday, April 5th, 2006

Navaho Gunleg raises some points about securing your AJAX enabled web application in his blog at darknet.