Understanding the disadvantages of using AJAX

Friday, April 25, 2008

Though Ajax delivers more responsive user interface and uses less band width over internet, understanding the disadvantages of using AJAX will help us to design better web applications.

The dynamically created page does not register itself with the browser history engine, so triggering the "Back" function of the users' browser might not bring the desired result.

Possible Solution
Using invisible IFRAMEs to invoke changes that populate the history used by a browser's back button.
Example: Google Maps - performs searches in an invisible IFRAME and then pulls results back into an element on the visible web page.

Dynamic web page updates make it difficult for a user to bookmark a particular state of the application.

Possible Solution
Use the URL fragment identifier to keep track of, and allow users to return to, the application in a given state. This is possible because many browsers allow JavaScript to update the fragment identifier of the URL dynamically, so that Ajax applications can maintain it as the user changes the application's state.

This solution also improves back-button support. It is not, however, a complete solution.


Response-time concerns

Network latency — or the interval between user request and server response — needs to be considered carefully during Ajax development. Without clear feedback to the user, preloading of data and proper handling of the XMLHttpRequest object, users might experience delays in the interface of the web application, something which they might not expect or understand. Additionally, when an entire page is rendered there is a brief moment of re-adjustment for the eye when the content changes. The lack of this re-adjustment with smaller portions of the screen changing makes the latency more apparent.

Possible Solution
Use of visual feedback (such as throbbers) to alert the user of background activity and/or preloading of content and data are often suggested solutions to these latency issues.


Search engine optimization
Websites that use Ajax to load data which should be indexed by search engines must be careful to provide equivalent Sitemaps data at a public, linked URL that the search engine can read, as search engines do not generally execute the JavaScript code required for Ajax functionality.


Reliance on JavaScript and the DOM
Ajax relies on JavaScript and the browser's Document Object Model (DOM), which are often implemented differently by different browsers or versions of a particular browser. Because of this, sites that use JavaScript may need to be tested in multiple browsers to check for compatibility issues. It's common to see JavaScript code written twice, one part for IE, another part for Mozilla compatibles, although this is less true with the release of IE7 and with the now-common use of JavaScript abstraction libraries like the Prototype JavaScript Framework or Jquery. Such libraries abstract browser-specific differences from the web developer.

Web analytics
Many web analytics solutions are based on the paradigm of a new page being loaded whenever new or updated content is displayed to the user, or to track a series of steps in a process such as a check-out. Since Ajax alters this process, care must be taken to account for how to instrument a page or a portion of a page so that it can be accurately tracked.

Possible Solution
Analytics systems which allow for the tracking of events other than a simple page view, such as the click of a button or link, are the ones most likely to be able to accommodate a site which heavily utilizes Ajax.

Read more...

Google Web Toolkit (GWT) with Jdeveloper.

Google Web Toolkit (GWT) helps Java developers create Ajax applications more productively. GWT proposes a different way to create Ajax applications. It uses Java as a single programming language for both the client and server sides. GWT provides a compiler that translates the Java code on the client side into JavaScript and DTHML. This solution greatly simplifies the technology stack from the programmer’s point of view.

Jdeveloper has provided extension (gwtDeveloper) for Google Web Toolkit (GWT). You can get it using JDeveloper's Check for Updates mechanism.

What can you do with gwtDeveloper?

  • Visually design your panels, composites, menus and other widget types
  • View, change your widget's properties using Property Inspector
  • Add event handlers to your widgets


You can find more about GWT Jdeveloper extensions at following link.http://www.gdevelop.com/


Also you can integrate GWT to Jdeveloper manually by following http://www.oracle.com/technology/pub/articles/dubois-gwt.html

Read more...

ADF online Demos

For ADF online demos refer
http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html

Read more...

Configuring JDeveloper with SQL Server

For configuring jdeveloper with MS SQL Server refer http://www.devx.com/dbzone/Article/33681/0/page/2

Read more...

How to forward to a page dynamically in ADF?

Monday, April 21, 2008

Sometimes you want to perofrm some validations and based on the result, forward to other ADF pages.

You can follow one of these following approches.

Approach I
/* Forward to page "myPage.jspx" */
FacesContext fc = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = fc.getApplication().getViewHandler().createView(fc, "/myPage.jspx");
fc.setViewRoot(viewRoot);
fc.renderResponse();

Approach II
/* Forward to the navigation rule "mypage" */
FacesContext fc = FacesContext.getCurrentInstance();
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "mypage");

Approach III
/* Redirect to page myPage.jspx */
FacesContext.getCurrentInstance().getExternalContext().redirect(/myPage.jspx);

Approach I and II preserve the processScope

Read more...

Database native Web services - A Cool feature in Oracle 11g

Tuesday, April 15, 2008

Web services have become a popular way of developing applications. Until now, creating a Web service has required hand-coding or generating the programs necessary to expose a SOAP end-point, and then deploying this code using an application server. These programs need to address all aspects of a Web service’s usage, including generating the WSDL document, parsing and processing the SOAP request, and marshaling the required data into the correct XML format to provide the SOAP response.

Database native Web services, delivered as part of Oracle Database 11g, eliminates all of this complexity for Web services that provide access to data stored in an Oracle Database. Database native Web services let you expose PL/SQL stored procedures, functions, and packages as Web services with zero coding and zero deployment effort. The database native Web services feature also includes a Web service that supports execution of dynamic SQL queries and XQuery expressions. The database HTTP server, provided as part of Oracle XML DB Repository, allows these Web services to be accessed using HTTP and HTTPS, without any additional application server infrastructure. Database native Web services leverage the powerful XML capabilities of Oracle XML DB to automatically generate the WDSL, parse and process the SOAP request, and generate the SOAP response.

A nice step-by-step artcile for using Database native Web services can be found here.

Read more...

Separating Rules from Business Processes.

Service-oriented architecture (SOA) facilitates the development of enterprise applications as modular business services that can be easily integrated and be reused. Business Process Execution Language (BPEL) enable services to be orchestrated into business processes, which can be changed easily in response to business requirements. SOA promises simplified integration and increases service reuse.

Change in Business Requirements does not always mean change in Business Process but often mean changes to the rules that drive the process.

A typical business process often includes a number of decision points. These decision points generally have an effect on the process flow; for example, someone's credit rating may determine whether he or she is approved for a low-cost loan. These decisions are evaluated based on certain conditions and facts, which may be internal or external to the business process, and predefined company policies or rules. Business rules engines (BREs) allow architects to easily define, manage, and update the decision logic that directs enterprise applications from a single location without needing to write code or change the business processes calling them.

Embeding the business rules inside the business process has savaral drawbacks.

  • Business rules change more often than the processes themselves, but changing and managing embedded business rules is a complex task beyond the abilities of most business analysts. Thus, as business rules change, programmers often have commit expensive time to this task.
  • Most organizations lack a central rules repository. Consequently, any organization-wide change in policy cannot be applied across all business processes.
  • Business processes cannot reuse rules. Hence, IT personnel end up designing rules for each and every process, often leading to inconsistency or redundancy.


The best way to avoid these problems is to separate business processes from business rules. Rules can be exposed as services and BPEL processes can leverage these services by querying the rules engine when they reach decision points.


Following Steps can be followed to use Rules along with BPEL.

  • Create rules in a ruleset.
  • Expose the ruleset as a Web service.
  • Invoke the ruleset Web service from BPEL.

Read more...

  © Blogger templates Newspaper by Ourblogtemplates.com 2008

Back to TOP