Tareq Alam

i have promises to keep and miles to go before i sleep – Robert Frost

CakePHP April 21, 2008

Filed under: PHP, PHP Frameworks — tareqalam @ 8:21 am
Tags: , ,

CakePHP is a nice PHP framework. Its as delicious as it’s name.
Installation is too easy. Just follow the steps..

  • download cake php from here http://www.cakephp.org/
  • just unpack it to your host and point the url and do as the introductory page say

Now I want to discuss how i have intigrated Smarty in CakePHP

I know there are few drawbacks of smarty but its helpful for the people who are already master in smarty.

Intigrating Smarty with cakePHP will be like blessing for them. Because they dont need to learn the template engine of cakephp then :) . Hope you guyz find this helpful

Steps

1. Download a version of SmartyView from here:
http://cakeforge.org/snippet/detail.php?type=snippet&id=6

  1. Save SmartyView as /(app)/views/smarty.php

2. Download Smarty

http://smarty.php.net/download.php
Extract tarball so Smarty.class.php sits at /vendor/smarty/Smarty.class.php

3. Create “smarty/compile” and “smarty/cache” within your tmp dir

(/(app)/tmp/ by default) and make them writable by the apache user

4. Include in your controller

(in app_controller.php to do it app-wide) var $view = 'Smarty'; and (to enable the SmartyHtml/SmartyJavascript helpers) var $helpers = array('SmartyHtml','SmartyJavascript'); to use Smarty templates and helpers.

You now have SmartyView installed!

Notes:

  1. /views/smarty_templates is parsed for smarty plugins : http://smarty.incutio.com/?page=SmartyPlugins
  2. SmartyView will fall back to .thtml templates for views.
  3. By default Smarty views must reside in ’smarty’ subdirectories — see addendum for information regarding removing this requirement.
 

Mojavi Framework April 21, 2008

Filed under: PHP, PHP Frameworks — tareqalam @ 8:00 am
Tags: , ,

I have worked with Mojave framework for more than 1 year while i was in ECBBBD. This is a true MVC(Model View Controller) Framework.

With this framework its easy to develop any kind of site and web application. Smarty is intigrated with this framework.

The original project site can be found at http://www.mojavi.org

This site’s development is currently stopped. But you can have a brief idea there.

If you’re looking for the Mojavi 2.0 API Documentation it can now be found at http://www.tannerburson.com/docs/mojavi/api please update your bookmarks accordingly.

I have worked on many projects using this framework. Though its not that much famous framework, its simple and easy.