Monday, January 29, 2007

Differences Between XML and HTML

XML
User definable tags
Content driven
End tags required for well formed documents
Quotes required around attributes values
Slash required in empty tags


HTML
Defined set of tags designed for web display
Format driven
End tags not required
Quotes not required
Slash not required.




SOURCE : www.referjava.com

What is SOAP and how does it relate to XML?

The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. SOAP consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls. Unless experience with SOAP is a direct requirement for the open position, knowing the specifics of the protocol, or how it can be used in conjunction with HTTP, is not as important as identifying it as a natural application of XML.


SOURCE : www.referjava.com

What is DOM and how does it relate to XML?

The Document Object Model (DOM) is an interface specification maintained by the W3C DOM Workgroup that defines an application independent mechanism to access, parse, or update XML data. In simple terms it is a hierarchical model that allows developers to manipulate XML documents easily Any developer that has worked extensively with XML should be able to discuss the concept and use of DOM objects freely. Additionally, it is not unreasonable to expect advanced candidates to thoroughly understand its internal workings and be able to explain how DOM differs from an event-based interface like SAX.

SOURCE : www.referjava.com

typical Ajax lifecycle within the browser:

Visit: The user visits a site the usual way, i.e. by clicking on a link or typing a URL.
Initialisation The page initially loads. Callbacks are established to handle user input, a loop might be established to continously refresh page elements.
Event Loop:
Browser Event An event occurs, such as a keypress.
Server Request The browser sends a request to the server.
...Server processes the event>
Server Response A moment later, the server responds, and the response is passed into a request callback function, one that was specified when the request was issued.
Browser Update The request callback function updates the DOM, including any Javascript variables, according to the response.


SOURCE : www.referjava.com

Downsides of Ajax

Limited Capabilities: Some Ajax applications are certainly doing things people never dreamed were possible on the web, but there are still substantial restrictions of the web platform. For example: multimedia capabilities, local data storage, real-time graphics, interaction with hardware such as printers and webcams. Support for some of these are improving in recent browsers, some can be achieved by delegating to Flash, but many are simply not possible, and if required, would rule out Ajax.
Performance Concerns: Constant interaction between browser and server can make an application feel unresponsive. There are, however, quite a few well-known patterns for performance optimisation such as browser-side caching. These usually suffice, even for fast-paced applications like stock trading, but Ajax still might not work for really time-critical applications such as machine control.
Internet Access Required: The user can't access an Ajax application in the absence of a network connection.
Second Programming Language: Serious Ajax applications require some knowledge of Javascript. Many developers are discovering that Javascript is actually a more capable language than at first assumed, but there is nevertheless an imposition to use a language different to that on the server-side.
Easily Abused: As with any powerful technology, Ajax concepts can be abused by careless programmers. The patterns on this site are intended to guide developers towards more usable solutions, but the fact remains that Ajax isn't always used in a manner that supports usability.


SOURCE : www.referjava.com

Give an example of using the point-to-point model.

The point-to-point model is used when the information is specific to a single client. For example, a client can send a message for a print
out, and the server can send information back to this client after completion of the print job.

SOURCE : www.referjava.com

How does a typical client perform the communication? -

1. Use JNDI to locate administrative objects.
2. Locate a single ConnectionFactory object.

3. Locate one or more Destination objects.

4. Use the ConnectionFactory to create a JMS Connection.

5. Use the Connection to create one or more Session(s).

6. Use a Session and the Destinations to create the MessageProducers and MessageConsumers needed.

7. Perform your communication.



SOURCE : www.referjava.com

What is the Role of the JMS Provider?

The JMS provider handles security of the messages, data conversion and the client triggering. The JMS provider specifies the level of
encryption and the security level of the message, the best data type for the non-JMS client.

SOURCE : www.referjava.com

What is publish/subscribe messaging?

With publish/subscribe message passing the sending application/client establishes a named topic in the JMS broker/server and publishes messages to this queue. The receiving clients register (specifically, subscribe) via the broker to messages by topic; every subscriber to a topic receives each message published to that topic. There is a one-to-many relationship between the publishing client and the subscribing
clients.


SOURCE : www.referjava.com

What are the types of messaging?

There are two kinds of Messaging. Synchronous messaging involves a client that waits for the server to respond to a message.
Asynchronous messaging involves a client that does not wait for a message from the server. An event is used to trigger a message from a
server.

SOURCE : www.referjava.com

How may messaging models do JMS provide for and what are they?

JMS provides for two messaging models, publish-and-subscribe and point-to-point queuing.

SOURCE : www.referjava.com

What type messaging is provided by JMS

Both synchronous and asynchronous.

SOURCE : www.referjava.com

What is JMS?

Java Message Service is the new standard for interclient communication. It allows J2EE application components to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous.


SOURCE : www.referjava.com

Does RMI-IIOP support dynamic downloading of classes?

No, RMI-IIOP doesn't support dynamic downloading of the classes as it is done with CORBA in DII (Dynamic Interface Invocation).Actually RMI-IIOP combines the usability of Java Remote Method Invocation (RMI) with the interoperability of the Internet Inter-ORB Protocol (IIOP).So in order to attain this interoperability between RMI and CORBA,some of the features that are supported by RMI but not CORBA and vice versa are eliminated from the RMI-IIOP specification.


SOURCE : www.referjava.com

How many types of protocol implementations does RMI have?

RMI has at least three protocol implementations: Java Remote Method Protocol(JRMP), Internet Inter ORB Protocol(IIOP), and Jini Extensible Remote Invocation(JERI). These are alternatives, not part of the same thing, All three are indeed layer 6 protocols for those who are still speaking OSI reference model.


SOURCE : www.referjava.com

What are the services in RMI ?

An RMI "service" could well be any Java method that can be invoked remotely. The other service is the JRMP RMI naming service which is a lookup service.

SOURCE : www.referjava.com

What are the services in RMI ?

An RMI "service" could well be any Java method that can be invoked remotely. The other service is the JRMP RMI naming service which is a lookup service.

What is the difference between RMI & Corba ?

The most significant difference between RMI and CORBA is that CORBA was made specifically for interoperability across programming languages. That is CORBA fosters the notion that programs can be built to interact in multiple languages. The server could be written in C++, the business logic in Python, and the front-end written in COBOL in theory. RMI, on the other hand is a total Java solution, the interfaces, the implementations and the clients--all are written in Java.

RMI allows dynamic loading of classes at runtime. In a multi-language CORBA environment, dynamic class loading is not possible. The important advantage to dynamic class loading is that it allows arguments to be passed in remote invocations that are subtypes of the declared types. In CORBA, all types have to be known in advance. RMI (as well as RMI/IIOP) provides support for polymorphic parameter passing, whereas strict CORBA does not. CORBA does have support for multiple languages which is good for some applications, but RMI has the advantage of being dynamic, which is good for other applications.


SOURCE : www.referjava.com

Explain RMI Architecture?

RMI uses a layered architecture, each of the layers could be enhanced or replaced without affecting the rest of the system. The details of layers can be summarised as follows:


Application Layer: The client and server program
Stub & Skeleton Layer: Intercepts method calls made by the client/redirects these calls to a remote RMI service.
Remote Reference Layer: Understands how to interpret and manage references made from clients to the remote service objects.
Transport layer: Based on TCP/IP connections between machines in a network. It provides basic connectivity, as well as some firewall penetration strategies.


SOURCE : www.referjava.com

Will there be debugging mechanisms built into RMI?

RMI supports a simple call-logging facility for debugging. But there are no current plans to support a full-featured, interactive, remote debugger.


SOURCE : www.referjava.com

Does RMI require me to use an HTTP server?

No. You can set your java.rmi.server.codebase property to use any valid URL protocol, such as file or ftp. Using an HTTP server just makes your life simpler by providing an automated mechanism for class file downloading.



SOURCE : www.referjava.com