Design is more than pretty picture
Talk benefits, not features
Talk benefits, not features
I’m currently playing with Seaside (a Smalltalk web framework) for a pet project. As you maybe know, Seaside is, by default, not very friendly with URLs. I wanted to have bookmarkable URLs for user convenience and for search engine. Ramon Leon explains how he managed to get nice urls for his blog in a super-interesting blog post.
When playing with WAAnchor methods, I fought with a weird behaviour:
1 html anchor 2 callback: [self moveToPage: page]; 3 useBaseUrl; 4 extraPath: page slug; 5 with: page title.
did not work, while
1 html anchor 2 useBaseUrl; 3 extraPath: page slug; 4 callback: [self moveToPage: page]; 5 with: page title.
worked fine. Can you see the difference in these two snippets?
The reason of the resulting bug is quite simple but is hard to spot when you’re not careful: the method useBaseUrl should always be the first to be called in a method cascade on a WAAnchor. Indeed, both extraPath: and callback: will affect the url of the WAAnchor while useBaseUrl will reset it. This reset will cancel all the operations you’ve done before on the url of the WAAnchor.
Moral of the story: beware of side effect (or How I Learned to Stop Worrying and Love Functional Programming)
Comments [0]
Web development is a quite hot topic for developers these days. Some think that the web is the future and that native apps are a relic of the past. I would not say that it is that simple (iPhone/iPad apps anyone?) but it is clear that webapps work well for many tasks.
Some years ago frameworks started to appear in order to facilitate the development of web applications. They promise faster development time, more robust application and easy maintenance. We all know that a silver bullet does not exist in software development but it's kinda funny to see what all those frameworks promise. Here are some excerpts from some website of them.
Spring delivers significant benefits for many projects, increasing development productivity and runtime performance while improving test coverage and application quality.
CakePHP enables PHP users at all levels to rapidly develop robust web applications.
Iliad is a Smalltalk web application framework. It is designed to be simple and make web development as effective as possible.
Catalyst will make web development something you had never expected it to be: Fun, rewarding and quick.
It [Symfony] provides an architecture, components and tools for developers to build complex web applications faster.
Ruby on Rails is an open-source web framework that's optimized for programmer happiness and sustainable productivity. It lets you write beatiful code by favoring convention over configuration.
Pylons is a lightweight web framework
emphasizing flexibility and rapid development
Django makes it easier to build better Web apps more quickly and with less code.
Wow with all those promises, you have no excuse to deliver crappy webapps. I like those headlines have no meaning at all. Do not trust someone who is pretending that everything will be easy with his tool/framework. Except when the tool in question is Clojure or Smalltalk of course :)
Seaside provides a layered set of abstractions over HTTP and HTML that let you build highly interactive web applications quickly, reusably and maintainably.
Comments [0]
Interacting with a well design API is a pleasure. When an interface is consistent and works in the way I expect it to work I feel good. Gregory T. Brown wrote an excellent chapter on this subject in his (now freely available) book 'Ruby Best Practices'.
Something struck me in jQuery last week: map() and each()'s parameters. From jQuery's documentation:.map( callback(index, domElement) )
.each( function(index, Element) )
jQuery.each( collection, callback(indexInArray, valueOfElement) )
jQuery.map( array, callback(elementOfArray, indexInArray) )
Ok, what's the deal ?
Look at the parameters of the callback of jQuery.map(). The order is different than all the others. Why?
Comments [0]
Comments [0]