Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Wrzesień, 2011

PHPClasses.org: MODX: A CMS Framework Designed with PHP Developers in Mind

PHPClasses.org: MODX: A CMS Framework Designed with PHP Developers in Mind

On PHPClasses.org there’s a new article talking about a CMS that’s “designed with developers in mind” – MODX, technically a “content management framework”.

If you have ever wrestled with trying to create a custom Web site using a CMS that made you jump through hoops to get the desired output, you should definitely check out MODX, a CMS framework designed from the ground up with Object Oriented Programming PHP developers in mind. Read this article to learn more about MODX CMS framework and how you can easily use it to build your own content management system customized to your needs.

The article introduces you to MODX and shows you (briefly) how the MODX manager works to help you create a site quickly and easily through simple configuration options and content creation. He also talks about “chunks”, template variables, plugins/extras and xPDO – their abstraction layer for database connections.

Source: http://www.phpdeveloper.org/news/16902

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

NetTuts.com: Build Ajax Data Grids with CodeIgniter and jQuery

NetTuts.com: Build Ajax Data Grids with CodeIgniter and jQuery

In a new tutorial from NetTuts.com today they show you how to combine a CodeIgniter-based backend and a jQuery frontend to make a simple Ajax data grid of data pulled from a database.

In this lesson, we will create a CodeIgniter library that allows us to generate data grids automatically for managing any database table. I’ll explain each step required to create this class; so you’ll likely learn some new OOP techniques/concepts in the process! As a bonus, we’ll proceed to write some jQuery code that will enable a user to update the data grid’s content without having to wait for a page refresh.

The tutorial’s broken up into a few different steps, each complete with descriptions and plenty of code ready for cut-and-paste:

  • Build a Data Grid Generator Class (a helper in PHP)
  • Testing the Datagrid Helper Class with a CodeIgniter Controller
  • Implementing Ajax (jQuery to the Rescue!)
  • Check All or Nothing!

You can also download the source for all of the scripts if you’d like to dive right into the code.

Source: http://www.phpdeveloper.org/news/16901

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

DZone.com: Phar: PHP libraries included with a single file

DZone.com: Phar: PHP libraries included with a single file

On DZone.com today Giorgio Sironi has a new post looking at an interesting, if seldom used, feature of recent PHP releases – packaging applications with phar archives.

Phar is a php extensions that provides the means for distributing code as a single archive, that does not have to be extracted to a folder before usage. The concept is similar to JVM Jars: each archive becomes a virtual directory where files can be accessed. However, the virtual folder is not limited to class loading, but you can open and read internal files as if it were decompresse into a directory.

He includes a brief “hello world” example of packaging up a script into a phar archive and executing it via PHP. He also shows how easy it is to create an archive from current code, making an archive containing the latest Doctrine 2 release for simple inclusion. Phars also allow compression and hashing but has issues with resource management and access external files.

Source: http://www.phpdeveloper.org/news/16900

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Gareth Heyes’ Blog: Non alphanumeric code in PHP

Gareth Heyes’ Blog: Non alphanumeric code in PHP

Gareth Heyes has tried out an interesting experiment – running non-alphanumeric code in PHP using only octal escapes.

So a small php shell was tweeted around and it inspired me to investigate a way to execute non-alphanumeric code. First off I started with the idea of using octal escapes in PHP and constructing the escape so for example: 107 is “G” if I could construct the “107″ and add the backslash to the beginning maybe I could construct “G”.

A snippet of example code is included showing his octal-based code for creating a “G” (6 lines of pluses, parentheses, equals and a few more characters). By doing some trickery with bitwise operators on strings, he was able to combine characters and make the string “GET”. Pretty clever, even if it’s not entirely practical.

Source: http://www.phpdeveloper.org/news/16899

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Derick Rethans’ Blog: Xdebug’s Code Coverage speedup

Derick Rethans’ Blog: Xdebug’s Code Coverage speedup

Derick Rethans has a new post to his blog today talking about some work that’s been done to speed up XDebug’s code coverage generation. Changes in the coming 2.2 release have some improvements that make things perform better and put less stress on PHP in the process.

Code coverage tells you how much of your code base is actually being tested by your unit tests. It’s a very useful feature, but sadly, it slows down PHP’s execution quite a lot. One part of this slowdown is the overhead to record the information internally, but another part is because I have to overload lots of opcodes. (Opcodes are PHP’s internal execution units, similar to assembler instructions) They are always overloaded even if code coverage is not used, because it’s only safe to overload them for the whole request.

These changes were from a combination of contributions from Taavi Burns and a new ini setting that will allow you to enable or disable the code coverage in XDebug. Benchmarking shows a good amount of time reduction in coverage runs – dropping anywhere from a few seconds to over a minute. He also mentions the idea of “modes”, shortcuts to predefined settings for different types of reporting (like “profiling” or “tracing”).

Source: http://www.phpdeveloper.org/news/16898

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

King Foo Blog: Using Complex Type with Zend_Soap

King Foo Blog: Using Complex Type with Zend_Soap

New from the King Foo blog there’s a tutorial showing how to use complex types in a SOAP request with Zend_Soap, a component of the Zend Framework.

To be able to use complex types with Soap requests, they need to be fully defined in the WSDL file. Zend_Soap can automate this process, if you know how to define those complex types. Let us start without it Zend_Soap’s magic and compare it with a fully discovered complex request type afterwards.

In their example, they have a collection of books (objects) that they want to send over to the web service. The code for both the server and client side are included with the WSDL automagically created by the Zend_Soap_Server component. By setting docblock comments on the properties of the Book objects, the SOAP components automatically know what types they are. Their example defines these, and sets up the web service on the other side with a classmap to define where the “tags” information for each book lies.

Source: http://www.phpdeveloper.org/news/16897

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for the Week of 09.23.2011

Site News: Popular Posts for the Week of 09.23.2011Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/16896

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Liip Blog: Integrating Magento into Symfony2

Liip Blog: Integrating Magento into Symfony2

On the Liip blog today, there’s a quick post about integrating Symfony2 and Magento, the popular PHP-based ecommerce platform.

So last week four developers sat together on a regular Hackday to see what’s needed to hook up Magento into Symfony. To make this short the outcome is a Magento bundle for Symfony2. When we met in the morning we weren’t even sure what exactly to try out but soon agreed on implementing a Symfony authentication which uses the Magento customer database.

The post talks about some of the issues they came across in their work – mainly a problem with incompatible autoloaders. There were also problems getting the logins to play nicely with each other and each product’s session handling. You can find the current results from their hacking in this bundle posted to github.

Source: http://www.phpdeveloper.org/news/16895

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Zend Developer Zone: Announcing September’s Zend Framework Bug Hunt Days

Zend Developer Zone: Announcing September’s Zend Framework Bug Hunt Days

The Zend Developer Zone has a new post about this month’s Zend Framework Bug Hunt Days happening today (the 22nd), 23rd and 24th:

For those who haven’t put the recurring event in their calendar, the Zend Framework Monthly Bug-hunt is here again! This Thursday, Friday and Saturday (the 22nd, 23rd and 24th of September), we’ll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.

Included in the post are instructions on how to find issues in their new Jira configuration (unresolved issues), where you can go to get involved – including the zftalk.dev IRC channel and their “Getting Started” guide.

Source: http://www.phpdeveloper.org/news/16894

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPBuilder.com: Introducing Namespaces for PHP Developers

PHPBuilder.com: Introducing Namespaces for PHP Developers

On PHPBuilder.com today there’s a new article from Jason Gilmore introducing you to namespaces in PHP 5.3+ development. Namespaces make it simpler to separate out your code into functional pieces and help keep it organized.

The inclusion of namespace support within PHP 5.3 effectively brought the need for gripes and workarounds to a halt, however adoption of this exciting new feature has seemed surprisingly slow in the more than two years since its release. [...] The utility of this new feature is simply undeniable. Therefore I thought it would be worthwhile to offer a formal introduction to namespaces for the benefit of those PHP developers who haven’t yet had the opportunity to investigate the topic.

He starts by introducing the concept of a “namespace” as a sort of container for your code, providing separation that prevents errors like the infamous “cannot redeclare class” issue. He includes examples of PHP’s namespace syntax to split out two “Account” classes into two different sections. Using them is as easy as referring to them by their namespaced “path” or using something like the “use” keyword to reassign it to another name.

Source: http://www.phpdeveloper.org/news/16893

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>