Skip to main content

Posts

Showing posts from January, 2011

WCF- Links

Here are some of the excellent links that would be helpful for newbies and for the experienced who are looking for a quick review. Service-oriented architecture Fundamental Windows Communication Foundation Concepts What Is Windows Communication Foundation? WCF Messaging Fundamentals WCF Security Fundamentals Bindings Intranet Application Scenarios Internet Application Scenarios WCF Security Guidelines Windows Communication Foundation Tools Service Trace Viewer Tool (SvcTraceViewer.exe) Reliable Sessions Overview Hosting and Consuming WCF Services  Hosting Windows Communication Foundation Services Hope the links prove useful.   Till Next we connect....   Happy Learning!

Microsoft Enterprise Library: Part-III

Continuing the exploration of the Enterprise library application blocks, this post will cover the Logging Application Block Logging Application Block Logging Application Block can be used to write information to a variety of locations: 1. The event log 2. An e-mail message 3. A database 4. A message queue 5. A text file 6. A Windows Management Instrumentation (WMI) event 7. Custom locations using application block extension points This link   provides the design details of logging application block. To know about what the logging application block does, refer this link When to use Logging Block: refer to this link Would it not be nice if there are pre-defined steps showing how to use this block in all the above 7 mentioned scenarios. If you answered YES, here are the steps . Feel free to play around with the above mentioned scenarios, before I come up with sample app for these. Till Next we connect Happy Learning.

Microsoft Enterprise Library: Part-II

This post is in continuation to the series started for exploring the Enterprise library here . This post will cover in detail the newly introduced Unity Application Block. Before we start the discussion there are few concepts that need to be understood for getting a good grasp of the Block. Inversion of Control (IoC): It means that objects do not create other objects on which they rely to do their work. Instead, they get the objects that they need from an outside source. Dependency Injection (DI): It means that this is done without the object intervention, usually by a framework component that passes constructor parameters and set properties. More about DI can be found here IOC is implemented using DI (Dependency injection). IOC is a principle while DI is a way of implementing IOC. In DI we have four broader ways of implementing the same: • Constructor way • Exposing setter and getter • Interface implementation • Service locator These two concepts forms the ba

Microsoft Enterprise Library:Part-I

What is Enterprise Library? Set of STANDARD libraries to extend the REUSABILITY concept. Put in simple words, the code blocks that provides a set of best practices and patterns that can be customized as per the needs. Consider writing an application where Data Access is required, you will definitely write a Data Access class. How about having a class already available to you that can be used as is or if the need be, customized easily. Microsoft has grouped all these libraries into one package and calls it Enterprise Library. Microsoft Enterprise Library 5.0 contains the following application blocks: • Caching Application Block. Developers can use this application block to incorporate a cache in their applications. Pluggable cache providers and persistent backing stores are supported. • Cryptography Application Block. Developers can use this application block to incorporate hashing and symmetric encryption in their applications. • Data Access Application Block. Developers

WCF-REST Services-Part-II

HOW REST is implemented in WCF Part-I of the series explored the REST conceptually and this post will explore how REST is implemented in WCF. For REST implementation in WCF, 2 new attributes namely WebGetAttribute and WebInvokeAttribute are introduced in WCF along with a URI template mechanism that enables you to declare the URI and verb to which each method is going to respond. The infrastructure comes in the form of a binding ( WebHttpBinding ) and a behavior ( WebHttpBehavior ) that provide the correct networking stack for using REST. Also, there is some hosting infrastructure help from a custom Service¬Host ( WebServiceHost ) and a ServiceHostFactory ( WebServiceHostFactory ). How WCF Routes messages WCF routes network messages to methods on instances of the classes defined as implementations of the service. Default behavior ( Dispatching ) for WCF is to do this routing based on the concept of action. For this dispatching to work, an action needs to be present in ev

WCF-REST Services-Part-I

What is REST? REST stands for Representational State Transfer. REST as described in MSDN, “is an architectural style that can be used to build software in which clients (user agents) can make requests of services (endpoints)”. REST is one way to implement a client-server architectural style. A service that uses the architectural style of REST is generally referred to as a RESTful service or endpoint. RESTful endpoint Building Blocks 1. Resources(What resources would the service Serve/Offer) 2. URI(Identifiers used to represent the resources) 3. HTTP Verbs (What parts of the uniform interface (HTTP verbs) are each URI going to support, like Get/Post etc.) I’ll develop a hypothetical system that will make use of these blocks in the next article, let us consider the theoretical aspects of the REST in this post. Why REST? As explained above, REST internally implements a Client/Server model that can be easily achieved by using SOAP with ASMX or WCF. Just for the discussion sake

WCF-All you need to know

WCF is a group of technologies that makes the communication among application(s) a real cake walk. The Nice Part...it's all about A.....B......C..... check out the details here Hope this link serves as an excellent resource for beginners and for experienced in need of quick review. Till Next we connect......... Happy Learning!

WPF –ElementHost

In response to WPF overview-Part-I , one of my friends and a .Net enthusiast herself, requested for details on ElementHost Class of WPF (this class gave her nightmares in not getting the Children attached to it). This might be true for many other developers who are specialized in Web Applications and  have lesser exposure to windows development. As a breather to all those folks, I am here exploring this class with sincere hopes that it will provide a good insight to the class.   ElementHost as described in MSDN is “a Windows Forms control that can be used to host a Windows Presentation Foundation (WPF) element” is located under System.Windows.Forms.Integration namespace . The members of this class have details available at this location . Why is this Class used? ElementHost control is used to place a WPF UIElement on to the Windows Forms control or form. In simple words, if a developer is using the traditional Windows forms and intends to use WPF controls, this control (class) is used

WPF Overview-Part-III

This post is in continuation to the last post. In this Post I’ll be exploring the Following two topics Routed Events Data Binding Routed Events has been covered in this post Hence this post would be covering the details of DataBinding in WPF. I definitely wanted to write about this topic, However it’s always good not to “RE-Invent ” the wheel every single time it is required. So let me provide an excellent resource here that covers all possible aspects of the Binding in WPF. This series seems to be ending abruptly and my apologies if you felt this way, but I bet after reading the above link you’ll excuse me for this.  Hope this was helpful. Till next we connect…… Happy Learning.

WPF Overview-Part-II

This post is in continuation to the last post. In this Post I’ll be exploring the Dependency Properties Dependency properties are similar to CLR properties with more advanced and complex features. The main difference between the CLR properties and dependency properties is, that the value of a normal .NET property is read directly from a private member in your class, whereas the value of a DependencyProperty is resolved dynamically when calling the GetValue() method that is inherited from DependencyObject . In case this description did not make sense, no need to worry, It will become clear by the time you reach end of this article. How the Value is Resolved in Dependency properties Every time a dependency property is accessed, it internally resolves the value by following the precedence from high to low. It checks if a local value is available, if not, check if a custom style trigger is active and I the similar manner continues until it finds a value. At last the default value is alwa

WPF Overview-Part-I

Windows presentation foundation (WPF) presents a unique paradigm that enables designers and developers to work independently and later on merge the work. This is facilitated by XAML (read more about XAML here) and the usual code behind file. WPF has a separate architecture (details here ), that needs to be understood before diving into the fancy terms like dependency properties, Bindings etc. Let us start with a quick review of Architecture.PresentationCore and Presentation Framework is the two main components that do most of the work in WPF. The Diagram below, depicts the complete architecture(This has been taken from MSDN)  There are three dlls which makes the Windows Presentation Foundation, that is WindowsBase (WindowsBase.dll), PresentationCore (PresentationCore.dll), and PresentationFoundation (PresentationFoundation.dll). First WPF component is milcore . MIL stands for Media Integration Layer . MIL is interface between DirectX and CLR (plus above layer). MILCORE is unmanaged com

WPF Routing

WPF (3.5) introduced the concept of Routing that made the event routing easies in the scenarios where it was tedious to handle events. Consider a scenario where there are a number of Hyperlinks in a Panel that direct to separate locations on Click. Now if this is done in normal programming, each hyperlink will have to have code for execution. It would be easier and cleaner if we could handle the hyperlinks in the container (the Panel) that handles the click and redirects to appropriate location. WPF handles the events with the following 3 strategies. Direct events are like ordinary .NET events. They originate in one element and don’t pass to any other. For example, MouseEnter is a direct event. Bubbling events are events that travel up the containment hierarchy. For example, MouseDown is a bubbling event. It is raised first by the element that is clicked. Next, it is raised by that element’s parent, and then by that element’s parent, and so on, until WPF reaches the top of the e

Application Design Diagramming Techniques-Part-III

Sequence Diagram Sequence diagram shows object interaction during execution (or run time). The model demonstrates the lifetime of these objects and shows the message exchange between them. The UML notations are critical in sequence diagrams. Objects are listed as rectangles at the top of the diagram with lifelines extending from them. An object lifeline is an indication of how long an object will live before it is disposed of or made ready for garbage collection. The objects themselves are described in the rectangle that sits atop this lifeline. The description that goes in the rectangle is meant to describe an instance of the class. Description is written as an Object or the Object, where the object is the name of the class or variable representing the class. The long rectangles that extend along the lifeline of each object indicate when an object is created and when it goes out of scope. The messages that pass between objects are indicated by the arrows from one lifeline to another.

Application Design Diagramming Techniques-Part-II

component diagrams  A component diagram is used to indicate the components (or code packages) that will be created for the application. A component is made up of logically related classes grouped together in a single deployable unit (consider them the DLLs or Web services). The components are represented by the rectangles that include the two smaller rectangles on their left, as depicted below. Each component name is preceded with text, indicating its logical layer, and then two colons. This text represents the components package. The outer boxes that surround the components are called nodes. All this is demonstrated in the figure below. Class Diagrams is another diagram that can be created easily using Visual Studio and id the most commonly used diagram and would not be covered here. Next post will cover Sequence Diagram. Till next we connect…… Happy Learning.

Application Design Diagramming Techniques-Part-I

This and few other subsequent posts will explore the diagrams used in designing the application in developing the Logical model for application. This post explores the ORM(Object Role Modelling)   Object Role Modeling (ORM): An ORM diagram includes the primary objects (also called entities ) in the system, the relationships between those objects, and the attributes (and even attribute values) that define those objects. ORM notation is used to create this logical representation between objects.   ORM Objects In ORM diagrams, each object is represented by an oval containing the name of that object. Simple rule to identify ORM objects: Any nouns in the requirements or use case is an ORM object ORM Relationship An ORM relationship defines how two or more objects are related to one another. In an ORM, a relationship between objects is represented as a line connecting the objects. Along this line will be a rectangle divided into segments based on the number of objects in the relationship. T

Application Designing-Requirements to Prototypes

Application design is one of the most critical part of software design..it it’s right the road ahead is a cakewalk…if not…Nightmare begins. Here I am starting a series of posts that will explore the application design processes and tools in detail Prior to application design, Requirement gathering constitutes the basic framework on which design is built. The requirements need to be analyzed from 4 perspectives to make valid requirements docs. The figure below sums up these perspectives   Here QoS is Quality of Service that also needs to be considered. Use cases also are a means of defining the requirements and sometimes serve as the main basis for application design; however there are some basic differences.   Use Cases versus Requirements A use case is a Unified Modeling Language (UML) model meant to describe a set of user steps that accomplish a task. Requirements define what must be created to satisfy the needs of the user. Together, they provide a good view of how the user sees the

Asp.Net 4.0: An Overview-Part-III

This is the last post in the series which will explore the following new features of ASP.Net 4.0  Performance Monitoring for Individual Applications in a Single Worker Process Web.config File Refactoring Permanently Redirecting a Page Expanding the Range of Allowable URLs Performance Monitoring for Individual Applications in a Single Worker Process It is a common practice to host multiple ASP.NET applications in a single worker process, In order to increase the number of Web sites that can be hosted on a single server. This practice results in difficulties for server administrators to identify an individual application that is experiencing problems. ASP.NET 4 introduces new resource-monitoring functionality introduced by the CLR. To enable this functionality, following XML configuration snippet is added to the aspnet.config configuration file.(This file is located in the directory where the .NET Framework is installed ) <?xml version="1.0" encoding="UTF-8"