[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [plt-scheme] scheme unit/sig

On Wed, May 15, 2002 at 06:12:00PM -0400, Matthias Felleisen wrote:
> In dskippy's case, it isn't so much a question of sticking to MVC. 
> It's a question of moving a conventional GUI program to the Web, and
> if you have MVC you can do this quickly, if you don't, you're in 
> deep trouble. -- Matthias, his professor :)

  well the scheme servlets and MVC is a something that alot of people
on this mailing list can relate to so i used it as an example. my actual
question was about units however. my question was in short but not an 
exact quote
  > if servlets are units that import servlet^, then is it possible
  > for me to make a unit derived from one that imports servlet^
  > the creates my MVC view class and then use that unit to be
  > my servlet.

  currently to do this i've been instantiating model, view, and controller
in the main program. i am wondering what other people do to solve this

  matthias and paul did correctly pick up on the fact that i'm doing this
for matthias's class. i hope i didn't offend people with a "homework"
question as in my opinion it was more a question about units which i'm
having a bit of trouble understanding.

 my partner tom's responce pushes my question off into yet another 
tangent about timeouts and such. this is an interesting matter that we've
discussed together. mostly revolving around the fact that session data
is store on the server side and not the client side like with traditional
methods like get and hidden fields. these allow the users to bookmark and
return after a *very long time period (longer than the server timeout)
if anyone has insight on how to over come these issues i'd be happy to
hear them but it is my current thoughts that send/suspend is good for
a certain set of web programing and for other things traditional top
level arguments from a get are nice. an example

  i make a servlet to index an indefinate number of magic the gathering
(card game) decks. the main page lets you click on one and see the listing
of cards that are in the deck. my friend that i made it for chooses to 
use it on a strategy gamming website that uses the script in two very 
different ways. one being the originally foreseen use as a place where users
can go look at all of the decks that members of the club play with. the
other being referencing indevidual decks in the meetings minutes as
who is playing which deck. this required me to use get method links
so one could reference (a ((href "deck-listing.ss?deck=mikes-deck")) Mike)
i also used get method on the index because it was desired to have
anchor links instead of form posts for the user to select a deck. i have
been looking around for HTML tricks to make an anchor link submit a form
with a name value pair but i'm not sure it's possible. i talked to paul
and he offered the suggestion of making a library that turns forms to 
links (not this would still require get) currently i do

    (lambda (k-url)
      `(html ...
         (a ((href ,(string-append k-url "?deck=mikes-deck"))) Mike))))

  thank you