Archive for December, 2011

Social Media Marketing

Social media marketing is a recent component of organizations’ integrated marketing communications plans. Integrated marketing communications is a principle organizations follow to connect with their targeted markets. Integrated marketing communications coordinates the elements of the promotional mix—advertising, personal selling, public relations, publicity, direct marketing, and sales promotion—to produce a customer focused message.

In the traditional marketing communications model, the content, frequency, timing, and medium of communications by the organization is in collaboration with an external agent, i.e. advertising agencies, marketing research firms, and public relations firms. However, the growth of social media has impacted the way organizations communicate with their customers. In the emergence of Web 2.0, the internet provides a set of tools that allow people to build social and business connections, share information and collaborate on projects online.


Aspect Oriented Programming

What Is Aspect Oriented Programming?

Aspect Oriented Programming (AOP) provides the ability to intercept code execution with the purpose of inserting a process before, in place of, or after the code that would normally execute. When you consider that everything, calling a method, returning from a method, retrieving or assigning a value, handling exceptions, switching context, etc., consists of code execution, you can begin to think about how such a capability would be used. If that satisfies your curiosity, then read no further. However, this definition is so simple that the reasons behind why one would use AOP are completely lost. Be warned also that this definition speaks only to a particular implementation which, in the opinion of this author, has actually nothing to do with Aspect Oriented Software Design (or Development, the terms seem to be interchangeable even if the acronym is the same) – AOSD. Furthermore, AOSD is itself a subset of post-object programming (POP) technologies. Unfortunately, pursuing AOP and AOSD gets us quickly lost in a quagmire of bizarre terminology and custom languages and extensions. This article is intended to provide a concise understanding of not only AOP but the more general issues of AOSD. Like many of the recent paradigms intended to solve some of the problems arising with complex software development, AOSD contains gems of wisdom within the effluence of actual implementations.

Why Aspect Oriented Software Design?

The predominant reason for AOSD is to help solve the issue of messy object architectures. The proponents of AOSD claim that object oriented programming has difficulty dealing with global information. Also, functionality that requires the involvement of several different objects (possibly collected into a component) results in interdependency between those objects/components. This makes the application susceptible to the implementation changes of a dependent object/component. Maintenance and enhancement are also problems, as the interaction between these objects/components (regardless of whether the rules of interaction are coded formally or informally) are typically hard coded within the containing object. If this is confusing in itself, consider that in these statements, the terminology of AOSD to explain the reason for AOSD is specifically avoided. This is intentional so as to avoid putting the cart before the horse. Attempting to understand AOSD can be very confusing when immediately immersed in the terminology of AOSD, with no glossary in sight.

Messy object architectures occur when something that the application needs to do requires the involvement of many different objects. Given a requirement specification, Object Oriented Design (OOD) often proceeds by determining the objects that are necessary to support the requirements. The goal is to compartmentalize functionality as determined by an analysis of the requirements until sufficient abstraction occurs (among other goals of OOD). Throughout this process, the designer often loses sight of the fact that ultimately these objects are going to need to interact with each other in order to meet the requirements with actual functionality. This happens easily and subconsciously because the way requirements interact is often fundamentally different from the way objects interact. The concepts described in Design Patterns are an attempt to formally understand the issues of object interaction and to provide the designer with some well understood and supported means for solving this object interdependency problem. In fact, the primary implementation of an AOP language, that being AspectJ, relies heavily on the Observer design pattern. However, one of the criticisms made by AOSD proponents is that, beside there being too many design patterns (and ever growing), these patterns are often “designed in” too early in the design process. As a result, designs must be redone, or even worse, implementation must be reworked when a different design pattern is required. Another criticism is the interaction between design patterns and system structure. A design pattern not only influences system architecture, but is itself influenced by system architecture. As a result, the design pattern loses its modularity as it disappears in the implementation. This often affects re-usability, as the design pattern (a reusable component) and the object model (another reusable component) become integrated into a more rigid, less re-usable, component.

Personally, while I agree with the reality of this observation, I disagree that this indicates some flaw with the concept of design patterns. Rather, I feel it is indicative of incomplete requirements and analysis, a lack of education and training on the part of the designer/developer, and a poor project leadership (someone should be smarter than everyone else!). If you accept this counter argument, then it also deflates the premise that AOSD is the cure to bad object architectures. Another consideration is that none of these paradigms give any indication as to when they should be used. Many useful applications, including web-based applications (where complex object interdependencies are difficult to maintain between page refreshes), do not encounter the problems that AOSD attempts to address. AOSD (and similar paradigms) begin to be useful only when an application crosses the boundary between automating simple tasks (like a simple text editor with cut and paste and print capability) and automating complex processes made of up multiple tasks (like a word processor that provides embedded graphics, line drawing, spell checking, layout and formatting tools, collaboration, security, and integration with other applications). Where this boundary is, and when to make the shift in the design paradigm, is still an art. My experiences have taught me that the vague requirements, ill-defined use cases, and potentially limitless enhancement are indicators that I should consider these issues at the very beginning of the project and design accordingly.

 

 

 


Difference between WCF and Web Services?

In this article, I will explain the difference between ASP.NET web service and WCF services like ASP.NET web services. I will also discuss how we use both the technologies for developing the web services.

Background

Web Service in ASP.NET

A Web Service is programmable application logic accessible via standard Web protocols. One of these Web protocols is the Simple Object Access Protocol (SOAP). SOAP is a W3C submitted note (as of May 2000) that uses standards based technologies (XML for data description and HTTP for transport) to encode and transmit application data.

Consumers of a Web Service do not need to know anything about the platform, object model, or programming language used to implement the service; they only need to understand how to send and receive SOAP messages (HTTP and XML).

WCF Service

Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. An endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML, or as complex as a stream of binary data.


In what scenarios must WCF be used

  • A secure service to process business transactions.
  • A service that supplies current data to others, such as a traffic report or other monitoring service.
  • A chat service that allows two people to communicate or exchange data in real time.
  • A dashboard application that polls one or more services for data and presents it in a logical presentation.
  • Exposing a workflow implemented using Windows Workflow Foundation as a WCF service.
  • A Silverlight application to poll a service for the latest data feeds.

Features of WCF

  • Service Orientation
  • Interoperability
  • Multiple Message Patterns
  • Service Metadata
  • Data Contracts
  • Security
  • Multiple Transports and Encodings
  • Reliable and Queued Messages
  • Durable Messages
  • Transactions
  • AJAX and REST Support
  • Extensibility

Difference between Web Service in ASP.NET & WCF Service

WCF is a replacement for all earlier web service technologies from Microsoft. It also does a lot more than what is traditionally considered as “web services”.

WCF “web services” are part of a much broader spectrum of remote communication enabled through WCF. You will get a much higher degree of flexibility and portability doing things in WCF than through traditional ASMX because WCF is designed, from the ground up, to summarize all of the different distributed programming infrastructures offered by Microsoft. An endpoint in WCF can be communicated with just as easily over SOAP/XML as it can over TCP/binary and to change this medium is simply a configuration file mod. In theory, this reduces the amount of new code needed when porting or changing business needs, targets, etc.

ASMX is older than WCF, and anything ASMX can do so can WCF (and more). Basically you can see WCF as trying to logically group together all the different ways of getting two apps to communicate in the world of Microsoft; ASMX was just one of these many ways and so is now grouped under the WCF umbrella of capabilities.

Web Services can be accessed only over HTTP & it works in stateless environment, where WCF is flexible because its services can be hosted in different types of applications. Common scenarios for hosting WCF services are IIS,WAS, Self-hosting, Managed Windows Service.

The major difference is that Web Services Use

XmlSerializer

. But WCF Uses

DataContractSerializer

which is better in Performance as compared to

XmlSerializer

.

Key issues with XmlSerializer to serialize .NET types to XML

  • Only

    Public

    fields or Properties of .NET types can be translated into XML
  • Only the classes which implement

    IEnumerable

    interface
  • Classes that implement the

    IDictionary

    interface, such as Hash table cannot be serialized

Important difference between DataContractSerializer and XMLSerializer

  • A practical benefit of the design of the

    DataContractSerializer

    is better performance over

    Xmlserializer

    .
  • XML Serialization does not indicate which fields or properties of the type are serialized into XML whereas

    DataCotractSerializer


  • Explicitly shows the which fields or properties are serialized into XML
  • The

    DataContractSerializer

    can translate the

    HashTable

    into XML



Using the Code

The development of web service with ASP.NET relies on defining data and relies on the XmlSerializer to transform data to or from a service.

Key issues with XmlSerializer to serialize .NET types to XML

  • Only

    Public

    fields or Properties of .NET types can be translated into XML
  • Only the classes which implement

    IEnumerable

    interface
  • Classes that implement the

    IDictionary

    interface, such as Hash table cannot be serialized

The WCF uses the

DataContractAttribute

and

DataMemeberAttribute

to translate .NET FW types into XML.

[DataContract]
 public 
 class 
Item { [DataMember]
 public 
 string 
ItemID; [DataMember]
 public 
 decimal 
ItemQuantity; [DataMember]
 public 
 decimal 
ItemPrice;}

The

DataContractAttribute

can be applied to the class or a strcture.

DataMemberAttribute

can be applied to field or a property and theses fields or properties can be either

public

or

private

.

Important difference between

DataContractSerializer

and

XMLSerializer

.

  • A practical benefit of the design of the

    DataContractSerializer

    is better performance over XML serialization.
  • XML Serialization does not indicate which fields or properties of the type are serialized into XML whereas

    DataContractSerializer

    explicitly shows which fields or properties are serialized into XML.
  • The

    DataContractSerializer

    can translate the

    HashTable

    into XML.

Developing Service

To develop a service using ASP.NET, we must add the

WebService

attribute to the class and

WebMethodAttribute

to any of the class methods.

Example
[WebService]
 public 
 class 
Service : System.Web.Services.WebService { [WebMethod]
 public 
string Test(string strMsg) {
 return 
strMsg; } }

To develop a service in WCF, we will write the following code:

[ServiceContract]
 public 
 interface 
ITest { [OperationContract] string ShowMessage(string strMsg); }
 public 
 class 
Service : ITest {
 public 
string ShowMessage(string strMsg) {
 return 
strMsg; } }

The

ServiceContractAttribute

specifies that an interface defines a WCF service contract,


OperationContract

attribute indicates which of the methods of the interface defines the operations of the service contract.

A class that implements the service contract is referred to as a service type in WCF.

Hosting the Service

ASP.NET web services are compiled into a class library assembly and a service file with an

extension .asmx

will have the code for the service. The service file is copied into the root of the ASP.NET application and

Assembly

will be copied to the

bin

directory. The application is accessible using URL of the service file.

WCF Service can be hosted within IIS or

WindowsActivationService

.

  • Compile the service type into a class library
  • Copy the service file with an extension

    .SVC

    into a virtual directory and assembly into

    bin

    sub directory of the virtual directory.
  • Copy the

    web.config

    file into the virtual directory.

Client Development

Clients for the ASP.NET Web services are generated using the command-line tool

WSDL.EXE

.

WCF uses the

ServiceMetadata

tool (

svcutil.exe

) to generate the client for the service.

Message Representation

The Header of the SOAP Message can be customized in ASP.NET Web service.

WCF provides attributes

MessageContractAttribute

,

MessageHeaderAttribute

and

MessageBodyMemberAttribute

to describe the structure of the SOAP Message.

Service Description

Issuing a HTTP

GET

Request with query WSDL causes ASP.NET to generate WSDL to describe the service. It returns the WSDL as a response to the request.

The generated WSDL can be customized by deriving the class of

ServiceDescriptionFormatExtension

.

Issuing a Request with the query WSDL for the

.svc

file generates the WSDL. The WSDL that generated by WCF can be customized by using

ServiceMetadataBehavior

class.

Exception Handling

In ASP.NET Web services, unhandled exceptions are returned to the client as SOAP faults.

In WCF Services, unhandled exceptions are not returned to clients as SOAP faults. A configuration setting is provided to have the unhandled exceptions returned to clients for the purpose of debugging.

 

Special thanks to Yatin V Patil


Blog Marketing

BLOG MARKETING

Blog marketing is the term used to describe internet marketing via web blogs. These blogs differ from corporate websites because they feature daily or weekly posts, often around a single topic. Typically, corporations use blogs to create a dialog with customers and explain features of their products and services.

Many organizations use blogs with their user community. This allows them to share and preview product features, functions, and benefits before the products are released. Blogs are an excellent way to gather feedback and to make sure products meet the needs of users. Blogs have become the next generation marketing tool to corporate websites which merely post collateral and do not provide any interactive feedback. Blogs are also supplementary to a User Group. User Groups happen annually for example while blogs provide users constant daily and weekly feedback.

Blogs are Basic websites which are updated Regularly. They act as a Private news interface for any Company / Website. With regular updates being handled by the company executive team, product marketing, and product strategy teams. The need for fresh content on the web makes the Blogs a preferred destination for Resources. Blogs have been focused as a primary platform for Marketing since the early 2006.


ONLINE MARKET RESEARCH

In addition to identifying potential areas for growth, online market research can help a company learn more about its target consumers. For example, if consumers purchase a certain type of product and then return to purchase accessories, that is a specific type of consumer behavior that can be measured. The information gathered from doing an online market research study is helpful to track this type of behavior.

An online marketing research study can be conducted by the company itself, or the company may choose to hire an outside company to manage this. How and by what method a company decides to conduct a market research plan is dependent upon how objective or anonymous the company wishes to remain. An online marketing research program can include any number of methodologies.

Some companies may use a direct method, by which a survey is sent out to existing customers to determine satisfaction levels and gather feedback. A company may also contact consumers and gather information from a specific demographic, such as an age group, or a specific geographic region. Companies may also use a “blind” method, by which a random sample of the population is contacted for opinions online.


JavaScript Debugging Using IE

Introduction

Anyone who has done some work with JavaScript knows it can be very frustrating. Often you have to use:

Alert("I am here");
type of code to debug it. Visual Studio and IE (Internet Explorer) have the ability to debug
JavaScript code, including setting break points in your JavaScript.

Background

When I started working in .NET, I was a VB.NET Windows programmer. When I started to use ASP.NET, the need to use JavaScript started to come up. It was easy for me to make mistakes in my JavaScript since it is a C based language, so there was a real need to have the ability to debug my JavaScript code. I don’t think I would have ever ventured into the JavaScript world without being able to
debug 
it in Visual Studio.

Setup

In IE you have to enable script debug ging. Go to Tools, then Internet Options. Click on the Advanced Tab. Un-check disable script

debugging (Internet Explorer). It is checked by default.

NOTE

you will find with script debug ging enabled that many Internet sites have lots of JavaScript problems.


So I would suggest only turning this on when you want to debug

your JavaScript otherwise you will be bothered by IE asking you if you want to debug

other peoples bad JavaScript.

Once you have this set, a new option is available in your View menu. If you click on View there is now a script

debug
ger option. If you are using IE 7 you will need to click on Tools, then Menu bar to see the View menu item.

So at this point in Visual Studio, if you set your web project / web site to debug

mode and run it, you can
debug  your JavaScript.

Under View/Script

Debugger there are two options. The first is Open.

This will open the HTML/JavaScript in Visual Studio and allow you to set break points in your JavaScript.

The other option is Break at next statement which does just what it says. When the next JavaScript gets run, you will go into Visual Studio and it will break on the first JavaScript line.

Once you are in the Visual Studio

debugger, you can use all of the normal tools you have to investigate variables etc. to help with the

debugging of the JavaScript code.

Conclusion

Debugging JavaScript has really helped me to find all the small problems and bugs that are so easy to create when writing JavaScript code.

I hope this article helps you in your JavaScript debugging.


  • Categories

  • Quick Contact
    Copyright © 1996-2010 AXAT Technologies. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress