Performance of Java Swing Vs Ajax ( Java Script )

We had developed application in swing which displays the data received after querying to web-service in Table and JTrees.
The current technological move is toward Ajax, It is ok that I can build this application in Ajax but not willing to go for replacment to swing.
I had following question, why should I go for Ajax over swing considering my type of application only ( beside plugins,JRE.. )?
And Peformance of Java script ( AJAX ) application over swing on following gorund?
1. Rendering of components in Swing & HTML ( browser )
2. Peformance of Java Script over Java ( CPU, Memory usage )
3. Event model in Java Script over java swing
4. Multitasking & Multithreading.
5. Storing data in variables.

The advantage of AJAX over Swing is clear, no special software is needed on a client computer other than an up to date browser.
Swing does have some advantages however in that it is much more established and there are many more tools available for developing a front end GUI application in Swing.
I have yet to find what I consider a "good" IDE for Javascript development on multiple platforms, Eg. IE, Firefox, etc...
Javascript is also not truly object oriented and that makes organizing your code and your design harder.
Performance I feel is a moot point between the two as it would hardly be noticeable, however I would guess that Javascript might have less performance than Java.

Similar Messages

  • Java/java script auto generate END Date

    Hi,
    I have a jps page with 4 fields.
    1. drop down list
    2. text box
    3. start date
    4. end date
    the problem is
    text box will allow "number of days"
    start date will get date from user on popup window
    end date has to be generate based on text box value "no of days", another filed which will retrieve from db and start date
    ex:
    if text box values is <50 and start date (user selected date) is 02-04-2010 , the end date should add 8 days from the start date.
    now the problem is calculating end date based on the start date with no of days which is given by user.
    i have spend time to write java script, but i am not able to complete the entire logic.
    please give some idea whether it can perform by java script or java bean.
    Thanks,
    Jasmin Rosline

    now the problem is calculating end date based on the start date with no of days which is given by user.
    Use the following code if you want to calculate in client side;
    <html>
    <script>
    function addVal(){
    var d = new Date(document.getElementById('dt').value);
    d.setDate(d.getDate() +eval(document.getElementById('dd').value));
    document.getElementById('result').value = (d.getMonth() +1) +"/"  + d.getDate() + "/" + d.getFullYear(); }
    </script>
    <body>
    <input type="text" id="dt" value="02/03/2011"/><br>
    <input type="text" id="dd"/><br>
    <input type="text" id="result"><br>
    <input type="button" value="add" onclick="addVal()"/>
    </body>Edited by: Pandiya on Feb 3, 2011 11:31 PM

  • How to embed/perform a Java Swing form into webased Swing form

    How to embed/perform a Java Swing form into webased Swing form or any alternative.
    Suppose i have 2 or more swing forms which are desktop applications but i want those forms to be now webbased..so how can i do this.Will i need to change the swing coding or will have to keep the swing design same.what can be the best Solution.

    You can launch your existing desktop app via the web using [Java Web Start|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp]

  • Need help with Java Script to perform a calculation in Adobe Acrobat Pro 9 form

    I have a form (test) that I am creating in Adobe Acrobat Pro 9.
    I need help creating custom Java Script so I can get the desired answer.
    1) There are several questions in each group that require a numerical answer between 0-4
    2) There is a total field set up to sum the answers from all above questions
    3) The final "score" takes the answer from Step 2 above and divides by the total possible answer
    Any help on what Java Script I need to complete this would be greatly appreciated!
    I've attached a "spreadsheet" that shows it in more detail as well as what formulas I used in Excel to get the desired end result.
    Thanks in advance.

    Have you tried the "The field is the average of:"?

  • Hp photosmart premium wireless C309 can't print after updating to IE 9 and i think java script

     hp photosmart premium wireless C309  can't print after  updating to  IE 9 and i think java script.  I am a realtor working from home and inorder to use the forms it required I update to IE9 and I think java,   this is the link.   http://www.car.org/tools/zipform6/   After doing so my printer does not work.  I tried to go on line and reinstall from a link on line but it did not work.  I don't know what to delete and what to add and how to get the " HP sSolution center" to work again.  the printer was already poor performance from day one.  Always having to unplug and restart and the black ink always runs out too quick.  but right now my concern is just being able to print and scan.  I am in the middle of a deal and can not communicate  with all parties effectively.  please help

    What error messages are you getting?
    What OS are you using?
    How is the printer connected to the computer?
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Display pop ups in the jsp by using Java script

    Hi
    can any body say ,how to display pop ups in the jsp by using Java script ?

    that's correct. You can use the below code for AJAX request.
    <script type="text/javascript">
    var httpObject = getHTTPObject();
    //create XMLHttpRequest object
    function getHTTPObject() {     
         var xmlhttp;
         if (window.XMLHttpRequest) // if Mozilla, Safari etc
              xmlhttp = new XMLHttpRequest();
         else if (window.ActiveXObject){ // if IE
              try {
                   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
              catch ( e ){
                   try{
                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                   catch ( e ){}
         return xmlhttp;
    //define the function to send the request
    function sendRequest(){
        var currDesc = document.getElementById("description").value;
        var URL =  "manageMaintAction.do"; //action mapping in your struts-config
        var queryString = "currDesc="+escape(currDesc); //get the currDesc value in your action class like request.getParameter("currDesc")
        httpObject.open( "Post", URL, true );
        httpObject.onreadystatechange = cbFn;
        httpObject.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded");
        httpObject.send(queryString);
    //callback fn
    function cbFn() {
        if (httpObject.readyState == 4)
             if (httpObject.status == 200)
              var result = httpObject.responseText;
              alert(result);
    </script>

  • Best practice for java script placement on a BC page?

    Hi guys just a general ask about where the best place for java script is on a BC page.
    I just watched the this very good video on optimization http://bcgurus.com/tutorials/how-to-do-website-performance-optimization and in it it says how you should try and load the scripts at the bottom of the page so that it loads quicker.
    now I want to do this but with it being a BC site i dont know if certain scripts have to be in the head of the doc. For instance the validate script I have? Does anyone know what I can and cant move from the head?
    I was going to do what kiyuco like to practice and add all my scripts to a content holder and then add that to my pages/templates. Will BC like me adding this to the bottom of the page and not the head?
    Thanks
    Dave

    http://forums.adobe.com/docs/DOC-2964

  • Not only does Adobe flashplayer continue to crash on my operating system (windows 7) but now java script is having issues .... what is wrong with firefox????

    for months I have checked the forums, and seen the same issues with Adobe Flash Player ... I have uninstalled and reinstalled too many times now and am totally frustrated with Firefox,. I just get it working again and Firefox updates and then I have the same issues ... and now my java script is screwing up and it never did before .... this all came after the latest update .... is anyone else having these issues or is my operating system under attack???

    Recent crashes of certain multimedia contents (this includes Youtube videos, certain flash games and other applications) in conjunction with Firefox are most probably caused by a recent Flash 11.3 update and/or a malfunctioning Real Player browser plugin.
    In order to remedy the problem, please perform the steps mentioned in these Knowledge Base articles:
    [[Flash Plugin - Keep it up to date and troubleshoot problems]]
    [[Flash 11.3 crashes]]
    [[Flash 11.3 doesn't load video in Firefox]]
    Other, more technical information about these issues can be found under these Links:
    http://forums.adobe.com/thread/1018071?tstart=0
    http://blogs.adobe.com/asset/2012/06/inside-flash-player-protected-mode-for-firefox.html
    Please tell us if this helped!

  • Java script created in Adobe Acrobat not working in Reader

    Hello,
    This is my first post, so I hope I chose the correct path for it
    Let's get to the point:
    I created a java script in Adobe Acrobat according to your tutorial page:
    search.matchCase = false;
    search.wordMatching = "BooleanQuery";
    search.bookmarks = false;
    search.query("Mytxt","Folder","../My directory");
    which I found to be working as a let's call it a relative link, beacuse, after copying my file into another folder it would still work. But when I opened the same file in Adobe Reader I got a Console message:
    Acrobat EScript Built-in Functions Version 10.0
    Acrobat SOAP 10.0
    GeneralError: Operation failed.
    Search.query:4:Link undefined:Mouse Up
    Folder does not exist
    As I mentioned before the same file does return the results of the search.query in this folder in Acrobat. Any ideas? Suggestions? What might be the problem?

    Thanks to your suggestion I started digging into the directories, so here's what's funny:
    Title Page - main folder
    Page 1 - sub folder
    Searched PDFs - sub sub folder
    I open the Title Page, then using a bookmark I open a new file in the same window: Page 1. There i have site links that allow me to perform search.query()
    And now to the funny part:
    In Acrobat:
    If I open the "Title Page" and from there go to Page 1 my directory has to be:
    ../Main Folder/Sub Folder/Sub Sub Folder
    to perform the required search
    However If I open the "Page 1" manually my directory for the same java script has to be:
    ../Sub Folder/Sub Sub Folder
    otherwise I get an error.
    Anyway
    Both don't seem to work in Reader....

  • How to refer an application item in a java script ?

    Hi Friends,
    I have a simple java script for disabling an item as below :
    <script language="JavaScript1.1" type="text/javascript">
        function disFormItems(item1)
          if ($x(item1).value != "")
              disItem = document.getElementById(item1);
                    disItem.style.background = 'beige';
                    disItem.readOnly = true;
    </script>I have an application level item G_BUTTON_FLAG. Based on the value coming into this application item I want to disable the item.
    So I went and changed the script as below :
    <script language="JavaScript1.1" type="text/javascript">
        function disFormItems(item1)
          if ($x(item1).value != "" && $x('G_BUTTON_FLAG').value == "EDIT")
              disItem = document.getElementById(item1);
                    disItem.style.background = 'beige';
                    disItem.readOnly = true;
    </script>Can any one please tell me what am I doing wrong here ?
    Thanks,
    Raj.

    Hi Teku,
    Javascript can only see what is actually on the page - this has nothing to do with Apex, it's just what javascript is designed to do.
    There are two things you can do:
    1 - Add a hidden item to your page and set the application item as its source and then refer to that hidden item instead
    2 - Use Ajax to get the value
    I'd go with the first one as it's the simplest solution.
    Andy

  • Java script with java

    sir i have seen that java 1.6 mustang version is supporrting java script
    if it is so please any one can help me on how to make my JEditorPane
    to support java script
    not only to jEditorPane but to any other swings component
    i tried in all ways please can any one give me this help

    Hello Farhan,
    The OP stated that there is no condition on the process. In this case, I believe only 'SUBMIT' will cause the process to be fired.
    "you can put anything in the string of the doSubmit."Well, you can do that, but it will have an effect only if you are using the REQUEST variable to condition a process. Otherwise, nothing will happen, and you want even receive an error message, because no error actually exist (as I believe happened with the OP case).
    Regards,
    Arie.

  • Pdf live cycle  form through sap abap editor to validate user input by java script coding

    I am new to apply a java script in a Adobe form.
    So i need of help that i have 9 page form of HR module i need to verify every blank field and wrong entry field also.
    I look around a lot of code but still i am not able to perform good validation in a Adobe form.
    I am using SAP ABAP editor where i am making through PDF Live cycle FORM & try to put java script validation on the field.
    My problem is that how can i link or configured to Adobe form.
    Here are some event are given "mouseup","validate" or more are given.So how i can do.
    i wrote the code like
    / Get the field value
    var f1 = this.getField("VORNA");----why it is not working.Some thing is wrong?
    var v1 = f1.valueAsString;
    if (v1) {
    } else {
       app.alert("Field: " + f1.name + " is blank.", 1);
    //above code is not working.
    but here we used rawValue() method it works , but it popup message  javascript with window error.
    if( this.rawValue()==' ' || this.rawValue==null)---------this works
    xfa.host.MessageBox("First name is blank!");---------this works
    "VORNA" is "First name" field name binding with this value.
    How we can linked java script file with Adobe form.
    Kindly help me

    You're mixing code for an acroform with code for an XFA form. SInce you're creating the form with LiveCycle Designer, it wold be better if you posted this to the LiveCycle Designer forum, if you haven't already.

  • Pdf live form through sap abap editor to validate user input by java script coding

    I am new to apply a java script in a Adobe form.
    So i need of help that i have 9 page form of HR module i need to verify every blank field and wrong entry field also.
    I look around a lot of code but still i am not able to perform good validation in a Adobe form.
    I am using SAP ABAP editor where i am making through PDF Live cycle FORM & try to put java script validation on the field.
    My problem is that how can i link or configured to Adobe form.
    Here are some event are given "mouseup","validate" or more are given.So how i can do.
    i wrote the code like
    / Get the field value
    var f1 = this.getField("VORNA");----why it is not working.Some thing is wrong?
    var v1 = f1.valueAsString;
    if (v1) {
    } else {
       app.alert("Field: " + f1.name + " is blank.", 1);
    //above code is not working.
    but here we used rawValue() method it works , but it popup message  javascript with window error.
    if( this.rawValue()==' ' || this.rawValue==null)---------this works
    xfa.host.MessageBox("First name is blank!");---------this works
    "VORNA" is "First name" field name binding with this value.
    How we can linked java script file with Adobe form.
    Kindly help me.

    You're mixing code for an acroform with code for an XFA form. SInce you're creating the form with LiveCycle Designer, it wold be better if you posted this to the LiveCycle Designer forum, if you haven't already.

  • URL Branch with java script  target fails, but works as button press

    I have a java script that displays a "report is loading" message when the page's submit button is pressed via the optional URL redirect attribute of the button.
    Unfortunately, I had to remove the optional URL Redirect so that I could perform some computations and processes as a result of the button press.
    I tried to put the script link in a branch attached to the button, but it failed with the following error.
    ERR-1777: Page 11 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    After the branch to the java script, there is an unconditional branch to page 11.
    Any one encounter this issue before and, if so, is there a work around?

    Hi
    Can you not use a URL redirect on the button to call your Javascript function - the Javascript will display the message you want to display, then call
    doSubmit('request_name');
    ...to submit your page, picking up all your processes/computations etc
    You then need to define a branch on your page which is conditional on the value of REQUEST - in this case request would be 'request_name'.
    regards
    Andrew
    UK

  • Java Script in PeopleSoft

    Hello Folks,
    I am new to PeopleSoft. I would like to know what are the scenarios to use Java Script in PeopleSoft (PeopleCode) and why to use java script when we have peoplecode?
    Thanks!

    Hello All,
    Peoplecode is used to perform business logic checks for your application while javascript is used for client side validation.
    So there could be situations where you can use the Peoplecode and Javascript.
    Lets take an example :
    Suppose you have feild on a peoplesoft page and the check is that the value entered in this feild should not be greater than 100.
    Using Peoplecode this check can be implemented on feild change event, Which will execute on the server and will take processing time.
    Using Javascript it can be done very fast without making any call to server.
    So its better to use javascript in this situation.
    Hope it clearifies your answer.
    I would be providing a detailed post on the same at [http://peoplesoftnet.com]
    Regards,
    Anand
    Edited by: user7391270 on Aug 16, 2009 10:50 PM

Maybe you are looking for

  • SD tax G/L account determination

    First, I am not a Finance person nor do I know a lot about tax configuration.  My background (relevant for this issue) is in S/D pricing and associated account determination.  This is an S/D tax calculation and account determination issue for the Uni

  • HT4890 How do I see what photos are in Icloud?

    How do i see what photos are in icloud? I have duplicate photos appearing in my photo library and in another folder underneath the photo library on my Iphone5.  This is killing my free space and i cant delete them from the phone because I dont have t

  • Need help on Enterprise Structure

    Hi,      I need to map the following business structure in SAP.  The business is run on Strategic Business Unit (SBU) concept.  There are 3 SBUs: Steel, Paper and Chemicals.  Each SBU has its own manufacturing plant.  There are 2 distribution channel

  • How to make a WAR File

    Hi dear i have a JSp file Now problem is that my server dosent support JSP file So i ahve to make a WAR file So can u tell me how to make a WAR file. i am using TOMCAT 5.5.9 & Orion server

  • Subquery and NVL

    Hi All, I am trying to write a query like the following. Select * from tablea where tablea.col1 IN nvl((select value from tableb),tablea.col1) Now problem comes when there are multiple rows returned by subquery at that time Nvl will fail ,also if sub