Choosing Right Type of WCF Project

September 20th, 2014 | Posted by Vidya Vrat in .NET | C# - (0 Comments)

Abstract
Before you begin coding, it very important to understand what type of output and behavior is expected. These questions can be answered by reviewing your Deployment and Test needs as well. In this article I will talk about guidelines for choosing right type of WCF project templates while creating WCF Service(s).

Introduction
Any application’s life begins with choosing a Project Template. Right type of Project Template has big impact on how your application will shape up, output type etc.

WCF Services Projects are no different than other applications except being biggest player in SOA world.

Different Templates for WCF
Most commonly used type in industry is either WCF Service Library or WCF Service Application, as shown in the image below.

The difference between two depends on your Test and Deployment needs.

Continue Reading Full Article…

 

1st Actual Computer Bug

September 9th, 2014 | Posted by Vidya Vrat in Technology Awareness - (0 Comments)

1st actual computer bug found, September 9, 1947

In 1947, a team of engineers working on the Mark II Aiken Relay Calculator at Harvard University had a problem in one of the circuits of the long glass-enclosed computer. A member of the programming team, Grace Hopper, recorded the story in her log book:  “It was over in another building, and the windows had no screens on them and we were working on it at night, of course, and all the bugs in the world came in. And one night she (Mark II) conked out and we went to look for the bug and found an actual large moth, about four inches in wing span, in one of the relays beaten to death, and we took it out and put it in the log book and pasted Scotch tape over it.”

 

 

 

 

 

 

According to Hopper, from then on, when anything went wrong with a computer, they said it had bugs in it. The term “bug” had been used by engineers to describe flaws in machines, but Hopper popularized “bug” and “debug” as early computer-programmer language. She was an originator of electronic computer automatic programming and a computer pioneer while working for the Navy, where she was a Rear Admiral. As a lecturer, she often told the story of the computer bug. The Mark II was an electromechanical computer built at Harvard and financed by the US Navy.

 

 

 

Abstract

SOA is a well-known term today, when we think of SOA; WCF comes in mind. Whereas WCF is a Microsoft technology to build SOA based software solutions. This article will help you understand what exactly “SOA” is as per real architectural way, why architects suggest SOA based application architecture and how SOA can be implemented etc.

What is SOA

SOA (Service Oriented Architecture) is an Architectural Design Pattern / Approach, under which distributed and decoupled applications can interact with each other. SOA is NOT a Technology or a Language.

SOA provides the infrastructure to the idea of how two different business entities communicate and work together. E.g. your bank offering Stock services, a travel site with feature to book a flight, a hotel, a car or even a holiday package etc., weather updates and currency rates etc. All such activities take place due to B2B integration; and SOA is the oxygen for such type of business activities.

Before a service can be consumed, a request message needs to be sent to the service (the provider, or callee) by its client (the consumer, or caller). A request message contains information about the operation the service is being asked to perform, and any additional data that the specific operation needs to have before executing. For example, a service that shows you a currency exchange rate needs to have two currency types and how much money you want to convert. E.g. 100 USD to INR

Why SOA

In today’s world we heavily rely on software systems for example a bank’s system communicates to various other software & database systems.

This usually cause Software applications to face following challenges:

  • Applications are becoming more and more distributed.
  • Business needs are changing very often.
  • Collaboration with other systems is becoming key to success of application. E.g. B2B scenario.
  • Operation costs need to be reduced.
  • Scalable, secure and reliable systems are needed by business.

SOA resolves these challenges by defining standards for interaction between decoupled systems and technologies based on policies and contracts.

SOA Objectives

SOA is intended to provide loosely coupled interaction between applications. Benefits offered by SOA are as follows:

  • Agility. Enables your business to adapt changes quickly.
  • Productivity. Can implement complex applications using SOA more easily than with other architectural styles.
  • Reusability. Able to reuse your services across systems instead of rewriting the same modules again and again in every system or specific to an individual system.
  • Reduced cost. Software Architects think of Build vs. Buy vs. Reuse, SOA based approach allows to either buy or reuse this feature/functionality; hence in most of the cases cost is saved by reusing the existing services, a lot of commonly used services are available for free.

Communicating with SOA based Service

SOA based services communicate with outside world via EndPoint(s). Hence, EndPoint is required to communicate with a Service.

  • An EndPoint is the access point to the service.
  • Accessing internal assets can be done only through the EndPoint.
  • The EndPoint controls who can access the service, what operations they can perform, etc.
  • Services may expose multiple EndPoint for various reasons (technology, topology, etc.).

Properties of SOA Architecture

Service-Oriented Architecture is based on four tenets:

Services handle data, not objects

Objects are known to have direct dependency on a particular technology, while XML data is not technology-specific. Hence, services communicate by exchanging data as long as they use the same standards by which the service operates.

Services are autonomous

In order to utilize a Service, client does not need to know the implementation technology and various other internal/implementation details. What all a client requires is the service’s address (I.e. EndPoint) and the information to send the data to.

Services have explicit boundaries

The service is responsible for exposing its information. Everything inside the service’s boundary is only accessible through the service EndPoint. The service’s boundaries are explicit, meaning that the service specifies precisely which messages it can receive and what the messages need to contain; messages that are not compliant with these specifications will be rejected with an error message.

Services expose contract and policy

The contract of the service defines the data which client needs to use when calling a service. Service contract also define the response that the service sends back to the client as result of call made to service.
The service’s policy defines additional information about the data that is being sent. For example, a policy can state that the data needs to be encrypted etc.

SOA Benefits

Productivity

  • Services are autonomous. Services have explicit boundaries. Services can always be moved to some other location.
  • Services depend on data. There is no dependency on the technology that creates the data.
  • Service autonomy simplifies testing
  • All major development frameworks (Microsoft.NET, Java) embraced SOA.
  • Development tools like Microsoft Visual Studio provide an excellent environment for building SOA applications using WCF, ASP .NET WebAPI or ASP .NET WebServices.

Agility

Continue Reading

 

 

 

Microsoft released the CTP2 of Visual Studio 2014 today July 8th 2014.

In my previous News item I mentioned that biggest challenge in trying Visual Studio 2014 was Side-by-Side installation. This issue is claimed to be resolved in this new CTP2 release which can be downloaded from here , whereas I would suggest that you try it with your own responsibility and things might break.

What is CTP anyways?

CTPs are previews for the next major release of Visual Studio. These Visual Studio CTPs are intended to promote continuous feedback between early adopters and the Visual Studio development team.

CTPs have Limitations

CTPs are provided for testing and feedback purposes only. CTPs are unsupportedEnglish-only releases. They are not subject to final validation and are not intended for use on production computers, or to create production code.

Some New COOL Features Added in CTP2

  • Save and Apply Custom IDE Layouts. You can now save and apply custom layouts for tool windows in the IDE. The Save Window Layout and Apply Window Layout commands are under the Window Menu and you can also rename, reorder, and delete layouts from Manage Window Layouts.
  • Light Bulb Editor Adornment. How many times have you found yourself stuck in a complex syntax issue or compilation error which doesn’t seem to go away? I have always wished that there was a legitimate way to have some options displayed as solution to the problem. Microsoft Introduced, Light Bulbs which is an extensible editor adornment to identify and help you fix issues in your code. To use them, place the caret on a line with an issue or hover over an issue and you’ll see a light bulb that lists actions you can take to resolve the problem and even a preview of proposed solutions.
  • Editor Touch Support. All the devices these days are supporting touch. Many software receive direct benefit from the support for touch. Visual Studio Code Editor seem to be an exception to be fully benefited with touch, as development required typing. But a Touch support will certainly enables the developers to do some usual things like scrolling, pinch-to-zoom, tap-and-hold for context menus, double-tap for word selection, and line selection by tapping in the margin etc. All such gestures now acknowledged by Visual Studio 2014 code editor. Needless to mention you have to have a Laptop with Touch Support.
  • ALL CAPS. Remember menu names in Capital letters (All CAPS) was kind of hard to read. SO Microsoft has reverted it to be Title Case (Tools, File, View) as it has been used by various Visual Studio releases.  Microsoft Says.. Last week with the RC for Visual Studio 2013 Update 3 we added an option to sentence case menus; in this VS “14” CTP we changed Menu Bar styling to Title Case for everyone to help us get feedback on the change. 

 So Are you Installing?

I wanted to verify few things and so I chose to install and try the CTP2 bits of Visual Studio 2014. My current laptop settings are as follows:

  • Windows 7 Enterprise
  • Visual Studio 2012 Ultimate
  • Visual Studio 2013 Ultimate
  • newly installed Visual Studio 2014 Professional

Continue Reading….. 

 

 

Abstract

In this article I will share some real-world problems that appear to be complex, but with usage of Microsoft.VisualBasic.Devices those can be easily done.

Scenario

You are working on an application and you come across any of the following requirements before any action can possibly take place:

  • Verify OS name.
  • Make sure CAPS is ON or NOT (as per your application’s need)
  • Check Network availability before you open a browser or load the site.
  • Does the mouse have a wheel?
  • Ability to Ping a URI or Computer’s IP before your entire business logic starts executing.

Introduction

All of the preceding specified situations are valid and used in many real-world applications, the issue is that none of them appear straightforward to implement, as it involves:

  • Communication with Operating System; to know the OS name
  • Communication with Hardware; to know if CAPS is ON or OFF
  • Communication with Network Adaptor; to check if Computer is connected to Network on not
  • Communication with Hardware pointing device; Mouse has wheel or not
  • Perform some action over the network; Pinging a computer or URL

Solution

Microsoft.VisualBasic.Devices is a namespace that helps in such scenarios. The following code example shows the use of various classes.

In order to use Microsoft.VisualBasic.Devices namespace you must add a reference of it to your project/application.

Continue Reading…

 

 

A .NET Client Profile is supported by .NET Versions 3.5 and 4.0. It is designed for client applications like Windows Forms. The Client Profile version of .NET Framework is a lightweight subset of the framework. This enables quicker deployment and small installation packages.

Read My Full Article Here..

 

Introduction to Big Data

June 12th, 2014 | Posted by Vidya Vrat in Database - (0 Comments)

Data is a precious thing because they last longer than systems – Tim Barnes Lee

Introduction

Big Data, as the name implies, is a collection of huge amounts of data. Data has always been important to mankind and society by various means. But in the past few years data has been collected and used for a variety of purposes. The major factor that differs Big Data from normal data in a DBMS or RDBMS is that Big Data is very large volume, it has no defined structure, it includes a lot of data that is being created from various channels like emails or social media like Twitter, Facebook, LinkedIn and so on.

Read My Full Article Here

Here are some resources which may be useful as you try out the Visual Studio “14” CTP, released yesterday (June 3rd 2014):

Downloads: Download the Visual Studio “14” CTP (also available on MSDN subscriber downloads). Alternatively, save some time and use the provided VM in Azure.

Blogs & Release Notes: Read announcements by Soma & Brian. Check out the team blogs, including Visual Studio, Web Dev (web tooling), Web Dev (ASP.NET vNext), Entity Framework, C#, VB, and C++. See the Visual Studio “14” CTP release notes for a list of new features. Discuss on Facebook & Twitter.

Known Issues: This release should be installed in a test environment, such as a VM or a clean machine. Do not install on a machine with another version of Visual Studio installed. For other known issues, please see the Visual Studio “14” CTP KB.

Feedback: Submit bugs through Connect, suggestions on UserVoice .

Consider a Real World situation that you need to log username, machine name etc. into a log file. I have encountered this scenario many times. Usually finding such information is very tedious job and may require some complicated code to be written.

For such type of information Microsoft .NET provides System.Environment class which provides some static member properties and methods to address most of such scenarios (which turns out to be complicated implementation otherwise).
Read my Full Article Here..

 

What is Mono?

After release of .NET Framework people started discussion around its Non-Microsoft Platform portability. What it means is that can Microsoft .NET Framework based application run on Non-Microsoft operating systems? Such as UNIX, Mac and various Linux distributions? To help developer’s port .NET Code to non-Microsoft platforms “Mono” project is the solution. Mono is an open source implementation of Microsoft .NET Framework which allow developers to execute .NET centric applications on other platforms such Mac, Linux. Using such open source implementations of .NET you can create, compile and execute .NET assemblies on operating system other than Microsoft platform.

At present, Mono is compatible with the .NET 4.0, C# 4.0. In addition, Mono also provides an open source distribution of Silverlight API named MoonlightRead Full Article Here…