Posts

Showing posts from 2011

Explain DI or IOC pattern.

A:  Dependency injection (DI) is a programming design pattern and architectural model, sometimes also referred to as inversion of control or IOC, although technically speaking, dependency injection specifically refers to an implementation of a particular form of IOC. Dependancy Injection describes the situation where one object uses a second object to provide a particular capacity. For example, being passed a database connection as an argument to the constructor instead of creating one internally. The term "Dependency injection" is a misnomer, since it is not a dependency that is injected, rather it is a provider of some capability or resource that is injected. There are three common forms of dependency injection: setter-, constructor- and interface-based injection. Dependency injection is a way to achieve loose coupling. Inversion of control (IOC) relates to the way in which an object obtains references to its dependencies. This is often done by a lookup method. The advant...

Hibernate 3.0

Image
Hibernate is a powerful, high performance object/relational persistence and query service.It is an open-source technology which fits well both with Java and .NET technologies.Hibernate lets developers write persistence classes with hibernate query features of HQL within principles of Object Oriented paradigm.It means one can include association,inheritance,polymorphism,composition and collection of these persisting objects to build applications. Hibernate Architecture The main objective of Hibernate is to relieve the developers from manual handling of SQLs,JDBC APIs for resultsets handling and it helps in keeping your data portable to various SQL databases,just by switching the delegate and driver details in hibernate.cfg.xml file . Hibernate offers sophisticated query options, you can write plain SQL, object-oriented HQL (Hibernate Query Language), or create programmatic criteria and example queries. Hibernate can optimize object loading all the time, with ...

Explain RMI Architecture?

1)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. 2)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 busin...

50 JavaScript & AJAX interview questions

1.  Why so JavaScript and Java have similar name? A.  JavaScript is a stripped-down version of Java B.  JavaScript's syntax is loosely based on Java's C.  They both originated on the island of Java D.  None of the above 2.  When a user views a page containing a JavaScript program, which machine actually executes the script? A.  The User's machine running a Web browser B.   The Web server C.  A central machine deep within Netscape's corporate offices D.  None of the above 3.  ______ JavaScript is also called client-side JavaScript. A.  Microsoft B.  Navigator C.  LiveWire D.  Native 4.  __________ JavaScript is also called server-side JavaScript. A.  Microsoft B.   Navigator C.  LiveWire D.  Native 5.  What are variables used for in JavaScript Programs? A.  Storing numbers, dates, or other values B.   ...