Save info   Get password
Home Submit your blog Edit Account Rules RSS-Archive Contact


What about applets and plugins?
2007-12-07 23:12:00
Don't be too quick to dump your plugin or applet based portions of your application. While AJAX and DHTML can do drag and drop and other advanced user interfaces there still limitations especially when it comes to browser support. Plugins and applets have been around for a while and have been able to make AJAX like requests for years. Applets provide a great set of UI components and APIs that provide developers literally anything. Many people disregard applets or plugins because there is a startup time to initialize the plugin and there is no guarantee that the needed version of a plugin of JVM is installed. Plugins and applets may not be as capable of manipulating the page DOM. If you are in a uniform environment or can depend on a specific JVM or plugin version being available (such as in a corporate environment) a plugin or applet solution is great. One thing to consider is a mix of AJAX and applets or plugins. Flickr uses a combination of AJAX interactions/DHTML for labeling pictu


Why does HTML_AJAX hang on some server installs
2007-12-07 23:11:00
If you run into an HTML_AJAX problem only on some server s, chances are your running into a problem with output compression. If the output compression is handled in the PHP config we detect that and do the right thing, but if its done from an apache extension we have no way of knowing its going to compress the body. Some times setting HTML_AJAX::sendContentLength to false fixes the problem, but in other cases you'll need to disabled the extension for the AJAX pages. I've also seen problems caused by debugging extensions like XDebug, disabling the extension on the server page usually fixes that. Questions dealing with Using HTML_AJAX, and general JavaScript development .


XMLHttpRequest
2007-12-05 23:26:00
Is Ajax just another name for XMLHttpRequest?No. XMLHttpRequest is only part of the Ajax equation. XMLHttpRequest is the technical component that makes the asynchronous server communication possible; Ajax is our name for the overall approach described in the article, which relies not only on XMLHttpRequest, but on CSS, DOM, and other technologies.


client-side and server-side controllers in AJAX
2007-12-05 23:25:00
Is the server or the client in control? It depends. With AJAX the answer is more in between. Control can be more centralized in a server-side component or as a mix of client-side and server-side controllers.* Centralized server-side controller - When having a more centralized controller the key is to make sure the data in client-side page is in sync with that of the server. Some applications may keep all the state on the server and push all updates to client DOM via a simple JavaScript controller.* Client and server-side controllers - This architecture would use JavaScript to do all presentation related control, event processing, page manipulation, and rendering of model data on the client. The server-side would be responsible for things such as business logic and pushing updated model data to the client. In this case the server would not have intimate knowledge of the presentation short of the initial page that would be sent to the client page request.There are some use cases where an


Develop Ajax applications
2007-12-04 23:07:00
Are Ajax applications easier to develop than traditional web applications?Not necessarily. Ajax applications inevitably involve running complex JavaScript code on the client. Making that complex code efficient and bug-free is not a task to be taken lightly, and better development tools and frameworks will be needed to help us meet that challenge.


XSLT in an Ajax application
2007-12-04 23:06:00
Some of the Google examples you cite don't use XML at all. Do I have to use XML and/or XSLT in an Ajax application?No. XML is the most fully-developed means of getting data in and out of an Ajax client, but there's no reason you couldn't accomplish the same effects using a technology like JavaScript Object Notation or any similar means of structuring data for interchange.


How Debug JavaScript
2007-12-04 23:04:00
How do I debug JavaScript ?There are not that many tools out there that will support both client-side and server-side debugging. I am certain this will change as AJAX applications proliferate. I currently do my client-side and server-side debugging separately. Below is some information on the client-side debuggers on some of the commonly used browsers.* Firefox/Mozilla/Netscape - Have a built in debugger Venkman which can be helpful but there is a Firefox add on known as FireBug which provides all the information and AJAX developer would ever need including the ability to inspect the browser DOM, console access to the JavaScript runtime in the browser, and the ability to see the HTTP requests and responses (including those made by an XMLHttpRequest). I tend to develop my applications initially on Firefox using Firebug then venture out to the other browsers.* Safari - Has a debugger which needs to be enabled. See the Safari FAQ for details.* Internet Explorer - There is MSDN Documentatio
Read more: Debug

Does Java have support for Comet style server-side push?
2007-12-20 23:02:00
Current AJAX applications use polling to communicate changes data between the server and client. Some applications, such as chat applications, stock tickers, or score boards require more immediate notifications of updates to the client. Comet is an event based low latency server side push for AJAX applications. Comet communication keeps one of the two connections available to the browser open to continously communicate events from the server to the client. A Java based solution for Comet is being developed for Glassfish on top of the Grizzly HTTP connector. See Enabling Grizzly by Jean-Francois Arcand for more details.


What is an AJAX Portal
2007-12-17 22:47:00
A portal refers to a page that allows users to customize their own homepage by dragging and dropping widgets onto the page. This approach gives users complete control over what content they see on their Start Page, where they want to see it, and how they want to interact with it.A widget is a discrete piece on a Web page that performs a particular function and comes with its own UI and set of features. Examples of widgets include a to-do-list, an address book, a contact list, an RSS feed, or even a clock, calendar, playlist, stock ticker, weather report, traffic report, dictionary, game, or almost anything you can imagine that can be packaged up and dropped on a Web page. In a corporate environment, widgets can connect to internal systems, such as an Expense Tracker widget that interacts directly with the internal Accounting System. If you are familiar with Sharepoint Portal , then you already know about Widgets. They are called Web parts in Sharepoint's term and also in ASP.NET 2.0.P
Read more: AJAX

How do I submit a form or a part of a form without a page refresh?
2007-12-16 23:23:00
When creating a form make sure that the "form" element "onSubmit" attribute is set to a JavaScript function that returns false.on form tagonSubmit="doAJAXSubmit();return false;"input type="text"input type="submit" value="Update" You can also submit data by associating a function with a form button in a similar way.on form tagonSubmit="doAJAXSubmit();return false;"input type="text" input type="button" value="Update"Note that the form "onSubmit" attribute is still set. If the user hits the enter key in the text field the form will be submitted so you still need to handle that case. When updating the page it is recommend you wait to make sure that the AJAX update of the form data was successful before updating the data in the page. Otherwise, the data may not properly update and the user may not know. I like to provide an informative message when doing a partial update and upon a successful AJAX interaction I will then update the page.


How do I provide internationalized AJAX interactions?
2007-12-13 23:25:00
Just because you are using XML does not mean you can properly send and receive localized content using AJAX requests. To provide internationalized AJAX components you need to do the following:* Set the charset of the page to an encoding that is supported by your target languages. I tend to use UTF-8 because it covers the most languages. The following meta declaration in a HTML/JSP page will set the content type: meta equiv="Content-Type" content="text/html; charset=UTF-8"* In the page JavaScript make sure to encode any parameters sent to the server. JavaScript provides the escape() function which returns Unicode escape strings in which localized text will appear in hexadecimal format. For more details on JavaScript encoding see Comparing escape(), encodeURI(), and encodeURIComponent().* On the server-side component set the character encoding using the HttpServletRequest.setCharacterEncoding() method. Before you access the localized parameter using the HttpServletRequest.getParameter()
Read more: interactions

Is Adaptive Path selling Ajax components or trademarking the name? Where can I download it?
2007-12-13 23:24:00
Ajax isn't something you can download. It's an approach — a way of thinking about the architecture of web applications using certain technologies. Neither the Ajax name nor the approach are proprietary to Adaptive Path.
Read more: selling

Are there Usability Issues with AJAX?
2007-12-12 23:17:00
The nature of updating a page dynamically using data retrieved via AJAX interactions and DHTML may result in drastically changing the appearance and state of a page. A user might choose to use the browser's back or forward buttons, bookmark a page, copy the URL from the URL bar and share it with a friend via an email or chat client, or print a page at any given time.When designing an AJAX based application you need to consider what the expected behavior would be in the case of navigation, bookmarking, printing, and browser support as described below.* Navigation - What would be the expected behavior of the back, forward, refresh, and bookmark browser buttons in your application design. While you could implement history manipulation manually it may be easer to use a JavaScript frameworks such as Dojo that provides API's history manipulation and navigation control.* Bookmarking and URL sharing - Many users want to bookmark or cut and paste the URL from the browser bar. Dojo provides cl
Read more: Issues , Usability

Is the XMLHttpRequest object part of a W3C standard?
2007-12-11 23:14:00
No. Or not yet. It is part of the DOM Level 3 Load and Save Specification proposal.


How do I create a thread to do AJAX polling?
2007-12-11 23:12:00
JavaScript does not have threads. JavaScript functions are called when an event happens in a page such as the page is loaded, a mouse click, or a form element gains focus. You can create a timer using the setTimeout which takes a function name and time in milliseconds as arguments. You can then loop by calling the same function as can be seen in the JavaScript example below.function checkForMessage() { // start AJAX interaction with processCallback as the callback function } // callback for the requestfunction processCallback() { // do post processing setTimeout("checkForMessage()", 10000); }Notice that the checkForMessage will continue to loop indefinitely. You may want to vary the increment the interval based on activity in the page or your use cases. You may also choose to have logic that would break out of the loop based on some AJAX response processing condition.


How do we do inheritance using Atlas?
2008-02-29 23:21:00
Below is a numbered code snippet which will answer both the upper questions. Lets understand in detail the numbered sections. 1 and 2 -- This defines the interface definition. Function.abstractMethod() defines a method as abstract. 3 - We need to register the interface which is done by using registerInterface method. 4, 5 and 6 - Inheritance and Interface is defined when we register the class. registerClass has three inputs. 4th section defines the main class which needs to be registered. 5th section defines the parent class from which it will inherit. 6th section defines the interface. So clsMyCustomCustomer is the class which derives from clsCustomer and implements ICustomer interface.
Read more: Atlas

How can we create a class in JavaScript using Atlas?
2008-02-29 23:15:00
JavaScript is object based language and this a new feature which is provided by Atlas . Using Atlas you can now define class es, do inheritance, create interfaces etc in JavaScript. You can now implement all the object oriented concepts in JavaScript. So let’s understand the same with an example. Once you install the Atlas setup you will get the following JS files and a web.config file as shown in the below figure. In order to use Atlas you need to add the JS files in your project. You can see from the figure below we have added the JavaScript files and the web.config file to the project which was installed with Atlas setup. We also need to add Microsoft.Web.Atlas.dll to the project.Components.js has the class definition which we will discuss in the coming sections.Below figure has two imp
Read more: JavaScript

How do we pass parameters to the server?
2008-02-29 23:14:00
Below are the two ways of passing data to server . The first one shows by using GET and the second by POST.xmlHttpObj.open("GET","http://" + location.host + "/XmlHttpExample1/ WebForm1.aspx?value=123", true);xmlHttpObj.open("POST","http://" + location.host + "/XmlHttpExample1/ WebForm1.aspx?value=123", true);
Read more: parameters

How can we get response text?
2008-02-25 23:42:00
abort() :- This method cancels a user request.getAllResponseHeaders() :- Returns a collection of HTTP headers as string. If you want a specific header value you can use getResponseHeader("headername") open("method","URL", "async", "uname","pswd") :- This method takes a URL and other values needed for a request. You can also specify how the request is sent by GET, POST or PUT. One of the important values is how this request will be sent asynchronously or synchronously. true means that processing is carried after the send () method, without waiting for a response. false means that processing is waits for a response before continuing. send(content):- Sends a request to the server resource. setRequestHeader("label"," value") :- Sets label value pair for a HTTP header. onreadystatechange :- Thi


How do we do asynchronous processing using Ajax?
2008-02-25 23:41:00
xmlHttpObj.onreadystatechange = function1();Above is the code snippet which will help us to do asynchronous processing. So function1() will be called when the XMLHTTP request object goes to on ready state change.


How do we use XMLHttpRequest object in JavaScript?
2008-02-25 23:37:00
Below is a code snippet which shows how to use XMLHttpRequest object. In this code snippet we are sending a GET request on the local IIS. Below is the explanation of the code snippet according to the numbers specified in the code snippet.1,2,3,4 - This is like checking which is this browser and create the objects accordingly. XMLHttpRequest objects have different ways of technical implementation according to different browsers. In Internet explorer it’s an activex object but in other browsers its XMLHttpRequest. So if windows.XMLHttpRequest does not return null then we can create XMLHttpRequest object. If it returns null then we can try creating the activex object Microsoft.XMLHttp object. In case it fails probably then probably we have an older version of XML that is MSXML2. So in the e
Read more: JavaScript

What is JSON?
2008-02-24 23:51:00
JSON is a very lightweight data format based on a subset of the JavaScript syntax, namely array and object literals. JSON allows communicating with server in a standard way.JSON is used as communication notation instead of XML.var oBike = { "color" : "Green", "Speed": 200, };alert(oBike.color); //outputs "Green"alert(oBike.Speed); //outputs 200The above code creates an object bike with two properties Color and Speed.


What is the basic fundamental behind Ajax?
2008-02-24 23:51:00
XmlHttpRequest is the basic fundamental behind Ajax. This allows the browser to communicate to a back end server asynchronously.XmlHttpRequest object allows the browser to communicate with server with out making post backs.


What is Ajax?
2008-02-21 23:46:00
Ajax is a set of client side technologies that provides asynchronous communication between user interfaces and web server. So the advantages of using Ajax are asynchronous communication, minimal data transfer and server is not overloaded with unnecessary load.


What problem does Ajax solve?
2008-02-21 23:42:00
In order to answer this question first lets understand how does browser and server work when we request any website. Below figure depicts pictorially the web environment. When client sends data to the server it post backs form element data, hidden fields,images,cookie information to the server and server make the page and sends the same information back to the browser. The bad part this happens with every request and response. Below are the issues with the above model:- Unnecessary data transfers: - In the above model unnecessary data is transferred between client and server. For instance the whole page is posted and refreshed even when we want small data of the page to be refreshed. Synchronous processing: - When a user request for a page he has to wait until the complete round trip happe


Is the XMLHttpRequest object part of a W3C standard?
2008-02-13 23:19:00
No. Or not yet. It is part of the DOM Level 3 Load and Save Specification proposal.


When should I use an Java applet instead of AJAX?
2008-02-10 23:10:00
Applets provide a rich experience on the client side and there are many things they can do that an AJAX application cannot do, such as custom data streaming, graphic manipulation, threading, and advanced GUIs. While DHTML with the use of AJAX has been able to push the boundaries on what you can do on the client, there are some things that it just cannot do. The reason AJAX is so popular is that it only requires functionality built into the browser (namely DHTML and AJAX capabilities). The user does not need to download and/or configure plugins. It is easy to incrementally update functionality and know that that functionality will readily available, and there are not any complicated deployment issues. That said, AJAX-based functionality does need to take browser differences into considerati
Read more: applet

Why did you feel the need to give this a name?
2008-02-08 23:38:00
I needed something shorter than “Asynchronous JavaScript+CSS+DOM+XMLHttpRequest” to use when discussing this approach with clients.


What about applets and plugins ?
2008-02-08 23:37:00
Don't be too quick to dump your plugin or applet based portions of your application. While AJAX and DHTML can do drag and drop and other advanced user interfaces there still limitations especially when it comes to browser support. Plugins and applets have been around for a while and have been able to make AJAX like requests for years. Applets provide a great set of UI components and APIs that provide developers literally anything. Many people disregard applets or plugins because there is a startup time to initialize the plugin and there is no guarantee that the needed version of a plugin of JVM is installed. Plugins and applets may not be as capable of manipulating the page DOM. If you are in a uniform environment or can depend on a specific JVM or plugin version being available (such as i


Is Ajax a technology platform or is it an architectural style?
2008-02-07 01:24:00
It’s both. Ajax is a set of technologies being used together in a particular way.
Read more: architectural

Page 2 of 4 « < 1 2 3 4 > »
eXTReMe Tracker