Feeds

Streamline your search with Yahoo! Web Services and AJAX

Google - not the only fruit

  • alert
  • submit to reddit

Maximizing your infrastructure through virtualization

One of the features of the JavaScript editor is syntax highlighting. To add syntax highlighting select Tools>Preferences and in the Preferences window Code Editor>Syntax Colors. Select JavaScript in the Language list. The Font Style, Foreground color and Background color may be set for the different JavaScript constructs in the Syntax Colors window.

JavaScript editor also provides code completion. As the JavaScript syntax varies in the different browsers we need to specify the browser for which code completion is to be implemented. Select JavaScript Editor in the Preferences window and select a Target Browser for code completion. In the JavaScript file right click and select Source>Completion Insight or Smart Completion Insight for code insight.

Another useful feature of the JavaScript editor is Go To Declaration, to navigate to or from a JavaScript variable or function. You can try this by selecting a use for the variable xmlHttpRequest and then right click and select Go To Declaration to go to the declaration of the xmlHttpRequest variable. JavaScript editor also provides brace matching and code folding.

Error underling and error audits are also helpful. Here's a simple way to test them: add an error by removing the '{' for a function declaration. An error analysis will then be run and the error underlined. Usages for a variable or function may be retrieved by selecting the variable/function and selecting Find Usages. For example, select xmlHttpRequest, right click and select Find Usages. The usages of the xmlHttpRequest variable get listed in the log window.

A JavaScript file is integrated with the Structure pane from which different variables and functions may be navigated to. JavaScript editor also provides refactoring to rename or delete a variable or function. To refactor, right click and select Refactor>Rename or Delete Safely. To add the JavaScript file to the input.jsp drag and drop the file from the Application navigator to the JSP. A <script/&gt element for the JavaScript file gets added to the JSP.

Run the AJAX web search

Next, we shall run the AJAX web application to send a query using AJAX an update the web page with the query response. Right click on input.jsp and select Run. In the web search form specify a query term and a context term. As an example, search for the term "AJAX" in the context of "web services". Click on the Submit Query button. The web page gets updated with the AJAX web service response.

More than one context terms may be specified and the number of results to be returned may also be specified. As an example specify results as five and specify context terms as "web services", "XML", and "ADF" for query term "AJAX". The specified number of web pages get displayed for the context based web search.

Conclusion

You now have the recepie for building fast and efficient web services. Contextual web search using Yahoo Web Services will help you narrow down your search results. The addition of AJAX will help reduce response times and the amount of network bandwidth consumed as the complete web page is not reposted.®

Seven Steps to Software Security

More from The Register

next story
Whoah! How many Google Play apps want to read your texts?
Google's app permissions far too lax – security firm survey
Chrome browser has been DRAINING PC batteries for YEARS
Google is only now fixing ancient, energy-sapping bug
Do YOU work at Microsoft? Um. Are you SURE about that?
Nokia and marketing types first to get the bullet, says report
Microsoft takes on Chromebook with low-cost Windows laptops
Redmond's chief salesman: We're taking 'hard' decisions
EU dons gloves, pokes Google's deals with Android mobe makers
El Reg cops a squint at investigatory letters
Big Blue Apple: IBM to sell iPads, iPhones to enterprises
iOS/2 gear loaded with apps for big biz ... uh oh BlackBerry
OpenWRT gets native IPv6 slurping in major refresh
Also faster init and a new packages system
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Top three mobile application threats
Prevent sensitive data leakage over insecure channels or stolen mobile devices.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.
Mobile application security vulnerability report
The alarming realities regarding the sheer number of applications vulnerable to attack, and the most common and easily addressable vulnerability errors.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Consolidation: the foundation for IT and business transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.