2010-04-08

Ejemplo de como Conexión Flex con AMFPHP 1.9 - HelloWorld

OBSERVACION: amfPHP 1.9 es soportado hasta Php 5.2.xxx

Ejemplo a Elaborar:


Para conectar una aplicación Flex con PHP necesitamos un protocolo que pueda hablar los 2 idiomas que pueda hablar Flex y que pueda hablar PHP y aun más pueda traducir lo que habla uno para entender al otro.

AMF (Action Message Format) es un formato binario basando en SOAP (Simple Object Access Protocol). AMF fue creado para intercambiar datos entre aplicaciones Adobe Flash y bases de datos, básicamente usando RPC (Remote Procedure Call).

AMF contiene una estructura completa que contiene manejo de ERRORES y una RESPUESTA que estaremos esperando como un Objeto de ActionScript, esto quiere decir en pocas palabras que AMF al hacer una petición puede devolver 2 cosas una respuesta en el evento RESULT y si en dado caso exista un error en la trasmisión de datos o simplemente no existe lo que estamos buscando el error se devolverá en el evento FAULT.

AMF por ser un formato binario tiende a ser más rápido en la comunicación que el paso POST o GET de PHP o el enviar un XML a php interpretarlo y devolver un XML e interpretarlo en Flash.

SOAP, es un protocolo para mandar información estructurada implementada en Web Services, que sirve para hacer RPC para la negociación y recepción de mensajes.

En este ejemplo veremos cómo conectar FLEX con PHP mediante AMFPHP, creando un simple servicio web en el cual mandaremos un mensaje y recibiremos el mismo mensaje en FLEX.




Lo primero que necesitamos es la carpeta de AMFPHP que la podemos encontrar en esta dirección http://sourceforge.net/project/showfiles.php?group_id=72483&package_id=72363&release_id=541961 y podemos bajarla de cualquiera de los dos espejos.

Luego necesitaremos un Servidor Web, yo siempre he usado WAMP y me a funcionado muy bien ya que tiene MySQL , APACHE y PHP y es todo lo que necesitamos. Se lo pueden bajar de la siguiente dirección http://www.wampserver.com/en/download.php

Una ves instalado WAMP tendremos un icono al lado de nuestro reloj del sistema en forma de un semi circulo blanco con negro.

Y también tenemos nuestro Servidor en la siguiente dirección C:/wamp/www donde colocaremos todas nuestras páginas .php .html .asp Etc…

Luego una vez descargado AMFPHP colocaremos la carpeta dentro de WWW la cual nos permitirá acceder a nuestros, servicios vía WEB, creando así nuestro primer WEB SERVICES. Pero aun nos queda mucho camino por recorrer.

Para probar que AMFPHP esté funcionando correctamente dentro de nuestro Browser colocamos http://localhost/amfphp/gateway.php y recibiremos un mensaje “amfphp and this gateway are installed correctly.”

Y procedemos al darle al LINK que dice “Load the service browser” que es lo mejor que se a podido inventar AMFPHP que es un brower de WEB SERVICES donde podemos probar nuestros servicio debugearlos y hasta generar códigos que funcionan en FLX y FLASH para los que SOMOS un poco Flojos al momento de programar.

Una vez dentro de nuestro Services Browse vemos que no hay ningún tipo de servicios asociados al Explorador.

Por lo que crearemos un servicio llamado HelloWorld.php, tenemos que tener mucho cuidado en colocar .php y no cualquier otro tipo de extensión y lo vamos a colocar en la siguiente dirección C:\wamp\www\amfphp\services

Abrimos HelloWord.php con un editor de texto y echamos nuestras funciones la cual constara de una función que recibe un parámetro y devolverá el mismo parámetro pero con un texto concatenado el cual será “USTED ESCRIBIO: ”.

El código de HelloWord.php:



  1. class HelloWorld
  2. {
  3. function HelloWorld(){
  4. }
  5. function say( $mensaje )
  6. {
  7. return 'USTED ESCRIBIO: ' . $mensaje ;
  8. }
  9. }
  10. ?>


Una vez que cuadramos nuestro código recargamos la pagina y veremos que nuestro servicio HelloWord aparece en nuestro Explorador de servicios para probarlo hacemos click sobre HelloWord y nos presentara una entrada de texto donde escribiremos “HOLA MUNDO” y nos responderá “USTED ESCRIBIO: HOLA MUNDO”.

Si todo se ha hecho bien podemos seguir ahora con la programación de un simple programa en Flex. Abriremos Eclipse y crearemos un nuevo Proyecto que tenga como servicio a PHP.

Entonces en Eclipse vamos a FILE -> NEW -> FLEX PROJECT

Le damos un nombre al proyecto, una vez que llenamos los campos le damos a siguiente “NEXT”. Creamos una carpeta en “C:\wamp\www” la cual llamaremos PRUEBAS y nos quedara la siguiente dirección “C:\wamp\www\Pruebas”. y le decimo a eclipse que compile todo a esta carpeta.

Bueno ya toda la configuración esta, ahora, manos a la obra.

Vamos a crear un texto de entrada donde podremos escribir el mensaje que queramos, crearemos un Botón el cual se encargara de enviar la información que queramos a PHP y luego crearemos un texto de Salida el cual se encargara de leer lo que PHP nos allá mandado.

Codigo tutorialAMFPHP.mxml




  1. version="1.0" encoding="utf-8"?>
  2. xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
  3. import mx.rpc.events.FaultEvent;
  4. import mx.rpc.events.ResultEvent;
  5. private function onClick():void{
  6. amf.say.send(myText.text);
  7. }
  8. private function handlerResult(e:ResultEvent):void{
  9. outText.text = String (e.result);
  10. }
  11. private function handlerFault(e:FaultEvent):void{
  12. outText.text = String (e.message);
  13. }
  14. ]]>
  15. id="amf"
  16. source="HelloWorld"
  17. destination="amfphp">
  18. name="say" result="handlerResult(event);" fault="handlerFault(event);"/>
  19. verticalGap="10" horizontalGap="10" paddingLeft="10" paddingTop="10">
  20. text="MENSAJE A ENVIAR ->"/>
  21. id = "myText" />
  22. click="onClick();" label="Enviar"/>
  23. text="MENSAJE A LLEGAR ->"/>
  24. id="outText" />




Una ves escrito el código esto no es todo lo que necesitamos, FLEX BUILDER no sabes nada de que existe AMFPHP entonces de algún modo se lo tenemos que decir mediante un archivo de configuración de SERVICIOS que es el que dice mira para comunicar PHP con FLEX usaremos AMFPHP.

Este archivo lo llamaremos SERVICES-CONFIG.XML y lo llenaremos con el siguiente código:





  1. version="1.0" encoding="UTF-8"?>
  2. id="amfphp-flashremoting-service"
  3. class="flex.messaging.services.RemotingService"
  4. messageTypes="flex.messaging.messages.RemotingMessage">
  5. id="amfphp">
  6. ref="my-amfphp"/>
  7. *
  8. id="my-amfphp" class="mx.messaging.channels.AMFChannel">
  9. uri="/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>


Una ves que tengamos esta configuración puesta en muestra carpeta SRC vamos a tener que decirle al compilador que ese archivo esta hay de el siguiente modo, hacemos Click derecho en nuestro proyecto luego vamos a “PROPIEDADES” y en FLEX COMPILER en el espacio que dice ADDITIONAL COMPILER ARGUMENTS agregamos, no borramos nada solo agregamos un espacio y colocamos -services "services-config.xml"

Una ves hecho esto Estamos listo para Probar nuestro programa y comunicarnos con HelloWorld.php mediante WEB SERVICES.

Antes de terminar este tutorial, quiero hacer unas acotaciones MUY IMPORTANTES y se las presentare \en las siguientes imágenes.

Una acotación para esta imagen es Supongamos que tenemos una carpeta dentro de services llamada MyServices y nos queda C:\wamp\www\amfphp\services\MyServices y tenemos nuestro HelloWord.php dentro de esa carpeta en nuestro código justo donde dice SOURCE=”HelloWorld” colocaremos SOURCE=”MyServices.HelloWorld” para poder hacer referencia al mismo nada de MyServices/HelloWorld ni nada parecido.

En cuanto a los métodos podemos tener tantos métodos como dentro del HelloWold.php hallan.

En otras palabras, se colocarían en tantos tag de Method como funciones tengamos dentro de HelloWorld.php.

Y por ultimo

Esta imagen sale acotación para prevenir que si ustedes tienen AMFPHP EN OTRO LUGAR que no sea C:\wamp\www\amfphp entonces nuestro SERVICES-CONFIG.XML no nos va a servir por lo que el proyecto no va a funcionar tampoco.

Aquí les dejo todos los archivos y el ejemplo corriendo

Descargar Archivos:



Ejemplo:




Saludos.


Fuente: LINK

2010-03-31

Editores On-Line gratis para tener a mano, por si no contas con PhotoShop

Pixlr.com

Ideal para realizar algunos retoques básicos (como cambiar tamaño, rotar, recortar, invertir…) y otros no tan básicos (polarizar, cambiar brillo y saturación, selección mágica, además de diversos efectos).

BeFunky.com

En este sitio podréis dibujarlo a partir de los diferentes componentes ue se ven disponibles: rostros, fondos, cuerpos, mascotas… todo lo necesario para que vuestra identidad virtual sea lo más parecida a la real (o lo más diferente).

Flauntr.com

Se compone de varios módulos especializados en diferentes acciones: incluir texto, adaptar fotos para móviles, crear perfiles para redes sociales, dar efectos artísticos en los colores de las fotografías, aplicar filtros de distorsión, etc.

FunPhotoBox.com

Excelente opción para realizar montajes fotográficos de buena calidad en pocos minutos.

Photovisi.com

Pensada para organizar fotos de una forma original y atractiva.

Lunapic.com

Recortar, escalar, añadir texto, gradientes de color, animaciones, ajustes de brillos y contrastes… sencillo y efectivo.

Pizap.com

Ideal para darle efectos rápidos a cualquier foto añadiendo ojos, narices, sombreros y otros componentes que harán la imagen más divertida.

Picnik.com

El uso de picnik es muy sencillo, seleccionamos la foto que deseamos tratar, escogemos los efectos y movemos las barritas superiores hasta tener el resultado deseado. Fue comprado hace pocas semanas por Google.

Snipshot.com

Permite obtener cualquier foto de nuestro PC o de internet para recortarla, modificar los contrastes y brillos, redimensionarla, girarla, modificar colores, tonos y demás virguerías.

Splashup.com

Podéis obtener la imagen desde la webcam, desde un programa de fotografía online o desde vuestro ordenador.

Photoshop.com

No es tan poderosa como la versión de escritorio, tampoco es su idea sustituir un producto tan divulgado, pero permite guardar hasta 2 gigas de fotos que podrán ser redimensionadas, giradas, filtradas, procesadas…

Loonapix.com

Loonapix permite poner fotos dentro de marcos, cambiar colores y tonos

Para aparecer en portadas de revista

Algunas opciones para crear revistas con vuestra foto en la portada.

Drpic.com

Tendréis que subir la imagen y, sin necesidad de registro, aplicarle uno de los 15 efectos y acciones disponibles hoy. Recortar, redimensionar, añadir texto, darle efecto de foto…

Fuente: wwwhatsnew.com

2010-03-26

50 gandes utilidad PHP Tools - Class - Clases - IDE

50 herramientas útiles de PHP que puede mejorar significativamente el flujo de trabajo de programación. Entre otras cosas, usted encontrará una gran cantidad de bibliotecas y clases que ayudan en la depuración, las pruebas de perfiles y de creación de código en PHP.

Link relacionados:

Debugging Tools

  • Wincachegrind
    Wincachegrind interpreta los archivos profile de Xdebug y los muestras de una manera simple, esta aplicacion es compatible con Windows es un simple ejecutable.
    El cual busca los archivos cachegrind.out.* que genera xDebug segun su configuracion.
    Podes obtener muchos detalles de lo que consume cada unos de tus script PHP y encontrar los cuellos de botella para mejor la performan.

    Para configurar xDebug tenes que poner esto en el PHP.ini Ejemplo de mi configuracion para desarrollar:
    [xDebug]
    # xDebug No es compatible con la extencion Zend Optimaser y Zend Studio Debugger
    # por eso hay que desactivar estas extenciones cuando trabajamos con xDebug

    #ProFile netbeans-xdebug

    [xDebug PHP5.2.11]
    #zend_extension_ts=C:/wamp/bin/php/php5.2.11/ext/php_xdebug-2.0.5.dll
    zend_extension_ts=C:/wamp/bin/php/php5.2.11/ext/php_xdebug-2.1.0-5.2-vc6.dll
    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9000

    [xDebug PHP5.3]
    #zend_extension=C:/wamp/bin/php/php5.3.0/ext/php_xdebug-2.0.5.dll
    #xdebug.remote_enable=1
    #xdebug.remote_handler=dbgp
    #xdebug.remote_mode=req
    #xdebug.remote_host=127.0.0.1
    #xdebug.remote_port=9000

    # xDebug ProFile
    xdebug.profiler_append=1
    xdebug.profiler_enable=1
    xdebug.profiler_enable_trigger=1
    xdebug.profiler_output_name = cachegrind.out.%s
    #xdebug.profiler_output_name = cachegrind.out
    xdebug.profiler_output_dir ="C:/wamp/tmp/grind-out/"

  • Dentro de el archivos que queres hacer el profile tenes que poner esto.
    xdebug_get_profiler_filename(); /* Esto envia la orden a xDebug a generear el archivo
    que luego analizas con WinCacheGrind*/

  • Webgrind
    Webgrind is an Xdebug profiling Web front end in PHP 5. It implements a subset of the features of kcachegrind, installs in seconds and works on all platforms. For quick ‘n’ dirty optimizations, it does the job.

    Webgrind in 50 Extremely Useful PHP Tools

  • Xdebug
    Xdebug is one of the most popular debugging PHP extensions. It provides a ton of useful data to help you quickly find bugs in your source code. Xdebug plugs right into many of the most popular PHP applications, such as PHPEclipse and phpDesigner.
  • Gubed PHP Debugger
    As the name implies, Gubed PHP Debugger is a PHP debugging tool for hunting down logic errors.
  • DBG
    DBG is a robust and popular PHP debugger for use in local and remote PHP debugging. It plugs into numerous PHP IDE’s and can easily be used with the command line.
  • PHP_Debug
    PHP_Debug is an open-source project that gives you useful information about your PHP code that can be used for debugging. It can output processing times of your PHP and SQL, check the performance of particular code blocks and get variable dumps in graphical form, which is great if you need a more visual output than the one given to you by print_r() or var_dump().
  • PHP_Dyn
    PHP_Dyn is another excellent PHP debugging tool that’s open-source. You can trace execution and get an output of the argument and return values of your functions.
  • MacGDBp
    MacGDBp is a live PHP debugger application for the Mac OS. It has all the features you’d expect from a fully featured debugger, such as the ability to step through your code and set breakpoints.

Testing and Optimization Tools

  • PHPUnit
    PHPUnit is a complete port of the popular JUnit unit testing suite to PHP 5. It’s a tool that helps you test your Web application’s stability and scalability. Writing test cases within the PHPUnit framework is easy; here’s how to do it.
  • SimpleTest
    SimpleTest is a straightforward unit-testing platform for PHP applications. To get up and running with SimpleTest quickly, read through this pragmatic tutorial that shows you how to create a new test case.

    Simpletest in 50 Extremely Useful PHP Tools

  • Selenium
    Selenium Remote Control (RC) is a test tool that allows you to write automated Web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser. It can be used in conjunction with PHPUnit to create and run automated tests within a Web browser.
  • PHP_CodeSniffer
    PHP_CodeSniffer is a PHP 5 script for detecting conformance to a predefined PHP coding standard. It’s a helpful tool for maintaining uniform coding styles for large projects and teams.
  • dBug
    dBug is ColdFusion’s cfDump for PHP. It’s a simple tool for outputting data tables that contain information about arrays, classes and objects, database resources and XML resources, making it very useful for debugging purposes.

    11 Dbug in 50 Extremely Useful PHP Tools

  • PHP Profile Class
    PHP Profile Class is an excellent PHP profiling tool for your Web applications. Using this class will help you quickly and easily gain insight into which parts of your app could use some refactoring and optimization.

Documentation Tools

  • phpDocumentor
    phpDocumentor (also known as phpdoc and phpdocu) is a documentation tool for your PHP source code. It has an innumerable amount of features, including the ability to output in HTML, PDF, CHM and XML DocBook formats, and has both a Web-based and command-line interface as well as source-code highlighting. To learn more about phpDocumentor, check out the online manual.
  • PHP DOX
    An AJAX-powered PHP documentation search engine that enables you to search titles from all PHP documentation pages.

Security Tools

  • Securimage
    Securimage is a free, open-source PHP CAPTCHA script for generating complex images and CAPTCHA codes to protect forms from spam and abuse.
  • Scavenger
    Scavenger is an open-source, real-time vulnerability management tool. It helps system administrators respond to vulnerability findings, track vulnerability findings and review accepted and false-positive answered vulnerabilities, without “nagging” them with old vulnerabilities.
  • PHP-IDS
    PHP-IDS (PHP-Intrusion Detection System) is a simple-to-use, well-structured, fast and state-of-the-art security layer for your PHP-based Web application.
  • Pixy: PHP Security Scanner
    Pixy is a Java program that performs automatic scans of PHP 4 source code, aimed to detect XSS and SQL injection vulnerabilities. Pixy takes a PHP program as input and creates a report that lists possible vulnerable points in the program, along with additional information for understanding the vulnerability.

Image Manipulation and Graphs

  • PHP/SWF Charts
    PHP/SWF Charts is a powerful PHP tool that enables you to create attractive Web charts and graphs from dynamic data. You can use PHP scripts to generate and gather data from databases, then pass it to this tool to generate Flash (SWF) charts and graphs.
  • pChart – a chart-drawing PHP library
    pChart is a PHP class-oriented framework designed to create aliased charts. Most of today’s chart libraries have a cost; this one is free. Data can be retrieved from SQL queries or CSV files or can be manually provided.

    Chart in 50 Extremely Useful PHP Tools

  • WideImage
    WideImage is a PHP library for dynamic image manipulation and processing for PHP 5. To be able to use the library, you should have the GD PHP extension installed on your Web server.
  • MagickWand For PHP
    MagickWand For PHP is a PHP module suite for working with the ImageMagick API, which lets you create, compose and edit bitmap images. It’s a useful tool for quickly incorporating image-editing features in your PHP applications.

PHP Code Beautifier

  • PHP_Beautifier
    PHP Beautifier is a PEAR package for automatically formatting and “beautifying” PHP 4 and PHP 5 source code.
  • PHPCodeBeautifier
    PHPCodeBeautifier is a tool that saves you from hours of reformatting code to suit your own way of presenting it. A GUI version allows you to process files visually; a command-line version can be batched or integrated with other tools (like CVS, SubVersion, IDE, etc.); and there is also an integrated tool of PHPEdit.
  • GeSHi – Generic Syntax Highlighter
    GeSHi is designed to be a simple but powerful highlighting class, with the goal of supporting a wide range of popular languages. Developers can easily add new languages for highlighting and define easily customizable output formats.

Version-Control Systems

  • Phing
    Phing is a popular project version-control system for PHP. It is a useful tool for organizing and maintaining different builds of your project.
  • xinc
    xinc is a continuous integration server version-control system written in PHP 5 (i.e. continuous builds instead of nightly builds). It works great with other systems such as Subversion and Phing.

Useful Extensions, Utilities and Classes

  • SimplePie
    SimplePie is a PHP class that helps you work with RSS feeds. Check out the online RSS and Atom feed reader, which demonstrates a simple Web application that uses SimplePie.

    Spie in 50 Extremely Useful PHP Tools

  • HTML Purifier
    HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier not only removes all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive white list, it also makes sure your documents are standards-compliant. Open source and highly customizable.
  • TCPDF
    TCPDF is an open-source PHP class for generating PDF documents.
  • htmlSQL
    htmlSQL is a unique tool. It is a PHP class for querying HTML values in an SQL-like syntax. Check out the live demonstration of how htmlSQL works.
  • The Greatest PHP Snippet File Ever (Using Quicktext for Notepad++)
    “A little something for all coders: a snippets file that I use for PHP coding. This is designed to be used with Quicktext for Notepad++, but feel free to adapt it to whatever text editor you prefer.”
  • Creole
    Creole is a database abstraction layer for PHP5. It abstracts PHP’s native database-specific API to create more portable code while also providing developers with a clean, fully object-oriented interface based loosely on the API for Java’s JDBC.
  • PHPLinq
    LINQ is a component that adds native data querying capabilities to PHP using a syntax reminiscent of SQL. It defines a set of query operators that can be used to query, project and filter data in arrays, enumerable classes, XML, relational databases and third-party data sources. [via]
  • PHPMathPublisher
    With PhpMathPublisher, you can publish mathematical documents on the Web using only a PHP script (no LaTeX programs on the server and no MathML).

    Math in 50 Extremely Useful PHP Tools

  • phpMyAdmin
    If you’re working with PHP, there’s a big chance you’re set up in a LAMP configuration. phpMyAdmin is Web-based tool for managing, building, importing, exporting and exploring MySQL databases.
  • PHPExcel
    PHPExcel is a set of useful PHP classes for working with Microsoft Excel files. PHPExcel allows you to read Excel files and write to them. This is useful for dynamically generating Excel spreadsheets for downloading.
  • Phormer
    Phormer is a PHP-based photo gallery management application that helps you to store, categorize and trim your photos online.
  • xajax PHP Class Library
    xajax is a PHP class for easily working with PHP AJAX applications. It gives you an easy-to-use API for quickly managing AJAX-related tasks. Check out the xajax Multiplier demo and the Graffiti Wall demo to see the xajax PHP class in action.
  • PHP User Class
    PHP User Class is an excellent script that helps you create a system for user authentication (i.e. registration, log in, account profile, etc.). It’s a useful utility to have around if you require user registration for your Web applications.
  • PHP-GTK
    PHP-GTK is a PHP extension for the GTK+ toolkit (a robust toolkit for developing GUIs). It is a suite of useful OOP functions and classes to help you rapidly build cross-platform, client-side GUI’s for your application.

PHP Online Tools and Resources

  • Minify!
    Minify is a PHP 5 app that can combine multiple CSS or JavaScript files, compress their content (i.e. remove unnecessary white space and comments) and serve the results with HTTP encoding (via Gzip/deflate) and headers that allow optimal client-side caching. This will help you follow several of Yahoo!’s Rules for High Performance Websites.

    Minify in 50 Extremely Useful PHP Tools

  • HTTP_StaticMerger: Automatic “merging” of CSS and JavaScript files
    This library automatically merges sets of static files (CSS or JavaScript) and speeds up page loading (by lowering the number of HTTP queries). It is recommended to use this together with caching reverse-proxy to minimize the response time.
  • PHP Object Generator
    PHP Object Generator is an open-source Web-based tool that helps you quickly construct PHP objects and leverage object-oriented programming (OOP) principles in your code.

    03 Object Generator in 50 Extremely Useful PHP Tools

  • gotAPI/PHP
    gotAPI is a useful online tool for quickly looking up PHP functions and classes. Also check out the Quick PHP look-up widget example in case you’d like to include this awesome look-up feature on your website.

    04 Gotapi in 50 Extremely Useful PHP Tools

  • koders
    koders is a search engine for open-source and downloadable code. It currently has over a billion lines of code indexed and isn’t limited to just PHP.
  • PECL
    PECL is a directory of all known PHP extensions and a hosting facility for downloading and developing PHP extensions.

In-Browser Tools (Firefox Add-Ons)

  • FirePHP
    FirePHP is a Firefox extension that allows you to log data in Firebug. It has a variety of useful logging features, such as the ability to change your error and exception handling on the fly and to log errors directly to the Firebug console. To learn more about what FirePHP can do, check out the FirePHP guide on how to use FirePHP. For developers using the Zend PHP framework, you might find this guide on using FirePHP with Zend useful.

    01 Firephp in 50 Extremely Useful PHP Tools

  • phpLangEditor
    phpLangEditor is a very handy Firefox add-on for translating language files and variables in your script.

    02 Phplangeditor in 50 Extremely Useful PHP Tools

  • PHP Lookup
    PHP Lookup is a built-in search bar to help you quickly look up references to PHP syntax.
  • PHP Manual Search
    PHP Manual Search is a handy search bar that searches official PHP documentation from within your Web browser.

Frameworks for PHP

  • Dwoo
    Dwoo is a PHP 5 template engine positioned as an alternative to Smarty. It is (nearly) fully compatible with its templates and plug-ins, but it is being written from scratch and is aimed to go one step further with a cleaner code base.
  • CodeIgniter
    CodeIgniter is a powerful, high-performance, open-source PHP framework that helps you author PHP applications rapidly. CodeIgniter is known for having a light footprint, thereby reducing your server’s work. You can get up and running with CodeIgniter in a jiffy: it has an awesome online manual, a couple of helpful video tutorials and an active user forum.

    Codeigniter in 50 Extremely Useful PHP Tools

  • YII Framework
    Here is a high-performance component-based PHP framework that is supposed to be more efficient than CodeIgniter, CakePHP, ZF and Symfony. An optimal solution for developing large-scale Web applications. Yii supports MVC, DAO/ActiveRecord, I18N/L10N, caching, jQuery-based AJAX support, authentication and role-based access control, scaffolding, input validation, widgets, events, theming and Web services.
  • NetBeans
    A dedicated PHP coding environment and complete integration with web standards. The NetBeans PHP editor is dynamically integrated with NetBeans HTML, JavaScript and CSS editing features such as syntax highlighting and the JavaScript debugger. NetBeans IDE 6.5 fully supports iterative development, so testing PHP projects follows the classic patterns familiar to web developers.
  • Solar
    Solar is a PHP 5 development framework for Web applications derived from the Savant templating engine. Solar uses the MVC architectural pattern and has a host of classes and functions for securing your Web app against SQL injection, cross-website scripting (XSS) and other common exploits.

    Solar in 50 Extremely Useful PHP Tools

  • symfony
    symfony is an open-source PHP 5 Web application framework that is well known for its modularity and useful library of classes. To get up and running as fast as possible, you should check out the pragmatic symfony online tutorial called “The symfony 1.2 advent calendar tutorial,” which takes you through a step-by-step example of building your own symfony-based Web application.
  • PEAR – PHP Extension and Application Repository
    PEAR is a popular framework and distribution system for reusable PHP components. The purpose of the framework is to provide a structured library of open-source code for PHP users, a system for code distribution and package maintenance and a standard style for PHP code.
  • Propel
    Propel is an Object-Relational Mapping (ORM) framework for PHP 5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data.
  • {{macro}} template engine
    {{macro}} compiles initial templates into executable PHP scripts with very clean syntax (much cleaner than WACT and Smarty) and executes them very fast. The engine doesn’t use an XML-like syntax; there are only two data scopes, global and local, and no more data sources (all data is displayed with regular PHP variables); and the system supports all WACT features such as templates wrapping and including.Macro in 50 Extremely Useful PHP Tools
  • Zend Framework
    The Zend Framework by Zend Technologies (the creators of PHP’s scripting engine) is a popular PHP Web application framework that embraces the principles of PHP OOP; it’s very extensible and has built-in utilities for working with free Web service APIs, such as those of Google, Flickr and Amazon.
  • Qcodo
    Qcodo is an excellent open-source PHP Web application framework. It’s subdivided into two parts: (1) Code Generator, and (2) Qforms. Code Generator handles the creation of object code and PHP and HTML front-end code from your data model. Qforms is an intuitive system for handling and creating complex PHP-driven HTML Web forms. Check out demos of applications that use Qcodo and presentational material that covers Qcodo.

    Qc in 50 Extremely Useful PHP Tools

  • SAJAX
    SAJAX is a JavaScript and AJAX application framework that works well with PHP (as well as several other server-side scripting languages). See SAJAX at work by going to Wall live demonstration.
  • Smarty
    Smarty is a popular PHP templating system to help you separate PHP logic and front-end code (HTML, CSS, JavaScript). It will keep your projects modular and easier to maintain.
  • CakePHP
    CakePHP is one of the leading PHP frameworks for creating robust, fully-featured Web applications. CakePHP has an extensive and well-organized online manual. If you want to learn via video tutorials, check out the CakePHP screencasts.

    Cake in 50 Extremely Useful PHP Tools

  • Savant2
    Savant2 is another popular object-oriented PHP templating system. Instead of a special syntax unique to Savant2, you use PHP syntax to develop your project’s template.
  • PHPSpec
    PHPSpec is a simple and intuitive PHP framework. It follows the Behavior-Driven Development principle and therefore allows you to write behavior-oriented code, oftentimes in plain English.

PHP IDEs and Editors

  • PHPEclipse
    PHPEclipse is a popular PHP source-code editor that is open source and runs on all the major operating systems, such as Windows, Linux and Mac OS. It has all the features you’d expect from a PHP source-code editor, such as code-folding, syntax highlighting, hover-over tool tips and support for XDebug and DBG.

    07 Php Eclipse in 50 Extremely Useful PHP Tools

  • PhpED
    PhpED is an excellent IDE for Windows users. It is one of the most robust and feature-packed IDEs currently out on the market and has useful features such as a built-in source-code profiler to find bottlenecks in your PHP source code and excellent integration with third-party apps and services just as front-end code validation.

    08 Phped in 50 Extremely Useful PHP Tools

  • phpDesigner
    phpDesigner is a lightweight PHP editor/IDE that also handles front-end code and markup remarkably well. Check out the phpDesigner online tutorials, as well as screencasts on phpDesigner to help you learn more about the IDE.

    09 Phpdesigner in 50 Extremely Useful PHP Tools

  • Zend Studio
    Zend Studio is an excellent PHP IDE for Eclipse. It’ll help you develop, deploy and manage Rich Internet Applications (RIAs) in an intuitive interface.

    10 Zend Studio in 50 Extremely Useful PHP Tools

  • Aptana PHP
    Aptana PHP is an open-source IDE extension/plug-in to be used in conjunction with Aptana Studio. To learn more, be sure to check out the online documentation about Aptana PHP.
  • PDT
    PDT is a PHP Development Tools framework that’s part of the Eclipse project. PDT includes all the necessary tools for you to create PHP-based Web applications.
  • VS.Php
    VS.Php is a PHP IDE for MS Visual Studio, making it a great IDE for recently converted ASP developers who have used MS VS to develop Web applications. To get you up and running ASAP with VS.Php, check out Jcx.Software’s online tutorials as well as its online documentation.
  • PHPEdit
    PHPEdit is an excellent PHP editor/IDE with a ton of useful features and a very intuitive user interface. To learn more about why PHPEdit is a good IDE, read the 10 reasons to use PHPEdit and view the introductory screencast about PHPEdit.

Sources and Resources

PHP template engines, Smarty, Twig, Dwoo, Savant y muchas mas..

PHP template engines son ampliamente utilizados para separar el código

PHP LogoEsto hace que un sitio web más fácil de mantener y actualizar

Seguro que tiene algunos inconvenientes que es generalmente el rendimiento (la mayoría de las bibliotecas ofrecen grandes soluciones allí)

Para mencionar, utilizando un motor de plantillas puede no ser adecuado para cada proyecto. Un sitio web con pocas páginas probablemente no lo necesiten. Pero se puede mejorar el proceso de desarrollo de un portal, un sitio de comercio electrónico o de otra aplicación web de fácil.

Aquí hay 19 motores de plantilla PHP con características muy agradables

Smarty

Smarty PHP Template Engine

El motor de PHP más populares de plantillas que prefiere llamar a sí misma una "plantilla o marco de la presentación", ya que equipa el diseñador

Tiene un robusto mecanismo de caché, así como un plug-in fuerte

Con la plantilla de funciones, la capacidad de depuración, la seguridad que proporciona

Twig

El motor de plantillas que esta desarrollado por la gente de Symfony-project.org

Tiene caché, bloques, extenciones, la capacidad de depuración, la seguro y liviano parace muy interesante , es vastante nuevo. hay que ver en el futuro.

Dwoo

Dwoo PHP  Template Engine

Dwoo pretende ser una alternativa seria a Smarty con un limpiador de base de código.

Algunas de las características principales son:


  • La creación de plugins más flexible.

  • Unicode UTF-8 de apoyo para las funciones de manipulación de cadenas

Savant

Savant PHP Template Engine

Un motor de plantillas para PHP ligero.

Template Blocks

Template Blocks PHP Template Engine

Plantilla Blocks es un motor de plantillas visuales, reemplazando cualquier semántica de los motores de la generación anterior con un motor de interface.The AJAX es ligero, flexible,

Open Power Template

Open Power Template PHP

El nuevo Open Power plantilla contiene un analizador XML integrado que comprende perfectamente la estructura de su código HTML. Se puede encontrar etiquetas sin cerrar y llevar a cabo operaciones complejas en su structure.For un mejor rendimiento, todas las plantillas está compilado en el código PHP, de modo que su ejecución es rápida y puede acelerarse con los aceleradores de PHP. Y se almacenan en caché los resultados.

TinyButStrong

Tiny But Strong PHP Template Engine

Una muy fácil de aprender

Rain TPL

Rain PHP Template Engine

Un fácil utilizar e instalar el motor, que tiene 6 etiquetas, 3 funciones de PHP y 2 PHP classes.Rain TPL es WYSIWYG fácil, usted puede trabajar con img / css rutas relativas

PHPTAL

PHPTAL PHP Template Engine

PHPTAL es una aplicación PHP de ZPT. Para ser breve, es un PHPTAL XML / XHTML biblioteca de plantillas para PHP.

Si bien la mayoría de los desarrolladores web siguen utilizando etiquetas PHP como lenguaje principal de sus plantillas, la comunidad Zope viene con una idea refrescante llamado TAL que se está moviendo dentro de las acciones de presentación XHTML atributos en lugar de utilizar etiquetas de formato o elementos.

PHP Template Engine

PHP  Template Engine

Este motor utiliza plantillas de PHP PHP, no es un lenguaje de scripting de la plantilla.

Tiene una autenticación de usuario sencilla, período de sesiones

Template Lite

Template Lite - PHP Template Engine

Plantilla Lite, anteriormente conocido como Smarty Luz, es una gota en el reemplazo para Smarty.

Soporta la mayoría de las características de Smarty. Asimismo, mencionó a ser más rápido

VTE – Vivvo Template Engine

Vivvo PHP Template Engine

TEV, construido originalmente para Vivvo CMS sino que se distribuye de forma gratuita, es ligero, fácil de usar, pero potente y escalable.

El motor de plantillas que pueden hacer recurrencias, llamadas a objetos, matrices, pero aún permanecen dentro de una sola clase en menos de 1000 líneas de código!

El TEV es el lenguaje basado en XML y consta de etiquetas y atributos.

XTemplate

XTemplate PHP Template Engine

Xtemplate le permite almacenar el código HTML por separado de su código PHP.

Tiene muchas características útiles con todo el código es corta, altamente optimizado,

vlibTemplate

vlib PHP Template Engine

vlibTemplate es una clase de plantillas para aplicaciones PHP. Normalmente se incluye en el paquete vlib que incluye las siguientes 3 clases:

  • vlibTemplate
  • vlibDate
  • vlibMimeMail

El uso de esta clase en la que establezca los valores de las variables, bucles, si las declaraciones, etc, que se declaran en la plantilla. Esto le permite separar el diseño de todos los datos, que usted crea usando PHP.

PHP-Sugar

PHP-Sugar Template Engine

Tiene un espíritu similar con Smarty.

Un motor flexible que permite la compilación de expresiones similares a la de PHP es utilizado. También tiene un limpio y fácil de entender la sintaxis.

La salida es HTML de escape por defecto, en lugar de exigir explícitamente escapar como PHP en sí, que lo hace mucho menos probable que accidentalmente introducir un archivo HTML o código de la vulnerabilidad de inyección de JavaScript de usuario contenido enviado.

FXL Template

FXL PHP Template Engine

It supports:

  • de texto simple / asignacion de arreglos
  • bloques
  • bloques anidados.

Blitz templates

Blitz Templates

Blitz templates is a fast template engine written in C and compiled as a PHP module.

It started as a php_templates replacement, but developed into much more. It is based on extensible template controllers (PHP) and weakly-active templates (HTML).

Vemplator

Vemplator PHP Template Engine

With 220 lines of code, Vemplator offers:

  • Conditionals: if/else and switch statements
  • Dot-notation for class member variables (customer.name)
  • Associative and numerical arrays (row[0] and rows[1]['name'])
  • For-each looping over arrays (associative and numerically indexed)
  • Includes (included templates are parsed and cached separately)

Template Engines Under PEAR

PHP PEAR Template Engine

4 PEAR packages on templating:

QuickSkin

QuickSkin PHP Template Engine

QuickSkin, previously known as SmartTemplate, works like a ‘template compiler’ that converts templates into executable PHP code and stores it for later reuse.

It supports:

  • Simple Scalar Substitution (Strings, etc.)
  • Block Iterations (nested Arrays / BEGIN..END)
  • Basic Control Structures (IF..ELSEIF..ELSE)
  • Custom Extension (Output filters, uppercase, sprintf, etc.)
  • Template Compilation (HTML templates are converted to executable PHP Code)
  • Output Caching (Accelerates your applications by reusing page output)

What is your preference of PHP template engines & why?

Further Readings