問題描述
我不是巨魔,我的目標也不是發(fā)起火焰戰(zhàn)爭;我也沒有不尊重 Zend 框架的作者的意思:其中有很多優(yōu)秀的工作.但是...我有一項工作要完成,我很難在 ZF 的流行與使用它構(gòu)建應(yīng)用程序的現(xiàn)實之間進行協(xié)調(diào).我真的很想從其他人那里知道他們?yōu)槭裁词褂?Zend Framework.
I'm not a troll and my goal isn't to start a flame war; neither do I mean to disrespect the authors of the Zend Framework: there is a lot of fine work in it. But... I have a job to get done and I'm having a hard time reconciling the popularity of ZF against the reality of building apps with it. I would really like to know from others why they use Zend Framework.
我對 PHP 世界還很陌生,但我已經(jīng)用多種語言進行了大量編程.在閱讀了許多教程并在其中構(gòu)建了幾個應(yīng)用程序后,一些核心 Zend Framework 工具對我來說就像是 alpha 代碼.對我來說,以下基本弱點似乎太過分了,無法考慮使用它部署應(yīng)用程序 - 但一次又一次地建議 ZF 作為領(lǐng)先框架之一,如果不是領(lǐng)先框架.
I am fairly new to the PHP world but I've done a lot of programming in many languages. After reading many tutorials and building a couple of apps in it, some core Zend Framework facilities feel like alpha code to me. For me the following fundamental weaknesses, among others, would seem too overwhelming to consider deploying apps with it - but over and over again ZF is suggested as one of the, if not the leading framework.
首先讓我說我發(fā)現(xiàn) ZF 的大部分內(nèi)容都是可行的.路由幾乎可以正常工作,布局工具是可用的(盡管與 JSP/ASP 等模板系統(tǒng)非常不同),緩存工具等也是如此.社區(qū)中似乎有一種趨勢,即填充大量建模(例如驗證)和視圖邏輯(例如 $this->headScript() - 為什么我的控制器必須關(guān)心我的視圖需要哪個 js 文件?)但可能是使用問題而不是必然 框架的問題.
First let me say I find the much of ZF to be workable. Routing works pretty much as it should, the Layout facility is serviceable (though very different from templating systems such as JSP/ASP), as is the cache facility, etc. There seems to be a tendency in the community to stuff a lot of modeling (e.g. validation) and view logic (e.g. $this->headScript() - why should my controller have to care which js file my view requires?) into controllers but could be a matter of usage and not necessarily the framework's fault.
現(xiàn)在說說我在短時間內(nèi)遇到的幾個非常嚴重的 (IMO) 弱點.我不寒而栗地想象,如果我繼續(xù)用它來構(gòu)建,我將來會發(fā)現(xiàn)的其他領(lǐng)域.
Now for a couple of really serious (IMO) weaknesses I've experienced in my short time with it. I shudder to imagine the other areas I will discover in the future if I continue to build with it.
1.表單布局
許多人似乎對缺乏對表單布局的控制感到不滿.你怎么能有一個流行的框架來構(gòu)建一個簡單的表單需要這么多的討論?問題 1和問題2.
2.認證/授權(quán)
似乎沒有人真正了解如何簡單地執(zhí)行常規(guī)身份驗證/授權(quán).人們 [包括你真正的] 努力實現(xiàn)簡單的訪問控制.此外,該方法似乎傾向于序列化以實現(xiàn)持久性,而不是用戶和權(quán)限的傳統(tǒng)數(shù)據(jù)庫存儲.一個令人困惑的例子,增強設(shè)施的提案,教程 - 第一部分,和第二部分.伙計們,這太辛苦了!
2. Authentication/Authorization
No one really seems to understand how to simply perform routine authentication/authorization. People [including yours truly] struggle with implementing simple access control. Further, the approach seems to lean on serialization for persistence, rather than traditional database storage of users and permissions.
A confusing example, a proposal to enhance the facility, a tutorial - part I,
and part II. This is too much work guys!
我感知到的弱點是不是真的,或者不是問題?為什么或者為什么不?您為什么選擇 Zend Framework(或不選擇)?您是否發(fā)現(xiàn)其他領(lǐng)域非常痛苦,以至于您想放棄 ZF 以換取不同的方法?感謝您的意見.
Are my perceived weaknesses not real or somehow not a problem? Why or why not? Why did you choose Zend Framework (or not)? Are there other areas that you've found to be so painful that you want to dump ZF for a different approach? Thanks for your opinions.
推薦答案
因為他們擅長營銷
Zend 的創(chuàng)始人 Andi Gutmans 和 ZeevSuraski 是 PHP 的主要貢獻者
Zend's founders Andi Gutmans and Zeev Suraski are key contributors to PHP
他們擁有最完整的 php 框架之一.
And they have one of the most complete framework for php.
當你想到的時候;就像在說:
我們的語言沒有達到應(yīng)有的性能,因此我們制作了一個帶有緩存的框架,使其速度更快"
"Our language isn't as performant as it could be, so we made a framework with caching that makes it faster"
- Zend 提供的大部分功能都可以完成沒有 Zend.
- 但是 Zend 的包是非常好的多合一"分發(fā).
- 他們提供認證和培訓.
這篇關(guān)于為什么 Zend Framework 如此受歡迎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!