... newer stories
Tuesday, 21. March 2006
RSS / RDF Muddle
jlink, 15:47h
I've had problems with the RDF feed which was not correctly interpreted by Thunderbird. I manually edited the template files myself now to switch over to RSS, so expect problems with the feed...
Johannes
PS: It looks good so far; at least much better than before.
Johannes
PS: It looks good so far; at least much better than before.
... link
Friday, 17. March 2006
AJAX Travelogue (Part 1): The Pilot
jlink, 14:09h
There's hardly ever been a term in software development which has been picked up, digested and (ab)used as fast as AJAX (Asynchronous JavaScript and XML). Thirteen month after the acronym was coined by
Jesse James Garrett there are more than 20 English books listed on the topic, many of them already in print.
My personal dive into the AJAX sea took place early this year when I tried to come up with a simple demo application to show the practices and pitfalls of Test-Driven Development with SAP's Netweaver technology. My colleague Marco and I decided to use two technologies to show the universal applicability of our approach: WebDynpro (the SAP way to generate web user interfaces) and plain JSPs.
It didn't take me long to realize that WebDynpro was going to be a real pain in my behind, so I kept morale up by adding a couple of AJAX features (inline editing, drag&drop, no page rerendering etc.) to the JSP variant. Although I had done some reading on AJAX implementation techniques and patterns, I ended up with a solution of almost 500 lines unreadable JavaScript code, which - to make things worse - only worked with my specific version of Firefox.
So I decided to do it right for once. My goal was to implement the same thing over again, but additionally I intended
Being the thorough guy that I am once in a while I started by purchasing (and reading) a couple of books:
In the stories to come I'll probably ramble about lots of details like client-server communication models, browser (in-)compatibilities, JavaScript effects, testing, templates and a few more. For today I send you to bed with the most striking lessons I learned in the last two months:
Johannes
Jesse James Garrett there are more than 20 English books listed on the topic, many of them already in print.
My personal dive into the AJAX sea took place early this year when I tried to come up with a simple demo application to show the practices and pitfalls of Test-Driven Development with SAP's Netweaver technology. My colleague Marco and I decided to use two technologies to show the universal applicability of our approach: WebDynpro (the SAP way to generate web user interfaces) and plain JSPs.
It didn't take me long to realize that WebDynpro was going to be a real pain in my behind, so I kept morale up by adding a couple of AJAX features (inline editing, drag&drop, no page rerendering etc.) to the JSP variant. Although I had done some reading on AJAX implementation techniques and patterns, I ended up with a solution of almost 500 lines unreadable JavaScript code, which - to make things worse - only worked with my specific version of Firefox.
So I decided to do it right for once. My goal was to implement the same thing over again, but additionally I intended
- to leverage the best Javascript and Ajax libraries available.
- to have automatic tests for both server-side and client-side code.
- to make standard stuff (like communication and dom handling) as easy as possible.
- to come up with a cross-browser-enabled solution.
Being the thorough guy that I am once in a while I started by purchasing (and reading) a couple of books:
- Foundations of Ajax by Ryan Asleson and Nathaniel Schutta
- Ajay in Action by Dave Crane, Eric Pascarello and Darren James
- Professional JavaScript for Web Devlopers by Nickolas Zakas
In the stories to come I'll probably ramble about lots of details like client-server communication models, browser (in-)compatibilities, JavaScript effects, testing, templates and a few more. For today I send you to bed with the most striking lessons I learned in the last two months:
- If you want to make a really cool Ajax application, you won't get around programming in JavaScript. You'll probably be able to make use of many useful libraries for communication, effects and widgets. But that only gets you so far.
- JavaScript is not a bad language per se. What really sucks is the bad support for debugging and testing. I have yet to know a JS debugger that works with the latest version of either Firefox or Internet Explorer. The JS interpreters in Firefox and IE are not even able to recognize all syntax errors or to produce sufficient error messages from compilation and runtime errors. IE doesn't even tell you about the real line number in which an error occurs.
- Browser incompatibilities slow me down much more than I would have guessed from reading the books. Although I'm using libraries which are supposed to hide the cross-browser issues I spend at least a third of development time to sort out the problems when getting Firefox ready code to work in IE. And I haven't even tried Opera and Safari yet.
Johannes
... link
Wednesday, 15. March 2006
On broken windows, garbage and everything
jlink, 10:35h
You might have heard about the Theory of Broken Windows first formulated in an article by James Q. Wilson and George L. Kelling:
in The Pragmatic Programmer have been the first to transfer this principle into software development stating that you have to clean up your code often enough to prevent others who see that code from adding more broken stuff. So far so good (or bad, actually).
During the last weeks I have been witness to a slightly different expression of the same principle. I live in Heidelberg, Germany, a city rather well known for its mediaeval buildings, its tiny alleys and its being cleaner and more innocent than most German cities. Since the garbage collection service has been on strike for over a month now, Heidelberg's tidiness has somewhat suffered. You can see large piles of garbage everywhere, growing larger from day to day. Garbage attracts more garbage.
I cannot help realizing that by now many (if not most) people have given up completely on the idea of cleaning up after themselves. Instead they drop anything they want to get rid of anywhere at any time. Many people, but not all. Some, like myself, still prefer to take their used Kleenex home - just to put it into one of the twenty or so garbage bags waiting on our balcony for the strike to be settled. Thus, I conclude, there are two kinds of citizens: those who have somehow internalized the rules and follow them regardless of what their fellow citizens are currently up to. And those who just do whatever the majority does - with a strong inclination towards the least possible effort.
I have seen that in developers, too. Programmers who seem to do everything right: unit testing, code formatting, continuous integration etc. But only as long as I'm around. Obviously, they don't see much sense in following the practices. Or they just don't care. Or they know better than I do. Or they see the futility of all human endeavour. Or whatever. I just don't know why they are the way they are, and - what's even more frustrating - most of the time I - as a consultant - fail to have even the slightest long-term effect on these people. Maybe the (what I consider to be) good software development practices depend too much on certain personality traits (like eg. the willingness to take responsibility).
Johannes
"Consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more windows. Eventually, they may even break into the building, and if it's unoccupied, perhaps become squatters or light fires inside."
As far as I know, Andy Hunt and Dave Thomas in The Pragmatic Programmer have been the first to transfer this principle into software development stating that you have to clean up your code often enough to prevent others who see that code from adding more broken stuff. So far so good (or bad, actually).
During the last weeks I have been witness to a slightly different expression of the same principle. I live in Heidelberg, Germany, a city rather well known for its mediaeval buildings, its tiny alleys and its being cleaner and more innocent than most German cities. Since the garbage collection service has been on strike for over a month now, Heidelberg's tidiness has somewhat suffered. You can see large piles of garbage everywhere, growing larger from day to day. Garbage attracts more garbage.
I cannot help realizing that by now many (if not most) people have given up completely on the idea of cleaning up after themselves. Instead they drop anything they want to get rid of anywhere at any time. Many people, but not all. Some, like myself, still prefer to take their used Kleenex home - just to put it into one of the twenty or so garbage bags waiting on our balcony for the strike to be settled. Thus, I conclude, there are two kinds of citizens: those who have somehow internalized the rules and follow them regardless of what their fellow citizens are currently up to. And those who just do whatever the majority does - with a strong inclination towards the least possible effort.
I have seen that in developers, too. Programmers who seem to do everything right: unit testing, code formatting, continuous integration etc. But only as long as I'm around. Obviously, they don't see much sense in following the practices. Or they just don't care. Or they know better than I do. Or they see the futility of all human endeavour. Or whatever. I just don't know why they are the way they are, and - what's even more frustrating - most of the time I - as a consultant - fail to have even the slightest long-term effect on these people. Maybe the (what I consider to be) good software development practices depend too much on certain personality traits (like eg. the willingness to take responsibility).
Johannes
... link
... older stories