News Feed
Jobs Feed
Sections




News Archive
feed this:

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

SitePoint PHP Blog:
Dart and PHP A Legacy Animal Guess Game
December 10, 2013 @ 11:54:40

The SitePoint PHP Blog has a new tutorial posted today showing an interesting combination of technologies to create a simple Animal Guesssing Game - using Dart as the frontend and PHP as the backend.

Back when I was learning programming on Apple II using BASIC, there was an Animal Guess Game. This game was a very primitive AI game: the computer tries to ask a few YES/NO questions and receives the answer from the user. Based on the answer, it may ask more Y/N questions until it tries to guess the animal. In this tutorial, we will learn how to re-vitalize this program using PHP as backend and Dart as frontend. Of course, a database will be used to store all the questions and guesses of animals.

He walks you through the database setup (including table definitions) and provides some simple PDO-based code to connect and fetch results. Then comes the Dart frontend. He goes through the installation and configuration and how to make a new Polymer application, also including the markup and Dart code to make the backend connection.

0 comments voice your opinion now!
dart animal guess game backend frontend tutorial

Link: http://www.sitepoint.com/dart-php-legacy-animal-guess-game

Greg Freeman:
Your PHP Framework Choice doesn't Matter
August 22, 2013 @ 11:45:18

In this new post Greg Freeman suggests something contrary to what most PHP developers (and framework supporters) believe - your choice of PHP frameworks doesn't matter...if you're basing it on speed.

I'm talking about the speed of PHP and more specifically, evaluating frameworks and tools based on "speed". If you have been in the PHP developer community for more than a few months, you would have seen at least a few discussions about what the fastest PHP framework is, as if this were one of the first key metrics you should evaluate first when choosing a framework for your team. You may even be contemplating switching from your current framework because you heard of a new framework that is faster. In the rest of this article, I'm going to do my best to show you why this not the best line of thinking and provide alternate and in my opinion better metrics for evaluating tools.

He talks about "frontend" versus "backend" PHP developers and how most PHP devs fit into the first category, not knowing how their applications really execute on the backend. This includes a pretty high-level concept of "speed." For his examples, he sets up a WordPress instance and fills it with some dummy content. He illustrates how, with a bit of tweaking on the "backend" side of things (server, environment, etc) the performance of the application can be greatly varied. He includes the specs for the environment he ran the tests in, some of the things he changed and a summary of the results.

0 comments voice your opinion now!
framework choice speed benchmark frontend backend environment

Link: http://www.gregfreeman.org/2013/your-php-framework-choice-doesnt-matter

NetTuts.com:
Building Ribbit in PHP
January 04, 2013 @ 10:22:48

In the first part of a new series on NetTuts.com, they started on the creation of a full web application (a Twitter clone). The first article covered the CSS and using LESS to create an interface. In this second post they get into the PHP backend, opting to create it without a framework on the first shot.

In the initial entry in this series, we took care of the UI-aspect of our Twitter-clone, called Ribbit. Now, we'll begin coding the application in a number of languages. This lesson will leverage standard PHP (with homegrown MVC), but, in future articles, we'll review other implementations, such as with Rails or Laravel.

They provide all the code you'll need, the database table structure to power it (MySQL) and the examples of a model, router and basic MVC stack to handle the requests. They help you make a user creation and login system as well as a few other pages ("buddies", "make a post" and a few others). You can also download the source from their Github account if you want it all in one shot.

0 comments voice your opinion now!
ribbit backend tutorial series css less mvc


DZone.com:
Sencha Touch 2 Models - Loading And Saving Model Data Using a Proxy, PHP Example
August 31, 2012 @ 11:54:19

On DZone.com there's a new tutorial posted (by Jorge Ramon) about hooking together the models of Sencha's Touch 2 with a PHP backend to make saving data to them simpler via a proxy.

Sencha Touch models have the ability to work with a proxy. This feature allows you to save and retrieve model data from the server, memory or local storage, without depending on a Sencha Touch data store. Let's try it with a very simple scenario where the server side is a PHP page.

The article includes both the Javascript to create the models (along with its proxy and custom API methods defined) as well as the PHP that powers the backend. The PHP just reads from the "php://input" stream and echoes back out JSON, but it gives you an idea of what to expect to receive. For more information on Sencha Touch, check out their documentation.

0 comments voice your opinion now!
senchatouch2 model backend save proxy tutorial


PHPMaster.com:
Server-Side HTML Handling Using phpQuery
June 12, 2012 @ 10:58:26

PHPMaster.com has a new tutorial today showing how you can use phpQuery to work with HTML in your application. phpQuery is a server-side CSS-selector-driven based on jQuery's API.

Think about how you can change and manipulate the generated HTML using server-side PHP code. phpQuery is the ultimate solution that will come to your mind. If you haven't heard about phpQuery, you may be interested in this article since I am going to give you a brief introduction to phpQuery and explain how you can use it in real-world projects.

The tutorial shows you how to generate a simple table with alternating row colors (zebra) and column headers from an array of product information. They also talk a bit about why using something server-side like this is important (over something client-side like jQuery) - how it can make things easier by keeping the "business logic" all in one place, leaving your frontend to do what it does best.

0 comments voice your opinion now!
tutorial phpquery backend html processing


PHPMaster.com:
Let's Talk Efficient Communication for PHP and Android, Part 1
May 28, 2012 @ 16:20:09

On PHPMaster.com today, they've started a new series about integrating two popular technologies - PHP and the Android OS - in this new tutorial from Matthew Turland. He'll show both sides of the code needed to get your Android app talking to a PHP backend.

This two-part article will guide you through the process of building an efficient PHP-based REST web service to be consumed by an Android-based application. Some of the concepts presented here are also applicable to other mobile platforms, such as iOS. I assume you already know the basics of PHP and Android development and that you have a suitable development environments set up for both. I'll focus mainly on showing you how to handle data serialization and compression in both environments.

In this first part, he starts from the client side, creating the code (Java) that's needed to create the connection to the backend. He stets it up as a background task so its execution won't block the main app from working. He shows how to execute it, running an "on create" method and checking to ensure the network is available for the request.

0 comments voice your opinion now!
tutorial android communication backend mobile java


Artur Ejsmont's Blog:
Publishing queue messages from PHP using different backends
March 26, 2012 @ 11:31:53

Artur Ejsmont has a new post sharing some benchmarks he put together about the "messages per second" and "time to execute" when using PHP to pull from various messaging backends.

I have looked at the state of different messaging backends recently and i ran a little benchmark to see what is the rough comparison of message publishing throughput. Results that i got are quite surprising. What i wanted to achieve is some sort of reassurance before choosing a messaging bus for my PHP project.

Running both the PHP and the messaging test scripts on the same server, he pulled from a few different backend systems - RabbitMQ, MySQL, MongoDb, Memcached and ActiveMQ. The results were interesting, showing an interesting result in the time it took to execute versus the number of messages per second pushed in.

0 comments voice your opinion now!
benchmark message queue backend rabbitmq mysql mongodb memcached activemq


Brandon Savage's Blog:
REST APIs as Data Backends
March 19, 2012 @ 09:57:14

In his most recent post Brandon Savage looks at a practice that's becoming more and more common - using a REST API as a data source for a web-based application.

We were faced with an increasing number of data sources, including the coming addition of Elastic Search to the data storage system, and maintenance was becoming a problem. Thus, the decision was made to move our data layer to our REST API exclusively, removing all direct access to data storage from the web interface. This is the second such project I've been on where an external API has been used for the retrieval of all data in an application. It's a novel concept, but one that takes some getting used to to be sure.

He talks about some of the advantages of this approach including the ability to be more flexible with the actual technology used to create the API, the ability to write other applications on top of it and a glimpse into some of the process that's been going on as a part of the project.

0 comments voice your opinion now!
rest api data backend language technology application platform


Script-Tutorials.com:
Form Validation with Javascript and PHP
February 02, 2012 @ 09:07:40

On the Script-Tutorials.com site today there's a new tutorial about form validation using a combination of jQuery on the frontend and PHP on the backend.

In this tutorial, I will show you how to create an attractive, pleasant to look form for your website and then I will explain you how to dynamically validate them using Javascript. We'll also cover server-side validation with PHP to make everything 100% safe. This tutorial will help you to add more functionality to your forms which leads to better user experience and better quality of your website.

His sample form (name, password, email and gender) is made from some pretty simple HTML markup. The real trick comes with the jQuery validation on each field handled in an onKeyUp. Included are both a "password strength" method and an email validation method to check the format of the address. Errored fields have their background color changed to indicate that they've failed and some basic validation (length, password match, etc.) are also included. The PHP does much of the same validation once the form is posted and returns any error messages that might have come up.

You can download the code or try out a live demo to see the scripts together in action.

0 comments voice your opinion now!
form validation jquery javascript frontend backend tutorial


Nikic's Blog:
How big are PHP arrays (and values) really? (Hint BIG!)
December 16, 2011 @ 10:28:39

In this recent blog post nikic takes an in-depth look at how large PHP arrays really are - how memory is used in the creation and management of these handy PHP variable types.

In this post I want to investigate the memory usage of PHP arrays (and values in general) using the following script as an example, which creates 100000 unique integer array elements and measures the resulting memory usage. [...] How much would you expect it to be? [...] Now try and run the above code. You can do it online if you want. This gives me 14649024 bytes. Yes, you heard right, that's 13.97 MB - eightteen times more than we estimated.

He goes into the details of PHP's memory management and breaks it down into the different totals (for 64 bit and 32 bit OSes) and details on each - zvalue_value, zvalue, cycles collector, Zend MM allocator and the buckets used to isolate one array (hash table/dictionary) from another.

What does this tell us? PHP ain't C. That's all this should tell us. You can't expect that a super dynamic language like PHP has the same highly efficient memory usage that C has. You just can't.
0 comments voice your opinion now!
memory management array datatype backend c



Community Events











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


example unittest hhvm application package hack component release symfony2 install podcast framework opinion composer language overview security code introduction facebook

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