Re: WOApplet ... why URL is wrong
Re: WOApplet ... why URL is wrong
- Subject: Re: WOApplet ... why URL is wrong
- From: Chuck Hill <email@hidden>
- Date: Fri, 14 Jan 2005 16:15:44 -0800
On Jan 14, 2005, at 1:33 PM, MacFirst wrote:
I know you're a smart guy who knows your WO very well, but I have to
ask: do
you work for Microsoft?
No, but I would probably enjoy it. I live near there and have met
several people who have worked for them. They all liked the work
environment. Perhaps one of these days...
Your recent answers to this thread (which I've been
following fairly closely as I've also never gotten this working and
received
zero replies when asking if anyone else has -- twice!) remind me of
the old
joke about the guy lost in a helicopter/balloon who gets answers that
"while
technically correct, provide no useful information." ;)
Or, perhaps you are just missing the point, staring too closely at the
tree to see the forest? A _lot_ of questions asked on the list suggest
that the person asking knows very little about html, browsers, and
webservers. They expect WO to make knowing about those things
irrelevant. I find that a frustrating and counter productive attitude.
So much so that I often just delete the message. If you are a web
developer you _must_ know about these things. First. Other times I'm
pretty sure the person does know, it just hasn't occurred to them to
stop and think about what is going on when the browser processed the
HTML their app has generated.
WO is really very simple. It generates text files in a certain format.
If you know what the output should look like, and look at what WO
generated it is usually pretty easy to see what is wrong and find out
how to change it. If you don't know what the output should look like,
then you are just playing guessing games. Luckily there are many, many
correct examples of HTML, JavaScript etc etc out there if one just
bothers to look for them. Google is a great help in this.
There is no magic in WOApplet, is just generates some standard HTML.
Want to know what it should look like? Ask Google for "applet html
tag". First hit for me was
http://www.ibiblio.org/javafaq/course/week5/09.html which even included
a vaguely Mac oriented example:
<APPLET CODE="com.macfaq.greeting.HelloWorldApplet"
CODEBASE="http://www.example.com/classes" WIDTH="200" HEIGHT="200">
</APPLET>
OK, pretty simple, right? Install whatever applet classes/jars you
want to use in your webserver's DocumentRoot, grab a text editor, and
pound out the 10 lines or so of HTML that you need to get the applet to
work. Got it working? OK, cool. We now know that we have uncorrupted
classes in the right place on your webserver. And we know what the
generated HTML should look like for it to work.
Now we pop into WOBuilder, slap a WOApplet on the page, and start
setting the bindings so they mimic those in our static HTML file we
made in the text editor. Save, build, and run. Done. No fuss, no
muss, no confusion because we knew what we were doing. Doesn't work?
OK, look at what WO output, compare it to your hand created file. What
is different? Which binding is that from? See what is wrong? No? Try
the docs? Still no luck? OK, ask a question on the list.
I saw in a recent post that you hate direct connect -- aside from the
problem that it messes with WOApplets, is there a reason one should
avoid
this seemingly very-useful development tool?
It is not a tool. It is a crutch. It is not a web server it is just a
little like a web server. If you need real web server features, you
are out of luck. If you need to work with designers or others, that
want to share what you are working on, you are out of luck. It also
changes. Things in deployment don't run exactly like they do in
development. They stop working. You don't know why because you have
been using a crutch to shield you from knowing. Now your boss/customer
is breathing down your neck wanting to know why their site is not
working and you have no idea. You panic. I can't begin to count the
number of posts from people in this situation. And all for the sake of
avoiding learning about the webserver and having their IDE manage a few
files for them. Even then, there seems to be no end of problems adding
things to the wrong target and fussing over "split installs" for what
could be easily accomplished even in Finder. Less magic more
productivity for me, thanks. DirectConnect, I hold, is Evil. Some
people like it, but some people also smoke crack too. You have to make
up your own mind about such things. Crack is probably the lesser evil.
More to the point, can you provide any information about how to
hook-up a
WOApplet to make it work? Something beyond the rather vague and
ambiguous
(and, seemingly, not-accurate) information provided in the docs, I
mean <G>.
It is just a component to generate text. That is all it is, just some
text and some very well documented HTML. No magic involved. You could
so the same thing in a component and just output it as a WOString.
Follow the above steps (no, really, its not a joke) and see if it does
not work.
I'd really-really love to see an example of a working WOApplication
that
received parameters from the WO-app and returned information to that
WO-app,
using standard WOApplet communication techniques (vice some silly hack
that
bypasses the WOApplet.) Heck, I'd be willing to PAY for a decent
example of
such a thing!
Never done that. WOParam (aka html param tag) seem pretty
straightforward. I don't see how to get information back to the
server. I've always just used JavaScript to set form inputs.
I hope you've enjoyed this little rant, I have!
:-)
Chuck
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden