Archive for August, 2008


Free Online Dating with Black Book Singles

-August 7, 2008 byMatt Huggins

Black Book SinglesBlack Book Singles is a 100% free online dating service that allows members to find other local singles living nearby. Unlike the majority of Facebook applications that only exist on Facebook.com, Black Book Singles exists as a third party dating website that also allows users to find local singles on Facebook.

Both the website and the Facebook application allow users to create a free dating profile, upload personal photos, search for local singles, and send private messages. The website also offers the added benefit of a public dating forum where users can participate in public chat, as well as a collection of frequently updated dating articles in the blog.

Because Black Book Singles is different from most Facebook applications in that it is first and foremost a third party website that plugs into Facebook as an aside, getting started is a bit different than what Facebook users are used to. When first accessing the application, a user must register an account by creating a username and password, as well as providing an email address. The information is automatically associated with the user’s Facebook account, however, meaning that the user is automatically logged into Black Book Singles if accessing the application through Facebook. The username and password is only required if the member decides to access his or her account directly through the BlackBookSingles.com domain in the future.

Advertisement


Once a user has registered a new or imported an existing account, creating a dating profile is relatively easy. Most information can be selected from drop-down boxes and checkboxes, including gender, location, lifestyle information, interests, and religion. Other personal information — including name, a dating headline, and an about me section — must be manually entered by the user.

After creating a basic profile, the member is given an option to add personal photographs to his or her profile. Within the Black Book Singles Facebook application, this can easily be done by clicking on pictures that have already been uploaded into Facebook albums. One of the benefits of the Black Book Singles website is that additional photos from the user’s computer can be uploaded. Additionally, Facebook users have a “default” profile picture automatically assigned, while users accessing the website directly can specify which photo should be used as the default.

The final appearance of a dating profile that includes several photos can be seen below. Information is broken into sub-sections making it easy for visitors to scan, with images and action links to the right of the main profile content.

Black Book Singles Profile

Finding other members is as easy as typing in the first few letters of the location you’re interested in searching around, then choosing the most suitable options from the drop-down menu that appears. Details regarding gender and age range can be specified to ensure the results align with your interests.

Dating Profile Search

The search results provide a simple overview of matching users, including the user’s headline, name, age, and distance from the search location. Clicking on the profile picture or “View Profile” link leads to the full profile view. Additionally, each profile summary includes a link to send the member a message or add the member to your list of favorites.

In all, Black Book Singles is a great service for the price. It may not offer all the fancy details and finishing touches that a costly dating site like Match.com or eHarmony has, but it is free for everyone to use and covers all the basic functionality necessary to make new connections and meet new people.

Zend Further Expands Its Line of PHP Training Courses

-August 5, 2008 byZend Technologies, Ltd.





New Courses Cover Migration from PHP 4 to PHP 5 and Zend Studio for Eclipse, the leading PHP IDE

 

Cupertino, CA  –  August 6, 2008  –  Zend Technologies announced today the addition of two new PHP training courses: “Migration from PHP 4 to PHP 5” and “Zend Studio for Eclipse”. These courses further expand the portfolio of Zend training courses, which include PHP from introduction to advanced levels, as well as courses about PHP Security, creation of Rich Internet Applications, and the use of major Zend products.

 

The PHP courses, complemented with PHP 5 Certification Training, prepare students for the Zend PHP Certification Examination. With over 3,300 Zend Certified Engineers (ZCEs) worldwide, Zend Certification has become the global standard by which enterprises select, recruit and educate PHP professionals. More than 300 ZCEs advertise their Zend certification on their resumes in the LinkedIn professional network (http://www.linkedin.com).

Oxagile is a rapidly growing software outsourcing company with a strong focus on quality. They have achieved  a number of goals with their participation in Zend’s certification programs.

“Becoming a certified expert brings many benefits to the engineer, to the company, and its clients,” says Dmitry Karpovich, Oxagile CEO.  “The ZCE Certification demonstrates that the development team keeps in step with the latest PHP technology.  And it helps to show our customers and prospects that we have highly qualified PHP developers where it matters most of all – their critical projects.”

Through Zend, enterprise organizations have access to a complete training portfolio that enable their staff to deliver high-impact web applications faster, more predictably, and with better quality. They’ll be trained in industry best practices for web development, leveraging the modern object-oriented capabilities of PHP and frameworks, while leveraging state-of-the-art Zend product solutions.

“Signing our engineers up for the Zend Framework training was by far the best ROI investment I’ve made for our project,” said Jose C. Lacal with HealthLibrarian. “Our engineers delivered a fully working search engine with many customizations we needed within two weeks of completing Zend’s course.”

“By offering our curriculum in multiple languages, on-line and on-site through Zend training centers, Authorized Training Partners, and in collaboration with universities, we make our training easily accessible to both the growing PHP community and to commercial companies worldwide,” said Susie Sedlacek, vice president for global services at Zend. “Participants also benefit from our in-depth analysis of customer input, extensive research, and proven methods of instructional design. Zend has invested thousands of hours of experience into developing a curriculum that focuses on business relevance.”

“Our goal is to endow our clients with the skills and tools necessary to meet their needs in the most convenient and powerful methods used in adult education today, and our consistently high customer satisfaction ratings confirm our success,” adds Deirdre Bradley, head of instructional design at Zend.

Sponsored by Zend and delivered through Pearson Vue, the Zend PHP certification, leading to the title of Zend Certified Engineer (ZCE), is the standard for developers who want to demonstrate PHP proficiency.

Zend Certification testing is provided as part of conference attendance at the Zend/PHP Conference 2008, to be held in Santa Clara, California from September 15-18. For more information about ZendCon and to register, please visithttp://www. zendcon. com.

For additional details about Zend Training programs including courses, schedules, training partners, and for course registration, please visithttp://www.zend.com/training.

 
About Zend Technologies, Inc.
 

Zend Technologies, Inc., The PHP Company, is the leading provider of products and services for developing, deploying, and managing business-critical PHP applications.  PHP is used by more than twenty million web sites and has quickly become the most popular language for building dynamic web applications.  Deployed at more than 25,000 companies worldwide, the Zend family of products is a comprehensive platform for supporting the entire lifecycle of PHP applications.  Zend is headquartered in Cupertino, California.

For more information, please visit www. zend. com, or call +1 408 253 8800.

                                                                                                 ###
 Press Contact information:
 Bradford Cottel
Zend Technologies
+1 408 253 8812

pr@zend. com

Optimize Your Database Tables for Facebook Connect

-August 5, 2008 byMatt Huggins

At this year’s f8 Conference, Facebook announced the release of Facebook Connect. Facebook Connect is essentially Facebook Beacon redone, with the additional goal of taking users’ privacy into account. (The name change is likely to prevent people from associating negative opinions of Beacon with Connect.) Third party websites can allow users to log in using their Facebook credentials instead of creating a username and password for yet another website. In turn, those websites can deliver information to users’ News Feeds and Mini Feeds, generate friend notifications, and send email messages via Facebook.

The Run Around

Since seeing the first demo video of Facebook Connect during Mark Zuckerberg’s f8 ‘08 Keynote, one of the my initial questions that came to mind is how the back-end database must be structured for this to work efficiently and effectively. Fortunately, Facebook came along and offered The Run Around sample web app, which demonstrates how to use the client and includes example code. With the sample code came the users table definition, which can be seen below.

CREATE TABLE `users` (
  `username` varchar(255) NOT NULL,
  `name` text,
  `password` text,
  `email` text,
  `fb_uid` int(11) default NULL,
  `email_hash` varchar(64) default NULL,
  PRIMARY KEY `username` (`username`)
);

From this, it’s clear that the username is the primary key for any given user, as would generally be expected. However, considering that the username is in fact the primary key, and keeping in mind that users are allowed to log in using Facebook data alone via Facebook Connect (thereby not needing a username), I became curious about what kind of username a Facebook user is assigned when attempting to log in using this method.

Advertisement


After a bit of searching, I came across the createFromFacebookUID function within the lib/user.php file. This function (less some unnecessary lines of code) can be seen below.

static function createFromFacebookUID($fb_uid) {
  // *extraneous code stripped out for simplicity*
  $user_params['username'] = 'FacebookUser_' . $fb_uid;

  // *more extraneous code stripped out for simplicity*

  // write to the db
  if (!$user->save()) {
    return null;
  }

  return $user;
}

From this, it can be seen that the username field is nothing more than a hack for Facebook users. In fact, someone not using Facebook could come along and create a user by the name of “FacebookUser_12345″, at which point the person registered under Facebook UID 12345 could hijack that person’s account simply by logging in via Facebook Connect. While this is not a likely scenario, it is still a scenario that does exist in the system and is thus a design flaw.

While thinking about ways to resolve this issue, I considered the following approaches.

Potential Resolution #1: Create a Separate Table for Facebook Users

My initial thought was that this could be corrected simply by having two tables: a users table (containing people who registered through the site) and a facebook_users table (containing people logging in via Facebook Connect).

CREATE TABLE `users` (
  `username` varchar(255) NOT NULL,
  `password` text,
  `name` text,
  `email` text,
  PRIMARY KEY `username` (`username`)
);

CREATE TABLE `facebook_users` (
  `fb_uid` bigint(11) default NULL,
  `email_hash` varchar(64) default NULL,
  `name` text,
  `email` text,
  PRIMARY KEY `fb_uid` (`fb_uid`)
);

At first this seemed like a viable approach until I considered that other data in the database is going to be associated with a user. For example, a website that allows users to review movies might store each user’s reviews in a relational table named something like user_reviews, which includes two foreign keys pointing to the users and movies tables respectively.

Now that we’ve introduced the facebook_users table, however, we quickly see that reviews data cannot be associated with persons using Facebook Connect unless we either create a secondary facebook_user_reviews table — which is not feasible as all interfaces interacting with reviews data must be updated — or somehow associate the facebook_users table with users.

Potential Resolution #2: Associate Facebook Users Table with Users Table

The previous statement brings me to my second though on how this conundrum might be approached. Simply associating facebook_users with users allows for us to use JOIN conditions across multiple tables, thereby allowing other user data associated with the application (such as the aforementioned movie reviews) to be retrieved and associated with a Facebook user. The table structure implementing this concept can be seen below.

CREATE TABLE `users` (
  `username` varchar(255) NOT NULL,
  `password` text,
  `name` text,
  `email` text,
  PRIMARY KEY `username` (`username`)
);

CREATE TABLE `facebook_users` (
  `fb_uid` bigint(11) default NULL,
  `email_hash` varchar(64) default NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY `fb_uid` (`fb_uid`)
);

Unfortunately, this method requires a Facebook user logging in via Facebook Connect to register an account on the website as the two tables are directly related. As such, a user is unable to take advantage of what Facebook Connect is intended for: one-click login. The user would need to both log into Facebook Connect and register/login with an account on the third party website.

Potential Resolution #3: Create a Separate Account Table that Users and Facebook Users Associate With

My third and final thought on how to approach this difficulty is to create a basic account table with two separate tables associated with it: one with login credentials for when visitors create an account, and another with Facebook UID’s that can be used for Facebook Connect. The below SQL table definitions specifically outline my intentions.

CREATE TABLE `accounts` (
  `id` int(11) AUTO_INCREMENT NOT NULL,
  `name` text,
  `email` text,
  PRIMARY KEY `id` (`id`)
);

CREATE TABLE `users` (
  `username` varchar(255) NOT NULL,
  `password` text,
  `account_id` int(11) NOT NULL,
  PRIMARY KEY `username` (`username`)
);

CREATE TABLE `facebook_users` (
  `fb_uid` bigint(11) default NULL,
  `email_hash` varchar(64) default NULL,
  `account_id` int(11) NOT NULL,
  PRIMARY KEY `fb_uid` (`fb_uid`)
);

Using this structure, whenever a person logs in using Facebook Connect, two records will be inserted into the database: one record in the facebook_users table, and one in the accounts table. Similarly, whenever a person registers a new account on the website, two records will be inserted into the database: one record in the users table, and one in the accounts table.

The benefit of this approach is that all other data in the database can still be associated with an account. The account is then either associated with a Facebook user or a registered site user depending on how the person logged into the site during the visit.

Additionally, because the accounts table is utilized regardless of how the user logs in, and because data specific to the login method is kept in a separate table for each login type, more types of login methods — OpenID for example — can easily be implemented into your website in the future.

In Conclusion…

It is my personal belief that the final suggestion provided in this article is the best route to take for most websites wishing to implement Facebook Connect. Depending upon the goals of your website or business, though, you might not need to go the extra mile. It is important to note that if you do decide implement one of the “easier” implementations, such as the one included with The Run Around, then you will be making things extremely difficult for yourself in the future should you change your mind. While I suggest that something similar to the final table definitions be used within your own web projects that are implementing Facebook Connect, it is not the only right or only working solution.

    

Web Owner Tools










Recent Posts:
Sources:
Archives:
Meta:
Welcome to Web Owner Tools!

Web development is a challenging job, so you need the very best web owner tools to get it done right. Whether it's SEO, programming, utilities, software or just keeping up on the latest trends; web owner tools are what you need to succeed. Give yourself a headstart on the competition, and bookmark Web Owner Tools today.

 


Visit the Web Owner Store