1. What is Dijit?
Answers:
• Dijit is Dojo's git interface.
• Dijit is Dojo's interface to the jQuery
effects functions.
• Dijit is Dojo’s UI
Library.
• Dijit is Dojo's math library.
• Dijit is Dojo's AMD loader.
2. AMD is an acronym for
Answers:
• Ajax Modules Dojo
• Ajax Multiple Definition
• Asynchronous Module Dojo
• Asynchronous Module
Definition
• Asynchronous Multiple Deferred
3. lang.replace("title/{home}/{page}", {home: "dojo", page:"1.8.1.0"}) produces what result?
Answers:
• "title/dojo/{page}"
•
"title/dojo/1.8.1.0"
• "title/{home}/1.8.1.0"
• "title/{home}/{page}"
4. lang.replace("title/{home}/{page}", {home: "dojo", page:"1.8.1.0"}) produces what result?
Answers:
• "title/dojo/{page}"
•
"title/dojo/1.8.1.0"
• "title/{home}/1.8.1.0"
• "title/{home}/{page}"
5. Which module provides enhancements to native Array functions which may not be available?
Answers:
• dojo/Array
• Dojo does not provide enhancements for
array functions
• dojo/array
• dojo/_base/array
• Array
6. What does Dojo Util provide?
Answers:
• Internationalization, accessing data
stores, effects, back-button handling, etc
• Utilities specific to widgets
• XHR, AJAX, inheritance, packaging,
query, etc
• Dojo Util contains
utility scripts including build, shrink, test and documentation support
7. What does dojo/hash provide?
Answers:
• Interface to advanced data structures
• An object to store data
• Interface to the
browser's URL hash
• A hash table
8. What are the two ways to add Dijit widgets?
Answers:
• inline and included
• with style tags
• programmatically and
declaratively
• using PHP
• none of these
9. What server-side technology can Dojo work with?
Answers:
• Dojo does not work with ANY server side
technology. Web applications that use Dojo must load ALL data and content prior
to execution because once the page is loaded additional requests are
impossible.
• Dojo is a client-side,
back-end agnostic technology that can be used in conjunction with ANY
server-side technology.
• Dojo works only with Microsoft
technology and performs best with Internet Explorer, version 6.0 and earlier.
• The Java in JavaScript means that Dojo
only works with Java code, on both the client and server-side.
• Dojo works only with PHP and Java. Other
languages integrations are being developed and expect to be deployed by the end
of 2013.
10. What does dojo DojoX handle?
Answers:
• The Dijit widgets
• Foundation elements of Dojo
• Deprecated code
• Extensions and
experimental code from the Dojo team and third party
11. What are the main packages of Dojo?
Answers:
• AMD, Ajax, fX, and GUI
• desktop, tablet, and mobile
• layout, design, font, and effects
• Dojo, Dijit, DojoX, and
util
• Firefox, IE, Chrome, and Safari
12. In this code: require(["dojo/request"], function(request){ request("example.json", { handleAs: "json"}).then(function(data){ // Do something }) }); data is
Answers:
• The string "example.json".
• Undefined.
• The content of the file
example.json.
• The HTTP status code for the request.
• Inserted prior to the request.
13. When should you use a built version of Dojo?
Answers:
• You should never use a built version of
Dojo.
• A built version of Dojo eliminates the
need for public and private caching, speeding delivery with redundant requests.
• There is no build system for Dojo. The
advantages of AMD eliminate the need for builds.
• A built version of Dojo
should be used when you need to minimize the amount of code downloaded and the
number of requests made.
• The Dojo build process should only be
used for mobile device applications.
14. What does the dojo/_base/declare module contain?
Answers:
• All of these.
• dojo/_base/declare creates the site
infrastructure and language encoding.
• dojo/_base/declare
contains functions to define Dojo classes, which support standard Object
Oriented concepts within Dojo.
• dojo/_base/declare is used to explicitly
declare variables for high precision computations.
• dojo/_base/declare contains JSON
extensions to allow cross-domain request completion.
15. How do you load Dojo on your HTML page?
Answers:
• Include html.js
• Include _base.js
• Include dojo.js
• Include main.js
16. What is a dijit?
Answers:
• A type
• A framework
• A widget
• An object
17. Which code loads the dijit/form/Button module and waits until HTML has been loaded and processed?
Answers:
• try { dojo/DomReady!(); } catch (e) {
load "dijit/form/Button"; }
• (none of these)
•
(dojo/domReady!).wait(["dijit/form/Button"], function(Button) { // Do
something });
•
require(["dijit/form/Button", "dojo/domReady!"],
function(Button) { // Do something });
• when.DomReady.use
("dijit/form/Button", function(btn){ // Do something });
18. What does dom.byId() return?
Answers:
• An event handler
• Reference to the dijit
• Reference to the document
• Reference to the DOM
element
19. What does Dojo Dijit provide?
Answers:
• Internationalization, accessing data
stores, effects, back-button handling, etc
• XHR, AJAX, inheritance, packaging,
query, etc
• Extensions from Dojo team and third
party
• UI widgets
20. What is JSON?
Answers:
• JavaScript Object
Notation
• JavaScript Origin Node
• JavaScript Original Notation
• JavaScript Optimal Notation
• JavaScript Optimized Node
21. What is dojo/store?
Answers:
• dojo/store captures screen shots to
support debugging and cross-browser testing.
• dojo/store is used only on the Konquerer
browser as a shim.
• dojo/store is used for ecommerce
applications because it provides encryption within the front-end for security.
• dojo/store is an uniform
interface for the access and manipulation of stored data.
• dojo/store is used to buffer keystrokes
and mouse events to allow synchronous processing.
22. How do you import a module? (in this case dojo/query)
Answers:
• define([dojo/query], {});
• require([dojo/query], {});
• define(["dojo/query"], {});
•
require(["dojo/query"], {});
23. When we create dijits programatically rather than declaratively we must ensure to?
Answers:
• Call inherit()
• Call constructor()
• Call startup()
• Call postCreate()
24. DojoX is
Answers:
• Deprecated functions which are retained
for backwards compatibility.
• An optimized version of Dojo for
production sites which require extremely fast code.
• Cross-platform support for embedded
devices.
• DojoX is an area for
development of extensions to the Dojo toolkit.
• The next generation of Dojo, it is
available for testing as a beta distribution.
25. When does the function in require(["dojo/domReady!"], function() {}); execute?
Answers:
• After Dojo has loaded but before the DOM
is ready
• dojo/domReady! is not a valid Dojo
module
• When the DOM has
finished loading
• It will give an error since domReady was
not passed in as a parameter
26. To create a Dijit button widget, what module must be used?
Answers:
• buttonWidget
• dojo.dijit.form.Button
• Dijit/widget/Button
• Dojo/Button/Widget
• dijit/form/Button
27. To create a table with an Ajax interface to a server, you can use
Answers:
• dijit/form/Grid or dijit/form/Table
• dojox/grid/DataGrid or
dgrid
• dojox/dijit/Ajax/Table
• data/table/Grid or data/table/Ajax/Grid
• dojo/Table
28. What function handles the call back feature?
Answers:
• then()
• while()
• after()
• where()
29. What is one way to add a click handler to a button?
Answers:
• button.on.click = function(e){ // handle
event });
• on(button,
"click", function(e){ // handle event });
• function on(button, "click") {
// handle event }
• call(button, "click",
function(e) { // handle event });
30. What does registry.byId() return?
Answers:
• Reference to the element
• Reference to the dijit
• Reference to the tag
• Reference to the document
31. Which Dijit widget should be used to validate a telephone number? In this case a telephone number is defined as a string up to 16 characters, including digits, parentheses, dashes, periods, spaces and an upper or lower case x.
Answers:
• dijit/form/TelephoneValidator
•
dijit/form/ValidationTextBox
• dijit/form/PhoneTextBox
• dijit/form/NumberTextBox
• dijit/form/PhoneNumberValidator
32. How do you use dojo/query to get all elements with class "foo"?
Answers:
• query("class:foo");
• query(".foo");
• query("#foo");
• query("foo");
33. dojo/on is
Answers:
• a general-purpose event
handler module
• used to enable Dojo
• used to load Dojo
• bundled with dojo/off
• a jQuery feature which allows you to
call dojo modules
34. What does lang.getObject("foo.bar") return?
Answers:
• Value of bar nested in foo
• The bar property of foo
• The translation of foo.bar into the
current locale
• The normalized string
"foo.bar"
35. What is dojo/domReady! ?
Answers:
• dojo/domReady! is an AMD
loaded plugin that will wait until the DOM has finished loading before
returning.
• dojo/domReady! provides an audible beep
which alerts the user the page is ready for use.
• dojo/domReady! is a documentation
convention used to remind coders to include a timeout to ensure the DOM is
ready prior to execution.
• dojo/domReady! parses the DOM, applying
the Dijit widget code to the HTML, which readies the page for use.
• dojo/domReady! loads the DOM into Dojo
and fires the pageFullyLoaded event.
36. The annotation data-dojo-attach-point='foo' allows us to do what?
Answers:
• Allow the annotated DOM to be editable
• Prevent the DOM node from being changed
• Allow access to the DOM
node by the widget
• Position the DOM node on the page
37. What do dijits not offer?
Answers:
• Extensible UI controls
• Accessing data stores
• Using preexisting dijits
• Internationalisation
38. What do compliant async functions return?
Answers:
• JavaScript object
• an event
• JavaScript function
• Defered object
39. How do I query a store using complex criteria (month > 10)?
Answers:
•
dates.query(function(date){return date.getMonth() > 10});
• dates.query({month: "10"}) +
dates.query({month: "11"}) + dates.query({month: "12"})
• dates.query({month > 10});
• dates.query({month: "11"}) +
dates.query({month: "12"})
40. How is JSON-P different than JSON?
Answers:
• JSON-P is a white-space padded version
of JSON which is easier for both machines and people to read.
• JSON-P is delivered by servers which use
PHP, Perl or Python due to the technology integration with Apache.
• JSON-P uses the UTF-8P character set
which extends the data range of the encoding to transmit more information
faster.
• JSON-P works by making a
<script> element (either in HTML markup or inserted into the DOM via
JavaScript), which requests to a remote data service location.
• There is no difference.
41. What does dojo/has do?
Answers:
• Check if Dojo is already loaded
• Check the browser version
• Check if the browser
supports a feature
• Check the browser type
42. How does a function and it's call back behave?
Answers:
• Run the call back before you run the
code
• Run the function and the call back
asynchronously
• Run the function then
invoke the call back
• Run the function then run the call back
once we enter the function
43. Why should you place the script tag that loads Dojo at the end of the document body?
Answers:
• None of these answers.
• Because Dojo tests to see where the tag
used to load it from is located and will fail to execute otherwise.
• Browsers process script tags in the
document body using a faster algorithm than those in the head section.
• Because most pages have
some HTML elements which must be ready for use before Dojo can run.
• The script tag should always be in the
page header.
44. How do we access a dijit's properties?
Answers:
• Extension points
provided by the dijit
• Creating a new dijit and removing the
old one
• Accessing the dijit's DOM
• Server-side code
45. What is the _WidgetBase lifecycle?
Answers:
• constructor >
postscript > startup
• startup
• constructor > startup > postscript
• constructor > startup
46. What does lang.hitch() do?
Answers:
• Bind a function to the widget
• Concatenate two strings together
• Concatenate two JSON objects together
• Call a function in the
context of a widget
47. What is dojo/when used for?
Answers:
• Handling both async and
synchronous code
• Binding functions to dijits
• Handlling synchronous code but not async
code
• Handling async code but not synchronous
code
48. When invoking lang.mixin(y, x) what happens?
Answers:
• Sources are processed to return all
properties that are both in x and y (with y's properties 'winning')
• Sources are processed right to left so
all of y is added to x (with x's properties 'winning')
• Sources are processed to return all
properties that are not both in x and y
• Sources are processed
left to right so all of x is added to y (with y's properties 'winning')
49. How do you bind a function to response to UI events?
Answers:
• bind()
• when()
• hitch()
• on()
50. How do we define an internationalisation nls file? (denoted NLSFILE)
Answers:
• define(["dojo/i18n/NLSFILE"],
funtion(nlsFile){});
• define(["dojo/i18n./NLSFILE"],
funtion(nlsFile){});
•
define(["dojo/i18n!NLSFILE"], funtion(nlsFile){});
• define(["dojo/i18n/!NLSFILE"],
funtion(nlsFile){});
51. What does AMD provide?
Answers:
• Linear loading of dependencies that
takes into account dependencies that are already loaded
• Globally loaded dependencies
• Each module not specifying its
dependencies
• Each module specifying
its dependencies
52. What is the difference between a dijit/form/FilteringSelect and a dijit/form/ComboBox?
Answers:
• The FilteringSelect allows you to enter
a new option, one that is not listed.
• ComboBoxes are used to enter passwords
because they are more secure.
• The ComboBox allows you
to enter a new option, one that is not listed.
• There is absolutely no difference, the
ComboBox has been retained for backwards compatibility.
53. Is there a CDN for Dojo?
Answers:
• No, you must install Dojo on your
server.
• Dojo is bundled with the _Mojo_ library
on all major CDNs.
• Yes.
• You should never use a CDN with a JavaScript
library.
• Dojo is distributed on CDs which must be
purchased. N refers to the version.
54. Which Dojo module is used to make Ajax requests?
Answers:
• dojo/toServer
• dojo/fromServer
• dojo/ajax
• dojo/get
• dojo/request
55. How should Dijit widgets be styled?
Answers:
• Dijit widgets must be styled with a
DojoX Theme.
• Dijit widgets should be
styled using a Dijit Theme.
• Element specific style attributes should
be placed on the tag or in the instantiation code for every Dijit widget.
• Image overlays are used to apply Dijit
widget styling. Every widget needs an image overlay to ensure consistent
display.
• Dijit widget styling is static, you can
not change the way widgets look.
56. The build process compiles the Dojo JavaScript into Java for distribution.
Answers:
• true
• false
57. What does setting parseOnLoad to true do?
Answers:
• Skip parsing as the user will parse
selectively after the age is loaded
• Apply dojo/parser to the entire body
after the page is loaded
• Apply dojo/parse selectively to certain
DOM elements after the page is loaded
• Enable dojo to be used after the page is
loaded
No comments:
Post a Comment