ENTRIES TAGGED "Facebook"
What is Hack and what does it mean for the future of PHP?
Facebook recently released Hack, a new programming language that looks and acts like PHP. Underneath the hood, however, are a ton of features like static typing, generics, native collections, and many more features for which PHP developers have long been asking. Syntax aside, Hack is not PHP. Hack runs only on Facebook’s HipHop virtual machine (HHVM), a competitor to the traditional PHP Zend Engine.
Why did Facebook build Hack?
Much of Facebook’s internal code is first written with PHP. Facebook can onboard new developers quickly with PHP because the language is notoriously easy to learn and use. Granted, much of Facebook’s PHP code is likely converted to a C derivative before being pushed into production. The point is Facebook depends strongly on the PHP language to attract new talent and increase developer efficiency.
Unfortunately, PHP may not perform as well as possible at Facebook’s scale. PHP is a loosely typed language and type-related errors may not be recognized until runtime. This means Facebook must write more tests early to enforce type checking, or spend more time refactoring runtime errors after launch. To solve this problem, Facebook added strict typing and runtime-enforcement of return types to Hack. Strict typing nullifies the need for a lot of type-related unit tests and encourages developers to catch type-related errors sooner in the development process.
Instantaneous Type Checking
To make the development process and error-catching process even easier, Facebook includes a type-checking server with its HHVM engine. This server runs locally and monitors Hack code as it is written. Developers’ code editors and IDEs can use this type-checking server to immediately report syntax or type-related errors during code development.
Android software development at a crossroads
Apps have to get bigger and more ambitious. A key question for the developer community is how do you create big, integrated, multi-functional, configurable apps for the mobile enterprise? Curiously, Facebook is providing some answers by not using HTML5 and not attempting to make a cross-platform app. Go native, go big, and go deep.
Facebook Home is a harbinger of serious mobile apps
Facebook Home has earned positive reviews—in many cases from reviewers who had tired of Facebook and the intrusiveness of Facebook’s privacy policies and practices. Facebook Home is an example of a new kind of Android software development. It spans a variety of functions as a suite of cooperating software. It uses Android’s intent filters, high-level interprocess communication (IPC), shared databases (
ContentProvider components) and remote APIs to bond together a software product that replaces many of the standard parts of Android—as they are meant to be replaced.
Facebook Home isn’t some kind of rogue hack, nor is it a “fork” of AOSP, as Kindle Fire is. Facebook Home is a tour de force of correct Android application architecture. It takes over your phone, interface by interface, always playing by the rules, and it does so for justifiable reasons: for putting Facebook’s functionality everywhere you want to perform communications and social media functions.
Moreover, Facebook Home simply can’t be done on iPhone. iOS has a specific vision of apps that is separate from system software, while Android’s frameworks are the basis of both applications and system software. Facebook Home was built with this difference in mind: It replaces key elements of the Android system user experience. It is a suite of communicating apps. The word “app” doesn’t sufficiently describe it.
Square cab fares, Wal-Mart looks to beat Amazon to the same-day punch, and a major player update in the mobile payments war.
Here are a few stories that caught my attention in the commerce space this week.
Square may be courting cabs
Square not only is gearing up to launch in Starbucks stores in November — it may also be looking to enter the New York City taxi cab market. Ryan Mac reports at Forbes this week that negotiations may be underway:
“Late Monday, private company expert PrivCo said that the San Francisco-based startup and the city of New York will be announcing an official partnership with the city of New York to implement Square’s payment systems across the city’s cabs. If negotiations are completed as expected, said New York City-based PrivCo, the partnership may be announced as early as this month.”
Mac reports that neither Square nor New York City’s Taxi & Limousine Commission (TLC) would confirm that a deal was in place, but he notes Square has been testing iPad credit card swipers with TLC since March.
As to its forthcoming foray into Starbucks, Lisa Baertlein at Reuters reports that further innovations are in the works even ahead of the launch. At launch, customers will be able to pay for a coffee by having a barcode scanned off a smartphone, but plans are already in the works to use Square’s GPS to identify a customer in a Starbucks location, who can then pay by giving his or her name to the cashier. Also, Cliff Burrows, president of Starbucks’ Americas region, told Baertlein that by summer 2013, customers will have the option and ability to tip using the technology.
One-click Facebook campaigns, PayPal redesigns, and a Best Buy exec identifies in-store mobile issues.
Payvment launches a one-click Facebook ad service, PayPal revamps its website with consumers and mobile in mind, and a Best Buy exec says in-store mobile use has a scale issue. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)
Facebook buys Karma, strategies to battle showrooming, and grocery shopping gets mobile.
Facebook puts its IPO money to use, seven strategies to help retail businesses survive "showrooming," and grocery shopping sans checkout lines. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)
The evolution of geofences, Google Wallet's departures, and mobile carriers vs Facebook.
Placecast's CEO describes layers of context that make for rich, geo-targeted messages. Also, talent flees Google Wallet, and Facebook's IPO may make life harder for mobile carriers. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)
Facebook looks to make mobile pay, Google Wallet's security problems, and shopping on subway walls.
Bango will run Facebook's mCommerce platform, Google Wallet hacked, and PayPal pilots shopping walls. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)