Sunday, December 23, 2007

Email Validation

Here is a sample code for validating email address using JavaScript regular expression.

var Email = "username@domain.com";
var flag = /^[a-zA-Z0-9_.]+@[a-zA-Z0-9]+[.][a-zA-Z]+[a-zA-Z.]*$/.test(Email);
if(flag){
alert('Valid email address');
}else
alert('Invalid email address');

Saturday, December 1, 2007

Find Position

Each html elements in a page has position values (ie. where the elements currently
placed). Basically it is measured by pixels from top and pixels from left.The top
and left position values are obtained by using the html elements attributs offsetTop
and offsetLeft.This can be calculated at run time using javascrit.
The script follows. Argument of the function is the object of the HTML element,
and it returns the array of values.

function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
curleft = obj.offsetLeft
curtop = obj.offsetTop
while (obj = obj.offsetParent) {
curleft += obj.offsetLeft
curtop += obj.offsetTop
}
}
return [curleft,curtop];
}

Thursday, November 29, 2007

Facebook feed.publishTemplatizedAction

Publish feed to both Mini and News feed using feed.publishTemplatizedAction. In the starting i faced lots of difficulties for this, I got mini feeds successfully but News feeds are not come. I got news feeds only after i register the feed templates. Feed templates has no ids. What ever you construct templates in coding just you register those in Feed templates, Both are exactly same. Then only you get news feeds successfully, this way allows news feeds are posted to all your friends even those who are not added application. I gave source code below, i think that is usefull for you.

fbFaceBookUID;
$body_template = '';
$body_data = '';
$body_general = '';
$image_1 = NULL;
$image_1_link = NULL;
$image_2 = NULL;
$image_2_link = NULL;
$image_3 = NULL;
$image_3_link = NULL;
$image_4 = NULL;
$image_4_link = NULL;
/*
if You you make any Changes in templates and data you must make corresponding changes in Registered Feed Templates
*/
switch($Type){
case "AddApplication":
$title_template = "{actor} added {AppName} application";
$title_data = '{"AppName":"FBAppURL.'\">'.$this->AppName.'"}';
break;
case "JoinTeam":
$title_template = "{AppName} : {actor} joined in {TeamOwnerName} team";
$title_data = '{"AppName":"FBAppURL.'\">'.$this->AppName.'","TeamOwnerName":""}';
break;
case "AnswerQuestion":
$title_template = "{AppName} : {actor} has answered a quiz sent by {Sender} and has earned points for his team";
$title_data = '{"AppName":"FBAppURL.'\">'.$this->AppName.'","Sender":""}';
break;
case "PointsFeed":
$title_template = "{AppName} : {actor} scored {Points} points";
$title_data = '{"AppName":"FBAppURL.'\">'.$this->AppName.'","Points":"'.$Points.'"}';
break;
case "PointsOverFeed":
return;
break;
default:
return;

}

$Return = $this->objFaceBook->api_client->feed_publishTemplatizedAction($actor_id, $title_template, $title_data, $body_template, $body_data, $body_general, $image_1, $image_1_link, $image_2, $image_2_link, $image_3, $image_3_link, $image_4,
$image_4_link, $target_ids);
}
?>

Hi guys if make any mistakes please let me know which helps to me to correct my self.
Please leave your comment:

Wednesday, November 21, 2007

Web Submission

You have a site or blog but it is not found in the search engine. You can submit your site or blog url to the web directories which adds your site url to most of the search engine. I give link below one of the free web directory submission site.FreeWebSubmission.com

Tuesday, November 20, 2007

DIV over IFRAME

Hi,

I want to display my div content over the iframe. I tried with z-Index property, but DIV content can not come over the IFRAM.

Is it possible ?.

Pls help me.

Thanks in advance.

Friday, November 16, 2007

Steps to Create Web Application in JSP & Servlet

The following steps summarize the procedure for creating a Web Application. You may want to use some of the provided developer tools for creating and configuring Web Applications. For more information, see Web Application Developer Tools.

To create a Web Application:

  1. Arrange the resources (servlets, JSPs, static files, and deployment descriptors) in the prescribed directory format. For more information, see Directory Structure.
  2. Write the Web Application deployment descriptor (web.xml). In this step you register servlets, define servlet initialization parameters, register JSP tag libraries, define security constraints, and define other Web Application parameters. (Information on the various components of Web Applications is included throughout this document.) Place the descriptor in the WEB-INF directory of the Web Application.

    For detailed instructions, see Writing the web.xml Deployment Descriptor.

    You can also use the Administration Console to edit Web Application deployment descriptors. For more information, see Web Application Deployment Descriptor Editor Help.

  3. Create the WebLogic-specific deployment descriptor (weblogic.xml). In this step you define JSP properties, JNDI mappings, security role mappings, and HTTP session parameters. If you do not need to define any attributes in this file, you do not need to create the file.

    For detailed instructions on creating the WebLogic-specific deployment descriptor, see Writing the WebLogic-Specific Deployment Descriptor (weblogic.xml).

    You can also use the Administration Console to edit Web Application deployment descriptors. For more information, see Web Application Deployment Descriptor Editor Help.

  4. Archive the files in the above directory structure into war file. Only use archiving when the Web Application is ready for deployment in a production environment. (During development you may find it more convenient to update individual components of your Web Application by developing your application in exploded directory format.) To create a .war archive, use this command line from the root directory containing your Web Application:
    jar cv0f myWebApp.war .

    This command creates a Web Application archive file called myWebApp.war.

  5. (Optional). Archive the Web Application into an Enterprise Application.
  6. Deploy the Web Application on Weblogic Server. This final step configures your Web Application to service requests on WebLogic Server. For detailed instructions, see Deploying Web Applications.

Directory Structure

You develop your Web Application within a specified directory structure so that it can be archived and deployed on WebLogic Server, or another J2EE compliant server. All servlets, classes, static files, and other resources belonging to a Web Application are organized under a directory hierarchy. The root of this hierarchy defines the document root of your Web Application. All files under this root directory can be served to the client, except for files under the special directory WEB-INF, located under the root directory. The name of your Web Application is used to resolve requests for components of the Web Application.

Place private files in the WEB-INF directory, under the root directory. All files under WEB-INF are private, and are not served to a client.

WebApplicationName/

Place your static files, such as HTML files and JSP files in this directory (or a subdirectory). This directory is the document root of your Web Application.

/WEB-INF/web.xml

The Web Application deployment descriptor that configures the Web Application.

/WEB-INF/weblogic.xml

The WebLogic-specific deployment descriptor file that defines how named resources in the web.xml file are mapped to resources residing elsewhere in WebLogic Server. This file is also used to define JSP and HTTP session attributes.

/WEB-INF/classes

Contains server-side classes such as HTTP servlets and utility classes.

/WEB-INF/lib

Contains .jar files used by the Web Application, including JSP tag libraries.

Wednesday, November 14, 2007

Cake PHP

Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. To know more about this click here.

Saturday, November 10, 2007

Stored Procedures

What are Stored Procedures ?
MySQL 5.0 finally introduces functionality for Stored Procedures. So what exactly are stored procedures? That is the kind of question that gets database professionals who use other DBMS's raising their eyebrows. Stored procedures have been integral to Oracle, PostgreSQL, DB-2, MS-SQL server and others for years, and it has long been a sore point that MySQL has not had them. But there is no snobbery here - if you are a MySQL newbie, or have been using MySQL for years and want to find out what all the fuss is about, read on. If it is your eyebrows that are raised, and you just want to know how MySQL implements them, you will be relieved to know MySQL stored procedures are very similar to the DB2 implementation, as both are based on the SQL:2003 standard.

A stored procedure is simply a procedure that is stored on the database server. MySQL developers have to date unthinkingly written and stored their procedures on the application (or web) server, mainly because there hasn't been an option. That has been limiting. Some have claimed that there are two schools of thought - one claiming that logic should be in the application, the other saying it should reside in the database. However, most professionals would not bind themselves to one or other viewpoint at all times. As always, there are times when doing either makes sense. Unfortunately, some of the staunchest adherents of the in the application school are only there because until now they have had no choice, and it is what they are used to doing. So why would we want to place logic on the database server?

Why use Stored Procedures ?
  • They will run in all environments, and there is no need to recreate the logic. Since they are on the database server, it makes no difference what application environment is used - the stored procedure remains consistent. If your setup involves different clients, different programming languages - the logic remains in one place. Web developers typically make less use of this feature, since the web server and database server are usually closely linked. However, in complex client-server setups, this is a big advantage. The clients are automatically always in sync with the procedure logic as soon as its been updated.
  • They can reduce network traffic. Complex, repetitive tasks may require getting results, applying some logic to them, and using this to get more results. If this only has to be done on the database server, there is no need to send result sets and new queries back and forth from application server to database server. Network traffic is a common bottleneck causing performance issues, and stored procedures can help reduce this. More often though, it is the database server itself that is the bottleneck, so this may not be much of an advantage.
A Simple Example
stored procedure is simply some SQL statements.This one will simply say 'Hello'.
mysql> CREATE PROCEDURE Hello() SELECT 'Hello';
Query OK, 0 rows affected (0.00 sec)

It is as simple as that. And to call it:

mysql> CALL Hello()\G
*************************** 1. row ***************************
Hello: Hello
1 row in set (0.00 sec)

Hardly useful, but the basics are there. CREATE PROCEDURE sp_name() will define the procedure, and CALL sp_name() will call the procedure.

Parameters

The real benefit of a stored procedure is of course when you can pass values to it, as well as receive values back. The concept of parameters should be familiar to anyone who has had experience with any procedural programming experience.

There are three types of parameter:

  • IN: The default. This parameter is passed to the procedure, and can change inside the procedure, but remains unchanged outside.
  • OUT: No value is supplied to the procedure (it is assumed to be NULL), but it can be modified inside the procedure, and is available outside the procedure.
  • INOUT: The characteristics of both IN and OUT parameters. A value can be passed to the procedure, modified there as well as passed back again.

Mastery of stored procedures does require knowledge of session variables. Most of you probably know how to use session variables already, but if not, the concept is simple. You can assign a value to a variable, and retrieve it later.

Calling Stored Procedures from PHP
Consider the Procedure ViewComment and it has a IN parameter ID. The Procedure created with the following code
DELIMITER $$

DROP PROCEDURE IF EXISTS `Murali_InnoDB`.`ViewComment` $$
CREATE DEFINER=`root`@`%` PROCEDURE `ViewComment`(ID integer)
BEGIN
select * from tblPerson LEFT JOIN tblComment ON (tblComment.fk_PersonID = tblPerson.ID) where tblPerson.ID = ID;
END $$

DELIMITER ;

Then call Procedure ViewComment from a PHP file, it will be described below.

SQL Table Joining

Inner join

All of the joins that you have seen so far have used the natural join syntax—for example, to produce a list of customers and dates on which they placed orders. Remember that if this syntax is available, it will automatically pick the join attributes as those with the same name in both tables (intersection of the schemes). It will also produce only one copy of those attributes in the result table.

        SELECT cFirstName, cLastName, orderDate
FROM customers NATURAL JOIN orders;

• The join does not consider the pk and fk attributes you have specified. If there are any non-pk/fk attributes that have the same names in the tables to be joined, they will also be included in the intersection of the schemes, and used as join attributes in the natural join. The results will certainly not be correct! This problem might be especially difficult to detect in cases where many natural joins are performed in the same query. Fortunately, you can always specify the join attributes yourself, as we describe next.

• Another keyword that produces the same results (without the potential attribute name problem) is the inner join. With this syntax, you may specify the join attributes in a USING clause. (Multiple join attributes in the USING clause are separated by commas.) This also produces only one copy of the join attributes in the result table. Like the NATURAL JOIN syntax, the USING clause is not supported by all systems.

        SELECT cFirstName, cLastName, orderDate
FROM customers INNER JOIN orders
USING (custID);

• The most widely-used (and most portable) syntax for the inner join substitutes an ON clause for the USING clause. This requires you to explicitly specify not only the join attribute names, but the join condition (normally equality). It also requires you to preface (qualify) the join attribute names with their table name, since both columns will be included in the result table. This is the only syntax that will let you use join attributes that have different names in the tables to be joined. Unfortunately, it also allows you to join tables on attributes other than the pk/fk pairs, which was a pre-1992 way to answer queries that can be written in better ways today.

        SELECT cFirstName, cLastName, orderDate
FROM customers INNER JOIN orders
ON customers.custID = orders.custID;

• You can save a bit of typing by specifying an alias for each table name (such as c and o in this example), then using the alias instead of the full name when you refer to the attributes. This is the only syntax that will let you join a table to itself, as we will see when we discuss recursive relationships.

        SELECT cFirstName, cLastName, orderDate
FROM customers c INNER JOIN orders o
ON c.custID = o.custID;

• All of the join statements above are specified as part of the 1992 SQL standard, which was not widely supported for several years after that. In earlier systems, joins were done with the 1986 standard SQL syntax. Although you shouldn’t use this unless you absolutely have to, you just might get stuck working on an older database. If so, you should recognize that the join condition is placed confusingly in the WHERE clause, along with all of the tests to pick the right rows:

        SELECT cFirstName, cLastName, orderDate
FROM customers c, orders o
WHERE c.custID = o.custID;

Outer join

One important effect of all natural and inner joins is that any unmatched PK value simply drops out of the result. In our example, this means that any customer who didn’t place an order isn’t shown. Suppose that we want a list of all customers, along with order date(s) for those who did place orders. To include the customers who did not place orders, we will use an outer join, which may take either the USING or the ON clause syntax.

        SELECT cFirstName, cLastName, orderDate
FROM customers c LEFT OUTER JOIN orders o
ON c.custID = o.custID;

All customers and order dates
cfirstname clastname orderdate
Tom Jewett
Alvaro Monge 2003-07-14
Alvaro Monge 2003-07-18
Alvaro Monge 2003-07-20
Wayne Dick 2003-07-14

• Notice that for customers who placed no orders, any attributes from the Orders table are simply filled with NULL values.

• The word “left” refers to the order of the tables in the FROM clause (customers on the left, orders on the right). The left table here is the one that might have unmatched join attributes—the one from which we want all rows. We could have gotten exactly the same results if the table names and outer join direction were reversed:

        SELECT cFirstName, cLastName, orderDate
FROM orders o RIGHT OUTER JOIN customers c
ON o.custID = c.custID;

• An outer join makes sense only if one side of the relationship has a minimum cardinality of zero (as Orders does in this example). Otherwise, the outer join will produce exactly the same result as an inner join (for example, between Orders and OrderLines).

• The SQL standard also allows a FULL outer join, in which unmatched join attributes from either side are paired with null values on the other side. You will probably not have to use this with most well-designed databases.

Evaluation order

Multiple joins in a query are evaluated left-to-right in the order that you write them, unless you use parentheses to force a different evaluation order. (Some database systems require parentheses in any case.) The schemes of the joins are also cumulative in the order that they are evaluated; in RA, this means that

r1 join r2 join r3 = (r1 join r2) join r3.

• It is especially important to remember this rule when outer joins are mixed with other joins in a query. For example, if you write:

        SELECT cFirstName, cLastName, orderDate, UPC, quantity
FROM customers LEFT OUTER JOIN orders
USING (custID)
NATURAL JOIN orderlines;

you will lose the customers who haven’t placed orders. They will be retained if you force the second join to be executed first:

        SELECT cFirstName, cLastName, orderDate, UPC, quantity
FROM customers LEFT OUTER JOIN
(orders NATURAL JOIN orderlines)
USING (custID);

Other join types

For sake of completeness, you should also know that if you try to join two tables with no join condition, the result will be that every row from one side is paired with every row from the other side. Mathematically, this is a Cartesian product of the two tables, as you have seen before. It is almost never what you want. In pre-1992 syntax, it is easy to do this accidently, by forgetting to put the join condition in the WHERE clause:

        SELECT cFirstName, cLastName, orderDate
FROM customers, orders;

• If your system is backward-compatible (most are), you might actually try this just to prove to yourself that the result is pure nonsense. However, if you ever have an occasion to really need a Cartesian product of two tables, use the new cross join syntax to prove that you really mean it. Notice that this example still produces nonsense.

        SELECT cFirstName, cLastName, orderDate
FROM customers CROSS JOIN orders;

• It is possible, but confusing, to specify a join condition other than equality of two attributes; this is called a non-equi-join. If you see such a thing in older code, it probably represents a WHERE clause or subquery in disguise.

• You may also hear the term self join, which is nothing but an inner or outer join between two attributes in the same table. We’ll look at these when we discuss recursive relationships.


What is PHP?

What is PHP?

PHP is an open source programming language used to build dynamic Web pages. A dynamic Web page is a page that interacts with the user so that each visitor to the page sees customized information. Dynamic Web applications are prevalent in commercial sites where the content displayed is generated from information accessed in a database or other external source. PHP scripts are embedded within a Web page along with HTML, similar to other scripting languages such as Microsoft’s Active Server Pages (ASP) or Sun Microsystems' Java Server Pages (JSP).

Like ASP and JSP, PHP is a server-side language, meaning it runs on the Web server, rather than on the Web browser or other client. PHP can be used for any application development that uses a Web browser as the user interface. Because of user preferences for and familiarity with Web browsers, the use of browser-based solutions for mission-critical enterprise applications is increasing rapidly. A law office in Indianapolis, Indiana, for example, runs its billing and client management system in PHP. Pfizer Inc., the $34 billion a year pharmaceutical giant, used PHP to build an internal time and document tracking system for monitoring field trials of new drugs. These examples illustrate the fact that the market for Web applications extends far beyond the Internet.

Why PHP?

With hardly any publicity, PHP has swept the Web. According to the authoritative Netcraft survey of what technology is actually in use on the Web, PHP can now be found on more than five million domains, and is growing at a rate of up to 15% each month. PHP is available on over 36% of Apache Web servers – the most common server on the Web. The latest version of PHP, PHP 4, was downloaded 265,000 separate times in the first two months it was available.

Why is PHP so popular? Programmers who work with PHP say it is:

  • Ideal for dynamic and interactive Web sites
  • Supports a wide variety of back-end databases (e.g., Oracle, MySQL and others)
  • Easy to use and easy to learn
  • Designed for the Web, from the ground up
  • Fast
  • Extremely reliable
  • Cross platform – Unix (e.g., Sun Solaris, Linux, Compaq Tru64, IBM AIX and more) and Windows (e.g. NT 4.0, Windows 2000); cross Web server (e.g. Apache, IIS, Zeus); and highly portable
  • Compatible with a variety of other key Web technologies, including Java, COM, XML and Macromedia Flas

The rapid growth of PHP is driven by the explosive growth of server-based applications, which are rapidly replacing traditional client-based applications; market demand for an intuitive cross-platform, easy-to-use scripting language; and increasing recognition by the business community of the ability of open-source platforms to enable the free, stable, and rapid development of high-quality software.

Enterprises are also now realizing the need for a server scripting platform to replace Java servlets. For most enterprises, time-to-launch is a primary consideration. It simply takes too long to build an application using JSP. PHP has a much lower and easier learning curve than Java, allowing for quicker development cycles – from proof-of-concept to final product design.

Ideal for Dynamic Web Sites

Back in the early days of the World Wide Web – the mid-1990s – all you needed to build a Web site was HTML and perhaps some GIF files. That was before e-commerce swept the Web, before Web sites grew to include hundreds, or in some cases thousands, of pages. Today, transaction-oriented, interactive Web sites are rapidly replacing sites built using static HTML, and Web masters are quickly realizing that trying to keep thousands of separate HTML pages updated is an impossible task.

Not surprisingly, many Web sites now use HTML or XML to display information while storing their data in a database. This allows a company to update a piece of information – say a description of an item in a catalog, or a price – only once, in the database, and have the change reflected on every page that uses that information. PHP makes it easy to do this: just insert the PHP script in the HTML, and the data will appear in the proper place on the page. PHP supports databases from companies such as Oracle, Informix, Sybase, IBM, and Microsoft, as well as open source databases such as MySQL and PostgreSQL.

PHP: Easy to Learn, Easy to Use

For software engineers, the choice of programming language is a highly personal choice. Programmers are always looking for tools that make their lives easier. The increasing shift to PHP among Web application developers is a testament to PHP’s efficiency and ease of use.

For programmers who know C, C++, or Java, PHP is extremely easy to learn. Programmers say PHP is very intuitive and even people who are not experienced programmers can quickly pick up the basics. What’s more, with the current tight labor market for programmers, some Web development companies are finding that they can hire people who are not programmers, teach them PHP, and have them producing usable code within days.

Designed for the Web

While there are many available tools for building Web sites, most were originally designed for some other purpose. Java, for instance, started out as a language geared towards client-side applets, and not server-side servlets. The Perl programming language started life as a system administration tool, and was later shoehorned into its role as a Web development language, resulting in structural problems such as memory leaks.

PHP is easy to use for Web development because it has been designed from the outset for the Web environment. That means that PHP has many built-in functions that make Web programming simpler, so that programmers can focus on the logic of programming without wasting precious development time. As a simple example, Web browsers interpret characters like the ampersand (&) as special HTML code. Programmers then have to convert the ampersands to their special HTML representation, which is "&amp". Languages such as Perl or Allaire’s Cold Fusion require complicated regular expressions, similar to global search and replacements, PHP has simple functions already built in to do this.

Service Component Architecture for PHP

Like SDO for PHP, this is the first time the SCA technology has been mapped to a weakly and dynamically typed scripting language. The design and implementation must therefore focus very heavily on ensuring a natural fit with the unique requirements of that environment.

The initial scope of SCA for PHP is to provide a means for a PHP programmer to write reusable components, which can be called either locally, or remotely via Web services, with an identical interface and with a minimum of fuss.

Developing a Web service is made simple by automatically generating WSDL as needed from annotations within the component script. These annotations are a natural extension to those provided by phpDocumentor. Deploying a Web service is like deploying any other script.

This resource taken from www.osoa.org. To know more about this topic please refer this link Click here to read more

PHP DEFINITION(continued)

A PHTML (or it's sometimes called a PHP) page is a Web page that includes a script written in PHP, a language comparable to JavaScript or Microsoft's VBScript. Like Microsoft's Active Server Page (ASP) page, a PHTML page contains programming that is executed at the Web server rather than at the Web client (which is usually your Web browser). You may sometimes see a Web site whose address or URL ends with a file with a suffix of ".phtml"" or ".php3". Either of these suffixes indicate an HTML page that includes a PHP script.

Tuesday, November 6, 2007

Google Web Toolkit

Google Web Toolkit (GWT) is a Java software development framework that makes writing AJAX applications like Google Maps and Gmail easy for developers who don't speak browser quirks as a second language. Writing dynamic web applications today is a tedious and error-prone process; you spend 90% of your time working around subtle incompatibilities between web browsers and platforms, and JavaScript's lack of modularity makes sharing, testing, and reusing AJAX components difficult and fragile.
http://code.google.com/webtoolkit/

Database Replication in MySQL

MySQL does not claim to be enterprise-ready for nothing, and Yahoo and other high-volume users of MySQL certainly do not run on one database server. There are a number of techniques to handle high volumes, one of which is introduced in this article - MySQL replication.

http://databasejournal.com/features/...le.php/3355201

Friday, November 2, 2007

Create First Facebook Application


Getting Started:
To create your Facebook application you need a Facebook account. You can sign up free for Facebook at www.facebook.com. Once you have your account you’ll need to install the Facebook developer application. This little tool will allow you to generate your application profile and get an API key. Once you’ve logged into Facebook visit: www.facebook.com/developers/ or click the following link to add the developer Application.

Add the Facebook Developer

I have developed my Facebook application in PHP. You no need to write a single line of code to interact with facebook, All things are given by Facebook it self as a PHP Rest Client library files. You want to just use those APIs to interact with facebook to your appliction. You can grab the PHP version of the library at developers.facebook.com/resources.php. Download the ‘PHP (4 and 5) Client Library’.

Once you’ve downloaded the library unzip it into a folder that is accessible by your PHP scripts. So you would have something like /php_include_directory/facebook/ and in that folder you will have the entire Facebook PHP Client Library (3 folders: client, footprints, php4client). I’m using PHP5 so my examples will be using the “client” directory of the library. The footprints folder is an example application.

Configure Your Application Settings:
Facebook requires that you register each application you make. Once you’ve logged into Facebook and installed the developer application go to the developer panel (or click here). Inside the developer application click “Set Up New Application”.

Required Fields:
1. Application Name: This is important because it’s what users will see when they are browsing the application directory. Currently the name field is the only thing used when searching for applications. So it’s at this point.

Optional Fields:
1. Support E-mail:
You need to provide your email address. The facebook developers contact you through this email address when any new updates or any problems in your application.

2. Callback URL: This is where things start to get confusing; a callback URL is meant to be the root directory with the slash included, of the content for your facebook application on your server. For my application, i place the facebook application directory in my server's root; this callback URL is crucially important as it is your end of the Facebook application service. If this URL is not provided correctly your application will not work.

Facebook call back URLs work essential like proxy servers, including caching. The reason for this? Obviously Facebook doesn’t want applications with crappy hosts diminishing the results for its users, so it caches FBML (Facebook Markup Language) output and checks periodically for updates.

Eg: http://www.myserver.com/myfacebookapplication/

3. Canvas page URL: The canvas page URL is simply the Facebook virtual directory pointing for the content in your application.

Eg: http://apps.facebook.com/myfacebookapplication/

4. Application Type: This one is pretty simple; if you’re designing a desktop application that connects to Facebook for some operations, then check the desktop option. If you’re designing an application that can be run off of your website, then pick website.

5. Mobile Integration: sorry i didn't used this option.

6. IP Addresses of Servers Making Requests: You can restrict to access your application except from some IPs through using this optional field. Provide comma separated IP addresses here to access your application.

7.Can your application be added on Facebook?: If you want users to be able to add your application to their facebook account, then check the yes button. This means that users will be able to access the canvas page, add your application to their profiles, and post news feed items regarding your application.
Note: If you are still in the development stage of your application, don’t check the “no” button because you want to prevent users from accessing your application, as this will also prevent you and any developers you are working with from testing the application as a user; check the “only developer’s may install application” checkbox further down the page to prevent normal users from tampering with your application in production.

8. Terms of Service (TOS) URL: The terms of service URL is meant to be a link to a terms of service document hosted on your server; unless you’re trying to build a Facebook app where you can potentially run into some privacy issues, I’d recommend leaving this blank.

9. Application Icon: First, every application should have an icon, period. Your icon will be shown alongside your application name in every instance the app name is displayed, so it’s important for establishing branding. The icon dimensions are 16 by 16 pixels and it must in the GIF format.

10. Post-Add URL: This URL can be on your local hosting, and users are redirected from Facebook to here immediately after adding your application.

Eg. http://app.facebook.com/myapplication/install.php

11. Application Description: Self-explanatory. This is the description that appears next to your application on the “About Application XYZ….” page.

12. Post-Remove URL: When a user selects to remove your application they are not sent to the ‘Post-Remove URL’ as they have removed the application and so will have no further contact with it. A POST request will be sent to this address in the background however containing the uid of the leaving user.

13. Default FBML: This is the FBML that will be visible in the profile by default.

14. Default Profile Box Column: There are two columns on any Facebook profile page: the wide one on the right and the narrow one on the left. Users can drag and drop your application on their profile to either column, but if you want to specify a default column you can do it here.

15. Developer’s Only Mode: If you don’t want any noobs (normal people) messing around with your application while you’re still in the process of developing and testing it, check this button.

16. Side Nav URL: This is an important one. If you want Facebook users who have installed your application to be able to access it via sidebar, you need to provide them with a URL so they can have a link on their sidebar. For many applications this link is the application’s primary entry point.

17. Privacy URL: If you have some custom privacy options that you’d like your users to be able to set, place a URL to that here. Again, it can be internal like my sidenav example or external.

18. Help URL: If you have a help page for your users you can place a link to it (internal or external to Facebook, again) here. Although I have no idea where it actually appears as I have tried looking for mine.

19. Private Installation: If you want to prevent information about your application from appearing on news feeds or mini feeds then check this box.

20. Upload URLs: If you want to allow uploads in your application you need to fill out both of these fields. Frankly, I don’t know quite how the action field works, but the callback URL is just your local URL for handling the file upload.

Getting API and Secret Key: You should now see your application listed with a unique API Key and Secrete code (Navigation link : Click developer in the left panel and then click My Applicaitons link). You’ll use these within your application.



There are a number of API calls, and a list of them can be found here:
developers.facebook.com/documentation.php

Resources and Further Reading

These are very helpful pieces of information that I highly recommend reading before you get too far into making your Facebook application.

And of course the official documentation / developer site:

Other Facebook tutorials and how-to articles:

Thursday, November 1, 2007

DHTML Menus


Create web navigation of your dreams with our DHTML Menus! DHTML Menus is a set of professional web components ( DHTML Menu, DHTML Tree, DHTML Tabs) that allows guru and amateur web developers to design cross-browser, fast-loading, search engine friendly dhtml menus for their web sites and web apps.

Wednesday, October 31, 2007

Javascript and Ajax

The following links provides A library of nice looking DHTML(dynamic HTML) scripts, javascripts and Ajax scripts.

1. Javascript Tutorial

2. DHTML and Javascript Samples and Demos

3. Ajax Tutorials

4. DHTML and AJAX Samples and Demos

5. Ajax Samples Samples and Demos

Xajax Tutorials

Ajax is easy! Just include xajax, register a function (or an object or class method) then add a call to the function in your HTML or javascript then see the result in the browser instantly!.

1. Learn xajax in 10 Minutes

2. Download Xajax Here

3. XAJAX samples and demos

4. Xajax API documentation

Monday, October 29, 2007

My Sql

Referential integrity
Referential integrity means that when a record in a table refers to a corresponding record in another table, that corresponding record will exist. To read more about this follow the following links.
1.http://www.databasejournal.com/features/mysql/article.php/10897_2248101_1
2.http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html

Sunday, October 28, 2007

PHP Developers

Developer Manuals:

1. Download PHP manual

2. Download MySql Manual

3. Download Javascript

Software:

To execute and test php sites you need php and php enabled web servers and db database based web pages. Some control panels includes all these three. You can download these from the following link.

1. Download XAMPP

2. Download WAMPP

3. Download Easy PHP

And Dreamweaver is the best design and development tool for php you can download this from the following link.

4. Dreamweaver 8.0

Latest News and Discussion forums:

To view latest news and discussion forms about php Click here

Yahoo! News: Technology News