论坛首页 Java企业应用论坛

冷静的比较一下Douyu和Play Framework

浏览 49100 次
该帖已经被评为良好帖
作者 正文
   发表时间:2009-12-02  
berlou 写道
helian 写道
Arden 写道
现在play! 1.1 可以用scala写,我发现以后说不定还可以用python写~~


这东西越来越玩具了。。。


搞不好越来越杯具了


不见得吧,他只是提供选择,不喜欢就完全不理他好了
0 请登录后投票
   发表时间:2009-12-02  
貌似author全部列出了Douyu 的劣势吧...有做冷静的比较么?
0 请登录后投票
   发表时间:2009-12-02  
jssanshengshi 写道
貌似author全部列出了Douyu 的劣势吧...有做冷静的比较么?

你敢说你这么说话就冷静、就负责:)
0 请登录后投票
   发表时间:2009-12-03  
koda 写道
jssanshengshi 写道
貌似author全部列出了Douyu 的劣势吧...有做冷静的比较么?

你敢说你这么说话就冷静、就负责:)

个人用了貌似,疑问句的形式,应该比较冷静...
0 请登录后投票
   发表时间:2009-12-03  
最烦丫的说“貌似”,“赞”...
0 请登录后投票
   发表时间:2009-12-03  



我不是啥牛人,我只看看,我不说话。

防拍,防吵,防被人挑技术。



0 请登录后投票
   发表时间:2009-12-03  
koda 写道
最烦丫的说“貌似”,“赞”...

最烦“丫的” 当我灌水好了...
1 请登录后投票
   发表时间:2009-12-03  
楼上几个都在灌水。
斗鱼作者跑哪去了,在准备比较帖么?
1 请登录后投票
   发表时间:2009-12-03  
Arden 写道
现在play! 1.1 可以用scala写,我发现以后说不定还可以用python写~~


jython???
2 请登录后投票
   发表时间:2009-12-03   最后修改:2009-12-03
引用
Play的"缺陷和问题":
Play有很多的静态方法,在Controller和Model中都有,静态方法带来的最大麻烦就是难以继承,这是很恶心的一件事情,这一点可能是Play框架的一个硬伤,不知道以后会不会有更正.


关于这点,分成两部份,

1. Controller的static method,其实有人提过的。

下面试Bort的回答原文:

引用
Yes I know.
But the use of static methods has some advantages for other points.
For example the ability to reverse routes just by calling the action
method. And it help use in many byte code manipulation tricks. Perhaps
we could provide some helper for some use cases.


关于继承问题,如果按照Play!的哲学开发,应该问题不大,继续Bort的原话:

引用
Also, I'm not sure to understand what you try to do. What your route
file looks like ?

I understand to need to common validation, but I would do it this way:


public class BaseCrud extends Controller {
    protected static void validate(JPASupport o) {
       ...
    }
}
public class User extends BaseCrud {

     public static void create(User user) {
           validate(user);
           ...
     }
}


相关帖子:
http://groups.google.com/group/play-framework/browse_thread/thread/ed032c637f82b115/d95dc1315d4c458f?lnk=gst&q=controller+static#d95dc1315d4c458f

2. 对于Model层,这里很多static的方法吗?指哪些?find?

我个人感觉这一层的开发就是Active Record模式。。。

http://en.wikipedia.org/wiki/Active_record_pattern
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics