Menu Close

Category: Blog

POWER MAILCHIMP FOR DYNAMICS CRM

POWER MAILCHIMP INTEGRATION WITH MICROSOFT DYNAMICS CRM

To send bulk emails from Microsoft Dynamics 365 and track bulk email statistics back to your CRM contacts, leads and accounts. PowerMailChimp is a MailChimp CRM integration tool that connects the powerful, robust, and affordable third-party bulk email platform, MailChimp, with Dynamics 365. Use static or dynamic CRM marketing lists to send out bulk emails such as newsletters, special offers, and more, all from within Dynamics 365.
PowerMailChimp also tracks vital bulk email statistics such as sends, successful deliveries, opens, clicks, bounces, and unsubscribes back to individual CRM contacts, leads and accounts. This lets you see who opened the email, who clicked on which links, and if anyone unsubscribed. The statistics are powerful, and the add-on is simple to use.
1)    What does Mailchimp do?
Ø Send beautiful, rich, HTML emails without needing any HTML knowledge by using MailChimp’s robust template editor
Ø Use CRM information to create dynamic content in your templates using merge tags
Ø Good for current MailChimp users AND users brand new to MailChimp!
2)    Take advantage of CRM Workflow:
Ø Automatically fire off a response when a bulk email receiver clicks on a specific link, unsubscribes, opens the email, etc.
Ø Automatically add a bulk email recipient who shows interest in a specific product to a CRM marketing list
Ø Decide which CRM users have rights to PowerMailChimp by assigning the PowerMailChimp user (or the PowerMailChimp read-only user) security role.


3)     Other PowerPack add-ons to further enhance functionality!

Ø Send surveys in bulk emails with PowerMailChimp and PowerSurveyPlus
Ø Track web traffic of individual contacts and leads with PowerMailChimp and PowerWebTraffic
Ø Collect bulk email subscribers with PowerMailChimp and PowerWebForm
Ø View all bulk email statistics and other related records, specific to one individual  contact, lead or account with PowerMailChimp and PowerOneView
Power MailChimp is a product of  Power Objects which helps to send bulk emails to potential customers or marketing list in CRM, or hot leads to customers  and to find out the activity of  the customer Power MailChimp  will be used.
PowerMailChimp is reliable product and license is per user around $2, its all depends upon the organisation, how many user will be using the product.

————————————————————————————————————————–

Share this:

UNIFIED SERVICE DESK

UNIFIED SERVICE DESK FOR MICROSOFT DYNAMICS CRM

This is the article from Microsoft and quite useful for understanding the overview of the Unified Service Desk.

Unified Service Desk for Microsoft Dynamics 365 provides a configurable framework for quickly building applications for call centers so that agents can get a unified view of the customer data stored in Microsoft Dynamics 365. You can aggregate customer information from different areas in Dynamics 365 into an integrated desktop that provides a 360° view of the customer interactions. This gives your customer service agents immediate access to business critical information so they can quickly engage with customers and address queries and issues.
Unified Service Desk, which is built using the User Interface Integration (UII) framework, is designed as a series of adapters and modules that facilitate management of Dynamics 365 UI elements (such as pages and dialogs), automatic loading of related records, agent scripting, a configurable toolbar, and so on. Unified Service Desk can be configured and administered using Microsoft Dynamics 365 or Microsoft Dynamics 365 for Outlook. Using Unified Service Desk to configure agent applications doesn’t require you to write code for the most part, and therefore reduces the lead time to design an agent application as per your business requirements. Also, with the computer telephony integration (CTI) framework of UII, organizations can build adapters to connect Unified Service Desk with their existing CTI infrastructure to support customer communication in agent desktops over various channels such as chat, email, or telephone.

What is User Interface Integration?

Unified Service Desk leverages the power of the User Interface Integration (UII) framework to help you quickly configure a customized agent application. The UII framework lets you build and deploy composite agent applications that can provide unified access to customer information in Microsoft Dynamics 365 and external systems, and can aggregate different modes of customer interactions or channels. UII provides a framework for non-intrusive integration of existing line-of-business (LOB) systems at the UI level. For more information about how you can use UII, see Unified Service Desk and the UII framework in the Unified Service Desk Developer Guide.

What makes up Unified Service Desk?

Unified Service Desk is a collection of solutions and data files that contain configuration entities and the underlying entities for the UII framework. You configure the Unified Service Desk entities to define the user experience in the client application, such as various controls, their layout, user flow, and so on. All configuration information is stored in the Unified Service Desk entities, and you can bundle it along with the solutions and data files into a “package” that defines a Unified Service Desk application. The package can then be deployed to any Dynamics 365 instance, and users can connect to it using the Unified Service Desk client application to experience the interface and functionality defined by the configuration data of the application.
Basic Unified Service Desk topology diagram
The Unified Service Desk feature is defined by the following two solution files:
  • Dynamics Unified Service Desk: This solution file contains the primary Unified Service Desk entities that you configure to define the agent application experience.
  • User Interface Integration for Microsoft Dynamics 365: This solution contains the underlying entities required by the Unified Service Desk configuration entities.
Unified Service Desk comes with four sample applications. More information: Sample Unified Service Desk applications
For information about the core Unified Service Desk concepts, see Core concepts for configuring Unified Service Desk in the Unified Service Desk Developer Guide.
======================================================================

To research into emerging technology and how it can benefit users. As part of the Spring ’14 Update Microsoft released the Unified Service Desk.
 The Unified Service Desk (USD) is a desktop application that helps customer service agents provide phone, email, chat, and social media support to your customers. USD provides a configurable framework to quickly build an Agent Desktop application that’s integrated with Microsoft Dynamics CRM. With USD we can quickly make a customized agent desktop application by leveraging the User Interface Integration framework.
The Unified Service Desktop can be download from here.
The administration guide for the USD can be found here.
How do we install the Unified Service Desk?
First we need to install the base USD, this contains the general application framework, which includes connecting up to CRM, security, error logging, and base application. The installer we need here is the UnifiedServiceDesktop.msi. The installation for this is pretty straight forward, just next, next, finish 🙂
When we have installed that we need to deploy the package that we require, this is done via the second download which is the CRM2013-USD-PackageDeployer.exe self-extracting zip file. Once we have extracted the package deployer, we need to run the PackageDeployer.exe to install the USD solutions to CRM, along with the additional components to the actual USD we installed above.

Here we get the standard Package Deployer connect to CRM page, so we enter our server details and click Login.

Now we have multiple packages within the USD Package, these are a base package for CRM 2013, a CRM 2013 SP1 package with Product Updates (which includes scenarios based on the product update), and a CRM 2013 SP1 package. All options include sample data.
We will choose the CRM 2013 SP1 with Product Updates package, as this allows us to use some of the new features of service management, and click Next to continue.
Note: The new features demonstrated are, Entitlements, Service level agreements (SLAs), Routing Rules, Automatic case creation rules, Customer service schedule.

We can see that the package deployer validates the configuration, and we can click Next to continue.
Next we need to specify where the USD has been installed, as the Package Setup needs to install a number of custom controls. So we browse to the installed location of the USD and click Next to continue.

Note: 
If we want to install on to another machine, we would need to install the base version of USD and then copy across the USD folder from our master set up.
Clicking Next starts the installation process off.

We can see the progress of the installation, and see that the first step is to disable a number of plugins, and then the managed solution entities are created in CRM that are required by the USD.

We can see that updates are applied to the managed solution entities.

The updates include a number of data import files that are the sample data.
Finally we see that the various relationships are created, the plugins that were disabled are now enabled, and the installation is now complete.

Once the Unified Service Desk has been installed, and we look at the solution within CRM, we can see that a number of solutions have been imported.


 

What does the Unified Service Desk look like?
When we launch the USD from the desktop icon, we get the now standard WPF login form, which allows us to specify our server either On-Premise or Online / Office 365.

We are then presented with a customer service dashboard, which gives us a number of KPI’s, which from the sample data and configuration we choose earlier, is all centred around case management.

Scrolling down we see a list of the case that have been assigned to our user, which is effectively our case backline.

If we click on as case, we get the standard CRM form within the main panel. We can then expand out the Left Nav panel by clicking on the arrow, and see our Call Script which takes us through a new of predefined actions and makes the process flow really nice to use with the main panel updating as and when we need to perform an action.

As we process say through the Request for Service process, we can perform a number of actions either in sequence or if we like out of sequence, with the final action being to Resolve the case and Close the current session, which ends the Session Timer.

We also get a tab called My Work which shows us activities, or any items we can work on within our queue.

We have a Search tab, that can be set up to allow a number of entities to be searched, giving us a simplified enquiry mechanism, which obviously uses the standard CRM default views.

From the USD we can also have activity reminders be displayed in an Outlook style popup.

A handy technical tab, is the debugger which is available from the cog menu option. This shows us our action calls, along with action data and parameters.

We also get to see any debug information from the debug output sub-tab.

And get to see a number of data parameters that are specific to the USD session we are using.


 
How Configurable is the Unified Service Desk?
The Unified Service Desk is very configurable, there are a number of new menu options within the Settings area of CRM that allow full control of call scripts.



We can specify an Agents call script, along with the possible answers that we can accept. The answer will then determine the tasks the agent must follow to progress say a case.

We can customise the menu toolbar, to include a number of different options, icons, and various actions which can be configured to have conditions associated within them to when they are available.

From a customisation perspective we can create a number of custom action scripts, which are JavaScript functions, which we can call from various event actions.

One of the great features about using the USD, is that we can create more complex client side controls, which we just can’t really do through web resources and JavaScript within standard CRM. A couple of examples are CTI (Computer Telephone Integration), or maybe Webcam Integration to allow us to take a customer photo when registering them at a customer service desk and storing it as the Entity Image on the contact record.

In the example that we have installed we have an SLA Timer that is displayed in the Status Panel.
As part of the CRM SDK Templates for Visual Studio, we can create a number of different UI and USD Controls, Adapters or a Panel Layout.

A full example of creating a custom hosted control can be found on MSDN here.
How do we Enable Tracing?
We will occasionally get problems that we need to debug, so we can enable tracing within the UnifiedServiceDesk.exe.config file which is located within the same directory as the Unified Service Desk, e.g. C:Program FilesMicrosoft Dynamics CRM USDUSD

To enable tracing, we simply set the various setting to Error, Warning, Verbose or All.
<switches>
       <!– 
       Possible values for switches: Off, Error, Warning, Information, Verbose
                     Verbose:      includes Error, Warning, Info, Trace levels
                     Information:  includes Error, Warning, Info levels
                     Warning:      includes Error, Warning levels
                     Error:        includes Error level
       –>
       <add name=”EventTopicSwitch” value=”Error”/>
       <add name=”Microsoft.Uii.Common.Logging” value=”Error”/>
       <add name=”Microsoft.Xrm.Tooling.CrmConnectControl” value=”Error”/>
       <add name=”Microsoft.Xrm.Tooling.Connector.CrmServiceClient” value=”Error”/>
       <add name=”Microsoft.Xrm.Tooling.WebResourceUtility” value=”Error”/>
       <add name=”Microsoft.Crm.UnifiedServiceDesk” value=”Error”/>
       <add name=”Microsoft.Crm.UnifiedServiceDesk.Dynamics” value=”Error”/>
       <add name=”Microsoft.Crm.UnifiedServiceDesk.CommonUtility.UserProfileManager” value=”Error”/>
       <add name=”UnifiedServiceDesk.KPIControl” value=”Error”/>
</switches>
<sharedListeners>
       <add name=”fileListener”
            type=”Microsoft.Xrm.Tooling.Connector.DynamicsFileLogTraceListener, Microsoft.Xrm.Tooling.Connector” BaseFileName=”UnifiedServiceDesk”                                    Location=”LocalUserApplicationDirectory” />
       <add name=”USDDebugListener” type=”Microsoft.Crm.UnifiedServiceDesk.Dynamics.UsdTraceListener, Microsoft.Crm.UnifiedServiceDesk.Dynamics” />
</sharedListeners>

From the Shared Listeners section we can see that the log files will be created within
C:Users<username>AppDataRoamingMicrosoftUSD

Full walk through articles are available on MSDN here.
This post should have given a good overview of the Unified Service Desk, how it can be used and some of the types of customisations that can be made to it.
Share this:

SOAP AND REST WEB SERVICES IN MICROSOFT DYNAMICS CRM

SOAP AND REST WEB SERVICES IN MICROSOFT DYNAMICS CRM 

REST

„REST is a software architecture style consisting of guidelines and best practices for creating scalable web services. REST is a coordinated set of constraints applied to the design of components in a distributed hypermedia system that can lead to a more performant and maintainable architecture.
REST has gained widespread acceptance across the Web as a simpler alternative to SOAP and WSDL-based Web services. RESTful systems typically, but not always, communicate over the Hypertext Transfer Protocol with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) used by web browsers to retrieve web pages and send data to remote servers.” (from Wikipedia)

 SOAP

“SOAP, originally an acronym for Simple Object Access protocol, is a protocol specification for exchanging structured information in the implementation of web services in computer networks. It uses XML Information Set for its message format, and relies on other application layer protocols, most notably Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.” (from Wikipedia)

“Should I REST or Should I SOAP?”

I have spent hours fretting over the choice between SOAP and REST finding the answer.  Some Web services support one and some support the other. Microsoft Dynamics CRM supports both. Our decision depends on which web service best meets your NEEDS, rather than which PROTOCOL to USE!
SOAP is a heavyweight player: it provides the following advantages when we compare to REST:
Security:
SOAP supports SSL – just like REST – but also support WS-Security (Web Services Security is an extension to SOAP to apply security to Web Services. WS-Security supports identity through intermediaries, not just point to point. It implements data integrity and data privacy.
Transactions:
Need ACID (Atomicity, Consistency, Isolation, DurabilityTransactions over a service? You need SOAP. However REST supports transactions, it is not as comprenesive and is not ACID compliant! REST has its own weakness: it is limited by HTTP itself: HTTP is not able to provide two -phase commit across distributed transactional resources, but SOAP can.
Reliability:
SOAP supports WS-ReliableMessaging which is a protocol that allows SOAP messages to be reliably delivered between distributed applications in the presence of software component, system, or network failures.
Let me show you some reasons why REST is almost the “right” answer:
REST uses standard HTTP: it means it is much simpler in some cases:
Creating clients and APIs is easier than SOAP.
Performance:
REST permits many different data formats: SOAP only permits XML. REST supports JSON which is a better fit for data because it parses much FASTER!. REST allows BETTER support for most of browser client.
REST has better performance and it is scalable: REST can be cached, SOAP can’t be.

Conclusion:

Even though REST seems to be in favor now I think there are some cases when SOAP makes sense when you choose it: if I was writing an smart phone application to interface with a service which provides confidental data I would definitely need to use SOAP. All features (WS-Security, WS-AtomicTransaction, WS-ReliableMessaging) are required for this kind of service.
On the next article I will compare REST and SOAP in Dynamics CRM developers’ perspective.
==========================================================
One of my first choices while starting my Silverlight development in Microsoft Dynamics CRM 2011 was to used SOAP or REST. What surprised me was the lack of a clear answer in the Microsoft SDK. All I could see was a fuzzy answer, something along the lines of  “Well REST is potentially OK for this… but SOAP can do that as well…”, and “SOAP is good for this…, but REST can actually achieve that as well…”. AHHHHHHHHH!!!!!!!! So I’ve given both a go and finally came to a conclusion.
This is only my opinion so please chip in with comments. Also I’m thinking more in terms of CRM integration and maintainability than actual REST and SOAP architecture… I believe that the best option is SOAP! Why? well lets look at what Microsoft say about REST and SOAP.
Here is their recommendation table .

The following table describes the appropriate web service to use depending on the task you need to perform.

Task Web Service
Create, Retrieve, Update and Delete records.
REST Endpoint
Associate and Disassociate records
REST Endpoint
Assign Records
SOAP Endpoint
Retrieve Metadata
SOAP Endpoint
Execute Messages
SOAP Endpoint
Here is what they have to say about REST and SOAP
The REST endpoint provides a ‘RESTful’ web service using OData to provide a programming environment that is familiar to many developers. It is the recommended web service to use for tasks that involve creating, retrieving, updating and deleting records. However, in this release of Microsoft Dynamics CRM the capabilities of this Web service are limited to these actions. Future versions of Microsoft Dynamics CRM will enhance the capabilities of the REST endpoint.
The SOAP endpoint provides access to all the messages defined in the Organization service. However, only the types defined within the WSDL will be returned. There is no strong type support. While the SOAP endpoint is also capable of performing create, retrieve, update and delete operations, the REST endpoint provides a better developer experience. In this release of Microsoft Dynamics CRM the SOAP endpoint provides an alternative way to perform operations that the REST endpoint is not yet capable of.
So what this means is you should use REST if you want to perform CRUD operations or want your code to look prettier through LINQ utilisation. Lets look at that from a maintainability point of view. Lets say we have developed a lovely CRUD based Silverlight application and it works perfectly. However our client has now requested some new functionality that can only be achieved through an Execute Request.
Well now we have to implement the SOAP connection too, to perform the request!  All of a sudden my visual studio solution has grown a couple of classes and involves two services (SOAP and REST). Already thinking messy? I’d prefer to use just one service. What’s that… I can!!! Ah yes because you can perform CRUD operations with SOAP as well. So I might as well of used SOAP in the first place.
SOAP 1 – REST 0
Now apparently the other thing REST has going for it is that it provides a better developer experience. I assume this is because LINQ can  interpret it. Well that is great, however my client isn’t happy that its taking me longer than it should do to implement his new functionality. For some reason he doesn’t seem to understand why using LINQ is so great, but why I am having to now implement a different service until Microsoft increase the REST functionality.
SOAP 2 – REST 0
Microsoft also say that a downside to SOAP is that there is no strong type support. What they are referring to is early and late binding. In my opinion this is a blessing in disguise! Strong typing may look nice in code and allow easier data extraction, but it has one major downfall for me. When developing I try to keep code as generic as possible so that it can be reused.  You can achieve this through late binding better than early binding. Thought I haven’t looked in to it potentially you could achieve early binding in SOAP by using the crm svcutility tool to generate a strongly typed object class.
SOAP 3 – REST 0
Did I mention that you can achieve more through SOAP?
SOAP 4 – REST 0
So while we may argue away from CRM, REST may be better because its lightweight, provides human readable results, and is easy to integrate with. Or SOAP is better because its easier to consume, or is rigid and contains type checking. Or one is better than the offer because its faster or more secure etc… At the end of the day for me with regard to CRM SOAP wins 4 – 0
===========================================================

In the last two columns, I’ve described the basics of REST and talked about exposing and consuming Web feeds. In this column, I’ll answer a number of questions that often come up when I make presentations or conduct training sessions on using REST to build service-based applications.

Which is better, REST or SOAP?
This is one of the most common questions I get about REST, and it is probably the least fair. Both REST and SOAP are often termed “Web services,” and one is often used in place of the other, but they are totally different approaches. REST is an architectural style for building client-server applications. SOAP is a protocol specification for exchanging data between two endpoints.
Comparing REST with the remote procedure call (RPC) style of building client-server applications would be more accurate. RPC is a style (rather than a protocol, which is what SOAP is) of building client-server applications in which a proxy (generally generated from metadata) is used in the client’s address space to communicate with the server and the proxy’s interface mimics the server’s interface. Although SOAP doesn’t require the RPC style, most modern SOAP toolkits are geared toward (at least they default to) using RPC.
In contrast to RPC, REST lacks the metadata-generated proxy (see the next question for more information), which means that the client is less coupled to the service. Also, because REST relies on the semantics of HTTP, requests for data (GET requests) can be cached. RPC systems generally have no such infrastructure (and even when performing RPC using SOAP over HTTP, SOAP responses can’t be cached because SOAP uses the HTTP POST verb, which is considered unsafe). SOAP intentionally eschews HTTP, specifically to allow SOAP to work over other protocols, so it’s actually a little disingenuous to call SOAP-based services Web services.
My perspective is that both REST and SOAP can be used to implement similar functionality, but in general SOAP should be used when a particular feature of SOAP is needed, and the advantages of REST make it generally the best option otherwise.

What about security? Isn’t SOAP more secure than REST?
This question touches one of my pet peeves because the answer is clearly no. It is just as easy to make a RESTful service secure as it is to make a SOAP-based service secure. In the majority of cases involving either REST or SOAP, the security system is the same: some form of HTTP-based authentication plus Secure Sockets Layer (SSL). Although technically the technology for secure conversations over HTTP is now called Transport Layer Security (TLS), SSL is still the name most commonly used.
What is true is that a SOAP-based service, because of the extra protocols specified in the various WS-* specifications, does support end-to-end message security. This means that if you pass SOAP messages from endpoint to endpoint to endpoint, over the same or different protocols, the message is secure. If your application needs this particular feature, SOAP plus WS-* is definitely the way to go. REST probably wouldn’t be an option here because of its dependence on HTTP, and inherently you’d be designing a multiprotocol application. I believe that the fact that SOAP with WS-* enables end-to-end message-level security is the source of the misconception that SOAP-based services are more secure than RESTful services.
Another area in which the WS-* folks have spent a lot of time and effort recently is federated security. The simple idea behind federated identity is to create trust between two companies, where authenticated users from one company can be trusted and considered authenticated by another company without the second company having to maintain the authentication information (username and password, typically). The various WS-* specifications have implementations from all the major vendors, and Microsoft is integrating the ideas into Active Directory through Active Directory Federation Services (ADFS).
In the realm of federated security, the WS-* arena certainly has more standards than the RESTful arena (and this will probably always continue to be the case), but there are efforts to support federated security in the world of REST. OpenID is one such effort. The .NET Service Bus (part of Microsoft Azure) also contains a federated identity service, which works just as well with HTTP (and therefore REST) as it does with SOAP-based services.

What about transactions?
Here is another area in which SOAP and WS-* have explicit support for an “advanced” feature and REST has none. WS-Atomic Transactions supports distributed, two-phase commit transactional semantics over SOAP-based services. REST has no support for distributed transactions.
Generally speaking, if you want something like transactions in a RESTful system, you create a new resource. (Creating a new resource whenever you run into a problem with a RESTful system generally solves most problems.) You can have a resource called Transaction. When your client needs to do something transactional (such as transferring money between two bank accounts), the client creates a Transaction resource that specifies all the correct resources affected (in my example, the two bank accounts) by doing a POST to the Transaction factory URI. The client can then perform updates by sending a PUT to the transaction URI and close the transaction by sending a DELETE to the URI.
This, of course, requires some amount of hand-coding and explicit control over your system, whereas the WS-Atomic Transactions system is more automatic because (in the case of Windows Communication Foundation) it is tied to your runtime’s plumbing.
If your system absolutely needs atomic transactional semantics across diverse systems, WS-Atomic Transactions is probably the way to go. Using distributed transactions in this way may or may not be smart because it increases the coupling between the two systems and creates potential problems if you aren’t controlling the code on both ends. But the most important thing is to use the right tool for the right job (once you’ve figure out what the right job is).
In defense of REST, I think it is fair to say that given today’s distributed, service-oriented architectures, coupling two endpoints so tightly using a distributed transaction may not be the best design. On the other hand, some situations call for this type of functionality, and if you need it, use SOAP and WS-Atomic Transactions.

What about interoperability? Isn’t SOAP supposed to be about interoperability? Isn’t SOAP more interoperable than REST?
If you define interoperability as the technical ability to communicate between two divergent endpoints, I assert that REST wins the interoperability battle hands down.
Since one of the driving points behind creating the SOAP specification was to create an interoperable way to communicate between different platforms and different languages, many people are surprised by this assertion. But a funny thing happened on the way to widespread interoperability: the WS-* specifications (and vendors’ implementations of said specifications) made SOAP services less interoperable rather than more interoperable.
The problem in the SOAP and WS-* arena is the large number of different standards (and versions of each of those standards) to choose from. And when a particular vendor chooses to implement a particular standard, that vendor often provides an implementation that is just slightly different from another vendor’s (or all others). This leads to problems whenever you have to cross vendor boundaries (languages and operating system).
Of course, even to use SOAP you need a SOAP toolkit on your platform, which most (but not all) platforms have today. And then you have to deal with myriad WS-* specifications and figure out which to use (or not to use) and how that affects interoperability. To be honest, it’s kind of a mess out there.
In terms of platforms, REST has the advantage because all you need to use REST is an HTTP stack (either on the client or the server). Since almost every platform and device has that today, I would argue that REST has the widest interoperability. Given that mobile devices, household devices, POS devices, DVD players, and TVs all have Internet connectivity, there are more and more platforms for which having a full SOAP toolkit is impossible or unlikely. And even if you do have a SOAP toolkit for a particular platform, the chance of it working with another platform’s implementation is not 100%.

But what about metadata? So what if REST is so interoperable—there’s no WSDL with REST, and without WSDL, I can’t generate a client-side proxy to call a service. REST is hard to use.
It’s true that in the world of REST, there is no direct support for generating a client from server-side-generated metadata, as there is in the world of SOAP with Web Service Description Language (WSDL). A couple of efforts are being made to get such support into REST, one being a parallel specification, known as WADL (Web Application Description Language). The other is a push to use WSDL 2.0 to describe RESTful endpoints. I often say that REST is simple, but simple doesn’t always mean easy. SOAP is easy (because of WSDL), but easy doesn’t always mean simple.
Yes, using WSDL makes generating a proxy for a SOAP-based service easier than writing the code to call a RESTful service. But once you generate that proxy, you still have to learn the API. Nothing in the WSDL tells you which method to call first or second or whether you need to call the methods in any particular order at all. These are all things you need to figure out after you generate the proxy and are prototyping the code to use the service.
Building a client against a RESTful service means you are learning the service and how it works as you build the client. Once you have finished, you have a complete understanding of the service, its resources, and the interaction you can have with those resources. To me, this is a big benefit. Since RESTful services follow the constraints of REST (at least they are supposed to), there is a convention that you can easily follow as you determine the different parts of the service.
Also, out in the wilds of developer-land, most services are wrapped in something often called a “service agent,” which is another layer of indirection to protect clients from changes in the service layer. This may be needed in either REST or SOAP.
Another point is that metadata-generated proxies are part of what SOAP was meant to get away from in the RPC era, namely local-remote transparency. The concept of having an API on the client that matches the API on the server was considered to be a bad idea, but that’s exactly what happens in most SOAP-based services. Having a metadata-generated proxy in REST also reduces the chances of taking advantage of hyperlinking. Using hypertext as the engine of application state (HATEOAS) is one of the constraints of REST, and using it requires a more loosely coupled client API.
The last point I’ll make is that as support for REST becomes more ubiquitous, building clients will get easier and easier. If you look at the Windows Communication Foundation (WCF) REST starter kit, it includes facilities that head in this direction. The new HttpClient API makes using HTTP much easier than using the .NET WebRequest/WebResponse API. Also, there is a new Paste as XML Serializable tool, which allows you to copy a piece of XML (say from the documentation of a RESTful endpoint) and generate a .NET type that can represent that XML instance in your application. This is similar to what the WCF tools do automatically for the whole service with WSDL. Over time, these tools will become much more sophisticated, further simplifying the client experience in WCF when using RESTful services.

What if I want to use a transport other than HTTP?
The common (somewhat sarcastic) answer from the REST community here is, “Go ahead, there isn’t anything stopping you.” Realistically, however, REST is currently tied to HTTP, if only because most developers and teams of developers do not have the time for the engineering effort necessary to get the semantics of REST to work over, say, TCP/IP.
The common answer is technically correct, because nothing is stopping you from implementing the concepts of REST over other protocols, but until vendors add support for this, I find it a dubious proposition for most.

After all that information, aren’t you telling me that REST is good for Internet-facing applications, and SOAP for enterprise applications?
If you’ve read the rest of this column, you can probably imagine that I think this statement is generalized and false. Often I hear this sentiment after discussing the lack of explicit distributed transaction support in REST versus the explicit support in WS-Atomic Transactions. My retort is generally something like “Well, ASP.NET doesn’t have support for distributed transactions, but does that mean ASP.NET isn’t useful for enterprises?”
My point is that not every technology solves every problem, and there are plenty of technologies that don’t support the typical features people think of when they think of enterprises but that are incredibly helpful for enterprises nonetheless.
In fact, when I think of enterprise applications, I often think of speed and scalability—scalability being one of the main differences between REST and SOAP. SOAP services are much harder to scale than RESTful services, which is, of course, one of the reasons that REST is often chosen as the architecture for services that are exposed via the Internet (like Facebook, MySpace, Twitter, and so on).
Inside enterprises, applications also often need to scale as well. Using REST means that you can take advantage of HTTP caching and other features, like Conditional GET, that aid in scaling services. Many of these techniques can’t be used with SOAP because SOAP uses POST only over HTTP.

Bottom Line
I hope that after you read this column, you’ll think that the answer to “Which is better, REST or SOAP?” is “It depends.” Both the REST architectural style and SOAP and the WS-* protocols have advantages and disadvantages when it comes to building services. Those of us in the RESTafarian camp (yes, I must give full disclosure here: I am definitely in that camp) believe that for most service situations, REST provides more benefits than SOAP or WS-*. On the other hand, SOAP and WS-* have some features that are easy (and possible) to implement using REST. When you need those specific features, you definitely want to use runtimes and toolkits that can provide those features. Although this column wasn’t specifically about WCF, one nice feature of adopting WCF is that it supports both REST and SOAP/WS-*. Moving back and forth between the two worlds becomes easier if you have one programming and runtime model to learn.
Share this:

GENERICS IN C#

GENERICS IN C#



GENERICS

Generics are introduced in c# 2.0. Generics allow us to design classes and methods deoupled from the data types.

Generics classes are extresively used by collection classes available in System.Collections.Generic namespace.(Covered in the next session)

One way of making AreEqual() method resuable, is to use object type parameters. Since, every type in .NET directly onherit from System.Object type, AreEqual() method works with any data type, but the probelm is performance degradation due to boxing and unboxing happening.

Also, AreEqual() method is no longer type safe. It is now possible to pass integer for th first parameter, and string for the second parameter.It doesn’t really make sense to compare strings with integers.

So, the problem with using System.Object.type is that
1. AreEqual() method is not type safe
2. Performance degradation due to boxing and unboxing.

————————————————————————————————————————–
using System;
using System.Reflection;

namespace ConsoleApplication4
{
    public class MainClass
    {
        private static void Main()
        {
            bool Equal = Calculator.AreEqual<int>(10,10);
            if (Equal)
            {
                Console.WriteLine(“Equal”);
                Console.ReadLine();
            }
            else
            {
                Console.WriteLine(“Not Equal”);
                Console.ReadLine();
            }
        }

    
    }


    public class Calculator
    {
        public static bool AreEqual<T>(T Value1, T Value2)
        {
            return Value1.Equals(Value2);
        }

    }
}

Share this:

LATE BINDING USING REFLECTIONS IN C#

EARLY V/S LATE BINDING IN C#

Difference between early and late binding:


1.Early binding can flag errors at compile time. With late binding there is a risk of run time exceptions.

2. Early binding is much better for performance and should always be preferred over late binding. Use late binding only when working with an objects that are not available at compile time.

3. I think 95% of people use early binding over late binding because of late binding is going to be compiled properly at compile time but it will through exception at Runtime “if there is any errors”, so early binding is better as it warns the programmer with “wiggly sign” at compile time itself, it does not allow to compile the program.



using System;
using System.Reflection;

namespace ConsoleApplication4
{
    public class MainClass
    {
        private static void Main()
        {
// LATE BINDING STARTS HERE
            Assembly executingAssembly = Assembly.GetExecutingAssembly();

            Type customerType = executingAssembly.GetType(“ConsoleApplication4.Customer”);


            object customerInstance = Activator.CreateInstance(customerType);


          MethodInfo getFullNameMethod =  customerType.GetMethod(“GetFullName”);


          string[] parameters = new string[2];

          parameters[0] = “Malla”;
          parameters[1] = “Tech”;

         string fullName = (string)getFullNameMethod.Invoke(customerInstance, parameters);

         Console.WriteLine(“Full Name = {0}”, fullName);
         Console.ReadLine();

// LATE BINDING ENDS HERE.

            ///     Early Binding 
        //    Customer C1 = new Customer();
        //    string fullname = C1.GetFullName(“Malla”, “Tech”);
        //    Console.WriteLine(“Full Name = {0}”, fullname);
        //    Console.ReadLine();
        }
    }


    public class Customer
    {
        public string GetFullName(string FirstName, string LastName)
        {
            return FirstName + ” ” + LastName;
        }

    }
}

Share this: