[Bese-devel] questions

Marco Baringer mb at bese.it
Fri Sep 23 14:48:57 UTC 2005


Jan Rychter <jan at rychter.com> writes:

>> no, it falls into the "think of a good way and help marco implement
>> it". i'd really really like to see ucw have a nice form api
>> (validation, marshalling and java script alerting are good starting
>> points), i just can't seem to come up with it. this would be as good a
>> time as any to start stealing ideas from other libs.
>
> Could you please explain how you understand "marshaling" in this
> context?

we send strings back and forth across the wire, but the server (and
the client in most cases) deal with objects like numbers, dates,
countries, etc. 

given a select field which allows you to chose a country i'd much
prefer to have the field hold a CLOS object (on the server) than a
string.

i could have a text input field representing a number, a floating
point value, or just some empty string.

etc...

> I'm using SBCL and SLIME. The backtraces work fine, but the problem is
> that they are huge and convoluted to the untrained eye. Combine this
> with CLOS debugging, which even on a normal day isn't that obvious and
> you quickly get into real trouble.
>
> An example of a problem which took me a while to understand: I had a
> form-component class with a "my-field :component (integer-field)
> :initarg :my-field" slot. I then tried to (call 'my-form :my-field 1222)
> and wondered why it wouldn't work.
>
> BTW, the error message you get is:
>   There is no applicable method for the generic function
>   #<STANDARD-GENERIC-FUNCTION (SETF COMPONENT.PLACE) (1)> when called with
>   arguments (#<IT.BESE.UCW::PLACE (SLOT-VALUE IT.BESE.UCW::COMP
>   IT.BESE.UCW::SLOT-NAME) {BEB5089}> 1222).
>
> ... which is perfectly obvious after you've realized what the problem
> was. But it doesn't help that the backtrace is 22 levels deep, of which
> only one is potentially useful in resolving the problem and even then
> it doesn't really give many hints.
>
> I'm not sure what (if anything) can be done about this. Math is hard, as
> Barbie says, right?

ok, it's hard, but we can make it easier. there are certain points in
ucw which have certain expectations, we should insert error
checking/reporting code at those points. call-component, where the
above error originated, is one such place. i'd accept any suggestions
(or even patches) whcih add error checking to ucw, unfortunetly this
is not something i myself can do as i'm to far down inside ucw to
realize what is obvious and what isn't, so someelse will have to point
me in the right direction.


-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen



More information about the bese-devel mailing list