English 中文(简体)
Getting started with a project using Zend Framework
原标题:

Ok, I ve got Zend all set up and my hello world pages working.

Personally, I d rather code this from scratch, but I m trying to find out how to use Zend to save time when making similar projects over and over again.

I want to:

Admin:

  1. Create multiple admin accounts
  2. Have database-stored admin options that will be available on all php pages for both admin and public pages (like global on/off switch for the entire public site, homepage title, guest permissions, etc)

Public:

  1. Have the user be able to create and sign in
  2. User can fill out personal information
  3. Recurring payment processing

My quesiton is, what Zend modules do I want to use? I want to use the zend framework to the best it can and not write any code that I don t have to.

最佳回答

With the exception of the payment processing your app is doing CRUD, so you will likely use the MVC and Db classes of ZF then. For authentication you d use a Zend_Auth adapter. And thats it already. Of course ZF provides much more classes than that, but given from your description YAGNI.

Also, keep in mind, that ZF promotes a use-at-will architecture. You can take whatever you like from it. It is not a full stack framework though and there is very little automagic in it. ZF can do a lot with some additional work, but if you are looking for something like this out of the box, you are probably better off with Symfony or another full stack framework.

Well, as for the other ZF classes, why not RT*M ;)

问题回答

basically, you will need the MVC implementation so read about
Zend_Controller , Zend_View and Zend_Application too.

for DB interaction, there is Zend_Db but I don t prefer using it, it will be better to go with a good O/R mapper like Doctrine . there is planes for integrating ZF with Doctrine in the future so using it now, is a good idea.

for Authentication use Zend_Auth and for Authorization use Zend_ACL.

Zend_Form will make creating and validating your forms easier with its integration with Zend_Validate





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签