zend-framework - 潜在 Zend Framework 开发人员的编程问题

标签 zend-framework

我可以给一些不了解 Zend Framework 的潜在开发人员提出什么重大问题?

我的目标主要是确定他们自己(即框架)快速学习新事物的能力。这必须是他们通常会在几个小时内完成的事情,但在这种情况下,由于他们不熟悉框架,由于额外的阅读和 stackoverflow.com 的使用,他们将花费更多的时间;),所以,我可以让他们在周末做一些事情。

此外,问题必须非常针对 View 和 Controller 部分,因为前端工作主要是我需要的。 (而且 Zend 框架对 Model 并没有多大帮助)。问题可能需要他们做一些 ajax,并且通常“漂亮、实用,但后端不是很复杂”。

最佳答案

对我而言,每个采埃孚开发人员应具备的基本技能与以下内容有关:

  • 编写自定义 View 助手 - 如果它们必须是自定义命名空间,则最好,而不是 Zend ,因为这将让他们学习如何在 View 中注册辅助路径。
  • 绝对使用 Zend_Form 编写一些表单类(并与装饰者斗争;)。甚至可能是一些自定义表单元素,这也需要注册辅助路径和新命名空间 - 基本技能。
  • 编写简单的ACL系统。在那里你可以检查他们是如何做的——这为你提供了关于他们的软件架构知识的信息。他们是作为插件实现的吗?也许硬编码在 index.php ?或自定义 Controller 和 initpreDispatch方法。
  • Auth - 在 ZF 中有 10-15 行,但您必须搜索它:)
  • 一些数据库模型工作 - 简单。二、三个表以及它们之间的关系——可以是最简单的ACL表:users , role , user_has_role .
  • 当然使用布局并使用 ZF 的 View 助手来附加脚本和样式。
  • 定义一些自定义路由。
  • 在某种程度上实现缓存。
  • 了解 bootstrap 的工作原理 - 对于大多数这些任务,使用基于 Bootstrap 和 application.ini 的 Bootstrap 资源是最简单的。

  • 涵盖几乎所有技能的简单“应用程序”可能如下所示:

    1. Simple database which have three tables: user, role, has_role. In user table column created_at which is automaticaly set when I insert record. (covers Zend_Db_Adapter, application.ini).
    2. 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's contextSwitch feature. (covers Zend_Db_Table_Abstract, relations between them, understanding of model, Zend_Db_Select, Views and maybe viewhelpers like appendScript, 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/

    相关文章:

    Eclipse PDT 调试设置 (XDebug/Zend)

    php - 通过多种函数获取数据库记录

    php - xlsx 文件在 php 中下载时损坏

    php - Zend Form AJAX 弹出窗口与 jQuery

    php - catch 语句中函数的错误处理

    ios - Zend 1.10 'isPost' 在 Af Networking 2.2 发布到它时返回 false

    zend-framework - 部署 Zend Web 应用程序的最佳方式

    mysql - 在 zend 中使用动态数据更新查询?

    php - zend 使用 Decoration 在文本框旁边移动服务器端验证消息

    php - ZF语言与翻译