Tim Uckun

Ranch Hand
+ Follow
since Jan 19, 1999
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tim Uckun

Given all of the above it would seem that if you plan on setting a variable repeatedly to different strings it's better to use the construct.
s="This"
... some code ..
s="That"
Especially if keep setting the string over and over again. Is this right? Can you force gc on teh constant strings?
25 years ago
Yes and no. That is yes what you describe can be made to happen but does not need to. If you subsitute a servelet for the CGI the servelet can actually create a java object (whatever it may be) and then serialize it and pass it over to the client as binary data. the client then "de-serializes" it and voila objects passed over http!. This could be very powerful when you think about it.
If the servlet is also an RMI server then it can create the stub and the skeleton. It can pass the stub over to the client which can then manipulate the remote object (if the RMI port is open).
If the port is closed then RMI is pretty much out of the question and you will have to deal with either text or serialized objects being passed around.
IMHO it is best to deal with text. I have created an API of sorts. So the server CGI gets a request like command=1&data=somestring and it executes what ever the 1 comand is passing the somestring parameter to it. The return value is allways x,somestring where x is an exit status and somestring is the meat of the result. Sometimes I use simple XML like structures ( < double > 2.0 < /double > ) other times I just send over data like this 1|2|3~1|2|3 to represent a recordset. I kind of used WDDX http://www.wddx.org as a basis for my XML specs. Also there are some cool white papers at inprise http://www.borland.com/jbuilder/papers/jb2servlet/ if you have time to read white papers.
I have been able to do all of this using very minimal knowledge of JAVA (feeble at best!). I just use JAVA as a bridge and rely on Cold Fusion on the server which I know well and javascript on the client.

[This message has been edited by Tim Uckun (edited September 15, 1999).]
I would think you can use RMI. OTOH RMI is just a wrapper around sockets
I don't quite understand what you are asking. Are you wondering how RMI can penetrate firewalls or how http tunneling works with RMI. Configuring a firewall to accept RMI is fairly straightforward just open up the port (I forget the port number off the top of my head).
Http tunneling on the other hand is a bit more complicated. From what I have read it's more practical to do text streams over http get or post requests. It <bold>is</bold> possible to serialize an object and pass the object to the client using http but the client has to be running JDK 1.1 or better. Once the object is on the client then you can use it like any other object.
Here is what I have done using my feeble understanding. There is an old piece of software called java-CGI-bridge on the net. All this software does is to simulate a POST to a given URL. I wrote a wrapper around this object using public methods. I then embed this applet in a HTML page. I call the public methods from javascript! You can actually pass java objects to javascript this way it's too cool. In essence I create scriptable objects in java that do the communication to the server. I wish I understood threads a bit better I think I could make it better.
Of course as with all web projects this will only work on browsers which support scripting of the applet tags. Almost all version of NS, IE4+ and nothing on a Mac (the JVM is not scriptable on a Mac).
The best example of a java applet I have ever seen the netscape javascript debugger. This thing is just awsome!. If you do any web developement at all you owe it to yourself to check it out. http://developer.netscape.com/software/tools/index.html?content=/software/jsdebug.html
The best example of server side java is at http://www.msgto.com I really dig msgto and the concepts behind it pure genious.
------------------
"There are some who call me TIM?"
[This message has been edited by Tim Uckun (edited September 14, 1999).]
25 years ago
Actually what I don't like about UBB is the lack of threading. I don't know if ultra supports threading. I was at some site a couple of months ago and they had a lesson on Cold Fusion during which they build a threaded discussion board using CF. I downloaded it and it'a someplace on my HD Of course there are bunch of them in PHP, perl, and python too. I enjoy slashdot and technocrat.net the most. Slashdot because it's so customizable and technocrat because the discussions tend to More Mature.
------------------
"There are some who call me TIM?"
25 years ago
Not really. It was rated the best at some CGI site. The web site is done nice and they use their own forum on the tech support. Maybe I'll give it a try when I have a spare moment or two (yea right!).
25 years ago
How big an install is that? The plug in is about 6 megs
25 years ago
What this thing needs is a preview button. Oh yea did you know that there is a free BBS that looks a lot like this one called ultraboard http://www.ultrascripts.com/ . I don't know if it's GPLed but it's free beer.
25 years ago
Everybody seems to agree that Java is here to stay on the server. On the client however things are not so sure. Almost every has given up on the applet. IMHO the applet is the most promising thing about java and that which originally attracted me to Java in the first place.
When I was emailing Paul about this he said a class loader is a better solution and he is probably right but don't you have the same problem about the JVM? Surely you can't rely on the same JVM everywhere.
I will reiterate. Is WORA dead? Has sun given up on the applet? Has the Java community?
25 years ago
I am having much problems trying to script a simple applet. I have read books, websites et al and they all say that the following shoudl work. Only it does not. What am I doing wrong?
Here is the HTML
-----------------------
<pre>
<script>
function lookupURL(){
myApplet=document.applets["fetchURL"];
myApplet.start(); // It fails here ( no such method)
s = myApplet.getCGIResult(); // If I comment out the //above it fails here
alert (s);
} // lookupURL
</script>

<center>The applet is below</center>


<APPLET name="fetchURL" "CODE="testcgiapplet.class" CODEBASE="Java" WIDTH=300 HEIGHT=100 MAYSCRIPT></APPLET>
</pre>
----------------------
I declared the function like this
public String getCGIResult()
I could post the whole applet too if anybody want it.

------------------
"There are some who call me TIM?"
25 years ago
Here is a similar looking project by the apache folks.
http://java.apache.org/cocoon/index.html
25 years ago
Is there a way have UBB store information about which articles have been read and last visited time on the server instead of as a cookie. I sing the porkchop electric >:} both from home and work. It would be great if the views from both locations would be uniform.
------------------
"There are some who call me TIM?"
25 years ago
I think that the modality is one of the reasons why it's so productive. It allows you to reduce the number of keystrokes required to execute any command. Also it's a more efficient way to enter commands because you don't need to be holding down the ctrl or the alt key.
My book just came in from Amazon.com. I ordered it from Amazon because FSF did not take credit cards via the web (yea I know I'm lazy). This book is thick enough to stun an ox. I am looking forward to reading it. The cheat cards are a lot cheaper and may be sufficient for most people though.
P.S. I found out ALL of the profits from the book go to support FSF so I don't feel at all bad about spending the money on the book.
------------------
"There are some who call me TIM?"
This a question to mostly to JD. If I was going to set up a internet server which version of FreeBSD should I use?
25 years ago