Alex Tech Adventures The webs best tutorials!

Modular application

(0 votes, average 0 out of 5)

When your site has multiple functionality, like user services and administration, you may want to break them into separate modules. This way you can have library/books/list and admin/book/edit or generally speaking module/controller/action. Addition of module to the URI can be a challenge as modules are outside of the general MVC. Instead, each module has its own independent MVC. In this video I show how to set up such modular structure as well as applying familiar concepts, such as layout and ACL, to this new paradigm.

 

Download source

 

P.S. I had a real hard time uploading this video and I am still not sure if it came out correctly. It suppose to be 48 minutes long. Please report if its broken.

P.P.S By request, here's the SQL for the database. Its very small so i'll just include it here:

-- phpMyAdmin SQL Dump
-- version 3.2.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 14, 2009 at 11:42 AM
-- Server version: 5.1.37
-- PHP Version: 5.2.10

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `zftutorial`
--

-- --------------------------------------------------------

--
-- Table structure for table `books`
--

CREATE TABLE IF NOT EXISTS `books` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(50) COLLATE latin1_general_ci NOT NULL,
`author` varchar(100) COLLATE latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5 ;

--
-- Dumping data for table `books`
--

INSERT INTO `books` (`id`, `title`, `author`) VALUES
(1, 'Core PHP Programming', 'Leon Atkinson'),
(2, 'Programming in Python 3', 'Mark Summerfield '),
(3, 'Core Java', 'Cay S. Horstmann and Gary Cornell'),
(4, 'AJAX and PHP: Building Responsive Web Applications', 'Bogdan Brinzarea, Cristian Darie, Filip Chereches-Tosa, Mihai Bucica ');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) COLLATE latin1_general_ci NOT NULL,
`password` varchar(50) COLLATE latin1_general_ci NOT NULL,
`role` varchar(50) COLLATE latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `password`, `role`) VALUES
(1, 'john', 'pass1', 'users'),
(2, 'rob', 'pass2', 'admins');

Last Updated ( Sunday, 23 August 2009 22:34 )  
Discuss (2 posts)
Modular application
Dec 30 2010 07:54:20
I have an error on the main bootstrap, withini _initAutoload function

with the following code: $this->_acl = new Model_MediaACL();
i got the following error: Fatal error: Class 'Model_MediaACL' not found in /Users/Keldon/Sites/zend_vault/application/Bootstrap.php on line 19
Do you any idea of the reason why it raises that kind of error?
Thanks

Giuseppe
#854
Modular application
Jul 31 2011 14:26:02
I have this problem, too. Could you tell me how to fix it?
#959

You need to login or register to post comments.
Discuss...
You are here: Home Development Zend Framework Modular application

Statistics

Members : 1388
Content : 42
Web Links : 1
Content View Hits : 190497

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 28 guests online