less-known-facts-of-mahabharatham-great

less-known-facts-of-mahabharatham-great

Mahabharata is such a vast treasure house of facts and knowledge that it is impossible for anyone to know everything!

தாவனி

For your Loved ones

My AAMEC Friends

My AAMEC Friends

Power of Friendship

கல்லூரி

கல்லூரி நண்பர்களுடன்

நட்சத்திரங்களை நான் ரசித்தேன் அதுபோல் நானும் என் நண்பர்களுடன் இருக்க விரும்பியதால்...!

sachin-tendulkar-retires-famous-quotes

sachin-tendulkar-retires-famous-quotes

Commit all your crimes when Sachin is batting. They will go unnoticed because even the Lord is watching

Showing posts with label webservice. Show all posts
Showing posts with label webservice. Show all posts

Web 2.0 - A privilege of web technology

Web 2.0

Web 2.0

Introduction
Web 2.0, a phrase is a cluster term for the new phase of World Wide Web, which was coined by O?Reilly and Media live International in 2003 and popularized by the first Web 2.0 conference in 2004. There is no certain definition of Web 2.0, even though; it stands for the transformation of the web into a full-fledged computing platform.

Web 2.0 is not a modified version of World Wide Web, but it is a different way to utilize Internet into web platform like weblogs, social book marking, wikis, podcasts, RSS feeds (and other forms of many-to-many publishing), social networking web, Web APIs, Web standards and online service provider. It is like open sourcing and genuine interactivity in which user can upload anything, download anything and can use the content according to its own wish. There is no restriction of more or less measure of content, uploading and downloading. All these are absolutely free.

According to ?O?Reilly, the inventor of Web 2.0, ?Web 2.0 is the business revolution in the computer industry caused by the move to the Internet as platform, and an attempt to understand the rules for success on that new platform?. So Web 2.0 is a new way of business via Internet. It?s really a new business tactic that is being used on the mass level across the world. The success of ?YouTube?, ?Orkut?, ?MySpace?, ?Google?, ?live?, ?Wikipedia? and many more websites are the biggest examples of Web 2.0.

Definitions and Components
As we have already mentioned that Web 2.0 has not any specific definition. Many users have defined its in their own way. According to Wikipedia, ?Web 2.0 is a term often applied to a perceived ongoing transition of the World Wide Web from a collection of websites to a full-fledged computing platform serving web applications to end users. Ultimately Web 2.0 services are expected to replace desktop computing applications for many purposes.?
On the other hand, according to Wall Street Technology powered by CMP ?United Business Media?, the coinventor of Web 2.0, ?Web 2.0 refers to Rich Internet Applications (RIAs) that use the Internet as a platform to create interactive user interfaces that resemble PCbased applications. Typically, RIAs emphasize online collaboration among users.?

Several supporters of Web 2.0 have defined it according to their uses, observations and experiences, but in brief, we can say that:
  • Web 2.0 is a conversion of websites from unique information structure having the sources of content and functionality. That?s why being a computing platforms it serves web applications to end-users.
  • Web 2.0 is a new way of organizing and categorizing of the content, audio, video, pictures and movies highly stressing to the growth of the economic value of the Web.
  • Tim O?Reilly, the father of Web 2.0 along with his colleague John Battelle summarized the key principles Web 2.0 applications in 2005. According to them:
    • The web as a platform
    • Data as the driving force
  • Network effects created by an architecture of participation
  • Innovation in assembly of systems and sites composed by pulling together features from distributed, independent developers (a kind of ?open source? development)
  • Lightweight business models enabled by content and service syndication
  •  The end of the software adoption cycle (?the perpetual beta?)
  • Software above the level of a single device, leveraging the power of the ?Long Tail?
  • Ease of picking-up by early adopters

Characteristics of Web 2.0

Though there is a controversy still going on over the definition of Web 2.0, yet it has some basic common characteristics. These include:
1.     Web 2.0 use network as a platform as it deliver or receive applications thoroughly via a browser.
2.     Users gets, manipulates and controlled the data on the site.
3.     Participatory architecture in which user can add or edit value to the application according to their requirement.
4.     A rich, interactive, user-friendly interface based on Ajax or similar frameworks.
5.     Some social-networking aspects.
6.     Enhanced graphical interfaces such as gradients and rounded corners (absent in the so-called Web 1.0 era).
Usage of Web 2.0
After emerging of Web 2.0, it is being vastly used because of its wide range of variety and very attractive features. Descriptive list of Web 2.0 tools are endless even though we can say that the new generation of Internet approximately uses its tools. Web 2.0 tools include Weblogging, Wikis, Social networking, Podcasts, Feeds, Social bookmarking, and Cascading Style Sheet. The Approach behind using Web 2.0 is different. Some uses it accidentally as for browsing purpose. Some uses it to fulfill theirs? job because they need it. Some uses it by curiosity as they want to check it and some uses it by default as they have no knowledge about it. Overall, many people and companies use it but they don?t know why? The reason may vary, but its utility is still undoubted.

Technical Overview
Web 2.0 has a complex and growing technology that includes server-software, content-syndication, messaging- protocols, standards-based browsers with plugins and extensions, and various client-applications. All these differ in functions and approaches but provide all the requirements beyond the expectation such as information- storage, creation, and dissemination capabilities.
A web 2.0 website may usually feature a number of following techniques:
  • Rich Internet application techniques, optionally Ajaxbased
  • Cascading Style Sheet, CSS
  • Semantically valid XHTML markup and the use of Microformats
  • Organization and collection of data in RSS/Atom
  • Clean and meaningful URLs
  • Excessive use of folksonomies (in the form of tags or tagclouds)
  • Use of wiki software either completely or partially (where partial use may grow to become the complete platform for the site) partially, e.g. the LAMP solution stack
  • XACML over SOAP for access control between organizations and domains
  • Blog publishing
  • Mashups (A mix up of content and Audio usually from different musical style)
  • REST or XML Webservice APIs.

Innovations associated with ?Web 2.0? Web-based applications and desktops
Ajax, the rich internet application technique has prompted the development of web-sites that copy personal computer applications like (M.S. Office package) word processing, the spreadsheet, and slide-show presentation while some wiki sites replicate many features of PC authoring applications. Some sites perform collaboration and project management functions. Web 2.0 also innovated various browser based operating system that works like an application platform not merely operating system as it copy the user experience of desktop operating systems having similar features and function like a PC environment. They have as their distinctive characteristic to run within any modern browser.

Rich Internet applications
The new feature included in the Web 2.0 based application in which user does not need to refresh the page, the whole page or a portion of page get refreshed automatically like in some real time web page. E.g. Cricket websites, Share Market etc. Some of the richinternet application techniques are Ajax, Adobe Flash, Flex, Nexaweb, OpenLaszlo and Silverlight and many more.

Server-side software
Web 2.0 application server functions on existing web server architecture but strongly depend on back-end software. The weaving of software varies only nominally due to methods of publishing via using dynamic content management but web services usually need highly vigorous database and workflow support. It has analogues to traditional intranet functionality of an application server. Vendor moves towards to date fall either under a universal server approach or under a web-server plugin approach. (A universal server refers to a common server that bundles most of the necessary functionality in a single server platform while under a plugin refers to standard publishing tools enhanced with API interfaces and other tools.)
Client-Side Software
Web 2.0 provides several extra functions that a usercan use according to its own ability and requirements. It can be accessed in various forms like an HTML page, Javascript, Flash, Silverlight or Java. All these methods reduce the server workload and increase the accessibility of the application.

XML and RSS
Web 2.0 supporters consider the syndication of site content as a Web 2.0 feature includes because it standardized protocols that allows users to implement data for other purpose like for using another website, a browser plugin or a separate desktop application. XML based protocols like RSS, RDF and atom allow syndication. As the popularity of these technologies increase by name of Web feed because of its high usability the RSS icon replaced by more user-friendly icons.

Specialized protocols
Social networking sites uses the specialized protocols like FOAF (Friend of A Friend) and XFN (XHTML Friends Network), which enhance the functionality of the site by allowing end users to interact directly without centralized website.

Web protocols

Web communication protocols support the Web 2.0 infrastructure. Major Web protocols are:
  • REST (Representational State Transfer) provides a way to access and manipulates data on a server using the HTTP verbs GET, POST, PUT, and DELETE.
  • SOAP (Simple Object Access Protocol) includes POSTing XML messages and requests to a server to follow the quite complex but pre-defined instructions.

Usually servers use proprietary APIs, even though standard web-service APIs have also been used vastly. Web service communications mostly involve some form of XML.

Besides above protocols, WSDL (Web Services Description Language) is also used for web services. The composition of WSDL with UDDI is expected to promote the use of Web services worldwide.

Web 2.0 and Language Learning Technologies

Web 2.0 technologies are new and evolving techniques for learning language, but new added features like video, file sharing, blogs, wikis,  podcastingin and many more included features in Web 1.0 have made Web 2.0 very popular among the scholars, educators and students. The user of these technologies have appreciated the social networking and wikis aspect quating it as a natural helper for a constructivist learning methodology.
 

Continue learning here..

Create Simple Web Service in Visual Studio 2008 / 2010

This tutorial explains how we can create simple Web Services using Visual Studio 2008 or Visual Studio 2010

1. Create the Web Service


First create new project and select "New ASP.NET Web Service Application" and I'm giving the name "MyFirstWebService" to it, you can give any name to your project.


Now you can see auto generated code that you can add methods to create your web service. You can see simple method "HelloWorld" and in this sample code I have removed it.

I'm going to add simple method called "simpleMethod" which takes a string as an input and add "Hello" to beginning of that string. Now the code will appear like bellow.































using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace MyFirstWebService
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    // [System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {
        [WebMethod]
        public string simpleMethod(String srt)
        {
            return "Hello "+srt;
        }
        [WebMethod]
        public int anotherSimpleMethod(int firstNum, int secondNum)
        {
            return firstNum + secondNum;
        }
    }
}
Then you can run your code and you can see the resulting page as bellow.


2. Create the Client Program


We have created our simple web service and we have to create small
client program to use this web service. There you can open another
instant of Visual Studio and create new "Console Application" project.


Then you have to add Service Reference so that you can access your web service. Here are the screen-shots.




Here you have to give the URL of the web service we created earlier.
As I said before previously created web service application should be
running on another instant of Visual Studio.


Note that I have set the "Web reference name" as "TestWeb".


Now you can update your client program using following code. Note the line 5 "using WebServiceTest.TestWeb;".




















using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebServiceTest.TestWeb;
namespace WebServiceTest
{
    class Program
    {
        static void Main(string[] args)
        {
            Service1 webservice = new Service1();
            string srt = webservice.simpleMethod("Baranidharan");
            Console.WriteLine(srt);
            Console.WriteLine(webservice .anotherSimpleMethod(4,3));
        }
    }
}
Now you can run the client program to see the result.


3. Publish Our Web Service in Internet Information Service (IIS)


Let's see how we can publish our web service in IIS. Otherwise you always need to run your web service application in separate VS instant. There first stop the web service application and go to the Solution Explore and Right Click on the project. Then select "Publish...".


Then the following window will appear and there you can directly publish to the IIS by selecting "Web Deploy" as the publishing method. But here I'm going to use the "File System as the publishing method. There you have to provide the target location. I have created new folder called "MyApp" in my D drive and selected it.


Now click "Publish" and check the "MyApp" folder. There you will be able to see Service1.asmx file, Web.config file and bin folder which contains the DLL file has been generated. Then copy this "MyApp" folder to "wwwroot" folder. You may find it in "C:\inetpub\wwwroot".

Now enable IIS in your computer and open IIS Manager. I'm going to add my service to Default Web Site. There Right Click on the "Default Web Site" and click "Add Application...".


There you will get following window. Now you can provide appropriate Alias (I have given testservice) and select the physical path of your application. There you can provide the path to the folder we copied previously as following figure and click Ok.

You have to make sure that the application pool identity has Read access to the physical path. So it is better if you copy your files to the "wwwroot" folder other than keep it in separate partition. Please check the following screen-shot



Now restart the IIS and goto http://localhost/testservice/Service1.asmx. You will be able to see the Web Service running.


Now you have published your web service in IIS and you can update the Client Program by giving the new Web Reference URL using Properties Window.

Content Management System - Introduction

What Content Management System (CMS) Should You Use?  

Content Management System (CMS) is a product installed on a web server that allows managing pages, blogs and articles online, without storing them on a desktop computer and uploading each time when you need to make changes. You simply login to your website, write or modify content, and your website is instantly updated, unless you set a specific schedule for your content to be visible to website visitors. CMS products also allow multiple administrators or editors to maintain online content without conflicting with each other. And most importantly, CMS products provide separation between articles and web design, thus allowing you to focus on writing content and not worry about copying the web design from page to page. CMS products can also automatically update menus and links between pages based on the list of articles you create, therefore you don't need to worry about your website becoming broken when you rename pages.
Many CMS products have emerged over the last few years and sometimes it is difficult to choose the right one for your needs. In this article we’re going to talk about what you need to keep in mind when choosing a CMS. We will cover a few of the more popular CMS products used today.
Please note that some of the topics, pros and cons provided here are based on personal opinion and experiences of our staff. Other people may have a different opinion about CMS products based on their prior experience and comfort level with specific technologies. Therefore this guide is provided only as a general overview of popular CMS choices for those unfamiliar with CMS products or concepts.

 

Basic Web Service concepts

                                  Web service is a way of communication that allows interoperability between different applications on different platforms, for example, a java based application on Windows can communicate with a .Net based one on Linux. The communication can be done through a set of XML messages over HTTP protocol.
                                 Web services are browsers and operating system independent service, which means it can run on any browser without the need of making any changes. Web Services take Web-applications to the Next Level.The World Wide Web Consortium (W3C) has defined the web services. According to W3C, “Web Services are the message-based design frequently found on the Web and in enterprise software. The Web of Services is based on technologies such as HTTP, XML, SOAP, WSDL, SPARQL, and others.”
Why you need to learn web services:
 
Reuse already developed(old) functionality into new software: Lets understand with very simple example.Lets say you are developing a finance software for a company on java and you have old .net software which manages salary of employees.So rather then developing new software for employee part,you can use old software and for other parts like infrastructure you can develop your own functionalities.
Usability Web Services allow the business logic of many different systems to be exposed over the Web. This gives your applications the freedom to chose the Web Services that they need. Instead of re-inventing the wheel for each client, you need only include additional application-specific business logic on the client-side. This allows you to develop services and/or client-side code using the languages and tools that you want.
Interoperability :This is the most important benefit of Web Services. Web Services typically work outside of private networks, offering developers a non-proprietary route to their solutions.Web Services also let developers use their preferred programming languages. In addition, thanks to the use of standards-based communications methods, Web Services are virtually platform-independent.
Loosely Coupled:Each service exists independently of the other services that make up the application. Individual pieces of the application to be modified without impacting unrelated areas.
Ease of Integration:Data is isolated between applications creating ’silos’. Web Services act as glue between these and enable easier communications within and across organisations.
Deployability :Web Services are deployed over standard Internet technologies. This makes it possible to deploy Web Services even over the fire wall to servers running on the Internet on the other side of the globe. Also thanks to the use of proven community standards, underlying security (such as SSL) is already built-in.

Some jargons used in Web services:
Simple Object Access Protocol(SOAP):
SOAP is a protocol specification for exchanging structured information in the implementation of Web services in computer networks. It relies on XML as its message format.
Web Service Description Language(WSDL):
WSDL stands for Web Service Description Language. It is an XML file that describes
the technical details of how to implement a web service, more specifically the URI,
port, method names, arguments, and data types. Since WSDL is XML, it is both
human-readable and machine-consumable, which aids in the ability to call and bind to
services dynamically.
Elements of WSDL are:
Description:
It is the root element of a WSDL 2.0 file. It usually contains a set of name space declarations which are used throughout the WSDL file. 
Types:
The WSDL types element describes the data types used by your web service.Data types are usually specified by XML schema.It can be described in any language as long as your web services API supports it.

Binding:
The WSDL binding element describes how your web service is bound to a protocol. In other words, how your web service is accessible. To be accessible, the web service must be reachable using some network protocol. This is called "binding" the web service to the protocol.

Interface:

The WSDL interface element describes the operations supported by your web service.It is similar to methods in programming language.Client can only call one opertion per request. 

Service:
It describes the endpoint of your web service. In other words, the address where the web service can be reached.

Endpoint:

The endpoint element describes the address of the web service. The endpoint binding attribute describes what binding element this endpoint uses.i.e. protocol with which you will access web service. The address attribute describes the URI at which you can access the service.

Message:
The message element describes the data being exchanged between the Web service providers and consumers.

Sample WSDL file:
   <?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://webservices.javapostsforlearning.arpit.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://webservices.javapostsforlearning.arpit.org" xmlns:intf="http://webservices.javapostsforlearning.arpit.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified" targetNamespace="http://webservices.javapostsforlearning.arpit.org" xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="sayHelloWorld">
    <complexType>
     <sequence>
      <element name="name" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="sayHelloWorldResponse">
    <complexType>
     <sequence>
      <element name="sayHelloWorldReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
  </schema>
 </wsdl:types>
   <wsdl:message name="sayHelloWorldRequest">
      <wsdl:part element="impl:sayHelloWorld" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="sayHelloWorldResponse">
      <wsdl:part element="impl:sayHelloWorldResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:portType name="HelloWorld">
      <wsdl:operation name="sayHelloWorld">
         <wsdl:input message="impl:sayHelloWorldRequest" name="sayHelloWorldRequest"/>
         <wsdl:output message="impl:sayHelloWorldResponse" name="sayHelloWorldResponse"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="HelloWorldSoapBinding" type="impl:HelloWorld">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="sayHelloWorld">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="sayHelloWorldRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="sayHelloWorldResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="HelloWorldService">
      <wsdl:port binding="impl:HelloWorldSoapBinding" name="HelloWorld">
         <wsdlsoap:address location="http://localhost:8080/SimpleSOAPExample/services/HelloWorld"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>
Universal Description, Discovery and Integration(UDDI):
UDDI stands for Universal Description, Discovery and Integration.It is a directory service. Web services can register with a UDDI and make themselves available through it for discovery

Web service design approaches:


Contract last or Bottom up approach:
When using contract last approach,you first write your java code then you create web service contract(WSDL) .There are various kinds of tools which can generate WSDL on the basis of java code.
s
It  is reverse of contract first.Here you first define web service contract.You define all the elements of WSDL first then after that you create your java logic.