Showing posts with label framework. Show all posts
Showing posts with label framework. Show all posts

Thursday, May 30, 2013

Nothing in OOP is obvious


Is nothing in OOP obvious to the neophyte?

Here is comment from a class named Observable declared as follows :


   public abstract shared Observable


The documentation for the class contains the following method comment  :

public add-observer

Add an observer to this object's list of observers to be notified. Typically this is only called from the Observer's observe method.


For this to make sense to a neophyte, wouldn't we need TWO variants of PUBLIC, e.g.,

  • MY-PUBLIC-FACE
  • YOUR-PUBLIC-VIEW-OF-ME

corresponding to

  • obj-public (intended for me to call against myself)
  • consumers-public (available as your message sent to me)

??

BTW, that add-observer method is declared as follows :

public  
{Observable.add-observer
    o:Observer,
    error-if-present?:bool = false
}:void


Is the issue the method name ?  Should it be 

   all-ya-all-add-observer-to-me

??

Consider :

   receive-observer

But what in a name prevents a hack ?  One idea : object procedures and functions versus messages.  In such a language, an object never sends itself a message.  If you have a local copy of an object, you can use its public procedures and functions.  If you have a pointer to an object - an object reference - you send only messages.

And what did the documenting author mean by "typically" ?



Tuesday, December 21, 2010

Tcl EventLoop

TIP #379: Add a Command for Delivering Events Without Tk


Seen at http://www.tcl.tk/cgi-bin/tct/tip/ as a Tcl Improvement Proposal.

Compare: Smalltalk's new Announcements framework or Curl's Sonntag.

A blog note regarding Dolphin Smalltalk.

Tuesday, August 7, 2007

RIFE-Jumpstart

RIFE is such a terrific example of using continuations in a web application framework that it is too bad if giving it a try has glitches from the get-go.
The RIFE-Jumpstart will use Jetty so you will want to go into the Jetty subfolder and edit the jetty.xml such that the port value is something other than 8080. After that you will reach RIFE as something like
http://localhost:28282
You simply must confirm that your OS has the JAVA_HOME env variable set to a JDK. I am using RIFE for Java5 so mine set to
i:\java5\jdk
I tried using my own ClassPath tool from LogiqueWerks to get around this by being sure to hit the right tools.jar and javac.exe but I could not escape
class file has wrong version 49.0, should be 48.0
when launching from the RIFE-JUMPSTART directory with
ant run
This also means that you must have ant in your path.
It is annoying that most HTTP frameworks install without politely asking for an alternative to port 8080. OracleXE and SUN Application Server are the latest to do this to me.
There are some good video podcasts on RIFE - one at Google is about an hour long.
If I add some RIFE pages they will be over at eclectic-pencil.com Useful links include rifers.org and a Confluence link on DWR.