Thursday, October 20, 2011

Obfuscation with run time behaviour

When obfuscating we will loose the mapping file changes that needs to get into the properties file and the xml file to do that with out fail

we need to capture all the dynamic behaviours at a JUNIT testcase which will fail and will alert the user that we need to find these references and change them once all obfuscation is done.

then re run the all junit again.


prahalad.das.core.Employee is mapped in XML file

Then we need to add a test case :
// This will check that we dont forget to change the Employee.hbm.xml
// before we obfuscate the code.
assertEquals( "prahalad.das.core.Employee" , Employee.class.getName( ) ) ;

Once this starts failing we check for references like "prahalad.das.core.Employee" in the whole project in all kinds of file.



Wednesday, August 10, 2011

PRAHALAD's STOCK MONITOR [Logical FORM]

Assume if we have to make a tree of logic each node ask the user what kind of analysis he would like to do for him.

Assume i am defining a plan like:
1. Apply any further if currently i have more than >1lakh cash for long term investment, then Proceed for ranking.
2. If the RSI is close 2 30 with tolerance ( + 5 or less ) give (marks 20-less marks by std deviation range 5)
3. Daily drop is more than 50% probability from daily loss (marks 150 - less marks by std deviation based on negative drops only.)
3.1. If the dispersion is not (Normally distrib) try log normal
3.1.1 then fetch results from weighted average.
4. [BROAD] If all the ranking are meet all post it for sure buy.

After all these he would be asked closing questions like
- Does this needs to follow aquision pattern.
- this would raise a violation of other plan.
- What is the action SELL/BUY and what quantity.


Now all these screen would be build manually(JEditorPane) at the local level. Once the user is being asked he would be prompted with appropriate question each panel and would follow plan according to what has been described.
If the user has exited from this logic it should be logged. it would be enabled only when requested by the use. this would be pushed to server in chunk.



PRAHALAD's STOCK MONITOR [TABLE]

Tables are categories as 3 categories :
1. Simple columns.
2. Aggregated view.
3. Pivot view.

Table data cache:
1. All Data in memory.
2. Data in memory is the visible page, rest are in db. [More than 1k rows]

Data fetching is of 2 kind:
1. Data update with out sorting.
2. Data update with variable frequency.
3. NO Data update.
4. Data update with sorting on paginate data.

To give an example where am I comming from:
Now various combination of operation that can be applied on the data. Per say i have to run my analysis over a bunch of stocks in various market then rank them according to their category with explaination of those ranking.

Once we do the ranking we also have to explain them the ranking they hold but these can happen in there own time. or on demand. or while creating these numbers i would be storing these information some where in local db.

PRAHALAD's STOCK MONITOR [FORMS]

Java Form object(XMLEncoded ) is given as input, advices are added to this, this is then rendered.

Once the form is submitted, i trap the htmlLinkLister with eventtype being FormEventType.
it validates the JavaForm Object if fails it returns back the JEditoPane with error messages.

The below code will change url to map and then map would be used to convert it back to JavaFormObject.

Areas to explore is if they work:
1. Does Radio button works well.
2. Multiple select does it work
3.

JavaForm
1. JavaFormObject real object maps 1-2 with UI.
2. Is annotated for presentation.
3. Links to the real object.
4. this is aware of the JEditorPane.
5. Advice if needed.
6. Persist or query needs to be intersepted with interface $Proxy.
7. Advice can also be added to them.


JavaFormLifeCycle
1. OnLoad(fetches master data)
2. Containing Data + not posted
3. showing data, session scope and posted
4. Containing Data + not validated

Advice/Plugin should be able to pin in advance features at any level.

NOTE:
Advice should also have global/machine advice, depending on the scope of the machine on which it is sitting.