Bret Waldow

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

Recent posts by Bret Waldow

Hello,

Given your overview, do you think that Java is becoming a different language, in the sense that the new paradigms are "taking over" and evolution of the earlier approach will fade, or are the new features enhancements but not real shifts?

Of course the language is used to express the directions it has been used for all along - it's good at them, and that's why solutions that are written in Java are written in Java. But in the course of adapting to express new uses that are coming into being (say functional programming vs Object Oriented programming), do you think the language might actually be driven in a new direction?

There might be other distinctions you see - what do you see with your perspective?

Cheers,
Bret
10 years ago
I know I can adapt many approaches, but knowing what you use might save me some time as I'm just starting with jQuery and I wouldn't mind working with a tool set that is already well adapted for the task. I will find it easier to learn if I'm paying attention to jQuery instead of how to work around some tool's shortcomings.

So, what tool set do you recommend (or against)?

Thanks,
Bret
I thought of that possibility a few minutes ago, and then thought, "no, that's ridiculous. Why would they allow that?"

But it does fit with the symptoms. An interesting design choice.

Do you know of a way to then re-open System.out? "new System.out()"?

And yes, I can understand the idea of "don't do that".

Thanks,
Bret
14 years ago
Hi,
I ran across this in a small demo I wrote, and pared it down. The behaviour is a console app, give it several text files on input line and it prints the contents out. If I uncomment the "systemOut.close();" line, it only prints the first one. I can't figure out why - can anyone tell me?

Thanks in advance.

Sample output with line commented out:

With the line uncommented, only the lines from Input1 appear?
14 years ago
Hello,

I'm new to SWT. I can't find an example (or hack one) that allows a Menu to appear in the client area of a CTabItem or a TabItem.

I have a gizmo 'class BrowserPage extends Composite' which sits nicely in a CTabItem. I can put buttons and text fields and the SWT Browser in it, but not a Menu.

So, each tab will have it's own instantiation of the gizmo (a Browser plus some controls), and each gizmo will have it's own menu.

Can anyone provide or point me at some example code showing a Menu in the client pane of a TabItem or CTabItem?

Thanks much,
Bret
14 years ago
This is good advice:

Developing SWT applications using Eclipse

This approach fulfills the javadoc functionality in Eclipse. You simply import the SWT zip download as a project in Eclipse and then add that to any other project to inherit it.

14 years ago
Hello,

I downloaded eclipse-jee-helios-linux-gtk.tar and installed it on my machine (Xbuntu 10.4).

It runs, but it appears SWT is not configured, and I can't find mention of an SWT layout tool for designing.

I'm very surprised the SWT jars are not configured - isn't this Eclipse's approach to GUIs? And so I think there must be something wrong with the file or...? But I downloaded it from Eclipse.org.

Can someone shed some light on this? Is this somehow how it's supposed to be? Can you point me at a site that explains how to set it up properly?

Thanks for any pointers.
Cheers,
Bret
14 years ago
We have a legacy java app. The coder is long gone. It connects to a database over the network via jdbc.

I found a nice tool called loq4jdbc which logs all calls including Result Set accesses. But it gives time statistics. I need size measurements.

For each call to the database (either an initial call or a request to consume the next row of a Result Set) I need to know the size of the call & the size of the corresponding response.

Do you know of a tool that can do this?

Thanks in advance,
Bret
Hi,

I'm going to accept the 'RPC to a local Tomcat servlet' implementation for my shared library while I get on with the GWT coding I want to do, and assume I'll know more about how to pick the best solution from what I learn as I go.

I am curious about your comment against a proxy - I know there are proxies whose purpose is to intercept and re-write pages in the stream - filtering content, for instance. I'd think thus that all the content could safely pass through, be monitored for triggering types, and acted on. But I haven't worked with one yet, myself.

Am I being naive about this?

Thanks,
Bret
15 years ago
It occurs to me that perhaps what I want is a proxy server on the local system that Firefox could be directed to use.

This proxy could add javascript code to support annotation and data extraction features to pages retrieved from the Internet, provide access to local pages for note-taking (and create new ones on request), and provide local access to the system computing resources - javascript code could assemble a request into a URL that is intercepted by the local proxy, translated to a local JINI or JNA call, and the result could be packaged into a reply to the originating javascript for appropriate action in the page.

GWT would be used to easily create on-page UI components and for other on-line resource access.

Can you recommend a good quality proxy server implemented in Java? Or perhaps you can shoot obvious holes in the idea (I would appreciate that too)?

Regards,
Bret Waldow
15 years ago

Tim Holloway wrote:Have you checked out XulRunner?



I think XulRunner allows me to run Mozilla/Firefox code and apps locally without the browser? That's not what I want to do.

I specifically want to use my connected-to-the-internet, fully-set-up-to-handle-mime-content, connected-to-online-resources-like-google-calendar Firefox or Google Chrome browser as the UI for my app BECAUSE it has all that capability already worked out and installed and functioning. And I want to be able to send data to a local computation function I've created as a shared system library on my Linux machine (the one running the browser) and get a computed result back into the scope of the browser for my app to work with.

You could think of what I'm trying to create as a Scientific PIM, and some of the 'Scientific' stuff is processing capability on my local machine and I want to be able to use it to process some of the information I'm getting in the PIM on the web.

And there's no central server 'out there' for this solution/architecture. It's my (or some other scientist's or academic's or engineer's) own computer that hosts their own PIM, gathering their own notes and processing their own transforms on it.


Tim Holloway wrote:You can probably invoke a native code library, but chances are you'll need to create a signed application and maybe some glue libraries



Please tell me the search terms I need to use to find out about how to do this. Any pointers would be helpful.

I have a 'libSomeCompute.so' shared system library on my local machine. I can call it from a C program or from a Java app via JINI with a string input now, and receive a string result back. I want to do that from Firefox.

That led to the thought of a local server & RPC, which led to the question of 'server collisions', which led to this thread. I'd much rather not need a local server to access the local computation resource (which cannot be relocated into Firefox for licensing and language reasons), but if I need one, how do I deal with 'computer-clueless' students and researchers who want to use the app, but can't resolve a collision between the port I specify and the same randomly chosen by some other package maintainer?

That's why the question is in the Linux/Unix section.


Tim Holloway wrote:Unless you're absolutely dead set on GWT, you'd probably find it less work to use SWT (Eclipse's GUI) or even Swing for Linux desktop apps. You don't need to have Eclipse to run SWT - the Spoon ETL GUI design tool of the Pentaho Business Intelligence Suite is a stand-alone Java application using SWT. Then again, some of the more ambitious systems use Eclipse itself. Eclipse can be used for other purposes besides as an IDE for software development.

And, of course, there's a whole raft of quick-and-dirty GUI app design options that come with the core Linux distros - or as minor add-ons, from dialog-assistes shell scripts to Tcl/Tk on up to and including (but not limited to) Python and Perl. Not even touching the not-so-quick platform options like C/C++ or even Ada.



For my use, I think I'd be reinventing a lot of wheels.

Tim Holloway wrote:Sorry to be so pedantic, BTW, but not everyone understands the nuances of servers.



I don't mind at all. I have a lot to learn. Thanks for taking the time to respond.

I'll appreciate anything more you might suggest in light of my description above.

Regards,
Bret Waldow
15 years ago

Tim Holloway wrote:

Bret Waldow wrote:You install Tomcat (a/k/a Apache Tomcat"). Apache itself is the name used to refer to the non-Java general web server, although the Apache project as a whole has a lot of Java stuff not related to the original Apache Http Server at all.



Umm... I didn't write that.

Tim Holloway wrote:There are bigger issues here, however. One of which is that installing server software, if it's going to be on desktop computers, has the potential to really annoy the security people.



I'd love to find a solution that allows me to access a local system library without installing a server. Can you suggest one?

Tim Holloway wrote:Another is that there's no such thing as "a" server. Servers come in lots of different flavors: DNS, HTTP, FTP, DHCP, database, etc., etc., etc.. Quite frequently more than one of these servers will be running in the same OS on the same box at the same time.



Yes, I know some of this. In my professional life I've written and deployed SOA services on Tomcat and JBoss. Either may have been installed by someone else's Linux package, or perhaps Glassfish.

I'd like to know about strategies to deal with that open-ended possibility, and the possibility they have no server at all installed. Servers can't use the same ports, best I know now.

Best solution would be not to need a server, of course. I'd love to find an approach that doesn't require one to gain access to local computation resources, just as the local mouse is available for use with the browser.

Thanks,
Bret
15 years ago

Cloudgen C.F. Wong wrote:If you are going to use the GWT, I think you should consider the "Google App Engine" http://code.google.com/appengine/



Thanks for the suggestion. I've had a look at it, and I don't think that's a suitable architecture.

Nothing wrong with the app engine.

This is a stand-alone app running on a personal computer. I'm using a browser as there is a lot of capability easily available with browsers - it's a good fit for displaying content.

But while the user might also want to use a browser session to look at a web page off their machine, I'm not doing anything about that - I'm only utilizing content that is on their local machine.

Modern browsers such as FireFox and Chrome are javascript interpreters, and that's what I'm using it for. I'd be quite happy to implement the entire application without any server, just using local javascript files.

The only reason I'm considering a server now is that I also want to be able to call local system libraries to do some computing, and it appears that the security model for browsers does not allow that unless I implement it through a server. Since this is a self-contained local application, I'll have to put a server on their personal machine - they won't be connected to the internet, so there is no central server to use.

So, the question is - how do I go about dealing with the possibility they may already have one, and maybe a different one than the one I choose for the application? I've written servlets and SOA interfaces, deployed on Tomcat and JBoss. But I haven't dealt with the unknown Linux user who may have installed any sort of application they want to before they select mine, and may have any server someone else specified in their package on the system already.

How do I integrate with what they have programmatically? How do I deal with the possibility?

That's what I want to know. I'd have expected there is an approach worked out, or a simple answer explaining why it's not a problem.

What is an effective strategy for dealing with the possibility the user already has a server, and may not know anything about servers themselves? I'm talking about an app to be used by non-technical Linux users who can run 'apt-get' to install 'cool stuff' but cannot resolve server conflicts themselves.

Thanks,
Bret
15 years ago

Cloudgen C.F. Wong wrote:

Bret Waldow wrote:I might also find reason to have a server for some other functionality as I develop my application, but knowing the limits of Javascript will be helpful, so I'd like to hear about both approaches - with and without.

Cheers,
Bret


If you can use your library within JNI, is it possible for you to wrap the libraries into RMI (Remote Method Invocation), or a network service, (or xmlrpc web services or something else) and allow it to be called by Java Applet (or xmlHttpRequest Object) in a webpage? (Java Applet or xmlHttpRequest Object have their own security limitations, too.)
If you target for ie as your webbrowser, you have an alternative choice, compile it as ActiveX dll component. And you can call it by <object></object> tag and access it using Javascript.

Moreover, you are not allow to access local system's resources (other than webpages, multimedia files and files that opened by webbrowser's plugin or add-ons) directly from Javascript due to security reasons. Thus, it's quite IMPOSSIBLE to call an external library directly from javascript.



Thanks. It appears from these responses I must provide a server-side component to provide access to local system services. I am already accessing the system library I mention via JNA from a Java app, so it shouldn't be too difficult to make it available via a server.

I did post a question here about how to deal with the possibility the user has already installed a server. If you have thoughts about that, I'd appreciate hearing them.

Thanks,
Bret
I am starting the design of an application primarily for Linux machines, although perhaps it might be used on Macs too. I am not targeting Windows at all.

I'm probably going to use the GWT in a browser as the main UI - Firefox or Google Chrome when it's generally available. I expect either can run Javascript locally, but there are some features that may require a server. One would be to access a shared system library to ask for computation - it appears this violates one of the design choices for browsers, and so would require a local server (servlet, REST, or SOA) to allow access.

The question is not 'which one'. The question is 'how do I know if the user has already installed a server, and how do I install my app to that if it's already there?'

If I were to choose Tomcat, how would I know if they already have Tomcat installed? If they have Apache, what do I do then?

How is this question resolved for applications that require a server to function on Linux (and Mac) machines?

Thanks for help and pointers.

Regards,
Bret
15 years ago