我可以给一些不了解 Zend Framework 的潜在开发人员提出什么重大问题?
我的目标主要是确定他们自己(即框架)快速学习新事物的能力。这必须是他们通常会在几个小时内完成的事情,但在这种情况下,由于他们不熟悉框架,由于额外的阅读和 stackoverflow.com 的使用,他们将花费更多的时间;),所以,我可以让他们在周末做一些事情。
此外,问题必须非常针对 View 和 Controller 部分,因为前端工作主要是我需要的。 (而且 Zend 框架对 Model 并没有多大帮助)。问题可能需要他们做一些 ajax,并且通常“漂亮、实用,但后端不是很复杂”。
最佳答案
对我而言,每个采埃孚开发人员应具备的基本技能与以下内容有关:
Zend
,因为这将让他们学习如何在 View 中注册辅助路径。 Zend_Form
编写一些表单类(并与装饰者斗争;)。甚至可能是一些自定义表单元素,这也需要注册辅助路径和新命名空间 - 基本技能。 index.php
?或自定义 Controller 和 init
或 preDispatch
方法。 users
, role
, user_has_role
. 涵盖几乎所有技能的简单“应用程序”可能如下所示:
- Simple database which have three tables:
user
,role
,has_role
. Inuser
table columncreated_at
which is automaticaly set when I insert record. (coversZend_Db_Adapter
, application.ini).- App has three modules/controllers/pages - call it what you want.
a) ability to add, remove and edit user and roles. Typically CRUD. Additionally, you can say that grid has to be frontend side (jqGrid, DataTables etc.) using AJAX to get data from app. There you will check if they implement AJAX output at their own, or use ZF'scontextSwitch
feature. (covers Zend_Db_Table_Abstract, relations between them, understanding of model, Zend_Db_Select, Views and maybe viewhelpers likeappendScript
, Zend_Form)
b) uploader for custom files - such a web based storage. Simple form to upload file and table bellow with list of them and possibility to download (covers security, could cover Zend_Form and Zend_File_Transfer, maybe partials in view if they use the same table as in a))
c) page which display 10 last tweets of whoever you want from Twitter, which must be cached for x hours.(covers Zend_Cache, and then maybe Zend_ervice or XML,JSON knowledge - depends how they implement it)Additionally, app requires user to log in using login and password (you can say, that registration must be another part of an app). And for take advantage of ACL system, user has access only to b) and c) (and of course register/login page ;), but admin to all three pages.
现在你有两种方法。
首先是说:
"It must be in ZF. But form has to be made using Zend_Form, and models using Zend_Db_Table_Abstract. For auth you must use Zend_Auth for ACL front controller plugin And so on....
第二种方式是说:
"It must be in ZF. How you do it internally - it's totally your buisness - but it must work."
你会选择哪个,取决于你的需求:)
附注。就个人而言,在招聘过程中,我使用第二种方法(有时甚至没有指定框架)——因为就像我之前说的,它向我展示了候选人的思维方式——这也很重要。尽管已经有 10 个这样的解决方案,或者她/他更喜欢 RTFM 的人,或者两者兼而有之,但候选人是“DIY 人”,她/他/他/他/他/他/他/他/他/他/他/他/他/他/他/他/他/她想要做任何事情。当你必须做应用程序并且你自己想如何去做,使用哪些组件时,它更有创意。在候选人制作这样的应用程序之后,您仍然可以进行代码审查并向他们展示可以以不同方式做的事情 - 这样他们就会学习新的东西,也许您会从他们的方法中学到一些东西:)
关于zend-framework - 潜在 Zend Framework 开发人员的编程问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4964451/