通常,使用ZF的人都对Controller很感兴趣,尤其是Rewrite和Router功能很吸引人,不过因为一些特殊原因,比如大项目中涉及大量的rewirte条件,导致全部交给php来处理有些难以接受,这个时候就可能会放弃掉ZF的Index.php文件, 而采用传统的PHP文件结构,这时的ZF如何使用呢?
前一段时间完成的6.cn 的专辑改造 (http://6.cn/zj),完全基于了ZF来实现,但却没有使用ZF的index.php文件,在目录结构上,完全参照了ZF标准的Models、Views、Controllers模式开发,只不过调用的地方直接调用Controller里面的Action,这相当于把Controller当作了一个普通的类来使用,这个方法经过使用,发现虽然有些变态,其实还是挺有趣和挺方便的。有兴趣的朋友可以尝试一下,感觉似乎更灵活,有时index.php会带来很多思路上的束缚 🙂
挺好,灵活应用满足要求才是学习的最终目的。
也一直使用ZF开发,感觉很顺手,虽然喜欢Borland的产品,但是Delphi For PHP目前的确不怎么地。
直接使用controller
想看看代码
ZendFrameWork 耦合性够松散了,但是还是不够。
lz,多向你学习,希望也多关注我的blog哦有空加个链接:)
http://www.80island.com
[Comment ID #25498 Will Be Quoted Here]
已经加上,欢迎交流。
刚点过去您的blog,第一篇文章是从我这里转的吗? 哈哈,是不是该feedback一下?
lz多向你学习,希望也多关注我的blog哦有空加个链接:d
http://www.hiadmin.com
此人很懒,只换了链接地址.
[Comment ID #25510 Will Be Quoted Here]
哈哈,已经加上。
6.cn现感觉很慢,点击后3秒才响应
6.cn现感觉很慢,点击后3秒才响应。
框架给开发上带来一定便利,同时也损失了一部分性能
是啊,我也得向你学习.
[Comment ID #25855 Will Be Quoted Here]
6.cn主站没有用到ZF框架, ZF框架仅用到部分子站和独立的项目上了。
最近慢是因为CDN在做较大的改造,改造完了就不会这样了。
跟我的做法一样,我是参照zfw跟thinkphp的做法,
不过也是将controller做成class来用,觉得这样子很爽
做了56的群组
http://qun.56.com
[Comment ID #26223 Will Be Quoted Here]
兄弟做的qun.56.com感觉不错啊,多多交流。
是啊.都留个blog地址
要去学习
呵呵,最近人越来越懒了,懒得写了哈哈,ok feedback完了!!!:)
现在的6.cn/zj 还是用的ZF么?
Greetings I am so glad I found your web site, I really found you by
accident, while I was researching on Bing for something else, Nonetheless I am here now and would just like to say thanks a lot
for a remarkable post and a all round thrilling blog (I also
love the theme/design), I don’t have time to go through it
all at the moment but I have book-marked it and also included your RSS feeds, so
when I have time I will be back to read a lot more, Please do
keep up the great b. generic viagra without a
doctor prescription
I like the helpful information you provide in your articles.
I’ll bookmark your weblog and check again here frequently.
I’m quite sure I’ll learn many new stuff right here!
Best of luck for the next!
Hello, I enjoy reading through your article.
I like to write a little comment to support you.
Hey! I could have sworn I’ve been to this website before but
after reading through some of the post I realized it’s new to me.
Anyways, I’m definitely happy I found it and I’ll be bookmarking and checking back frequently!
I loved as much as you’ll receive carried out right here.
The sketch is tasteful, your authored material stylish.
nonetheless, you command get got an edginess over that you wish
be delivering the following. unwell unquestionably come more
formerly again as exactly the same nearly very often inside case
you shield this increase.
An outstanding share! I’ve just forwarded this
onto a colleague who was doing a little homework on this.
And he in fact ordered me lunch because I found it
for him… lol. So allow me to reword this…. Thanks for the meal!!
But yeah, thanks for spending the time to discuss this issue here on your blog.
I’m excited to discover this great site. I need to to thank you for your time for this fantastic read!!
I definitely appreciated every bit of it and i also have you saved
to fav to check out new stuff in your website.
Marvelous, what a webpage it is! This website presents valuable facts to us, keep it up.
Have you ever considered about adding a little bit more than just your articles?
I mean, what you say is valuable and everything. Nevertheless think
about if you added some great pictures or videos to give your posts
more, “pop”! Your content is excellent but with pics and clips, this website could
certainly be one of the greatest in its niche. Awesome blog!
Greate pieces. Keep writing such kind of info on your page.
Im really impressed by it.
Hello there, You’ve done an incredible job. I’ll definitely digg it and individually recommend to my friends.
I am sure they’ll be benefited from this web site.
Excellent items from you, man. I have consider your stuff previous to and you’re simply too
great. I actually like what you’ve obtained right here, really like
what you’re saying and the way by which you assert it. You make it entertaining and you still take care of to stay it sensible.
I can not wait to learn far more from you. That is really a great website.
It’s a shame you don’t have a donate button! I’d most
certainly donate to this outstanding blog!
I suppose for now i’ll settle for book-marking and adding your RSS
feed to my Google account. I look forward to fresh updates and will
share this site with my Facebook group. Talk soon!
Hi there! Do you know if they make any plugins to assist with Search Engine Optimization? I’m trying to get
my blog to rank for some targeted keywords but I’m not seeing very good
gains. If you know of any please share. Cheers!
Whoa quite a lot of good knowledge!
cialis tablets
can you take cialis and l arginine together – http://cialisbirx.com/cialis+40+mg+generic/cialis-online-ec-37
cialis pills
If you want to take much from this post then you have to
apply these methods to your won blog.
Aw, this was an exceptionally good post. Finding the time and actual effort to create a top notch
article… but what can I say… I hesitate
a lot and don’t seem to get nearly anything done.
Heya i am for the first time here. I came across this board and I find It truly useful
& it helped me out a lot. I am hoping to provide
something again and aid others like you helped me.
An impressive share! I’ve just forwarded this onto a
friend who had been doing a little research on this.
And he actually ordered me breakfast simply because I discovered it
for him… lol. So let me reword this…. Thanks for
the meal!! But yeah, thanks for spending some time
to discuss this subject here on your web page.
My partner and I stumbled over here by a different page and thought I may as well check things out.
I like what I see so now i am following you. Look forward to looking at your
web page again.
Hi! I know this is sort of off-topic but I needed to ask.
Does building a well-established website such as yours take a large amount of work?
I’m brand new to blogging however I do write in my journal daily.
I’d like to start a blog so I will be able to share my experience and
thoughts online. Please let me know if you have any kind of recommendations or tips for
new aspiring blog owners. Thankyou!
Howdy are using WordPress for your site platform?
I’m new to the blog world but I’m trying to get
started and set up my own. Do you require any coding expertise to make your own blog?
Any help would be really appreciated!
Hello just wanted to give you a quick heads up. The text in your post seem to be running off the screen in Ie.
I’m not sure if this is a format issue or something to do with browser compatibility but I figured I’d post to let you know.
The design and style look great though! Hope you get
the problem resolved soon. Many thanks
It’s an remarkable piece of writing designed for all the online people;
they will obtain benefit from it I am sure.
I like the helpful info you provide in your articles.
I’ll bookmark your weblog and check again here frequently.
I’m quite certain I’ll learn many new stuff right here! Good luck for the next!
My programmer is trying to convince me to move to
.net from PHP. I have always disliked the idea because of the costs.
But he’s tryiong none the less. I’ve been using WordPress on numerous websites
for about a year and am concerned about switching to another platform.
I have heard excellent things about blogengine.net.
Is there a way I can import all my wordpress content
into it? Any kind of help would be greatly appreciated!