10/30/2010

A look at important J2EE Design patterns

· Session Façade – Fine-grained EJB applications are highly susceptible to
communications overhead. Session facades provide a service access layer that
hides the complexity of underlying interactions, and consolidates many logical
communications into one larger physical communication. With Entity EJB and other
complex objects, the work required to obtain and interact with such objects is
confusing. A session façade adds a layer of abstraction that masks complexity.

· MVC - The Model-View-Controller design pattern creates a decoupled data access,
data presentation and user interaction layers. The benefits are a higher degree of
maintainability because there are fewer interdependencies between components, a
higher level of reusability as components have distinct boundaries, and easier
configuration as you can implement new views without changing any underlying
code.

· Value Objects – Create a single representation of all the data that an EJB call
needs. By aggregating all of the needed data for a series of remote calls, you can
execute a single remote call instead of many remote ones increasing overall
application performance.

· Data Access Objects - Use a Data Access Object to abstract and encapsulate all
access to the data source. The Data Access Object manages the connection with the
data source to obtain and store data.

· Service Locator - Enterprise applications require the use of distributed components.
It is often a difficult and expensive task to obtain handles to components, like an
EJB’s Home interface. Instead, you can efficiently manage and obtain them through a
Service Locator that centralizes distributed object lookups. You’ll benefit by having a
single point of control and an effective attachment point for a cache.

Design patterns are only a part of the puzzle. You will also want to build a robust build
framework. With J2EE’s object oriented environment, you’ve got an increased
dependency between objects and resources. Since you don’t want to manage all of the
dependencies yourself, you’ll need the build process to track it for you. Couple this
increased complexity with multiple environments (like development, test and deploy
environments), and what seemed like a luxury quickly becomes a necessity

10/21/2010

Benefits of Basil (tulsi)

Basil or tulsi has always enjoyed an important status in Indian culture. It is classified as a herb and has numerous health benefits...

  • Basil leaves are good for preventing common cold and fever.
  • Adding two to three drops of basil leaves extract to a glass of water, and sipping it every three to four hours, will help reduce the illness.
  • Boiling basil leaves with water and sipping it will help relieve a sore throat. This solution can be used to gargle, too.
  • To reduce cholesterol levels, regularly chew freshly plucked tulsi leaves. It contains blood purifying properties and doubles up as a great mouth freshener, too.
  • Application of basil juice or its paste is on affected ar- beneficial for treating ringworm and other skin ailments.
  • To keep night blindness and sore eyes, which is caused due to deficiency of vitamin A, at bay, regularly have fresh basil leaves.
  • Problems like diarrhoea and vomiting can be reduced with consumption of basil leaves.
  • Tulsi leaves are great for maintaining and improving dental health. Powder dried leaves of basil and use it to brush your teeth. Also, to heal mouth ulcers, massage a paste of basil leaves.


10/18/2010

Mathura-Vrindavan- Kokilavan tour

Recently I visited Mathura, Vrindavan and Kokilavan. I enjoyed this blissful and spiritual tour very much. I just want to share my experience as well as some photos with you all-
Yamuna ghat
Yamuna Ghat


Nand dwar

Yamuna ghat

Rang ji

Rang ji

ISKCON

ISKCON

How to reach

Mathura is around 150 kms from Delhi. It would take around 2-3 hrs to reach there by Car. So as I did, you can visit all three places in just 2 days.
First leave in morning around 7 AM and go to Mathura straight as you can have prabhu darshans till 12 PM in noon there and after that temples will be closed. After enjoying darshans at Mathura, leave for Vrindavan in afternoon. Reaching Vrindavan, you can take your lunch and then in evening around 4 PM you can go to visit temples.
Next day morning you can continue the same and then you can leave for Kokilavan around 8 AM in the morning. Kokilavan is around 70 kms from Vrindavan and it is near Kosi where you have to take left turn for it. The road to reach there is not good but okay. There you can enjoy shani dev darshan and can then leave for delhi in next 2 hrs.

What to see
Mathura
Shri Krishna janm bhumi temple -a prison cell where Vasudev and Devaki, parents of Sri Krishna were held captive. This is the cell were Bhagwan Sri Krishna was born hence the most sacred place in world for all the followers of Bhagwan Sri Krishna.

Yamuna ghat -The sacred spot where Lord Krishna is believed to have rested after slaying the tyrant Kansa. Enjoy evening Yamuna ji ki Aarti here.

Vrindavan
Rangji- Inside is a 50-ft high wooden chariot, taken out yearly for festivals, and in the inner courtyard is the 50-ft high gold-plated pillar known as Dhwaja Stambha.

ISKCON- very unique and best place. I enjoyed here very much. Free breakfast and lunch are available here.

Bihariji temple-The best-known temple in Vrindavan, home to a Krishna idol known as Thakur-ji. The idol's eyes are said to be so powerful that it is kept hidden from view behind a curtain, which is opened and closed every few minutes.

Seva kunj-Planted with countless tulsi (holy basil) trees, this is the garden where gopis dance for Krishna at night

Kokilavan
Parikrama is just of 30 to 40 minutes around  and then you can visit different temples there but main temple is shri shani dev temple (they call it jagadguru or vallabhguru ji temple; not able to recall exact name); there you can do puja.

Where to stay
At Vrindavan, there are many guest houses where you can get room for 400-500 bucks/night.

Where to eat
At Vrindavan there are good restaurants like SAGAR RATNA, Vrinda foods where you can enjoy your meals.

What I dont like
There are manu guides and brahmans who will keep asking you for guided tours except in ISKCON. Just avoid them and be ware though they can irritate you.

10/12/2010

Motion tracking using Java

Motion Tracking
Motion tracking is the process of locating a moving object (or several ones) in time. An algorithm analyses the video frames and outputs the location of moving targets within the video frame.
The main difficulty in video tracking is to associate target locations in consecutive video frames, especially when the objects are moving fast relative to the frame rate. Here, video tracking systems usually employ a motion model which describes how the image of the target might change for different possible motions of the object to track.
The role of the tracking algorithm is to analyze the video frames in order to estimate the motion parameters. These parameters characterize the location of the target.

Libraries to Implement Motion tracking
OpenCV
It’s a relatively easy thing for computers to “see” video, but “computer vision” goes a step further, applying a wide range of techniques by which computers can begin to understand and process the content of a video input. These techniques tend toward the primitive, but they can also produce aesthetically beautiful results. The best place to start with computer vision has long been the standard library, OpenCV. A free (as in beer and freedom) library developed by Intel and with ongoing use in a variety of applications, OpenCV is a terrific, C/C++-based tool not just for things like motion tracking, but video processing in general. OpenCV gets a lot of support in the C++-based OpenFrameWorks, but that doesn’t mean Java and Processing have to be left out of the fun. (In fact, I’d still recommend starting with Processing for OpenCV, because other tasks remain easier in Java.)
For details, refer -
• http://createdigitalmotion.com/2009/02/06/processing-tutorials-getting-started-with-video-processing-via-opencv/
• http://en.wikipedia.org/wiki/OpenCV

JMyron
JMyron (aka WebcamXtra) is an external library for Processing that allows image manipulation without having to hard code everything. This is great because we can extend what we saw in the Video Library tutorial and add other aspects to it like motion tracking and color tracking. To use JMyron, you have to download the JAR and put them in the path/to/Processing/libraries folder. You must then import the library in each Processing sketch where JMyron objects will be used.
For details, refer –
• http://webcamxtra.sourceforge.net/
• http://www.silentlycrashing.net/p5/libs/jmyron/

Using JMF
The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology. This optional package, which can capture, playback, stream, and transcode multiple media formats, extends the Java 2 Platform, Standard Edition (J2SE) for multimedia developers by providing a powerful toolkit to develop scalable, cross-platform technology.
Java with JMF can be used to implement a motion detection engine.
For details, refer –
• http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JVidCap.html
• http://www.darnok.org/programming/motion-detection/

10/05/2010

Setting up Blackberry dev environment


Software Requirements

Hardware Requirements

Window XP or 2000 OS
Intel / AMD powered processor
1GB RAM
Hard Disk (40 GB)
Keyboard
Mouse

Running the Software

  1. Install JDK.
  2. Install the NetBeans to your “SELECTED DRIVE” of your machine.
  3. Install the JDE 4.7.0.
  4. In Net Beans, Select Tools > Java Platform Manager from the top navigation bar.
  5. Click the Add Platform button.
  6. Select Custom Java Micro Edition Platform Emulator. Click Next.
  7. The Platform Home should be JDE installation directory (C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0).
  8. Enter BlackBerry as Platform Name.
  9. Enter 9530 as Device Name.
  10. Keep the Preverify Command as it is.
  11. Modify the Execution and Debugger Commands as shown:
    1. Execution Command: cmd /C "cd /D {platformhome}{/}simulator&{device}"
    2. Debugger Command: cmd /C "cd /D {platformhome}{/}bin&jdwp"
Click Next.
  1. The Bootstrap Libraries panel displays a long list of jar files. Select all of the listed files except net_rim_api.jar and click Remove. Click Next.
Note: If the net_rim_api.jar is not in the list, Click the Add button, and type in or navigate to C:\Program Files\Research In Motion\blackberry JDE 4.7.0\lib\net_rim_api.jar and click Open.
Then click next.
  1. In the Sources and JavaDoc panel, click the Add button next to the JavaDoc window and type in or navigate to: C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\docs\api\. 
  1. Click Finish, and then click Close.

10/04/2010

OPD - Outsource Product Development

Tapping the global talent pool has become a pre-requisite for survival in today's competitive world. The economic and intellectual benefits of this strategy are so overwhelming that it is often referred to as the first and next generation of "global resourcing."

Outsourcing "non-core" activities to gain such economic and intellectual advantage has become an essential component of any successful business strategy. However, as an industry matures, what constitutes its "core activity" undergoes change. The global competitive market is gradually changing the core expertise of Independent Software Vendors (ISVs) from product development to product management. Independent Software Vendors (ISVs) have begun to realize the advantages in engaging global talent to augment development capabilities, right from high-end architecture designing to development and version support – all at a lower cost and within a short span of time.

Overall, the 4 corner stones of product engineering are:-

Quality – Product performance, breadth and depth of the functionality is all what the customer is concerned about. Other differentiators are competition driven
Speed – Competition is always closer than anticipated. Your time-to market needs to place you miles ahead of your nearest competitor!
Cost – While you need to retain your high quality product standards, you need them developed at the lowest cost possible
Innovation – The sole differentiation in the market is your innovation
Why Outsource Product Development?
With the software market becoming more competitive and mature, product companies are under immense pressure to periodically release new versions of existing products. In a global competitive market, ISV's efforts to achieve better time- to-market is challenged by
v  Shorter product life cycles
v  Technological obsolescence
v  Rapid advances in design and engineering technologies
v  Increasing design and engineering complexity
v  Limited reduction of product costs
v  Slowed recognition and resolution of product defects

Necessary infrastructure changes required with new technology to product development. Moreover, product development is an intensive activity that requires a lot of attention. If the management's attention is spent on the routine aspects of product development, then market analysis and marketing activities that directly impact the success of the company will not get top priority. In the long run, this will have a direct impact on the profitability of the company. If a product company is able to crash its product roadmap and release new versions earlier than planned, it could gain significantly in terms of market share and revenues. However, budgets for product development are fixed and resources are finite. So, the only way ISVs can crash their product roadmap and generate quick and improved versions of their products is to outsource product development activities to an OPD provider.

By outsourcing product development, companies are able to
v  Acquire expertise
v  Build additional resources
v  Make faster and more frequent releases
v  Minimize development costs, and above all
v  Boost up their bottom line by focusing on new competencies

Regards,
Ankit Bhatia