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

Stoyan Stefanov:
Server-side React with PHP - part 2
September 19, 2013 @ 09:35:38

In a a previous post Stoyan Stefanov introduced a setup where you could render React templates on the server-side with the help of PHP and the v8 parsing. In this second part of the series, he extends that system and shows how to use it to update views based on new data.

Part 1 ended with todos. The first one was to couple the server-side generated code with the client-side React, so that any updates past the initial page load will be handled by React's client JS, which is where React shines. Let's see how you can do just that.

He gives an example similar to his previous one - displaying a table - but shows how to inject some values from PHP as a JSON string into the component. This time he saves the output of that rendering into a variable and reuses it as a part of a whole site render later.

0 comments voice your opinion now!
react javascript js v8 serverside render tutorial data

Link: http://www.phpied.com/server-side-react-with-php-part-2/

PHPMaster.com:
Server-Side Device Detection with Browscap
July 25, 2013 @ 13:09:12

In a new tutorial posted to PHPMaster.com today, Lukas White talks about using the Browscap functionality to do server-side device/client detection in your applications.

An alternative solution to the problem is to use server-side device detection and then take certain actions based on that information. One possibility is to simply forward requests for a mobile site to a different URL. Another possibility is to adapt the layout - or indeed content - programmatically as it's generated on the server. Taking a server-side approach is the basis of this article, which looks in detail at the Browser Capabilities Project, or Browscap for short, to provide the information on which to base these decisions.

He starts with some of the basics - User-Agent strings that most devices will send to your site and their structure. He then talks about the Browscap project and the PHP support for its use. He shows how to get it all installed via Composer and how to use the "browscap-php" library to get the current browser information. He includes an example of the output and shows how to use this to redirect the user to a mobile site if needed. He also adds in a bit at the end about using it for layout switching or for showing the user the correct download links based on their client.

0 comments voice your opinion now!
serverside useragent browscap tutorial detection

Link: http://phpmaster.com/server-side-device-detection-with-browscap

L2Admin.com:
Battle of the server side scripting languages - Perl, Python & PHP
July 21, 2010 @ 08:34:20

New on the L2Admin.com site today is the first part of a series they're doing comparing three of the popular server-side scripting languages for web development - PHP, Perl and Python - and what benefits each can give.

For a very long time I have wondered if there were any real benefits between Perl, PHP or Python from a performance standpoint [...] So after much wondering I have decided to answer the question for myself once and for all. I am going to perform three tests that I think typify the use cases for all three languages, I am also going to code the same tests in C and in static HTML.

This first post shoes the results from the most basic of tests - a "hello world" that's echoed out to the page. He ran the tests with Apache's ab tool for 10,000 times and recorded the request per second, average request time and the overhead as compared to plain HTML. It's interesting to see the jump from the HTML baselines when the languages start getting involved with the stock PHP install coming in as the slowest of the group.

0 comments voice your opinion now!
serverside scripting language compare benchmark


SitePoint Server Side Coding Blog:
Cache it! Solve PHP Performance Problems
November 09, 2007 @ 19:16:00

On the SitePoint "Server Side Coding" blog, there's this look at caching to help solve some PHP performance issues.

In the good old days when building web sites was as easy as knocking up a few HTML pages, the delivery of a web page to a browser was a simple matter of having the web server fetch a file. [...] Then dynamic web pages came along and spoiled the party by introducing two problems: a delay for processing and a check of the file's age before it's sent to the browser.

They talk about what caching can do for you, what you can do (both server and client side) to prevent caching, working with the headers sent from and back out to the browser, using output buffering, partial caching and using PEAR::Cache_Lite in your application.

0 comments voice your opinion now!
caching serverside clientside pear cachelite package partial caching serverside clientside pear cachelite package partial


Raphael Stolt's Blog:
Using the Zend Framework plugins for server-sided Ajax request identification
April 03, 2007 @ 12:08:00

Many thanks to Raphael Stolt for letting us know about his latest post, a tutorial on using the Zend Framework with Ajax to perform a server-side identification request.

He used a "@ajaxaction" marker in a previous article to implement the Ajax requests, but with other tools there could be an issue with the response. To help with this, he's worked up a handler to detect what needs to be done with the response. He applies this to create the authentication system, making it easy to include a simple ACL method into his application.

He includes code examples for the Controller to handle the detection, how to implement it, and the class to work with those "doclet" markers for the Ajax actions.

0 comments voice your opinion now!
ajax serverside zendframework plugin request identification ajax serverside zendframework plugin request identification


Ajaxian.com:
AjaxCore PHP Ajax Framework
November 22, 2006 @ 10:14:00

As mentioned over on Ajaxian.com, there's a new Ajax framework in town that's looking to "ease the development of rich Ajax applications, by generating the appropriate JavaScript code" - AjaxCore.

AjaxCore takes all the dirty work of JavaScript code generation and provides a solid foundation. The concept is to extend a Generic AjaxCore class and defining methods that handle the Ajax driven events and binding them to HTML objects.

It uses Prototype to work with the DOM and Ajax connections and to help you with binding the scripts to the different elements on the page. Code can be linked to certain elements and have that (server-side) code automatically executed when an element is referenced. You can find out more from the AjaxCore homepage and the Ajaxian post also includes a simple inline example to get you started.

0 comments voice your opinion now!
ajaxcore framework ajax bind element serverside ajaxcore framework ajax bind element serverside


SitePoint PHP Blog:
It's official Javascript sucks harder than PHP
October 11, 2006 @ 09:35:00

It's official - Javascript sucks. Well, at least according to Harry Fuecks and the group from the last WebTuesday meeting.

The surprise outcome of last nights webtuesday - Javascript sucks harder than PHP. I still can't quite believe it. Maarten took the PHP corner against me in the Javascript corner, both of us shamelessly advocating each language under various headings.

1 minute max per topic-no outright lies although often bordering on truthiness. Verdicts provided by the audience, based on who could shout loudest from a choice [ranking].

Of course, Harry does comment that the comparison is a bit unfair (server versus client side), but there are alternatives for both (client-side PHP and server-side Javascript) so make a foundation for enough of a comparison. At the end of the night, though, the results of the votes were conclusive - Javascript was in worse shape than PHP, though the winner was "he one that came out hurting less".

1 comment voice your opinion now!
javascript sucks ranking scale serverside clientside javascript sucks ranking scale serverside clientside


Job Posting:
Brain Bakery Ltd Seeks Server Side Developers (London, UK)
September 24, 2006 @ 16:30:22

Company Brain Bakery Ltd.
Location London, UK (Applications accepted from anywhere)
Title Server Side Developers
Summary At Brain Bakery Ltd. we are working on an innovative PHP-based payment system which will open up new and fairer methods of commerce. We have now reached the end of our Alpha phase on budget and ahead of schedule, and as we start our Beta phase we require two more part-time PHP programmers to join the team.
Link More Information
2 comments voice your opinion now!
job post serverside developer london uk job post serverside developer london uk


DevShed:
Managing Standalone Scripts in PHP
September 07, 2006 @ 16:19:52

DevShed continues their look at standalone PHP scripts (server-side scripting, not on the web) in part two, "Managing Standalone Scripts in PHP" excerpted from the book "Advanced PHP Programming" from George Schlossnagle.

Last week, we began our discussion of PHP standalone scripts. This week, we'll be talking about child processes, shared resources, signals, and writing daemons.

They jump right in, going first for a look at forking off child processes from the script using the pcntl functionality you'll need to build into PHP. Resource management is key to working with server scripts, and they show you how to close them out when you're through. Next up is a brief look at the types of signals that you can send to the child processes, and some good rules to follow for writing daemons in PHP.

0 comments voice your opinion now!
standalone script serverside daemon signal resources standalone script serverside daemon signal resources


Think-PHP Blog:
Detect and fix security vulnerabilities on server side within seconds
September 07, 2006 @ 07:12:27

From the group that brings you Chorizo! and Morcilla, the latest in PHP security tools, is a video showing how to find and correct the issues that your script might have on the server side (with the help of Morcilla).

This video shows you how Morcilla, our brand new PHP extension, lets Chorizo! have a look inside your application on the server.

We are able to hook into every PHP function and trace the payloads of Chorizo!. By default, Morcilla hooks into the whole MySQL function family, fopen, mail, include/require/include_once/require_once, preg_* and others. With a ZendEngine patch, we are able to trace unset variables and a lot more.

The video (basically a screen capture of the process) is a bit hard to read in the smaller version, so it's recommended to view the larger size if you want to see the options. It's interesting, though, to see how it picks out the errors and tells what they are and where you can go to fix them (like a file inclusion issue, as they demonstrate).

0 comments voice your opinion now!
chorizo security scanner morcilla serverside video example chorizo security scanner morcilla serverside video example



Community Events





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


bugfix series interview configure code podcast community developer symfony language application list api release wordpress laravel library install introduction threedevsandamaybe

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