Monday, April 12, 2010

Radar Chart/Spider Web Chart-Powered by Aravind.

Radar Chart Version 1.0.




A radar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart of three or more quantitative variables represented on axes starting from the same point. The relative position and angle of the axes is typically uninformative.

In a radar chart, a point close to the center on any axis indicates a low value. A point near the edge is a high value. In the football example, we would high marks near the outside due to the nature of what was being measured. In other scenarios, you might want points near the center, or low values. When you're interpreting a radar chart, check each axis as well as the overall shape to see how well it fits your goals.

When to use it:
A radar chart shows how a team has evaluated a number of organizational performance areas. It is
therefore essential that the initial evaluation include varied perspectives to provide an overall
realistic and useful picture of performance.

Radar chart statistics:
For the radar chart, the following statistics are calculated:

Mean: the average of all the values in the series.
Maximum: the maximum value in the series.
Minimum the minimum value in the series.
Sample Size the number of values in the series.
Range the maximum value minus the minimum value.
Standard Deviation Indicates how widely data is spread around the mean


Limitations
Radar charts are primarily suited for strikingly showing outliers and commonality, or when one chart is greater in every variable than another, and primarily used for ordinal measurements – where each variable corresponds to "better" in some respect, and all variables on the same scale.

Conversely, radar charts have been criticized as poorly suited for making trade-off decisions – when one chart is greater than another on some variables, but less on others.[10]

Further, it is hard to visually compare lengths of different spokes, because radial distances are hard to judge, though concentric circles help as grid lines. Instead, one may use a simple line graph, particularly for time series.

Hi!! code is available for this.. contact: aravindbenator@gmail.com

Implementation of PRISM in silvelight application.

PRISM or Composite Application guidance/Library

Architecture:





Prism or composite application guidance library helps us to build loosely coupled silver light or WPF applications.

It mainly contains
• Library
• Reference Implementation
• Documentation.

Prizm core concepts
 Container
 Bootstrapper
 Shell
 Modules
 Views
 Services

Unity Block:

 Dependency Injection Container
 Default for Prism (can use others though)
 Main functions:
 Register – Tell Unity it is responsible for a type or object
 Resolve – Obtain an object reference from the container
 BuildUp – Inject dependencies in an existing object
 Configure – Register based on configuration info
 Many overloads / variants
 Generic and non-generic versions


Modules
• Unit of the application assembly
• Unit of development
• Unit of deployment
Bootstrapper class is a main class to initialize.In this class shell object will be created as well as module is added to modulecatalog .
This class will be inherited by UnityBootstrapper class as shown in code snippet.

 Startup code for your application
 Alternative to putting everything in the Main() method
 Well defined intialization point in your application
 Not required, but recommended








public class BootStrapper:UnityBootstrapper
{
protected override DependencyObject CreateShell()
{
Shell arv_shl = Container.Resolve();
Application.Current.RootVisual = arv_shl;
return arv_shl;
}

protected override IModuleCatalog GetModuleCatalog()
{
ModuleCatalog modcatalog = new ModuleCatalog().AddModule(typeof(MainModule.Module));
return modcatalog;




}

}

Shell is exposing region of PRISM application.It is xaml file for rendering control.

 Main window of the application
 Could be more than one
 Presented at startup (typically, could be minimized to System
Tray)
 Root element for the whole UI
 Even modular views that know nothing about the shell
 Typically knows nothing about the views that it is composed of
 Just provides a “shell” to contain them, thus the name
 May define regions for dynamic plug in of views
 May explicitly load views into containers in the UI






Output is rendered through the MainRegion(Items Control).


View and Modules


 Composite parts (Legos) of your UI
 Used to decompose your window from one big monolithic blob
into a bunch of semi-autonomous parts
 Can be defined as:
 User control
 Custom control
 WPF Data Template
 XAML Resource
 Dynamically constructed UI Element tree






View contains actual presentation xaml file, which contains all GUI. Module class is bridge between the view and bootstrapper class.



Code is as shown bellow.

public class Module:IModule
{
private readonly IRegionManager regionmanager;

public Module(IRegionManager regionManager)
{
regionmanager = regionManager;
}
public void Initialize()
{
regionmanager.RegisterViewWithRegion("MainRegion",typeof( TestModule));
}
}


View-GUI










Composit View:
 View that contains other views
 Child views may be added
 By composite view statically
 XAML declaration
 Programmatic addition
 Through regions within the composite view
 Composite view generally responsible for composing itself out of
child views
 May have some content of its own as well



This is the simplest silverlight-prism application!



Email:aravindbenator@gmail.com

Friday, April 9, 2010

WCF Endpoints[ABC]

Every communication with the windows communication foundation occurs through the endpoints of the service.
Each endpoint consists of :
A-Address indicates where the endpoint can be found.
B-Binding indicates how client can communicate with end point.
C-Contract indicates operation available.


Structure Of Endpoint:
Each endpoint consists of following
1 Address: Address identifies the endpoint and tells the consumer to location of the service. It is represnted in endpoint address class.

The endpoint address class contains:
URI-which is the address of service.
Identity-represents the security identity of the service .

Defining endpoint in configuration.



behaviorConfiguration="HelloServiceBehavior">
binding="basicHttpBinding"
contract="UE.Samples.IHello"/>

binding="mexHttpBinding"
contract="IMetadataExchange" />














Binding: Binding tells how to communicate with endpoint in service.
This includes:
The transport protocol to use (for example, TCP or HTTP).

The encoding to use for the messages (for example, text or binary).

The necessary security requirements (for example, SSL or SOAP message security).

Contracts:This outlines what the functionalities endpoint exposes to client.

What operations can be called by a client.

The form of the message.

The type of input parameters or data required to call the operation.

What type of processing or response message the client can expect.

Endpoint Addresses:
Every endpoint has an address associated with it, which is used to locate and identify the endpoint. This address consists primarily of a Uniform Resource Identifier (URI), which specifies the location of the endpoint. The endpoint address is represented in the Windows Communication Foundation (WCF) programming model by the EndpointAddress class, which contains an optional Identity property that enables the authentication of the endpoint by other endpoints that exchange messages with it, and a set of optional Headers properties, which define any other SOAP headers required to reach the service. The optional headers provide additional and more detailed addressing information to identify or interact with the service endpoint. The address of an endpoint is represented on the wire as a WS-Addressing endpoint reference (EPR).

URI Structure of an Address
The address URI for most transports has four parts. For example, the four parts of the URI http://www.fabrikam.com:322/mathservice.svc/secureEndpoint can be itemized as follows:

Scheme: http:


Machine: www.aravind.com


(optional) Port: 322


Path: /mathservice.svc/secureEndpoint


Thanks!