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

Nikola Posa:
Community-driven PHP 8 Wish List
Sep 24, 2018 @ 14:08:01

Nikola Posa has a new post to his site sharing what he calls a "community-driven PHP 8 wishlist" as gathered from replies to a tweet he posted back in July 2018.

It's been over two months since I started a research on Twitter about the things that developers would like to be added or improved in the next major PHP release. [...] It had a surprisingly long reach, inspiring developers, prominent experts, community representatives to express their opinion through more than a hundred responses.

It would be a waste to leave such a valuable data in the form of a raw and fuzzy Twitter thread, so I finally found some time to turn it into something more useful.

In the post he shares the results in a spreadsheet, with the top three being: arrow functions, multi-threading and method overloading. Other interesting features also made an appearance pretty high on the list including boot-time preloading, scalar objects, native async and built-in request/response objects. Check out the post for the complete list and how it was processed into its final form.

tagged: community wishlist php8 spreadsheet results tweet

Link: https://blog.nikolaposa.in.rs/2018/09/23/community-driven-php8-wish-list/

SitePoint PHP Blog:
How to Consume Laravel API with AngularJS
Feb 22, 2016 @ 17:23:10

The SitePoint PHP blog has posted a new tutorial from author Francesco Malatesta that continues their series looking at combining AngularJS and PHP, more specifically Laravel, to create a basic application. In this part of series he builds on the server-side code created in part one and creates the Angular frontend.

In part 1, we built our server part. Now we can build our client. We are going to use AngularJS to make a Single Page Application. We will use a very basic bootstrap template, built on the fly.

The application is simple enough and will consist of three "screens" (not "pages" since it's a single page application): a login, a signup and a main screen. He walks you through the setup of a standard frontend development environment including tools and software you'll need to get started. He makes the simple route and Blade template for the single-page app and defines some AngularJS routes for each of the screens. He then includes the code to set up both the signup and login controllers and how to detect if the user is successfully logged in. From there he gets into the functional part of the application: managing the books and the user's wishlist with the standard CRUD (create, read, update and delete) operations. Screenshots are also included at some spots so you can ensure your progress matches the tutorial.

tagged: tutorial angularjs laravel part2 screen login signup book wishlist

Link: http://www.sitepoint.com/how-to-consume-laravel-api-with-angularjs/

SitePoint PHP Blog:
How to Build an API-Only JWT-Powered Laravel App
Feb 18, 2016 @ 16:55:25

The SitePoint PHP blog has posted a tutorial from author Francesco Malatesta showing you how to build an API with Laravel that uses only JWT tokens for authorization handling.

In this article, we will learn how to use it to quickly create a fully functional API for an imaginary book wishlist application. As an aside, we will also see how to build a client application with AngularJS that will use our APIs.

They start the tutorial by having you clone a boilerplate project to get some of the basics out of the way first. From there they start in on the functionality: a basic wishlist where users can add books they like. They show the code needed to build out the User controller and matching routes. The tutorial shows the interaction with the functionality using requests from Postman to sign up a new user and get a matching JWT token back. The tutorial then does the same for the book handling, creating the controller, routes and functionality to show a book, store it for a user, remove it from the user's wishlist and delete the book completely.

tagged: api laravel tutorial application jwt token wishlist application

Link: http://www.sitepoint.com/how-to-build-an-api-only-jwt-powered-laravel-app/

DZone.com:
And now instead, 5 things Java envies PHP for
Jan 25, 2011 @ 19:56:53

Giorgio Sironi has posted the other side of the PHP/Java envy perspective in this new article on DZone.com - five things that Java envies PHP for (The first article is here offering the opposite perspective).

The comparison is only on web applications and dynamic websites, as PHP does not compete on the desktop. I am a PHP programmer, but I work in Java on university-related projects. If you notice something is missing from the comparisons in this list, feel free to comment and complete my depiction of Java features, and of PHP too.

His list of five things includes that there's no compilation required in PHP applications (running is "compiling"), that there's a unified platform to work on and that there's a lot more included "out of the box" than with Java (like database connectivity).

tagged: java feature wishlist envy opinion

Link:

Web Builder Zone:
5 things that PHP envies Java for
Jan 20, 2011 @ 17:44:33

On the Web Builder Zone today Giorgio Sironi has a new article with five things he thinks the PHP world is jealous about when they look at the features Java has to offer.

I've seen many programmers starting to think that Java is old and verbose, and trying to jump on the bandwagon of scripting languages such as PHP and Ruby. But it's not so simple, as these languages are late to the party in many areas. Here are the 5 things that as a PHP programmer I started envy Java for.

The five features on his list are:

  • Hibernate
  • Generics
  • Keeping objects in memory between requests
  • Java Collection Framework
  • Asynchronous processing

Keep an eye out for his next article - he flips it around and talks about what Java developers have to envy about PHP's features.

tagged: java feature wishlist envy opinion

Link:

Aaron McGowan's Blog:
Five things I wish PHP would implement (or had) & would change
Apr 05, 2010 @ 19:50:34

Aaron McGowan has posted his list of five things he wishes PHP could change (or even had) in future versions of the language.

Recently I have been hard at work trying to finish up a few major source packages and one application – but I have recently found myself thinking about how much better and more “grown” up PHP would be if it had a few things that other technologies such as C++ and C# have.

The five things on his list are:

  • Operator Overloading
  • Method and function Overloading
  • Advancement of Namespaces
  • Use of final keyword for class member variables
  • 'Getters' & 'Setters' similar to C#'s for class member variables

Each point comes with a summary and a bit of code to show what he's talking about. He sees these things as major steps in PHP "growing up" and as features that could help it make a translation over from things like .NET simpler.

tagged: opinion wishlist feature implement

Link:

LivePipe Blog:
What PHP6 Actually Needs
May 15, 2007 @ 15:13:00

On the LivePipe blog, there's a whishlist that Ryan has posted for some of the things he'd like to see in PHP6.

His list consists of:

  • Closures
  • { } is the new array()
  • Parameter Collection in Functions
  • Late Static Binding
  • Backwards Compatibility

Each is explained, some with code to illustrate.

tagged: php6 need wishlist closures array parameter static binding php6 need wishlist closures array parameter static binding

Link:

LivePipe Blog:
What PHP6 Actually Needs
May 15, 2007 @ 15:13:00

On the LivePipe blog, there's a whishlist that Ryan has posted for some of the things he'd like to see in PHP6.

His list consists of:

  • Closures
  • { } is the new array()
  • Parameter Collection in Functions
  • Late Static Binding
  • Backwards Compatibility

Each is explained, some with code to illustrate.

tagged: php6 need wishlist closures array parameter static binding php6 need wishlist closures array parameter static binding

Link:

Stubbles Blog:
My wishlist for PHP6, pt4: static initializers
Mar 26, 2007 @ 14:16:00

In a continuation of their "wishlist" series of posts for PHP6, Stephan Schmidt has postted this new item today taking about something he wishes PHP could do - initialize a property when defining an object.

But how could this be solved, when you never create an instance of Foo but only use static method calls?

I propose a new feature, we implemented in the Stubbles class loader and has been shamelessly ripped from the XP framework. If you need to initialize some properties with objects and are developing with Stubbles, you only need to implement a method called __static() in your class. If your class is loaded by the Stubbles class loader, it will check, whether this method has been implemented and call it. As every class is only loaded once, this enables you to add code to your class, that is also only executed once, if the class is imported into your application.

His solution allows for the creation of such objects with little more than the use of a __static call that could get the object and change the property defined on it.

tagged: static initializers php6 wishlist class loader static initializers php6 wishlist class loader

Link:

Stubbles Blog:
My wishlist for PHP6, pt4: static initializers
Mar 26, 2007 @ 14:16:00

In a continuation of their "wishlist" series of posts for PHP6, Stephan Schmidt has postted this new item today taking about something he wishes PHP could do - initialize a property when defining an object.

But how could this be solved, when you never create an instance of Foo but only use static method calls?

I propose a new feature, we implemented in the Stubbles class loader and has been shamelessly ripped from the XP framework. If you need to initialize some properties with objects and are developing with Stubbles, you only need to implement a method called __static() in your class. If your class is loaded by the Stubbles class loader, it will check, whether this method has been implemented and call it. As every class is only loaded once, this enables you to add code to your class, that is also only executed once, if the class is imported into your application.

His solution allows for the creation of such objects with little more than the use of a __static call that could get the object and change the property defined on it.

tagged: static initializers php6 wishlist class loader static initializers php6 wishlist class loader

Link:


Trending Topics: