Jump to content
xisto Community

java-area

Members
  • Content Count

    45
  • Joined

  • Last visited

Everything posted by java-area

  1. I do not think it is a good idea to adopt both spellings (american and british) for so-named key words, reserved in programming languages and used by compilers -it will take additional time and resources for compilation as well as to create an additional headache for compiler producers! (I do not see such key words in C++ and Java, but I belive they can be found in other languages) However this improving can be done easy for names of constants and methods. If you want to prevent any spelling mistakes for developers (who will work with your application or package), you can create such doubled constants and methods in you source code. Really good practise! May be, it will be a starting point for improving all well-known application like IE browser etc.
  2. Are you trying to load the image with an applet from the host using a socket connection or to load the image from client's local machine?In both situations the applet must be granted to get an access to this resource! Here is a good example how to grand an access from the applet to the local system file: http://www.captain.at/programming/java//?gtnjs=1 As you can see, keytool (which is included in Sun Development Kit) is used for this.
  3. I agree with this opinion. If you want to get the first good practise of working with Html/Javascript, try to use your own stylesheets and your own script. But having some exprerience, you can start to include into your project scripts and stylesheets, created by other people. And you can start to use some additional tools, templates and automatic builders. You have to keep in mind, that every automatic builder creates a lot of additional source code. That's why you will spend a lot of additional time to understand this code. Certainly, it is much easier to modify and improve your own code or the code, that you understand well!
  4. I looked breafly and belive it is good. But I do not always have pre-installed PHP and Web servers (like Apache etc.) on my local destops/nootbook. Usually I do not use PHP (which is quite resource-consuming) in my regular work for projects, and many my frends have the same situation. So, it will be a little strange to install PHP + Apache especially for getting GUI to the small local testing database.
  5. Jackarta-Tomcat is a very good starting point for studying Web development; the distributiveis is free and quite small +there are couple of sample applications ("jsp-examples etc.), that can be simply copied, renamed and used as templates for you new Web application.On another hand,Tomcat Web Server re-starts very quickly, that's why it is a very effective for different testing purposes: I often use Tomcat for debugging and testing frontend-parts of big commercial applications:The simplient structure: HTML/Javascript on client side <- JSP/Servlets on frontend <- MySQL as datastorage.Having this structure and using Tomcat/MySQL, I can create and test any basic conception of new big application, that will be developed later for other Web servers (like WebLogic etc.)
  6. When you love your job, it always looks like an art for you. In this situation you are thinking lesser about the money and more about the quality of your job (finally it gets the money, too).On another hand, good sofrtware program has not only appropriated bussiness logic and user interface. I has also a good structure, clear specifications and descriptions, readable and effective comments in source code - it is necessary for further modifications and supporting by other people. So, good application looks really like a good book and we should make similiar efforts to build it.
  7. As a user, I do not see too big difference between menshened browsers (IE, Firefox, Opera), but I prefer to use Opera - it is better for viruses and for spy! So, I have choiced Opera in your questionnaire.But as Web programmer, I see some differences (basically, for Javascript). It creates additional headache! In my job, Opera usually is not specified to be supported from commercial application and I think, many Web application were created without testing by Opera.So, sometimes I see a message like "Your browser is not suited for viewing the current page" or a strange behavior without any messages.In such situation I am trying to Firefox for this URL address - usually, it helps.On my job in the office, I always make the version of applications for IE 6.0 and only after that I do testing with Firefox. In 90 percents of cases it works. But when it does not work, it is easy to correct with additional Javascript code.I do not remember any project on my job with requirements to support Opera.
  8. I am not scepticus and I think it is possible.Moreover, it have been already used - Sun energy is free, we can take it as much as we want! In the the time of global warning, it will great to use more energy coming from outside the Earth's sphere instead of producing additional warming on our own! The reasonable question: "Is sun energy relly free?" Certainly, there are some maintenance expenses. But I think the word "Free Enengy" means "Free source of energy". Maintenace expences will be always, I do not see any way to prevent them.
  9. local databases on PC for testing purposes.GUI should be quite simply and distributive is not too big. It should work under Windows (Linux is optional) and I am going to use it anywhere: on my home computer, on laptop, on my work machine in the office - I do not need to worry about any license limitations! Seems, I have just found an analog of SQL-Front, which is called HeidiSQL and absolutely free: http://www.heidisql.com/ Another good free database tool, which I have found: http://dbdesigner.sourceforge.net/ First of all, It is intended to creating database UML diagrams and they are amazing! (I have tested many free tools for database UML design and I am cosidering dbdesigner as the best! ) But it provides also a possibility for remote admitistaring some databases. I do not know how it works, because I am only studing this issue. Thank you very much, it sounds good! That's true. Seems, it is not great deal to create own simple GUI for database adminestering with free components (for example, in Java)And I am wondering why we are still do not have a free Eclipse perspective for this. I thought about creating such free perspective(or a small free application) on my own. But first I am going to check all existed free software in Internet to prevent creating so-named "old bicycle": in Russian it means "you are trying to invent something what have been used by people for many years!"
  10. There are a lot of different free software in Internet, but I have found only couple of free graphical tools for database adminiatration.On another hand, MySQL is free for non commercial usage. That's way it will be nice to have any good free GUI for this database.I remember the time, when one of MySQL-Front versions was for free, but now it is opened only for testing period.There is also free version of Toad, which is not full Toad, but it looks also very well -However, I am not going to use Oracle (wchich is quite expensive commercial tool) on my desktop. There will be nice to have something like MySQL-front, but for free.Are there any free Eclipse plugins, that provide a perspective for database administration?I do not know.And you?Do you know any free graphical tools for administering so-named "light" databases like Hibersonic or MySQL? How they look like on your experience?I would very appreciated for any propositions!
  11. Comment to my previous message:Div elements are used very often for creating poipup menu on the first (main) page of Web sites.But we have to keep in mind, that different browser have different Javascript systacsis for moving and hiding/showing elements on the screen.Look at documentation attentively!
  12. I think the common way to create a popup with JavaScript is using Div elements. You can simply put any Html code into the tag DIV and make this Div unvisible. For example: <body> ...... <DIV id="myTestDiv" style="left:-1000px;top:-1000px;disply:none;position:absolute;'> <table border=1> <tr> <td>Menu Item 1</td> </tr> <tr> <td>Menu Item 2</td> </tr> </table> </DIV> ..... </body> When my popup window (created as Div element) is unvisible, I do not worry about its location on the screen - it does not matter. That's way I put negative values for top and left coordinates. However, before visualing I should move it to appropriated location. It can be done by JavaScript using attribute style. For example, I can move my popup to any absolute location on current page: <script language='javascript'> function moveMyPopup() { var mypopup = document.getElementById('myTestDiv'); mypopup.style.top = '25px'; mypopup.style.left = '100px'; } </script> After moving I can do it visible: pop.style.display = ''; Or hide it again: pop.style.display = 'none';
  13. I think it is the best solution, provided by Java API - we can simply put desirable business logic of sorting into the method "Comparator::compare()". I do not any reasons to invent anything else. For example: import java.util.Comparator; public class MyItem implements Comparator { ....... public int compare(Object o1, Object o2) { // your business logic of sorting } public boolean equals(Object obj) { // see Sun comments here } } So, we can put objects of MyItem class into appropriated collections (for example, any implementation of SortedSet interface: TreeSet etc.)
  14. By the way I remember a fantastic film - it seems called "Simona", but I can be mistaken. It is a french film:One talented man, guru in programming, is invented a software application to visualize a very beautiful woman.Immediately after appearing on TV this "woman" became a superstar. Everybody believe that she is really exist!And when programmer resolved to destroy her(it), everybody thought that he killed the real woman.
  15. I think the best way to learn Javascript is to create in text editor a simpliest HTML file and save it on your local machine. For example, you can create something like: <html><script language='javascript'> function mytest() { // any javacript code for testing purpose }</script><body> <input type='button' value='Do My Test' onClick='mytest()' /></body></html> Having this you can put into the mytest() function any javascript code whatever you want -for example, you can take any part of code from the tutorials and execute immediately. For debugging purposes it is very useful to use the method Alert(). It gives a possibility to visualize any intermediate calculation results etc. I think the method Alert() can be considered like an altervative of debugging breakpoints, used in Java and C++ IDE. For example, I want to use some simple math formulas in Javascript and I found in tutorial how to do this. I am updating mytest() function: function mytest() { alert('mytest started'); var arg1 = 2; var arg1 = 3; alert('before finding result'); var res = Number(arg1) + Number(arg2); alert( res );} When I open my test page in the browser and click "Do My Test" button, I see alert message "mytest started".So, I am sure that mytest() function is correctly called by Javascript. After that I see the message "before finding result". It means, that I still di not have any errors in Javascript. But I do NOT see the message with the result of calculation. It means, I have some script errors on the line var res = Number(arg1) + Number(arg2) What is wrang??? I am looking on my code very attentiavelly and I see: variable arg2 is not declared, but used on the right side of Javascript statement because I decraled two times variable arg1!!! I correct my Javascript code: function mytest() { alert('mytest started'); var arg1 = 2; [b] var arg2 = 3;[/b] alert('before finding result'); var res = Number(arg1) + Number(arg2); alert( res );} After re-opening updated page in the browser, I see all alert messages, including the message with result "5".It means, my Javascript code is perfect and ready for using anywhere in my future job! I can add this debugged source code to any other Javascript code (with a very complicated business logic) and I can be sure it will work correctly. So, step by step (looking at tutorials and realizing immediately), I can create with Javascript any bussiness logic for my project!
  16. It works well! But there is a small truck.Lets look at Sun's tutorial: "Note : The contents of the manifest must be encoded in UTF8" (http://forums.xisto.com/no_longer_exists/) I tryed to create the manifest file (in our case - jex.mf) using different text editors and I had different results!!! When jar utility program understand the context of jex.mf, it includes the string "Main-Class: JarExample" into the new manifest file, which can be found in executable jar file. But sometimes Jar utility does not understand the text format of manifest file (jex.mf) - seems, it depends on the text editor, used for creating jex.mf. For example, I have created a new text file in Wordpad, copied the string "Main-Class: JarExample" into it and saved as jex.mf. Jar utility has successfully created executable .jar with manifest file, containing "Main-Class: JarExample" But I am not pretty sure about other text editors and formats, used for creating jex.mf. So, you need to double check manifest file in executable .jar - If it does NOT contain the string "Main-Class: JarExample", put it manually.
  17. I think what I am talking about is close to second variant and it is not so fantastic. Today, most graphics editors (like Photoshop) give a possibility to combine different images. It means, I can change sujet of a picture by adding some new objects, taken from other pictures. Also I can move objects to another locations and I can even a little change the view of objects. So, I am able to build a new picture, having existed objects (what is close to creating an image from graphical primitives). But I will be very annoyed at these manipulations, it will be better to have an intellectual tool with a high level user interface to simplify this job!!! The most interesting point is changing objects. I suppose everything can be adjusted according our preferences and it can be done by two different ways: 1. Converting analog data to digital form, changing and converting back. In principle, any visualized object on the picture can be described by the class of object-oriented language. So, it could have some many properties, that can be changed according our desires. For example, there is an original picture with a beautiful princess, who is sitting near the lake with a flower in her hand. But I want to see this princess with a knife in her hand, sitting close to superman Agent 007. So, first of all I need to change the object "Princess" and I need to change only one property of this object - the property "hand"... I know, that convertation of images from analog form to digital and back without losing of quality is a very difficult and memory-consuming. As well as very difficult to specify universal classes (with appropriated properties) to describe visualized objects. But on this forum we are talking about our desires and possibled ways of realisation of these desires! 2. Manipulations with analog data. In principle, we are able to change the object (presented in bmp format, for example) by redrawing parts of the object. These redrawings can be done using some functions, dependable on our desires. I do not have any experience of work with analog data, that's way I cannot describe how it can be done in details. ----- So, after changing frames we can start to work with animation of these frames!
  18. you can put in PATH as many pathes as you need:using semicolon separator ( ; ) in Windows or a single colon separator ( : ) in Unix example: C:\Program Files\Java\jre1.6.0_03\bin;C:\Any_Other_Path
  19. JAVA has different installation kits for different users. Many last kits (with installation instructions) can be found here: http://www.oracle.com/technetwork/java/javase/downloads/index.html But one thing is important : which kit to install? The answer depends on your needs! 1. When you are going only to run Java desktop application, you will be probably happy with minimal installation: Java Runtime Environment (JRE) 6 Take JRE installation kit according your operation system (Windows, Linus etc.). After installation, do not forget to dooble check environment variable PATH. For example, if you are installing Java on Windows in directory C:\Program Files\Java\jre1.6.0_03, environment variable PATH should contain the path C:\Program Files\Java\jre1.6.0_03\bin - windows operational environment should know location of java.exe, needed for running ANY Java program. 2. When you are going to develop Java desktop applications, you need to install more advanced kit - JDK 6. This kit includes JRE, that's way you do NOT need to install JRE separately. It is good idea to double check environment variable PATH (example, PATH=...C:\Program Files\Java\jdk1.5.0_11\bin... ), but you can also set up the environment variable JAVA_HOME, used by some Java Development Environments and by other tools (example, JAVA_HOME=C:\Program Files\Java\jdk1.5.0_11). If you do not have any Java development tools on your local machine, you can install the kit JDK 6 Update 5 with NetBeans 6.0.1. It is the same like JDK, but includes development tool NetBeans - good point to start studying Java from zero! 3. Finally, when you are going to deploy, run or develop server-based Java applications (co-named Java 2 Enterprise Edition), you need to install one of kits from here: http://www.oracle.com/technetwork/java/javaee/downloads/index.html These kits includes additional standard libraries (.jar files), needed for running Java server applications.
  20. This is only to illustrate the idea: <script language='javascript'> // XMLHttpRequest object callback function function callback() { // get current position of progress bar ( 0 .... 100 ) var pos = XMLHttpRequestObject.responseText; ..... document.getElementById('myElement1').width = pos; } </script> <table border=1> <tr> <td id='myElement1' width=0 height=15 bgcolor='blue'></td> </tr> </table>
  21. At this time AJAX is a very perspective solution for integrating with existed Web technologies.(When I use termine "Ajax", I think about HTTPRequestObject which is known is JavaScript!)How to improve performance of Web application, created by any technology?Very often we do not need to refresh all HTML tags, displayed on HTML page. We need to refresh only the part of the page. Having such possibility we can prevent many unnecessary data sendings between server and client.Traditional HTML technology did not prodive any methods for refreshing parts of page. But AJAX do this!!!As I know many new tag libraries with AJAX are appearing today. For example, in JSF and Seam.
  22. I think these two languages are not comparable, because they are intended to different things:JavaScript is a typical scripting language. JavaScript statements are executed into the browser on client side. But Java is object-oriented language for server-based- and standalone- applications as well as for applets. I agree that many statements in these languages look very similar, but they are used on different layers. However, we can compare JavaScript implementation of business logic with JSP-based implementation, becouse we have sometimes the choice how to implement the busines logic - with JavaScript or with JSP! For example, we can validate data on server side (using Java) as well as on client side (using JavaScript). If we respect security, we need to validate data on server side only. But for non-secure application, we can implement the similar bussines logic on client side, using JavaScript - this implementation will work quicklier. So, it is one of the ways to improve performance. Applet is a Java application. So, every applet contains not only its own source code, but also uses classes from different Java packages (java.lang.* etc.) Are we able to convert methods of Java classes into JavaScript functions??? Probably it is possible, but it is a very time-consumed job! I think it is not good idea to re-use source code of applets in Javascripts. It is easier to create new scripts from scratch!
  23. Nope, I absolutely do not agree. A theory is based on verified facts...One small example to illustrate my words: Euclid of Alexandria created his plane geometry, which has been successfully used by people for thousands years, in assumption of small set of axioms and he provided many other propositions from those axioms! So, to be involved in this theory we need to accept all it's fundamental "bricks" - axiomatic approaches. Everybody knows that there are only 5 main postulates of this theory. But how we can check, for example, parallel postulate having our life experience? We can only propose that this postulate is true and to look how Euclidean geometry describes the environment where we live! And we can be happy having this knowledge... or probably unhappy, if we see some facts that cannot be explained by Euclidean geometry!... If we are unhappy with Euclidean geometry, we can accept, for example, an alternative (non-Euclidean) systems of geometry where parallel postulate is replaced by a conflicting axiom. I only want to say that such practice of accepting fundamental "bricks" (axiomatic approaches), that are not always can be verifyed with our life experience, is is valid for any theory in any area!
  24. Seems, any theory is be built over some axioms. We believe in the theory only if we believe in these axioms! For my life experience, the item (which exist in 3 dimensional space and in the time) is more understandable and more obviously visible than string theory properties.
  25. Web application data (taken directly from data storage or created in the middle tier) are often presented in XML format, which looks like an universal data format on server side. However, if we want to show such data in the browser, we need to transform them to HTML format. There are two concurrent ways of doing this transformation: - XSTL transformation on server side - XML parsing on client side I have not big experience in XSLT transformation, but I have found that is not good for performance (takes lot of server resources). May be, it make sense to use for different transformations in the same program, for example: xml -> html, xml -> pdf, xml -> Excel sheets etc. But I am not pretty sure about using XSLT for transforming only to HTML code, because we can simply do the same transformation using XML parsing in JavaScript on client side. Do you think that XSLT transformation language is quite heavy and different from other script languages? I think, so. And it takes more resources, too. On another hand, any javascript scripts can be easily included into our own JSP tags... etc.. So, could someone to to describe situations, where XSLT transformation has adventages. I suppose, they should be
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.