News Feed
Sections




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

SitePoint PHP Blog:
How to Build Multi-step Forms in Drupal 8
July 07, 2015 @ 12:25:06

The SitePoint PHP blog has a post for the Drupal users out there showing you how to create multi-step forms in your application.

In this article, we are going to look at building a multistep form in Drupal 8. For brevity, the form will have only two steps in the shape of two completely separate forms. To persist values across these steps, we will use functionality provided by Drupal's core for storing temporary and private data across multiple requests. In Drupal 7, a similar approach can be achieved using the cTools object cache. Alternatively, there is the option of persisting data through the $form_state array as illustrated in this tutorial.

They start by setting out what the end result will be - a simple two-page form with two fields each, allowing for navigation back and forth between the pages. They start with a base class defining requirements needed for both pages and setting up the necessary form structure. They walk through each part of this base class, explaining the functionality going along. With that in place they extend it with a "MultistepOneForm" and "MultistepTwoForm" classes extending the base and defining two fields on each.

0 comments voice your opinion now!
tutorial drupal drupal8 multistep form

Link: http://www.sitepoint.com/how-to-build-multi-step-forms-in-drupal-8/

Voices of the ElePHPant:
It's the Booze Talking Podcasters on Podcasting
July 07, 2015 @ 11:58:32

The Voices of the ElePHPant podcast has posted a special episode of their "It's the Booze Talking" series with a show of podcasters talking about podcasting. Besides host Cal Evans the episode also features other podcast hosts Sammy Powers (PHP Roundtable), Matt Stauffer (5 Minute Geek Show/Laravel Podcast), Chris Hartjes (DevHell), Ben Edmunds (PHP Town Hall), Kayla Daniels (No Capes), Beau Simensen (That Podcast) and NinjaGirl (#ossart).

They talk about why they started their podcasts and what they want their show to be for their listening audience. They also go around and mention who they think their target audience is (or if there is a target), how they present their content to match and some of the feedback they get. Cal also asks some of the "how" involved in creating their shows and sharing them with their listeners. Finally they talk about some of their own "horror stories" they've had during the production of their show.

You can listen to this latest episode either through the in-page audio player or by downloading the mp3. If you enjoy the show and want to hear more from members of the PHP community, be sure to subscribe to their feed too!

0 comments voice your opinion now!
voicesoftheelephpant community boozetalking podcasters podcasting

Link: https://voicesoftheelephpant.com/2015/07/07/its-the-booze-talking-podcasts/

BitExpert Blog:
Think About It PHPExcel Performance Tweaks (Part 1)
July 07, 2015 @ 10:34:21

Florian Horn has posted the first part of a series of performance tweaks for using PHPExcel to work with Excel spreadsheets and CSV data.

A few weeks back I covered a small article about a CSV-Tool optimized for memory usage and additionally tweaking performance. Our performance optimization sprint contained the improvement of read file data, processing and persist it. While the file data is relatively small referred to the file size, the amount of data sets can vary between 5.000 and more then 40.000 entities on an average, but may be a lot more in some cases.

This article is the first of a three-part series and describes how we tweaked PHPExcel to run faster while reading Excel and CSV files.

In this first part of the series he goes through three different tips to improve some of the basic performance:

  • Cache Cell Index in Memory
  • Iterators and GC Optimization
  • Use Custom Read Filters

You can find out more about the PHPExcel library on the project's main page.

0 comments voice your opinion now!
phpexcel performance tweak series part1 cache iterators filter

Link: https://blog.bitexpert.de/blog/think-about-it-phpexcel-performance-tweaks-part-1/

Laravel News:
Laracon (US) Schedule Announced
July 07, 2015 @ 09:51:25

On the Laravel News site they've posted an announcement about the release of the Laracon US schedule for their 2015 event (happening August 11th and 12th).

Laracon US will be held next month in Lousiville KY and time is running out to get a ticket. Currently, 350+ have been sold and will be the biggest Laracon yet. The full schedule has now been posting on the Laracon site and the topics sound outstanding.

The list of sessions for this year's event include:

  • Matt Stauffer on Leveraging Laravel
  • Adam Wathan on Chasing "Perfect"
  • Jeffrey Way Things Laravel Made Me Believe
  • Brian Webb on Open Source and Company Culture
  • Yitzchok Willroth with Talmudic Maxims to maximize your growth as a developer

This year's event will also feature "Artisan Jeopardy" hosted by Jeremy Mikola, one session each day. If you're interested in attending, you can pick up your tickets now.

0 comments voice your opinion now!
laracon15 laraconus schedule announcement kentucky laravel

Link: https://laravel-news.com/2015/07/laracon-schedule-announced/

7PHP.com:
#20YearsOfPHP - Let's Hear It From Ben Ramsey
July 07, 2015 @ 08:41:18

On the 7PHP.com site Khayrettee Wasseem has posted a new interview with Ben Ramsey about the recent anniversary of the PHP language - "20 Years of PHP".

This is the 2nd serie of our #20YearsOfPHP ! YES $this->year['2015′] needs to be over-brimmed with lots and lots of love and happiness to celebrate this amazing unique moment. All that PHP has achieved today, is the hard work of myriads of PHP rockstar from all over the world. It's also because of a super-fantastic group (they know who they are!) of dedicated people who are doing their utmost best to keep shaping, giving consistence to and above all safeguarding the magical community that is The PHP Community! [...] Here over 7PHP, I'm taking this a step further by interviewing some of the PHP rockstars about what they have to say about #20YearsOfPHP

In the interview Ben answers questions about some of his own experience in the PHP community, lessons he's learned over the years, why he thinks PHP has survived so long and his advice to new PHPers just starting out.

0 comments voice your opinion now!
7php interview community benramsey series 20yearsofphp

Link: http://7php.com/20yearsofphp-benramsey/

Community News:
Latest PECL Releases for 07.07.2015
July 07, 2015 @ 07:01:17

Latest PECL Releases:
  • mongo 1.6.10 ** Bug * [PHP-1460] - Query with limit leaves open cursors on server * [PHP-1462] - Fix static compilation * [PHP-1464] - GridFS should not drop dupes when creating index

  • SeasLog 1.2.3 - Fixed issue #44 Seaslog::analyzerDetail([with out 'all']) - Support CONST SEASLOG_ALL

  • SeasLog 1.2.2 - Fixed Logger bug with PHP-Version -ge 5.4 - Fixed SeasLog::log('level','message','content',['logger']) bug - Support SeasLog::analyzerDetail("all") - Support SeasLog::analyzerCount("all")

0 comments voice your opinion now!



Lorna Mitchell:
PHP 7 Benchmarks
July 06, 2015 @ 12:42:55

Lorna Mitchell has posted some preliminary PHP7 benchmarks from the current alpha release (alpha2). Good news - it's fast....very fast.

If you know anything at all about PHP7, you probably know it's fast. But did you know how fast? The alpha is out and looks very robust, so I decided I would create a new set of benchmarks to include it. Graphs first, disclaimers later :)

This graph shows the time it takes for each version of PHP to perform the same task, on average, with oldest PHP on the left and moving forward in time. [..] The benchmark is the Zend/bench.php that lives in the PHP sourcecode (run ten times for each version of PHP using the php7dev VM on an average laptop, and then the mean result for each version calculated). The script runs through a series of taxing algorithms, giving a sense of how quickly a series of computational instructions can be executed.

She also talks briefly about how this can effect more real-world applications, how realistic it is to upgrade from older installs (much less painful on 5.5 or 5.6) and some things you can do to help improve PHP7 for everyone. This includes testing, working on bugs and adding extensions to this list to ensure they're made PHP7 compatible.

0 comments voice your opinion now!
php7 benchmark fast realworld help testing bugfix extension

Link: http://www.lornajane.net/posts/2015/php-7-benchmarks

Scotch.io:
Token-Based Authentication for AngularJS and Laravel Apps (continued)
July 06, 2015 @ 11:57:54

Scotch.io has posted the second part of their series (here's part one) continuing their look at using tokens for authentication in an AngularJs+Laravel application. They pick up where they left off in the previous part and focus on adding more of the systems around the token.

In the tutorial on Scotch.io we created a new app called jot-bot to look at how to implement token-based authentication in AngularJS and Laravel by using jwt-auth and Satellizer together. On the Laravel side, jwt-auth let's us generate JSON web tokens when the user inputs their credentials. [...] There were a few things for a complete authentication solution that we didn't get to in the last tutorial, including: Setting the logged-in user's data (such as name and email address) and their authentication status, a way to redirect the user to the login page if they become logged out and how to log the user out and the implications of token-based authentication on logout.

He starts by updating the AuthenticateController to handle getting the authenticated user based on the token information. He also adds the matching route and show the kind of data it should return. He then switches to the Angular side and creates the controller to hook into the backend and get the current user information. The tutorial then shows how to relay user information back to the view and what it might look like. He then goes through a similar process for adding the logout handling including redirecting the user when logged out. Finally, he shows how to initialize the user on the frontend when the application loads, pulling the data from localstorage and checking for a valid existing session.

0 comments voice your opinion now!
scotchio token authentication angularjs laravel application series part2

Link: http://ryanchenkie.com/token-based-authentication-for-angularjs-and-laravel-apps/

SitePoint PHP Blog:
Turning a Crawled Website into a Search Engine with PHP
July 06, 2015 @ 10:19:43

The SitePoint PHP blog has posted the second part of their "Powerful Custom Search Engines with Diffbot" series with part two showing how to take the Diffbot results and make them searchable.

In the previous part of this tutorial, we used Diffbot to set up a crawljob which would eventually harvest SitePoint's content into a data collection, fully searchable by Diffbot's Search API. We also demonstrated those searching capabilities by applying some common filters and listing the results. [...] In this part, we'll build a GUI simple enough for the average Joe to use it, in order to have a relatively pretty, functional, and lightweight but detailed SitePoint search engine. What's more, we won't be using a framework, but a mere total of three libraries to build the entire application.

For those interested in the end result, you can skip to the demo. Otherwise, they'll walk you through the full process:

  • Bootstrapping the environment and needed libraries
  • Creating a simple "home" page with a Diffbot client
  • Creating the frontend interface (a form allowing for various search terms)
  • Making the Javascript to catch the form submission
  • Adding CSS to style the page
  • Building out the PHP backend to perform the different search types (author and keywords)

Finally he ties it all together and create the output of the search results, providing links to each of the matching pages, posting date, author information and a brief summary. He ends the post with a look at paginating the results via a "PaginationHelper" class that will drop a navigation item at the bottom of the results and handle moving from page to page, interfacing with the Diffbot client.

0 comments voice your opinion now!
search engine diffbot tutorial series part2 results crawled website

Link: http://www.sitepoint.com/turning-crawled-website-search-engine-php/

Davey Shafik:
Changes to Engine Exceptions in PHP 7.0alpha2+
July 06, 2015 @ 09:41:29

Davey Shafik has posted about some changes in engine exceptions in the latest alpha of PHP 7 (alpha2+), mainly a small change to how things are named.

While updating my PHP 7 talk "What to Expect When You're Expecting: PHP 7″ for the DutchPHP Conference 2 weeks ago I noticed a small but significant change to the new Engine Exceptions feature in the newly release alpha 2. [...] However, for alpha2 this hierarchy changed. Engine Exceptions lost their "Exception" suffix, and became Error and and *Error exceptions, and the abstract BaseException class was changed to a Throwable interface.

He points out that this new naming and structure makes it impossible to make a good hierarchal structure for exceptions. He does favor the new format, though, as it does allow for some structure via interface definitions.

0 comments voice your opinion now!
exception handling php7 alpha2 throwable handling hierarchy

Link: http://daveyshafik.com/archives/69185-changes-to-engine-exceptions-in-php-7-0alpha2.html


Community Events

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


application language example community project podcast api list interview php7 symfony framework programming introduction composer part2 laravel yii2 series opinion

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