Thread Closed

AJAX versus JAVA

 
Share Thread Thread Tools
Feb11-08, 01:28 PM   #1
 

AJAX versus JAVA


Which one is better?

It turns out that AJAX suffers from the fact that 90% of development time is spent trying to work around intricacies of specific platforms, which is why google came up with a library that converts JAVA applets into AJAX code.

But why not stick with JAVA anyway? Can't JAVA produce a site that looks like this forum? Can't it provide all the same functionality but in different code, and much more responsively?
 
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> 'Whodunnit' of Irish potato famine solved
>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change
>> Curiosity Mars rover drills second rock target
Feb11-08, 05:55 PM   #2
 
Admin
Blog Entries: 5
You can use both together. You could certainly build a system like PF with JAVA (JSP...J2EE). AJAX is a technique rather than it's own language. The technique utilizes XML and Javascript to process a user request immediately instead of having to refresh the page. So yes you can use JAVA and AJAX together to create a system like PF.

Google likely created a library to convert applets to javascript because applets are resource hogs, have poor usability and need plugins to operate. Javascript is platform independant as well.
 
Feb11-08, 10:40 PM   #3
 
I think JAVA would much slower than AJAX for creating a forum like PF. Much slower. HTML loades much faster than a JAVA applet. But I guess applets could be designed to load faster.


AJ
 
Feb12-08, 12:51 PM   #4
 

AJAX versus JAVA


Quote by ajsingh View Post
I think JAVA would much slower than AJAX for creating a forum like PF. Much slower. HTML loades much faster than a JAVA applet. But I guess applets could be designed to load faster.
It's a different way of doing things, AJAX downloads first a lot and then interacts instantaneously, like FLASH. JAVA has the same philosopy by default.

But all JAVA applets I've seen look like FLASH graphics or windows dialog boxes, not browser text.

Anyone know if browsable forum text can be done with JAVA?
 
Feb12-08, 12:56 PM   #5
 
Admin
Blog Entries: 5
Quote by Ulysees View Post
It's a different way of doing things, AJAX downloads first a lot and then interacts instantaneously, like FLASH. JAVA has the same philosopy by default.

But all JAVA applets I've seen look like FLASH graphics or windows dialog boxes, not browser text.

Anyone know if browsable forum text can be done with JAVA?
Ulysees, did you read my post at all? You are really confused and I suggest you do some research on the technologies in general. You can't compare AJAX and JAVA. They are apples and oranges. But you can use them together to make a great smoothie . JAVA is a programming language. AJAX is a programming technique that uses javascript and xml. You can build a forum with JAVA with AJAX techniques, but you can't build a forum with just AJAX (javascript and xml).

If you want to use an applet then yes it is fairly similiar to flash. However you can easily use JAVA in the form of JSP, which is comparable to PHP, ASP, ROR, CF...
 
Feb12-08, 01:30 PM   #6
 
Quote by Greg Bernhardt View Post
Ulysees, did you read my post at all? You are really confused and I suggest you do some research on the technologies in general. You can't compare AJAX and JAVA.
Tell that to a customer who wants to offer a geographical system like google maps. It could be done, for example:

- As many pictures that are shown when you click on links in HTML

- As a WIN32 application that downloads maps into memory and shows the bit you're looking at.

Is customer allowed to compare WIN32 with plain HTML or is it apples with oranges?

I am aware of the philosophy of AJAX, which is all about using standard web things like javascript xml and asp in a way that gives instantaneous response from user input.

JAVA, I've only used as a substitute for C++ in desktop applcations, so I wonder if it can control the display of text in a browser like javascript does, that's my question.

> If you want to use an applet then yes it is fairly similiar to flash. However you can easily use JAVA in the form of JSP, which is comparable to PHP, ASP, ROR, CF...

Not sure what this parade of acronyms is saying to its users, but for me, does JSP look like physicsforums.com?

Does JSP respond instantaneously, ie you get from the server all new forum posts and show the user the topics he clicks on instantaneously?

In fact I wanted to design forum software like this. It would be super-responsive, it would be held on member's local hard disks, members would be able to ignore certain categories, etc.
 
Feb12-08, 01:50 PM   #7
 
Recognitions:
Homework Helper Homework Help
Science Advisor Science Advisor
AJAX can be compared to (client-side) Java applets or to server-side Java like J2EE. Server-side Java can be used with AJAX, or a Java applet can transfer data to a server with XML (though not AJAX per se), but that's about it.
 
Feb12-08, 02:16 PM   #8
 
Admin
Blog Entries: 5
Quote by Ulysees View Post

I am aware of the philosophy of AJAX, which is all about using standard web things like javascript xml and asp in a way that gives instantaneous response from user input.

JAVA, I've only used as a substitute for C++ in desktop applcations, so I wonder if it can control the display of text in a browser like javascript does, that's my question.

> If you want to use an applet then yes it is fairly similiar to flash. However you can easily use JAVA in the form of JSP, which is comparable to PHP, ASP, ROR, CF...

Not sure what this parade of acronyms is saying to its users, but for me, does JSP look like physicsforums.com?

Does JSP respond instantaneously, ie you get from the server all new forum posts and show the user the topics he clicks on instantaneously?
It's important you mention ASP. ASP is what you can compare to JAVA (JSP) not AJAX. You can use both ASP or JSP in conjunction with AJAX. AJAX is a client side technique (meaning you can't push data to a user) to run ASP or JSP scripts without having the user reload the page. And yes you could create a site just like PF using JSP. But since JSP is server side it will not update instantly. But you can use JSP with AJAX to update instantly. Understand?
 
Feb12-08, 02:32 PM   #9
 
Quote by Greg Bernhardt View Post
It's important you mention ASP. ASP is what you can compare to JAVA (JSP) not AJAX. You can use both ASP or JSP in conjunction with AJAX. AJAX is a client side technique (meaning you can't push data to a user) to run ASP or JSP scripts without having the user reload the page. And yes you could create a site just like PF using JSP. But since JSP is server side it will not update instantly. But you can use JSP with AJAX to update instantly. Understand?
You mention JSP scripts. Is JSP an acronym for javascript? If yes, then it's not suitable for what I want, because I want a super-responsive version of physicsforums where you only download new posts, but javascript cannot save data onto hard disk. So you'd have to reload too much every time you go to the site, in order to have fast interactive access to all topics. So what I want is like an email client for forums posts, that displays forum posts on web format.
 
Feb12-08, 02:40 PM   #10
 
Admin
Blog Entries: 5
Quote by Ulysees View Post
You mention JSP scripts. Is JSP an acronym for javascript? If yes, then it's not suitable for what I want, because I want a super-responsive version of physicsforums where you only download new posts, but javascript cannot save data onto hard disk. So you'd have to reload too much every time you go to the site, in order to have fast interactive access to all topics. So what I want is like an email client for forums posts, that displays forum posts on web format.
I see now. JSP is "Java Server Pages" and is equivalent to ASP but in Java scripting form. You're better off using a language for client application development (C++, JAVA,VB ). AJAX is Javascript btw. So in conclusion you could still use AJAX with your application development, but it still needs a server side component. So you could develop an application using JAVA, JSP and AJAX together. But now that I'm thinking, you could prolly just use regular client JAVA functions, you don't need JSP or AJAX.
 
Feb12-08, 02:46 PM   #11
 
> So in conclusion you could still use AJAX with your application development, but it still needs a server side component

How will I save messages onto client hard disk?
 
Feb12-08, 02:48 PM   #12
 
Admin
Blog Entries: 5
Quote by Ulysees View Post
> So in conclusion you could still use AJAX with your application development, but it still needs a server side component

How will I save messages onto client hard disk?
You'll have to read up on the JAVA functions. I'm sure there is a function for saving data onto the hard drive or atleast reading from an online database.
 
Feb12-08, 02:52 PM   #13
 
I tried this with javascript once, and it didn't exist, "for security reasons". Java applets, probably have the same problem, and they don't look like physicsforum.com, they look like flash.

Can't believe it is so hard to save on disk on the client side. There's got to be a way.
 
Feb12-08, 02:58 PM   #14
 
Admin
Blog Entries: 5
Quote by Ulysees View Post
I tried this with javascript once, and it didn't exist, "for security reasons". Java applets, probably have the same problem, and they don't look like physicsforum.com, they look like flash.

Can't believe it is so hard to save on disk on the client side. There's got to be a way.
Right, Javascript does not have this capability. You should look into stand-alone java programming if you don't want an applet.
 
Feb12-08, 03:02 PM   #15
 
Well the whole idea is something that works without users installing anything, just use their browser, and enjoy interactivity like that of googlemaps. Googlemaps reloads maps every time you visit, my forum has to only load each piece of data once and save it to disk (or cache?)
 
Feb12-08, 03:03 PM   #16
 
Remember JSP, ASP, PHP, all of these are what they call stateless connections. Java runs in it's JVM and can maintain state with the server, the others must make round trips to the server. To "save messages" your going to have to maintain somesort of state on the client machine. Cookies are a way, or have the server maintain a message read/not read list for each unique user. This is one of the biggest pains with web technologies. With a java applet running inside a JVM your essentially running a stand alone, statefull application that can interact with the server, and the client file system just like any other W32 app.
 
Feb12-08, 03:08 PM   #17
 
How much data can I save in cookies?
 
Thread Closed
Thread Tools


Similar Threads for: AJAX versus JAVA
Thread Forum Replies
Ajax vs. Flash Computing & Technology 10
Ajax problem Programming & Comp Sci 1
Ajax Problem Programming & Comp Sci 15
Ajax in this forum Forum Feedback & Announcements 3
Python/Perl/PHP versus Java Computing & Technology 27