Home

Advertisement

Framework/API Main Goal: Reuse

  • Mar. 22nd, 2009 at 4:15 PM
The main goals of the WebWork Framework depicted on the Wikipedia's article:
  1. Web Designer never has to touch Java code;
  2. Create multiple "Web Skins" for a application;
  3. Change Look and Feel;
  4. Change Layout on a given Web Page;
  5. Change Flow among Web Pages;
  6. Move *existing* data elements from one page to another;
  7. Integrate with various backend infrastructures;
  8. Reuse components;
  9. Perform internationalization (i18n) of a web application;
  10. Keep the API small and to the point;
  11. Ability to learn WebWork fast, by making all the fancier features optional;
  12. Allow the developer to choose how to implement as much as possible, while providing default implementations that work well in most cases [1];

I'm not sure if the order on the list above reflects the priority but if so I would strongly use the items from 8 until 12 as the first top one priorities:

  1. Reuse components;
  2. Keep the API small and to the point;
  3. Ability to learn <YOUR FRAMEWORK/API NAME HERE> fast, by making all the fancier features optional;
  4. Allow the developer to choose how to implement as much as possible, while providing default implementations that work well in most cases [1];
  5. Perform internationalization (i18n) of a web application;

An the last item is for certain one of the main strengths of the Springframework, as well as the terrific usage of Object Oriented advantages as Polymorphism.

I stumble upon this WebWork article because a tool I'm using for the past months makes some use of it :)

Yahoo opens up the mail

  • Oct. 2nd, 2006 at 8:11 AM
A very aggressive decision, how good is competition... (http://google.com).

Tags:

"Human Interface" operations

  • Dec. 9th, 2005 at 5:35 PM
By coincidence today I just had to implement my last post flatten operation of Array Ruby class. What is is funny about it is that when I read Fowler using it as an example of a typical operation of a human interface operation I thought to myself: "Who on earth would need such an operation?" If you don´t know what it does here is a example (Ruby code):

[1, [2, 3], 4, [5, [6, 7], 8], 9].flatten = [1, 2, 3, 4, 5, 6, 7, 8, 9]

And in the end I´ve ended up implementing it myself only a couple of days later of thinking that :)
I am doing some combinations of elements in my current project and my algorithm resulted this kind of collections, that may have elements that are other inner collections. All I needed was this kind of flatten operation, of course I could review my algorithm but this solution required much less effort. I guess the use of this operation is more common than I thought.

Here is the code:

public static Collection flatten(Collection elements)
{
    Collection flattened = new LinkedList();
    for (Object o : elements) {
        if (o instanceof Collection)
            flattened.addAll(flatten((Collection) o));
        else
            flattened.add(o);
    }
    return flattened;
}

A human interface operation is one that has a very specific usage but even though it is added to your interface against the philosophy of adding only operations of a general need.

By the way, Cedric has recently posted his opinions on human interfaces too.

Fowler has an interesting wiki entry on design of API interfaces. Although I think he missed a point on talking about java.util.List interface lack of more friendly operations (like last(), first()...) and not considering the java.util.LinkedList class interface which has much of those operations. Even though nothing so friendly (or human if you rather saying) like Ruby´s Array interface operation flatten mentioned in the article, and many others I suppose.

Anyway, as a programmer I feel writing more readable code with API with lots of useful operations.

Tip on personal documents crawling

  • Nov. 23rd, 2005 at 3:04 PM


Docco might be a very useful tool if you have hundreds of PDF documents on software development. It uses data mining techniques to find relationships between documents from a set o user entered key words (with a nice graphical view). It uses Lucene under the covers too. It´s very easy to install, just unzip e run the bat/sh.

Tags:

Latest Month

November 2009
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Tags

Syndicate

RSS Atom
Powered by LiveJournal.com
Designed by Tiffany Chow