Naveen M. Reddy is welcoming U.

Naveen M. Reddy is welcoming U.
Welcome to My Small World.

Monday, December 13, 2010

Partition by and Over by query to separate the single row into different columns based on the partition and over by

select st.*, rank() over(partition by st.id order by st.entr_dt, st.req_st_code) rank1from req_st st.
This is to separate a single row into different columns. This is pretty usefull.

Thursday, May 6, 2010

What is AMF? What makes flex application very fast?

BlazeDS and LCDS both support remoting over the AMF protocol.
AMF is Action Message Format.
AMF is a compact binay format, which increases the application's data
loading speed to 10 times compared with text based format protocols such as HTTP, SOAP and so on.

This AMF format is used by Flash Player for data exchange and data storage(SharedObjects).
AFM uses a compact binary format to serialize and deserialize ActionScript objects allowing you to call
and access server-side code.

This is how the Flex application is very fast compared to normal text based http and soap applications.

Flex:- BlazeDS and LCDS

We all know that Flex is developing an RIA(Rich Internet Application) application.
This flex code should be integrated with the server side code. i.e. java or php etc.
Using BlazeDS and LCDS, java and flex code can be integrated.
BlazeDS is an open source where as LCDS is costly one.
 

BlazeDS is a web application and a program that handles the all communication between java and flex application

BlazeDS enables
Invocation of remote java from a Flex application.
Translate the java objects returned from a server to corresponding ActionScript objects and vice versa.
Manages the communication channels and connection types between flex and java.
and etc.

Sunday, March 14, 2010

Flex:--> Calling a script function.





import mx.events.SliderEvent;
public function handleHS(event:SliderEvent):void{
     //trace(event.value);
     myImage.width = event.value;
}
public function handleVerticalSlider(event:SliderEvent):void{
    myImage.height = event.value;
}
]]>



When the slider is moved, change will occur and then the handleHS function will get called. This is how it is very simple calling the functions in flex.
These functions can be separated by placing them in an another file script file. This is same as separing the javascript file from the HTML page.

this change=""  attribute is for the HSlider similarly there are other attributes called click="" when the link or button is clicked. 
We can see here import statement import mx.events.SliderEvent; s This is how the class files will import when we want to use the classes of other package. Here SliderEvent is the class generated at the backend for the event of HSlider.
We can create a package structure and create a class there and import that class and use the properties of that class in this script tag and any where in other classes.
As I said, ActionScript is based on OOPS concept and we will see many other oops concept in AS.

Flex:--> Layouts and Containers.

There are good number of layouts and containers available in FlexAll layouts, containers, effects and many more components are given in http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html. Examples are also available.

Flex:--> Writing the code in Flex

Write the code in .MXML, .AS files.
When we open MXML, It can be seen in two ways, design and source. On left top corner of editor, we can switch from design view to source view and vice versa.
In designing mode we can drag and drop the components from the Components view, on to the editor. The respective code will be generated in the source.
Source view is to add the functions, to add the properties, to add the binding between the components. These can be done through the design view also. Its our choice to choose the way we want to design and write the code.
Scripting basically is added from the source view.
In the design mode, to adjust the components size or to add any other property, open Appearance view. From here the component can be modified. Click on the component on which you want to edit and change the properties in the Appearance view.

Started Flex

Started learing Flex. Its been around 9 days, started working on flex. Flex Builder is a tool to develop the applications in flex, it is exactly same as Eclipse. Actually It is developed on top of the eclipse and java reflection concepts. It is really a very nice technology to develop rich user interface(RIA).

Flex code can be written in two types of files they are MXML and ActionScipt. MXML is something like mixture of XML and HTML so there is nothing difficult in understanding this MXML. Script files can also be included using the tag , Usually we include the javascript and script files with the script tag.

It is a very powerful tool to develop good looking UI and very secure and also we can develop any type of effects like animation in MXML.

ActionScript (AS) is the main file to write logic's or handling the events or binding the data to components. This is basically an OOPS concept. Whatever we have in java almost all we have in this AS. The way we write the syntax is different but else part is almost all same.

Saturday, January 23, 2010

Query using CASE When

Recently I was assigned to a work, cold fusion reports. I was about to generate a chart report, in that, x axis as months coordinate, and y axis as counts of different types. I have never been to this type of query, now the different thing in this query is retrieving 5 columns from a 2 column table. Even I asked many of my colleagues to help me out of this query. One person helped me to do this after three days of my hard work, using CASE WHEN clause.

select mon,
       count(case when object_type = 'AUTO' then 1 end) as "AUTO",
       count(case when object_type = 'SAVNGS' then 1 end) as "SAVNGS",
       count(case when object_type = 'INMDL' then 1 end) as INMDL,
       count(case when object_type = 'CRNT' then 1 end) as CRNT
  from (select upper(to_char(objs.entr_date, 'mon')) as mon,
        (case
       when objs.object_type like 'AUTO' then 'AUTO'
       when objs.object_type like 'SAVNGS%' then 'SAVNGS'
       when objs.object_type like 'INMDL' then 'INMDL'
       when objs.object_type like 'CRNT%' then 'CRNT'
   else
    null
        end) as object_type
   from emp_detls_objs objs
   and objs.entr_date between '01-JAN-2009' and '31-DEC-2009' order by objs.entr_date
   )
 where object_type is not null
 group by mon order by to_date(mon,'mon')

Wednesday, January 20, 2010

First Project in my Career

Guys, I have completed the first project in ProKarma with the help of my manager. In this project, I have been to many new technologies like Spring, Hibernate and Wicket. And also I wrote JUnit test cases. Learned alot about the Eclipse configuration. After all, I completed the project successfully in 12 months.

Tuesday, January 19, 2010

Starting My Blog

I am a normal stupid common guy with little bit emotional and sentiment feelings.
I am from Nizamabad. Completed my schooling in Bodhan, completed my Inter in SriChaithanya, and got degree from SreeNidhi Engineering College in 2008.