Surya Namaskar - One of the Best and Easy Way to Ensure Good Health for Inner and Outer Body

Surya Namaskar (Salutation to Sun) is a Yogic Exercise and is a sequence of different Yoga Postures (asanas). It is used to worship the Surya (Sun) at the time of sun rise (can be done in evening when sun sets). It has diverse effect on all aspect of human body and the living of the human. It is very good for physical and mental health, and an easy way to ensure the good health of both outer and inner body. If one can be regular with Surya Namaskar, it can make a lot of difference in her life. Surya Namaskar can be done just for ensuring the physical health i.e. in the form of simple physical exercise. In this state, it will help to ensure a good health for body. However further it can be used as a medium for Sadhana by using asanas, pranayam, mantra and focusing on energy sources in body (sever energy chakra). It is very helpful in Sadhana (a mean to achieve something, mostly through spiritual practice).

Surya Pranam (Namaskar) is believed to be an exercise to gather the energy from Universe.

Initializing Parsley Framework and Dynamic Short Lived Objects

Parsley framework needs the configuration file for its initalization. This configuration can be written in tradition mxml file or using a xml file. Parsley API provides different configuration builders for initializing the configuration from these files, like FlexContextBuilder and XmlContextBuilder etc. So step to initialize the Parsley are:

  • Create configuration file either in mxml file or in xml file
  • Call appropraiate API by using the above file
    • FlexContextBuilder.build() or
    • XmlContextBuilder.build() etc
  • The build method will always return a context object. 
Generally we need  not to use the context object directly. Parsley itself manage the creation of objects and their relations through injection by using the declared configuration. However in some situations, we may need to interact with the API, like if we are extending the framework for some custom requirement, or for creating the application test environment etc.

Once we build the configuration, the Parsley environment is ready with the context and other configurations mentioned with configuration file. Now suppose if we are preparing a test case and want to fire the events from it so that respective command can be executed based on these events. Here the requirement is to attach the test case object to Parsley context, so that test case object gets the support of event mechanism from Parsley. The way to attach the object with Parsley is to add the object in context. 

Generally for short lived objects, we should use Dynamic Context. Dynamic Context should always be created from default context, so that it can be wired with the other application context. 

dynamicContext as DynamicContext = Context.createDynamicContext();

Now add the test object to this dynamic context. This can be done in setup of the test case. We should consider to remove the object from context after execution of the test methods. Code will be as:

dynamicContext.addObject(testCase);

Now the test case object is linked with Parsley and hence live for Parsley. Now it can participate in all life cycle events and operations of the Parsley like event firing and management.