This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
1) Being new to Java, I haven't been able to get a clear picture on whether Java, by being able to be run on the server and as standalone client apps, could easily be migrated from being a server app into being a client app or vice versa (obviously assuming the nature of the app could lend itself to that). For example, can one use JSP code to build a client-side interface (that doesn't necessarily query a remote server but which can be easily deployed and downloaded by Joe or Jane user) and then write a servlet which is similar to the client-side Java code and can also harness the JSP? I want to use the most portable option (specifically to make a text browsing app). I like using JSP, if that is possible, as by using HTML, it is also closer to being portable if I ever switch from Java.
2) While this is perhaps more of a Mozilla question, I haven't been able to get an answer, and this definitely does impinge on Java, so, here goes...
However, while I'm able to get the built-in Java classes working, I couldn't get the following to work.
When I try to use a Berkeley DB XML class (which is in my classpath and which I can access from NetBeans without problem) in a XUL document, I get a TypeError in Firefox that XmlManager() is not a constructor:
var xmlman = new Packages.com.sleepycat.dbxml.XmlManager();
Im not quite sure I understand your first question. I've taken the liberty to translate it into: 1.1: Can a Java application/system/program easily be transformed from a Standalone Application to a Web Application? It can be transformed - wheater or not the transformation will be easy depends on the structure/design of the original system. Let the objects (Model layer) perform the work (calculations, DB access ect) instead of having the logic in the same files as the user interface (Presentation Layer).
Does this answer your query? I'll check back later.
Joined: Jul 19, 2007
Yes, that basically was my question...
But I wonder which type of Presentation Layer I should be using... Is JSP+HTML usable as the Presentation Layer in a standalone application? I'd like to be able to easily migrate not only the Java code, but also the Presentation layer.
Unfortunately, JSP requires some form of Java container (server). Each user would have to have access to the container in order for it to work. In a case where the computer was notconnected to the internet, the local computer would have to have a container like Tomcat installed to interpret the JSP tags before the user could see the results.
Joined: Jul 19, 2007
How cumbersome would it be to package some kind of "light" server with a distribution?