Search This Blog

Monday, January 18, 2010

Basic steps to create and deploy a gadget

Basic Steps
Here are the basic steps you follow to create and deploy a gadget:
1. Use any text editor to write your gadget specification, and host it on a public web server.
2. Add your gadget to a site that has the ability to run gadgets, such as iGoogle.
Anatomy of a Gadget
Once you understand how to edit and publish gadgets, you're ready to include more advanced features in your gadget specifications. The XML gadget specification consists of 3 major parts:
• Content Section. The section is where the real work of your gadget happens. It is where you specify the type of gadget, your programming logic, and often the HTML elements that determine the appearance of your gadget.
• User Preferences. The section defines controls that allow users to specify settings for the gadget. For example, a personalized greeting gadget might provide a text field for users to specify their names.
• Gadget Preferences. The section in the XML file specifies characteristics of the gadget, such as title, author, preferred sizing, and so on.
Note: Within the XML attributes in a gadget spec, you need to "escape" (that is, properly encode) certain characters so that they will be interpreted correctly. For more information, see Escaping Special Characters.
Escaping Special Characters
Within the XML attributes in a gadget spec, you must escape certain special characters. Note that only ASCII entities can be used in the gadget spec. For example, you cannot use ISO 8859-1 symbol entities. Here is a list of the special characters that are supported:
Character Escape Code
1.& ---- &

2.< ---- &lt; 3.> ---- &gt;

4." ---- &quot;

5.' ---- &apos;

For example:
• BAD: href="http://www.foo.com/bar?x=a&y=b"
• GOOD: href="http://www.foo.com/bar?x=a&y=b"
• BAD: description="this is a "good" gadget"
• GOOD: description="this is a "good" gadget"
Note that this type of escaping is not required in the CDATA block. However, it is still good practice to do it there.
Within your JavaScript code, you can use the _hesc(str) function to return the HTML string str with the the following characters escaped: <>'".
When writing a gadget, you should start with the section.
Defining Content
The section represents the "brains" of a gadget. The section defines the type of content, and either holds the content itself or has a link to external content. The section is where the gadget attributes and user preferences are combined with programming logic and formatting information to become a running gadget.
The easiest way to create your gadget is to simply place HTML (and optionally, JavaScript or Flash) into the section. Experienced web developers can read Choosing a Content Type for other options relating to access control, remote hosting, using alternative scripting languages, and other topics. Here's a simple sample gadget. This gadget displays a clickable photograph that opens a photo album in a new HTML page:
Choosing a Content Type
One of the first decisions you make when you're developing a gadget is which content type to use. For example:

The content type determines:
• Which API features are available to you as a gadget author.
• How your gadget is rendered.
• Where you can deploy your gadget.
The following table describes the available content types and when you should use them:

Content Type -Html
Description - With an html content type, all of the content typically resides in the gadget spec. A type="html" gadget contains HTML, possibly with embedded JavaScript, Flash, ActiveX, or other browser objects. This is the default type.
When to Use -The most flexible, versatile content type is html. When in doubt, choose the html content type.
Content Type -url
Description -With a url content type, the gadget content lives on a remote web page referenced by a URL in the gadget spec. The remote web page is where all of the HTML markup and JavaScript resides. You can NOT put any HTML markup or JavaScript code in the gadget spec itself.
When to Use -The type="url" content type is currently not fully supported by the gadgets.





[CDATA[
]]


<?xml version="1.0" encoding="UTF-8" ?>
<module>
<moduleprefs title="Go to SALONISAYONI Photo Album" width="200" height="200" scaling="false" author_email="www2007@gmail.com"
thumbnail="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_EqVV7tmGiYDrl0xJavBM-biIlEAsYw2PIfVijRYruCElZne2TSCKTH0s2tHe7zyVFn60rvt7z8dHRDp0AL9QusX_qaSXajBxSc-JGzND7H_zYwSRiGQfKqghkPFORmY2iE5QG2pDjdgX/s640/DSC03216.JPG" />
<content type="html">
[CDATA[
<div style="text-align:center">
<a
id="Riggs" title="My Photo Album" target="_blank"
href="http://picasaweb.google.com/swapnanjalis/Prathamastami2009?locked=true&feat=email#5410615684023266514">
<img border="0" alt="Photo" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_EqVV7tmGiYDrl0xJavBM-biIlEAsYw2PIfVijRYruCElZne2TSCKTH0s2tHe7zyVFn60rvt7z8dHRDp0AL9QusX_qaSXajBxSc-JGzND7H_zYwSRiGQfKqghkPFORmY2iE5QG2pDjdgX/s640/DSC03216.JPG"
title="Click Here."></a>
</div>
]]
</Content>
</Module>
Defining User Preferences
Some gadgets need to give users a way of supplying user-specific information. For example, a game gadget might allow users to enter a preferred level of difficulty. The user preferences () section in the XML file describes the user input fields that are turned into user interface controls when the gadget runs. User preferences are stored persistently.
For example, this gadget displays a personal greeting based on the time of day. It lets users specify the following:
• A name to use in the greeting. The name is also displayed in the title bar.
• A background color.
• Whether to display a photo.

Sunday, January 17, 2010

Gadgets...

What are gadgets?
Gadgets are mini applications with a variety of possible uses. They can connect to web services to deliver business data, weather information, news updates, traffic maps, Internet radio streams, and even slide shows of online photo albums. Gadgets can also integrate with other programs to provide streamlined interaction. Gadgets are mini programs that give you information at a glance and provide access to frequently used tools. Windows Sidebar helps you to organize your gadgets.
Gadgets are small web applications that run on multiple sites, including iGoogle, orkut, other OpenSocial containers, Google Desktop, and thousands of sites all over the web that use Gadgets for Your Webpage. Gadgets are written in a module language using XML that wraps HTML and JavaScript.
What you can do with gadgets?
• Write in HTML; for dynamic behavior add JavaScript, Flash, or Silverlight.
• Get started quickly: no downloads necessary, no libraries to learn, and no webserver required.
• Create gadgets that run online in various sites — such as iGoogle, orkut, other OpenSocial containers, Maps, Desktop, and Calendar — as well as in third-party platforms and any webpage.
What you can do with Desktop gadgets ?
• Write in XML and JavaScript, optionally using C, C++, C#, or VB.net
• Use advanced functionality, such as:
o Free-form shapes and transparency
o Client libraries
o Responses to user actions outside the gadget (such as when the user opens iTunes or starts reading an email message)
Notes:
• Google Desktop must be installed on the user's computer.
• Not all gadgets can be added to a user’s desktop
Where do gadgets exist?
Gadgets are simply externally hosted XML files. They can be stored anywhere that normal web sites can be hosted. Google offers free hosting services that you can use to host your gadgets: Google Gadget Editor and Google Code Hosting.
Google fetches the XML specification when the gadget is displayed and caches it for approximately a few hours to prevent web hosting providers from being overloaded with requests.

Monday, November 30, 2009

SOA is a software design principle

SOA is not Web services

There seems to be general confusion about the relationship between SOA and Web services. In an April 2003 Gartner report, Yefim V. Natis makes the distinction as follows: "Web services are about technology specifications, whereas SOA is a software design principle. Notably, Web services' WSDL is an SOA-suitable interface definition standard: this is where Web services and SOA fundamentally connect." Fundamentally, SOA is an architectural pattern, while Web services are services implemented using a set of standards; Web services is one of the ways you can implement SOA. The benefit of implementing SOA with Web services is that you achieve a platform-neutral approach to accessing services and better interoperability as more and more vendors support more and more Web services specifications.

What is service-oriented architecture?

What is service-oriented architecture?
Service Oriented Architecture(SOA) is an evolution of distributed computing based on the request/reply design paradigm for synchronous and asynchronous applications. An Application is a business logic or individual functions are modularized and presented as services for consumer/client applications. What’s key to these services is their loosely coupled nature i.e. the service interface is independent of the implementation. Application developers or system integrators can build applications by composing one more services without knowing the service underlying implementations .For example a service can be implemented either in .Net or in J2EE and the application consuming the service can be on different platform or language.
Service-oriented architectures have the following key characteristics:
·          SOA services have self-describing interfaces in platform-independent XML documents. Web Services Description Language (WSDL) is the standard used to describe the services.
·          SOA services communicate with messages formally defined via XML Schema (also called XSD). Communication among consumers and providers or services typically happens in heterogeneous environments, with little or no knowledge about the provider. Messages between services can be viewed as key business documents processed in an enterprise
·          SOA services are maintained in the enterprise by a registry that acts as a directory listing. Applications can look up the services in the registry and invoke the service. Universal Description, Definition, and Integration (UDDI) is the standard used for service registry.
Each SOA service has a quality of service (QoS) associated with it. Some of the key QoS elements are security requirements, such as authentication and authorization, reliable messaging, and policies regarding who can invoke services

Thursday, November 26, 2009

My working-area

My working area is Java , J2EE  & SOA Technology, so i'll update few blogs in my free hour



SOA –Service oriented Architechture

What is it ?
Answer- Organizations are looking for a ways to make their applications, business processes, data and IT infrasctructure more modular and flexible. SOA meets these challenges hands-on.
In a Service Oriented Architecture systems are composed of reusable compoments, called services. A service is a software building block that performs a distinct function such as- retrieving customer information from database.  Because these services are ‘loosely coupled’ rather than tightly coupled integrations, service-oriented infrastructures and applications can change as quickly as business needs changes. SOA works with legacy and existing system through wrap and reused as opposed to  rip and replace, so service can be constructed , deployed and reused virtually on demand , and easily integrated enterprise wide, across multiple platform.
How do you apply it?
Answer- Middleware is critical. While it has its roots in common integration this category of software has  evolved to encompass some of the most fundamental components of information enterprise and offers complete support for the development, deployment and management of SOA. In fact middleware is the most strategic area  of IT  today. It’s how you initiate business invocation ;optimize business processes; uncover business insight and manage risk such as security, access control , and corporate governanace.
However the vital starting point is not technology. Instead of understanding the business service that are needed, demonstrating business success and gaining early business approval are essential.SOA is ideally suited to incremental deployment  while invest can be made by step-by-step basis tied to individual project – hence the need to understand  the understand the business requirement at the outset.
What are the benefits?
Answer- The fundamental reason for moving towards SOA is greater business and IT flexibility and agility, and because it works with what organizations already own there is no need to rip out and replace what you ‘ve already invested in. These are enormous advantages with wide reaching implications across every enterprise. Depending on the industry it is used in, and the most vital core services it supports, SOA can provide dramatic improvements in compliance , operational efficiency and customer retention.
What’s more, you don’t have to invest heavily to build an extensive architecture before you can see the real benefits- from the first project you can transform the IT assets of a business , making it possible to do more with less, far faster than before. SOA is a key step towards the goal of a truly agile business where new business initiatives can be deployed as needed- with the necessary underlying IT support- with minimal delay.
Why now?
Answer- The standards behind SOA have been around for years –but they are only  now reaching maturity. The evidence is inconvertible. Every leading vendor of software development tools and business application is supporting the adoption of SOA. The long region monolithic applications is coming to an end.SOA has created a new age of flexible , plug and play services and the next generation of competitive advantage will belong to those who seize it.