Skip to main content

Posts

Spring Interview Questions

Q) What is IOC (or Dependency Injection)? A) The basic concept of the Inversion of Control pattern (also known as dependency injection) is that you do not create your objects but describe how they should be created. You don’t directly connect your components and services together in code but describe which services are needed by which components in a configuration file. A container (in the case of the Spring framework, the IOC container) is then responsible for hooking it all up. i.e., Applying IoC, objects are given their dependencies at creation time by some external entity that coordinates each object in the system. That is, dependencies are injected into objects. So, IoC means an inversion of responsibility with regard to how an object obtains references to collaborating objects. Q) What are the different types of IOC (dependency injection) ? A) There are three types of dependency injection: –> Constructor Injection : Dependencies are provided as constructor parameters. –>...

Flash Lite Application Set Up

Steps to develop an mobile application on flash lite and deploy the same on some device. Step 1: Download Adobe Flash CS4 from net step 2 : Follow the instructions to execute the Adobe flash set up. After every thing installed successfully, follow the below instructions to develop your first Flash Lite Application Hello Mobile World: Creating Your First Flash Lite Project This section contains step-by-step instructions to walk you through the creation of your first Flash Lite Project. This section assumes that you have downloaded and installed Flash CS3 Professional which includes Adobe Device Central. 1.Start Flash CS3 Professional 2.File > New > Flash File (Mobile) 3.Adobe Device Central starts up to allow you to choose the main target device 4.In the 'Device Sets' panel choose 'Flash Lite 2.1 32 240x320'. This is the generic mobile device profile provided by Adobe for a Flash Lite 2.1 device. 5.Click the 'Create' button at the bottom right of Device Ce...

Flex Component Life Cycle

Flex Component Life Cycle Flex component life cycle is useful when you want to create your own component to suit your application requirement. The entire process has been divided into three broad categories. 1. Initialization phase 2. Update Phase 3. Destruction Phase Initialization Phase: The first phase of component life cycle. Again it contains four stages. 1. construction Stage 2. Configuration Stage 3. Attachment Stage 4. Initialization Stage Construction Stage: The constructor of the component is called by the MXML component tag or by using the new operator of Action script class. This is the very first stage where the component life cycle begins. Constructor of the component calls the super () to invoke the super class constructor. Commonly we create out custom component by extending the UIComponent class, as it is base class for all display components of flex framework. The stage is used to: i) set some initial values for component properties ii) add event listener to the...

Jasypt(Java Simplified Encryption) with hibernate 3

Jasypt is a java library which allows the developer to add basic encryption capabilities to his/her projects with minimum effort, and without the need of having deep knowledge on how cryptography works. Features : Jasypt follows the RSA standards for password-based cryptography, and provides you with both unidirectional and bidirectional encryption techniques. Open API for use with any JCE provider , and not only the default Java VM one. Jasypt can be easily used with well-known providers like Bouncy Castle . Learn more . Higher security for your users' passwords . Learn more . Binary encryption support . Jasypt allows the digest and encryption of binaries (byte arrays). Encrypt your objects or files when needed (for being sent over the net, for example). Number encryption support . Besides texts and binaries, it allows the digest and encryption of numeric values (BigInteger and BigDecimal, other numeric types are supported when encrypting for Hibernate persistence). Learn more . ...

Create batch files

In DOS , OS/2 , and Microsoft Windows , a batch file is a text file containing a series of commands intended to be executed by the command interpreter . When a batch file is run, the shell program (usually COMMAND.COM or cmd.exe ) reads the file and executes its commands, normally line-by-line. Batch files are useful for running a sequence of executables automatically and are often used by system administrators to automate tedious processes. DOS batch files have the filename extension .bat . Batch files for other environments may have different extensions, e.g. .cmd or .bat in the Microsoft Windows NT -family of operating systems and OS/2, or .btm in 4DOS and related shells. The now-obsolete Windows 9x family of operating systems only recognize the .bat extension. How to create a .bat file: step1: Open the notepad either directly from run(type: notepad) or from program files>Accessories>Notepad step2: Type the required commands in that file e.g cd\ shutdown -s ex...

Java/j2ee design Pattern

Design Patterns play's a important role in development of any huge application.The basic definition of design pattern is "it stands to solve a particular problem in a well defined manner". In java the concept of design pattern is broadly divided into three types: • creational Creational patterns deal with the creation of objects and help to make a system independent of how objects are created, composed and represented. They also enable flexibility in what gets created, who creates it, how it gets created and when it gets created. • structural Structural patterns deal with how objects are arranged to form larger structures • behavioural Behavioural patterns deal with how objects interact, the ownership of responsibility and factoring code in variant and non-variant components. Pros/cons of using Design Patterns. Pros. • quality, flexibility and re-use Design Patterns capture solutions to common computing problems and represent the time, effort and experience gained from ap...