PHP-final METHODS-override a final method
PMA05:03
However, there are times where you might want to make
sure that a method cannot be re-implemented in its derived
classes. For this purpose, PHP supports the Java-like final
access modifier for methods that declares the method as
the final version, which can’t be overridden.
The following example is not a valid PHP script because it is trying to
override a finalmethod:
class MyBaseClass {
final function idGenerator()
{
return $this->id++;
}
protected $id = 0;
}
class MyConcreteClass extends MyBaseClass {
function idGenerator()
{
return $this->id += 2;
}
}
INHERITANCE OF INTERFACES
Interfaces may inherit from other interfaces. The syntax is
similar to that of classes, but allows multiple inheritance:
interface I1 extends I2, I3, ... {
...
}
Similar to when classes implement interfaces, an interface can only
extend other interfaces if they don’t clash with each other which means that
you receive an error if I2defines methods or constants already defined by I1.
Marketing on Facebook, MySpace, and Twitter
PMA03:32
The largest social media site—Facebook. As you know, this
popular social network is a community with more than 500 million users.
Ignore Facebook at your peril.
There are many ways to market your company and products on Facebook.
We’ll examine the most popular methods here—hosting a Facebook fan
page, creating a Facebook application, and cross-marketing Facebook via
your own website or blog. First up is your Facebook page.
Facebook Pages
Individuals on Facebook are represented by their profile pages; other
users become friends with a person
to receive his or her status updates.
Businesses, however, aren’t individuals
and as such don’t have individual
profile pages or friends.
Instead, your business creates what Facebook simply calls a
pageor what I call a fan page, and you get people to "like" your
page to become fans. Your fans can read all about you on your fan page,
contribute to hosted discussions, and receive all the status updates you make.
Creating a Facebook page is relatively easy. You start by going to
www.facebook.com/pages/ and then clicking the Create Page button.
When the Create a Page screen appears, select the category for your page:
Local Business; Brand, Product, or Organization; or Artist, Band, or
Public Figure.
The first thing you should do is invite people to visit and like your page. You
want to find friends on the Facebook site and then suggest your new page to
your friends. There’s a Suggest to Friends link in the sidebar of your page; use
this to send invitations to these folks.
popular social network is a community with more than 500 million users.
Ignore Facebook at your peril.
There are many ways to market your company and products on Facebook.
We’ll examine the most popular methods here—hosting a Facebook fan
page, creating a Facebook application, and cross-marketing Facebook via
your own website or blog. First up is your Facebook page.
Facebook Pages
Individuals on Facebook are represented by their profile pages; other
users become friends with a person
to receive his or her status updates.
Businesses, however, aren’t individuals
and as such don’t have individual
profile pages or friends.
Instead, your business creates what Facebook simply calls a
pageor what I call a fan page, and you get people to "like" your
page to become fans. Your fans can read all about you on your fan page,
contribute to hosted discussions, and receive all the status updates you make.
Creating a Facebook page is relatively easy. You start by going to
www.facebook.com/pages/ and then clicking the Create Page button.
When the Create a Page screen appears, select the category for your page:
Local Business; Brand, Product, or Organization; or Artist, Band, or
Public Figure.
The first thing you should do is invite people to visit and like your page. You
want to find friends on the Facebook site and then suggest your new page to
your friends. There’s a Suggest to Friends link in the sidebar of your page; use
this to send invitations to these folks.
Ad Networks and Exchanges
PMA00:49
For most advertisers, however, display ad space is purchased
via some sort of ad network or exchange. The big three PPC
ad networks all have space advertising arms; there are also a
number of other large display ad networks that would be glad
to help you get your ads placed.
the big three PPC ad networks, who aren’t necessarily the big
three display ad networks—although they’re all near the top of
the list. The advantage of going through these networks is that
you’re likely to have a prior relationship with them, and it’s
easy to extend from your PPC ads to include display ads to
the mix.
Here are the networks to start with:
1.DoubleClick by Google -www.doubleclick.com
2.Yahoo! Advertising Display Solutions -advertising.yahoo.com
2.Microsoft Advertising -advertising.microsoft.com
Most ad networks sell premium space—the exact space you want
on the sites you specify. But most sites don’t sell out all the
premium space; they still have space available on their sites that
goes unsold.
Thisremnant inventory is the same exact space as a site’s premium
space; it’s simply space that is left over after the primary space
has been claimed. As such, it sells at discount and could be a
good buy for your advertising program.
There are ad networks that specialize in selling remnant inventory.
These networks buy up the unused space from a variety of
websites and then package it to their advertisers for pennies
on the dollar. Now, you don’t always get the choice of websites
for your ad to appear, but you don’t pay as much as you do
with premium space, either.
For the host websites, selling remnant inventory is a lot better
than leaving the available space empty; they get a little bit of
income, and they don’t have to leave white space on their pages.
For advertisers, the benefit is purely monetary; you get your ads
out there for less than you would if you purchased premium space.
To that end, including remnant inventory in your advertising plan might
make sense. Even if you still purchase premium space on the sites you really
want to use, you can supplement these placements with additional remnant
purchases. It’s certainly cost effective.
Display advertising is the best way to establish your brand or
product online.Most display ads are sold on a CPM basis,
which is fine if you’re most interested in generating impressions.
There is, however, a movement toward PPC display ads, if in fact
you have actual conversion in mind.
Display ads can be image-only ads, or they can include all manner of rich
media. State-of-the-art display ads often incorporate Flash animations, video
and audio playback, and even interactive elements for the consumer to click.
via some sort of ad network or exchange. The big three PPC
ad networks all have space advertising arms; there are also a
number of other large display ad networks that would be glad
to help you get your ads placed.
the big three PPC ad networks, who aren’t necessarily the big
three display ad networks—although they’re all near the top of
the list. The advantage of going through these networks is that
you’re likely to have a prior relationship with them, and it’s
easy to extend from your PPC ads to include display ads to
the mix.
Here are the networks to start with:
1.DoubleClick by Google -www.doubleclick.com
2.Yahoo! Advertising Display Solutions -advertising.yahoo.com
2.Microsoft Advertising -advertising.microsoft.com
Most ad networks sell premium space—the exact space you want
on the sites you specify. But most sites don’t sell out all the
premium space; they still have space available on their sites that
goes unsold.
Thisremnant inventory is the same exact space as a site’s premium
space; it’s simply space that is left over after the primary space
has been claimed. As such, it sells at discount and could be a
good buy for your advertising program.
There are ad networks that specialize in selling remnant inventory.
These networks buy up the unused space from a variety of
websites and then package it to their advertisers for pennies
on the dollar. Now, you don’t always get the choice of websites
for your ad to appear, but you don’t pay as much as you do
with premium space, either.
For the host websites, selling remnant inventory is a lot better
than leaving the available space empty; they get a little bit of
income, and they don’t have to leave white space on their pages.
For advertisers, the benefit is purely monetary; you get your ads
out there for less than you would if you purchased premium space.
To that end, including remnant inventory in your advertising plan might
make sense. Even if you still purchase premium space on the sites you really
want to use, you can supplement these placements with additional remnant
purchases. It’s certainly cost effective.
Display advertising is the best way to establish your brand or
product online.Most display ads are sold on a CPM basis,
which is fine if you’re most interested in generating impressions.
There is, however, a movement toward PPC display ads, if in fact
you have actual conversion in mind.
Display ads can be image-only ads, or they can include all manner of rich
media. State-of-the-art display ads often incorporate Flash animations, video
and audio playback, and even interactive elements for the consumer to click.
YouTube-business
PMA00:30
YouTube Multimedia Marketing business
When it comes to web video, there’s one really big dog that shouldbe the centerpiece of your marketing plans. I’m talking about YouTube
www.youtube.com, the Internet’s largest video sharing community.
If you’ve never heard of YouTube, you should probably be fired from
your day job. More likely you’re a fan of the site and use it to watch
all sorts of interesting videos. That puts you in good company.
It’s hard to believe, but as of this writing, YouTube has only been around for
five years. Before YouTube, there really wasn’t a central place on the Web to
upload or view videos.
The whole thing got started by three former employees of PayPal, who had a
little cash in their pockets and the suspicion that there might be a need for a
service that facilitated the process of uploading, watching, and sharing videos.
Anyone, individual or business, can upload videos to YouTube.
These can behome movies, video blogs, old television
programs as long as copyright isn’t an issue, commercials,
even independent films. Videos can be up to 15 minutes in
length, although most are much shorter.
YouTube proved immensely popular from virtually the first day in business.
Site traffic that first month was 3 million visitors, which is pretty good for a
startup. The number of visitors tripled by the third month February, tripled
again by July to 30 million visitors, and reached 38 million visitors by the
end of the site’s first year in business. That made YouTube one of the top 10
sites on the Web, period—and one of the fastest-growing websites in history.
If a viewer likes a video, he can easily share it with others; this is how a video
goes viral, by being passed around as a favorite. Viewers can post YouTube
videos to Facebook or MySpace, send links to videos via email, even embed
videos in their blogs or web pages. All the sharing mechanisms are right there
on the video viewing page, just below the video itself.
YouTube represents an essentially free advertising channel. The site doesn’t
charge producers to store their videos or to serve up the bandwidth necessary
to view them. It also doesn’t charge viewers anything to watch those videos.
Other YouTube videos are uploaded by businesses. These videos attempt to
promote a company, a brand, or a product. Some of these videos are blatant
commercials including existing commercials repurposed to the YouTube site,
some offer in-depth prepurchase information about a given product or service,
some offer post-purchase information or support, and some use other
approaches to gain viewers—and prospective customers
The first type of video you can produce is an informative video—that is, a
video that imparts information of some sort. This most often is the YouTube
equivalent of a newscast, with you (or your spokesperson) acting as reporter
or anchorman. Alternately, an informative video may function as a video
brochure, presenting in-depth information about you or your products.