Deploying Zend Framework applications on a shared host

Hello everybody!

Usually I have direct access (shell) in all the servers that host my Zend Framework applications, but, some clients already have a shared host, so I have to deploy the application there too.

I was thinking how can I never thought this before! There are a lot of ways to deploy a Zend Framework application, but in a shared host we can’t have access to create Virtual Hosts on Apache.

Continue reading Deploying Zend Framework applications on a shared host

Zend Framework vs CakePHP Framework

Hi every one!

I just read a small but very interesting post in BrownPHP website with a comparison between Zend Framework and CakePHP Framework. The post is below and the original article is here.

The Zend Framework, developed by Zend Technologies is an open-source, object oriented web-application framework implemented in PHP 5. It is widely known as ZF and is developed with the purpose of making things easier for PHP developers and supporting best practices at the same time. CakePHP too, is an open-source web application framework used for creating web applications written in PHP. It is developed by Cake Software Foundation, Inc. It is written in PHP and is based on the model of Ruby on Rails.

Zend Framework has easy methods of licensing with the new BSD license and a swift and well-tested code base that your business can rely upon. It makes use of commonly available APIs from well known vendors like Google, Amazon, Yahoo!, Flickr and API providers and catalogers such as StrikeIron and Programmable Web.  Continue reading Zend Framework vs CakePHP Framework

Basic CRUD operations with Zend Framework

Hi everyone,

Here I am again. Yesterday a friend asked me how to create the basics CRUD (Create, Release, Update, Delete) operations using Zend Framework. As everybody now, a basic CRUD it’s a good way to understand some framework’s resources to a new ZF developer. As he is a newbie with Zend Framework, the example will be simpler, but complete.

I think this example resumes a lot of things of a basic usage of Zend Framework, like controllers, models – not exactly ;-), views and the magic Zend_Form, with form validation, filters and more.

Our application context will be a simple Blog using MySQL as database. Why blog again? Because it’s simple to understand, just it. Our blog application will have just the posts table, to show only the CRUD funcionallity. Comments and files can be reason to a future post.

Continue reading Basic CRUD operations with Zend Framework

jQuery Form plugin does not send XMLHttpRequest value

Hi all…

Here we are, again.

This will be a quick post, just for warning in a specific case. When you’re using the jQuery Form plugin by malsup.com you are making an AJAX call, but it does not send some variables that identify a XMLHttpRequest (in my case I’m using the plugin with a upload form).

Continue reading jQuery Form plugin does not send XMLHttpRequest value

Redimensionamento, rotação e outros efeitos em imagens com PHP utilizando Asido

Boa tarde, pessoal!

É muito comum em aplicações web a necessidade de trabalhar com imagens, tanto para redimensionamento, criação de thumbnails, girar, etc.

Apresento a Asido, um conjunto de classes para trabalhar com imagens em PHP. Embora eu não goste muito da forma de organização de OO que a Asido utiliza, é uma boa ferramenta e suporta algumas bibliotecas de imagens (chamadas de drivers) como:

  • GD2 – Muito conhecida e muito utilizada em PHP
  • MagickWand – Uma extensão nativa de PHP para trabalhar com a ImageMagick
  • Imagick extension – Idem item anterior, porém é um pouco mais antiga
  • Imagick shell – Para trabalhos com a CLI do PHP

Continue reading Redimensionamento, rotação e outros efeitos em imagens com PHP utilizando Asido

Utilizando AjaxContext para chamadas Ajax com Zend Framework

Olá pessoal!

Esta semana estou trabalhando num projeto onde a utilização de Ajax está sendo muito útil em termos de performance e facilidade na busca de produtos no banco de dados.

Como estou utilizando Zend Framework no projeto, vou explicar resumidamente como trabalhar com requisições Ajax no ZF.

Basicamente, o óbvio seria desabilitar a renderização da view por padrão em sua action e também desabilitar o layout, caso esteja usando-o.

Continue reading Utilizando AjaxContext para chamadas Ajax com Zend Framework

Tradução usando gettext (*.mo) no Poedit

Olá pessoal.

Indo direto ao assunto, sempre tive dúvidas quanto a usar o Poedit para traduzir strings, motivo pelo qual usava mais arrays em PHP mesmo. Porém, mais cedo ou mais tarde, necessitamos evoluir e correr atrás do tempo perdido.

Sempre achei o Poedit chato e nunca conseguia fazê-lo funcionar. Após umas fuçadas na net e acertar o link correto, consegui (e entendi :-)) seu funcionamento.

Continue reading Tradução usando gettext (*.mo) no Poedit