News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Allan MacGregor:
Exploring Hack Building a MicroFramework
August 11, 2014 @ 09:09:13

Allan MacGregor has started a new series of posts to his site where he creates a microframework in Hack, the language created by Facebook to compliment their HHVM (Hip-Hip Virtual Machine) project. He sees it as a "learn by doing" kind of thing and wanted to share his results.

I honestly believe the best way to learn something is to get your hands dirty and make mistakes; so instead of writing dozens of post on the many new features of Hack and why they are awesome (in theory) let's build something useful. So to get started I've decided to build a micro-framework using HACK and HHVM, building a simple microframework should be a challenging enough task to illustrate some of the more interesting features of the language and at the same time it has an achievable goal so we don't end on a never ending development cycle.

His framework, one he calls "Slash", will mostly be about creating RESTful applications but it could, in theory, be for any kind of web application. He also mentions some of the other great microframeworks out there already that are well-developed and have good communities behind them (including Slim and Silex. This is just the first part of the series and introduces some of the "why" around his goal. In the next part of the series he'll get into the structure and routing with some actual framework code.

0 comments voice your opinion now!
hack microframework facebook hhvm language slash

Link: http://coderoncode.com/2014/08/06/exploring-hack-part1.html

Community News:
PHP Specification in Development
July 30, 2014 @ 11:54:25

In a recent message to the PHP internals mailing list Sara Golemon has announced the development of a PHP specification, a document formally defining the interfaces and structure of the functionality of the language. The effort is being spearheaded by a group at Facebook.

We (As in PHP) have been talking about making a spec for the PHP language for a LONG time. With PHPNG around the corner, the need for a formal spec is even more important so that we can reliably ensure that PHP.Next matches PHP 5.6's behavior as much as possible. Meanwhile, other implementations of PHP (like HHVM) should be as spec compliant as possible so that we don't see the language bifurcate. To that end, we (as in Facebook), have been putting together a formal language spec for PHP (using PHP 5.6 as the source of truth) along with an additional conformance test suite (which compliments Zend/tests).

An initial version (a "sneak peek") has already been posted providing a great start to the effort. There's already been a lot of support for the project in the community and some of the concerns around workflow and maintenance are already starting to be addressed.

0 comments voice your opinion now!
language specification facebook earlyrelease

Link: http://grokbase.com/t/php/php-internals/147p423vvz/php-language-specification

SitePoint PHP Blog:
Social Network Authentication Twitter and Facebook
July 21, 2014 @ 11:32:12

The SitePoint PHP blog continues their series of tutorials showing how to authentication your users against various social networks. In the previous post they covered connecting to Google+ and in this latest post they move on to two other popular social networks: Facebook and Twitter.

In the previous parts of this series, we created our initial interfaces, set up our Google+ login functionality and talked about how we can merge our accounts together. In this article, we will integrate Twitter and Facebook within our application. You will see a lot of similarities with the Google+ article, so if you could follow that one easily, you won't have much trouble with this one. If you haven't read that article yet, I suggest you read it first before continuing this article.

He starts off with the Twitter authentication, creating a new "SocialLogin" object type for it and defining the three required properties it needs to connect. Code is included to make the OAuth connection, pass along the callback URL and forward on the user to the Twitter site for approval. Code is also included to store the data about the Twitter user in your application. Next up is Facebook. The connection is very similar to the others with only a slight difference in the data that's required. You can find the full code for the tutorial so far in this Github repository.

0 comments voice your opinion now!
social network authentication tutorial series twitter facebook

Link: http://www.sitepoint.com/social-network-authentication-twitter-facebook/

SitePoint PHP Blog:
Paginating Real-Time Data with Cursor Based Pagination
July 11, 2014 @ 11:52:13

On the SitePoint PHP blog today a new tutorial has been posted introducing you to cursor-based pagination of real-time data, showing the results and allowing for easy click-through functionality.

Pagination is a technique for breaking large record sets into smaller portions called pages. As a developer, you should be familiar with implementing pagination, but implementing pagination for real time data can become tricky even for experienced developers. In this tutorial, we are going to discuss the practical use cases and solutions for real time data pagination and cursor based pagination.

He uses results from the Twitter and Facebook APIs in his examples, grabbing tweets matching the search term "php". He briefly explains some of the issues with real-time pagination and how it compares with standard pagination techniques. He uses the "after" and "before" functionality of each API to only pull the data needed, not the entire list of latest posts. This is added to a list in order and shown when the user view is refreshed. He includes the code for implementing the cursor-based handling and how to echo the results back out to a view.

0 comments voice your opinion now!
cursor pagination twitter facebook api tutorial realtime

Link: http://www.sitepoint.com/paginating-real-time-data-cursor-based-pagination/

Reddit.com:
Hack How to open the black box of Hacklang as a PHP developer
June 25, 2014 @ 11:56:44

In this recent post to Reddit, user JordanLeDoux shares some of the basics behind the Hack language (from Facebook) and making a "first jump" into it and its strong typing handling.

codebase. Having built HHVM, they wanted something that would enforce certain behaviors for developers that didn't rely on IDE's interpreting phpDoc statements. Hack's most interesting and largest function is that it adds optional strong typing to PHP, by examining the tokenized code and ensuring that where declared strong typing is respected.

Example code is included showing the different levels of typing and how to use them in a few example functions. He introduces some of the basic types included in Hack (like int, float and bool) and some of the types unique to Hack (like mixed, tuples, resource and closures). There's a brief look at maps, vectors and sets and a link to more documentation if your interest has been piqued to learn more and make that "first jump".

0 comments voice your opinion now!
hack introduction language facebook tutorial

Link: http://www.reddit.com/r/PHP/comments/28wn7j/hack_how_to_open_the_black_box_of_hacklang_as_a/

HHVM Blog:
Hack Developer Day 2014 Keep Hacking
April 11, 2014 @ 09:40:00

On the Facebook HHVM blog today there's a post about the Hack Developer Day they recently held in Menlo Park. The event brought in developers for a day of presentations from the Hack/HHVM engineers.

150+ Members of the PHP and developer community came to Facebook headquarters and joined over 2000 people online for presentations by the engineers of Hack and HHVM. Afterwards we held a five hour hackathon, where the attendees worked with those engineers to write Hack code, either by converting current codebases or writing new code from scratch.

For those that weren't able to attend or are interested in catching up on what was presented, they've posted videos of all of the sessions in a YouTube playlist as well as PDFs of all the slides. If you want the short version of what was presented, there's a quick list in the post or you can read a recap on the Facebook Engineering blog.

0 comments voice your opinion now!
hack developer day facebook presentation video slides summary

Link: http://hhvm.com/blog/4685/hack-developer-day-2014-keep-hacking

Pádraic Brady:
Is Facebook's HHVM Building PHP's Coffin?
April 01, 2014 @ 09:31:52

In a new post to his site, Pádraic Brady poses a question about the HHVM project from Facebook - is it going to "be the coffin" that will replace the Zend Engine in PHP completely and change the way we know it?

With HHVM 3.0 now released, it's probably time to start talking about HHVM and the new Hack Language. It's becoming hard to ignore some of the fantastical notions spreading on the grapevine about HHVM. There is talk of significant performance improvements, a multitude of new features courtesy of Hack, that PHP Internals is actually now outnumbered by HHVM contributors. There is even treasonous talk of PHP's Zend Engine being put out to pasture.

He talks about how it was inevitable, really, that there'd be another implementation come up through the ranks (much like the variations of Ruby). He also mentions some other, less popular options in replacing the main implementation (Zephir, HippyVM, etc). He then poses an interesting question - "what is PHP?" He talks about language specifications, the PHP internals group and the delay that sometimes happens introducing new language features into the core (some of which HHVM already has).

PHP, as we know it, is starting to smell. It has gone from being the only PHP in town, to being the slowest, with the least number of features, and the one that's subject to dysfunctional governance. The new PHP is called Hack, a new language with only the briefest of documentation since you can learn the other 99.9% of this language over on the PHP manual.
0 comments voice your opinion now!
hhvm hack facebook opinion future language

Link: http://blog.astrumfutura.com/2014/03/is-facebooks-hhvm-building-phps-coffin

HHVM Blog:
HHVM 3.0.0
March 31, 2014 @ 10:15:00

The HHVM blog has an exciting new post for those using the HHVM and Hack language - they've officially released version 3.0.0 with complete Hack support.

At our last major version bump (2.0.0), we basically became a whole new project. We switched from a "PHP -> C++" translator to a virtual machine. This version bump (3.0.0) is a much less dramatic code shift (we're still a VM, don't worry), but this time the big announcement is that we support a new language, Hack.

They take a step back in time and look at the changes since 2.0.0 in organization, technology and community involvement. From there, they get into "the business" of what's in this new release including:

  • The old webserver is gone. If you get something like Uncaught exception: no factory for server type "libevent", you need to switch to fastcgi.
  • We are moving from .hdf config files to .ini.
  • Our most requested extension, mysqli is now in. (there's currently a bug, but the fix will be in 3.0.1).

You can find out more about the HHVM on the project's main website.

0 comments voice your opinion now!
hhvm release hack support v3 project facebook

Link: http://hhvm.com/blog/4349/hhvm-3-0-0

CiteWorld.com:
Facebook's Hack language a silver bullet for user-developers
March 26, 2014 @ 10:41:16

In this new post to CiteWorld.com, they're making the claim that the Hack language from the developers at Facebook is the "silver bullet for user-developers".

How do you modernize the way we build the web? That's the question at the heart of the release of a flurry of new languages and development platforms -- all from companies that run and build large scale web services. [...] While getting more out of CSS is good, as is replacing JavaScript; Facebook's HHVM and Hack combo is targeting one of the foundations of the modern web: rapid application development.

They talk some about the overall goals of Hack (improved performance, a stricter typing system) and include a brief example of some Hack code. They consider it to be a "more modern language" that brings PHP-based development up into a different level of languages. He also talks about HHVM a bit, migration from PHP to Hack and the potential for Hack to be adopted on other platforms outside of the current HHVM runtimes.

0 comments voice your opinion now!
hack facebook silverbullet language developer overview

Link: http://www.citeworld.com/development/23156/hack-future

Allan MacGregor:
Hello Hack
March 25, 2014 @ 09:50:33

Allan MacGregor has a new post to his site introducing you to Hack, the recently released language from Facebook based on their work with the HipHop virtual machine.

Recently Facebook unveiled Hack, a new programming language that aims to provide developers with the tools to write and ship code quickly while catching errors on the fly. Hack is as programming language designed to work with HHVM and the same time it works seamlessly with PHP as Facebook lead devs. [...] So does that mean that Hack is just a faster more efficient PHP implementation, right? Wrong, Hack is much more than that, the language brings features that are normally found in statically typed languages to the dynamically typed world of PHP.

He focuses in on the static typing functionality of Hack a bit more and includes an example of PHP code where Hack would catch the type shifting. He also briefly mentions some of the other features including built-in collections, traits, generics and asynchronous programming.

0 comments voice your opinion now!
hack facebook language introduction typing

Link: http://coderoncode.com/2014/03/23/hello-hack.html


Community Events





Don't see your event here?
Let us know!


voicesoftheelephpant community tips package release language deployment list api install introduction laravel bugfix interview series framework library podcast opinion symfony

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework