• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Monday, 01 Mar 2010 01:49
昨晚sailing给我了个矩阵:
512
112
227
吓了我一跳,信仰都被摧毁了
为了证实这个数字不是忽悠,我特意查了一下时间,
都按照地震发生的当地时间计算的。
-_-|||
Tags - , ,
Author: "xeric " Tags: "心情[SPIRIT]"
Send by mail Print  Save  Delicious 
Memory   New window
Date: Friday, 11 Sep 2009 01:00
忽然听到那句我们再也回不去了,对不对,发现原来曾经的感动和坚持都没入回忆,时间终究还是像子弹一样穿了过承诺,无法回头。其实,回忆也不过就是对命运的不甘。或许唏嘘失去,或许期待重现。

品茗着苦涩的咖啡,不经意间哼起了落了流行的旋律,如鱼钩挂上了饵一般,悄悄钩出回忆,彩色的,香醇的过去。
Tags -
Author: "xeric " Tags: "心情[SPIRIT]"
Send by mail Print  Save  Delicious 
JMockit   New window
Date: Wednesday, 02 Sep 2009 03:55
很高兴的看到能够解决final和static相关的顽疾的mock tool出现。
Jmockit还没有算正式发布,前端时间问了一下作者,据说是会解决本身dependcy mock出错的问题。
现在有点懒得写技术文章了,一方面时间不够,另外一方面觉得草草写出点轮廓还是对不起观众。
细节太多,问题太多,不亲自动手实验,作用确实也不大。
写点cool的,以前我在文章中提起过关于静态方法的mock:
class FileUtil{
   public static String getName(File file){
   ....
   }
}

class Service{
   public void execute(){
   ...
   FileUtil.getName(file);
   ...
   }
}

遇到这种情况,以前接近无解,除非重写这个类,并设置为相同package优先加载。
现在对于Jmockit就比较easy了:
class ServiceTest{
   private Service serivce;
   FileUtil fileUtil;

   ....//some before method

   @Test
   public void executeTest(){
       new Expectations(){
            {....
                 FileUtil.getName(withAny()); returns("Test");
             ....}
       }
   }
}

基本上说,static的mock用起来还是非常爽的。
现在JMockit文档很少,例子和javadoc也不算详尽,但是要把case写起来还是比较容易的了。
Tags -
Author: "xeric " Tags: "开发[DEV]"
Send by mail Print  Save  Delicious 
Date: Tuesday, 30 Jun 2009 01:47
惊闻国家自然科学基金委员会办公室装修耗资巨大,不太相信,
有人发出链接,于是进入查看:
http://www.mof.gov.cn/mof/...
不看不知道,一看吓一跳,110个亿装修个办公楼!
惊骇之余,我打算细细计算一下这笔用黄金堆起来的装修究竟是什么样子的一个规模,
我特意搜索了一下,金茂大厦的造价的50亿!注意,是造价。
环球金融中心虽然才高出那么一点点,造价却不菲,高达72亿。
不过比起中国的某楼建设,我觉得他们择个良辰吉日自己倒塌掉进黄浦江算了。
110个亿啊!你以为是110万啊?
真的是想告诉世界中国有钱了,还是想告诉世界中国彻底废了?
110个亿,国内有那么多的公益事业,绿化,治沙,治水要去做,装修个大楼?不装修会死么?
我们按商品房的价格来算,一般一套100平米的房子,做个精装修,大约是20万。
我们为了提高中国对外形象,给他翻翻,可以说100平米40万装修费用,所有的设备都是顶级的了,。
当然建筑公司是高档的,没100平米额外白送10万,算50万吧。
110亿可以装修220万平方!可能还没意识到这个规模,那这样吧,金茂大厦一共88层,总面积是29万平米。
这下子有概念了吧,差不多9栋金茂大厦,我f**k这些勾结的动物!
国库那么充裕,干嘛不拿点出来给贫困的人,干嘛不把社会保障体系做做好,
干嘛让老百姓眼睁睁得看那些一天比一天贵,一天比一天容易倒塌的房子,无所适从?
Tags -
Author: "xeric " Tags: "心情[SPIRIT]"
Send by mail Print  Save  Delicious 
Date: Monday, 13 Apr 2009 01:51
One day, some friend ask me, why grails so looks like the rails, but there's a service layer in this framework.
It's a common question asked by buddy from rails framework.
I'm confused also when just got stating in grails.
I decide to talk about this topic in article, I think most of the idea is just came from myself, may be it's not alright, I just hope it can resolve some confuse and question from newer.
The most different between grails and rails, I think it's focus on grails is domain-Driven, this is came from some special area such as UML and BA. Programmers always not care about the UML and BA in most project. but they are always received some information about domain, entity, model, role, behavior, wow, it's so much nouns, hard to understand, no problem. I talk about them just since they are relative with the DDD.
Some buddies from rails framework is familiar with rich model object, right? That's important concept in rails model layer, we are always like witting model-related logic in model, it's different from java or ejb, an anemia model object language, But are you confused when you see thousands lines of code in the models? Are you feeling why it so far to get ending of the code when you have read the model's code for 1 hour?
Grails choose an standpoint between grails and ejb model, they choose DDD.
It's so familiar with the rails framework when you just get starting with grails, model properties, model constraints and model mapping such as belongsTo and hasMany.
But when you want to add some business logic, problem came out.
Where to add logic? In rails user opinion, coding in domain model is conversion, but why there's a service layer in grails, if we write logic into service layer, how to explain the constraints and validation in domain objects?
It looks like some important  concept in UML, domain-entity-role-behavior.
Example: in a pet store. We have three domain, store, pets, customers.
store has-may pets, customer can buy pets and also has-many pets.
the constraints is pets can not have no store but can null in owner(Customer) object.
the pets' price can not little than zero.
The customer must have non-null name and they must have enough money to buy pets.
the constraints is the meta information of domain, so this logic add to domain class.
when this domain get a instance in back-end, we can call them entity. entity can be described with the relation between each others, and entity has validation them self.
exclude entity concept, the customer, pets and store are also roles, why?
They have behavior, customer have behavior to buy, to pay and to complain.
The pets can shout, and the store can publish pet information.
Ok, where to put behavior code? Not controller layer, not domain layer or not script SRC in grails also. just in the service layer.
More advantage? Yes, service layer can inject into everywhere in the grails framework, so ,if someone want to reuse logic in other place, go ahead.
Service layer can be as an open service API, in web service.
Example, store and customer must login when store want to publish information and customer want buy pet, It's the same logic when auth them, username + password [+ verification code].
You can just write a LoginService in application and inject into store and customer domain(controller) to use.
And when you just want to open a auth API for user from another system, you can use this service as an open API(webservice).
After all, we have some idea when we choosing where to put the different logic, right?
After all, believe and trust DRY concept when you use this Agile Web Framework, that's the most important you must to remember!
Tags - , ,
Author: "xeric " Tags: "开发[DEV]"
Send by mail Print  Save  Delicious 
Date: Friday, 10 Apr 2009 08:46
come from: http://almaer.com/blog/mod...

This is a good thread talking about the service layer,
It's a challenge in enterprise application when you use pure Rich model object.
It's always not like in the book, when you in the middle phase of a project.

Because, there's only hundreds lines of code in the book or in a "simple blog" project, but always thousands lines of code at least in "ERP" project.

I'll talk about the service layer of grails in the next article in my blog.

this is one of my Reference article.
Tags -
Author: "xeric " Tags: "开发[DEV]"
Send by mail Print  Save  Delicious 
Date: Thursday, 09 Apr 2009 06:34
问题从一个Groovy迭代开始:
def a = 1..9
a.each{
 println it
}

这种简单的迭代work的很完美,但我想改一下需求,只打印等于4的数字
def a = 1..9
a.each{
 if(it == 4){
   println it
 }
}

似乎也正常,但是,其实这边打印了4之后的迭代就没必要执行了,如果是ruby,我会这么做

(1..9).each do i
 if i == 4
   puts i
   break
 end
end

而groovy就不行了,break是不能写入到一个闭包内的
原因也不难发现,groovy的底层是java支持的,那么实现each不用看源码不妨先猜测一下:
each是list的一个meta method,接受一个闭包作为参数。
内部用invoke的方式去把闭包调用起来。
所以这个代码更像是一个封装好的代码块的反射调用,而非逻辑集成,
ruby能工作原因可能是底层中,作为一个闭包并不是简单的block.call或者invoke,
而是编译器已经将其识别为执行流程的一部分,或者说,闭包并没有把逻辑封闭在本身内。
ruby执行码是原始底层支持的
groovy则最终还是java的执行码,这种推断也不是空穴来风,不妨看看一个包含闭包的groovy class编译后的状态:
XXX.class
XXX$_closure1.class
也就是说,闭包也不过是个类而已,因此其中不能添加break来控制调用者本身的流程也可想而知了。
而对于一个block,也就是普通的控制流程{}包起来的流程,比如if else这些包起来的,
则是原生的block,
这点和ruby有着极大的不同,个人认为也影响了程序员的一些第一直觉判断。
而且,如果迭代并不能有效被控制(当然不是绝对,比如continue可以通过return来实现)
那么迭代本身的价值就有所损失,不过真要把闭包trade as block来的话,那groovy底层真的要大手术了。
所以暂时(甚至永远),groovyer必须要把block和closure分分仔细,也不要随便搞乌龙写法出来,
举个例子,试图对一个迭代进行有效选择并返回,恐怕是永远做不到的,安心的for..in吧。

有人说groovy的closure更像是lambda,我觉得挺有道理的,当然,我只了解as和js的lambda,
其他的并不是很了解,我记得Martin Fowler有个介绍closure的文章里面确实也把js的lambda归为js脚本的closure,当然,这个不扯了,概念而已,关键是,要明白怎么用,为什么会这样。

有个很不错的文章,链一下:
http://blog.csdn.net/hax/a...
Tags - , ,
Author: "xeric " Tags: "Ruby"
Send by mail Print  Save  Delicious 
Date: Thursday, 19 Mar 2009 13:26
标题是个很简单的东西,问题却由下面这段既不提示groovy代码出错行又不具体告知问题的root cause的欠揍的错误信息引起的。

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to be
an 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error c
reating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.MappingException

引起这个问题的可能性很多,逛了几个国外的maillist,
主要集中在
1:同一个domain class中定义了两个domain definition
2:有个domain class是abstract的
3:你的数据库有了点小问题,重启下数据库试试

好了,我把代码检查了100遍啊100遍,没发现错误也没发现上述问题,
数据库重启了100遍啊100遍,当然,夸张了点,不过我想说的是,就算1000遍也许也没用,
当然,如果你找到代码错误了,那就抽自己吧。

我没抽自己,在万分无奈下,我想起了zend framework和ROR开发时的一个小细节:
马上检查是否grails有clean命令,发现果然有,执行之,重启,问题解决,

郁闷,不是第一次了,每个框架都要搞点缓存的事情出来调戏下我。。。。

以后要首选clean。
Tags -
Author: "xeric " Tags: "开发[DEV]"
Send by mail Print  Save  Delicious 
Date: Thursday, 30 Oct 2008 03:50
The single-table inheritance mechanism failed to locate the subclass: ......
......
基本上,十之八九就是有个字段被命名为type了,type属于ActiveRecord保留的属性,还是别用了。
最简单的办法,字段改名吧,改不了名,那这个英文也许能帮你:
This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Site.inheritance_column to use another column for that information.
让你去修改这个属性,挑个另外一个字段来存储继承信息,还是看需求了。
如果你的表是从其他应用迁移过来,并且很多地方都依赖这个名字,那建议还是修改这个属性,否则,改名吧。。。

Tags - ,
Author: "xeric " Tags: "Ruby"
Send by mail Print  Save  Delicious 
Date: Tuesday, 28 Oct 2008 04:01
升级gem到1.3.0后,直接建项目都出问题,执行除gem -v命令外的所有gem命令均出现下述问题,rubyforge如是解决,测试生效,备份。

地址:http://rubyforge.org/track...

[#22226] RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)
Date:
2008-09-29 16:30   Priority:
3
Summary:
RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)

Detailed description

Gem 1.3 does not work out of the box on windows.

Here is what happens:

C:\>gem update
Updating installed gems
ERROR:  While executing gem ... (NoMethodError)
   undefined method `uid' for nil:NilClass

The problem is in C:\ruby\lib\ruby\site_ruby\1.8\rubygems.rb, line 713:

"if 0 == File.expand_path(path).index(Gem.user_home) and Etc.getpwuid.uid != File::Stat.new(Gem.user_home).uid
then"

Which should be replaced with:

"if 0 == File.expand_path(path).index(Gem.user_home) and !Gem.win_platform? and Etc.getpwuid.uid
!= File::Stat.new(Gem.user_home).uid then"

Then everything works as expected.
Tags - ,
Author: "xeric " Tags: "Ruby"
Send by mail Print  Save  Delicious 
Date: Monday, 08 Sep 2008 07:57
最近看到有人在Infoq写了用Jruby为Java写测试用例,
感觉不错,脚本语言的简便性得以充分发挥,于是不免手痒,尝试了一下,
Jruby虽好,却发现需要进行编译时出来诸多问题,比如java代码必须放入jruby的libpath下,
虽然不是什么大事,却无形中增加了推广难度,大家肯定会排斥做测试还需要这么麻烦的操作。
当然不是没有办法,不过似乎看上去很美的东西总是存在缺憾。
这个和Jruby不是Java原生支持的脚本有一定关系,于是想到了Groovy。
果然,尝试了一下Groovy后,发现其集成度远优于Jruby,
很简单的调用IDE中部署好的java类,无需任额外配置就可以run起来。
于是感觉找到了新路可走,深入挖掘,
单元测试最繁琐的事情当然属mock对象,一个代码中充斥了各种依赖的类,
这些类在正常的运行中又依赖于其他类和诸多环境变量和配置。
当然Groovy是个不错的语言,对于Junit的支持非常优秀,提供了MockFor和StubFor的方法来处理mock。
简单易懂,不过随着测试代码烦琐的深入,问题逐渐出现了。
我需要测试的一个业务类中,调用了一个读取配置的Util,
当然,除非我的运行环境全部run起来才有可能读取到这个配置,否则是读取不了的。
就是以为着我要mock这个读取配置的Util。
这个是个很典型的Groovy范例,我当时看了doc后是这样想的。
然而事实却远比我想象残酷,在我找遍了所有资料,尝试了n种做法后,
突然发现一个严重的问题,所有的例子里,你要mock的对象需要生效,比如是在groovy的脚本中才可以,
换句话说,我mock了一个util类,是的,我确实成功了,我在下面代码总这样使用

import groovy.mock.interceptor.MockFor
class JavaGroovyTest extends GroovyTestCase{
 void firstTest(){
   def mock = new MockFor(JavaUtil)
   mock.demand.returnValue(1..2){false}//before mock, this return true
   mock.use{
     println(JavaUtil.retrunValue())
   }
 }
}

如我所料的返回了false,然而当这个util被包含在一个java类写的业务逻辑总,严重问题出现了,
groovy的mock无法使作用域进入class。

//java class, this is java code!
public class JavaClass
{
   public boolean doReturnValue(){
       return JavaUtil.returnValue();
   }
}


import groovy.mock.interceptor.MockFor
class JavaGroovyTest extends GroovyTestCase{
 void firstTest(){
   def mock = new MockFor(JavaUtil)
   mock.demand.returnValue(1..2){false}//before mock, this return true
   mock.use{
     def jc = new JavaClass()
     println(jc.doReturnValue())
   }
 }
}

返回的值依旧是true,而且抛出一个异常:
junit.framework.AssertionFailedError: verify[0]: expected 1..2 call(s) to 'returnValue' but was called 0 time(s).
开始还没理解这个错误究竟怎么回事,后来发现,由于所调用的returnValue是在java的class中,
对于这个测试用例来说,根本就没有调到mock出来的returnValue方法,而这个方法要求至少被执行1-2次,
这个执行操作没有发生,因此就抛出了这个错。
如果mock根本就无法介入java的class,那么意味着使用Groovy的纯粹性大大下降,
我们写测试的话,必须把java和groovy混着写才行,我想没有一个公司的代码管理者希望看到这样的情况。
不知道有没有其他办法来解决这个问题,我暂时是没辙了,
感觉上想让脚本进入项目还有点时间。
Tags - ,
Author: "xeric " Tags: "开发[DEV]"
Send by mail Print  Save  Delicious 
Date: Thursday, 07 Aug 2008 03:26
真是佩服自己的杂食能力,
又要新开辟一块战场了,不过整体来说还是对于快速开发和敏捷编程的喜爱。
不过seam有一点让我不是很喜欢,前端用的是JSF。
不知道是不是web bean在jsf里面运作的更好才这样选择的。
我是不太喜欢看着页面里面一堆tag的,对于维护来说,无疑是噩梦。
尽管ror里面也有很多tag,但是脚本语言的清晰度却要远远强于JSF这种复杂的东西。
而且是事件驱动的,暂时还没看到这块的优势在什么地方,
似乎更喜欢ror那种简单清晰的事件驱动模型。
REST也没有摸到,还在找。
不过后端的思想很不错,避免了诸多对象的转来转去。
现在还有一个比较迷惑的地方,看起来entity bean能够直接进入web层是个很不错的选择,
但java ee毕竟是java ee,不是ror,
当我希望把web层剥离出来单独部署的时候,怎么减少entity bean的串行化传输量和解决lazy load的问题,
好像还没有想明白。
难道在seam bean中的注入时定义一个体积较小的vo对象在处理,似乎回到了po转vo的模式。
再找找答案吧,
整体来说seam值得一看,gavin king确实是个天才。
Tags -
Author: "xeric " Tags: "开发[DEV]"
Send by mail Print  Save  Delicious 
Date: Tuesday, 20 May 2008 02:30
昨天本打算把notepad++推荐给别人,
结果上官网首页一看,差点没吐血,居然抵制奥运,
当然就是拿些什么西藏人权问题来说话了,
既然如此,你喜欢地址奥运是你的爱好,我喜欢抵制你也是我的爱好,
顺带让身边在用的朋友也一起和我爱好一下了。
换SciTE、notepad2,也不用你了。
Tags - ,
Author: "xeric " Tags: "信息[INFO]"
Send by mail Print  Save  Delicious 
Date: Tuesday, 22 Apr 2008 07:31
一直没时间管,
不知道1个月后能不能稍微那么一点点的闲下来,
如果有时间,就准备重新启动boblog的flash相册插件,
感觉imagebox老了点,而且没法配所有的皮肤,
想寻觅一下更好的flash程序进行改造,
自己从头写的话估计周期会很长,而且没很好的美工支持。。。

我现在拖欠的任务估计已经“罄竹难书”了,感叹一下自己的拖劲,
一个月后应该会公布一个新的web应用,呵呵,这边留点胃口呗。
和我这个年龄段的人很有关系哦:)
Tags -
Author: "xeric " Tags: "闪[FLASH]"
Send by mail Print  Save  Delicious 
Date: Monday, 21 Apr 2008 02:15
最近网上抵制消息一浪高过一浪,
大家的msn也是一个个红彤彤的,包括我的,
不过这次抵制真的不怎么样,个人感觉。
抵制JLF的人,我不知道有多少,
但是我就问一句:你们宣布自己开始抵制前,用你们的大脑好好思考了没?
如果没有,恭喜你,你和被DL利用的那些ZD分子没什么区别,
我不知道JLF支持DL的消息从何而来,至少,我没听到官方消息,
很多人觉得官方消息保守,那请问这种空穴来风的消息就不过激了?
抵制抵制,口号喊的响,不去买JLF的东西就以为自己团结了?
中国的国际地位就提高了?世界就和平了?如果真有其事,法国佬就因为这种抵制行为不支持DL了?
国家就富强了?人民就幸福了安康了?别的国家就看得起中国了?
这个就是不用大脑思考最后导致的幼稚!
这几天天天喊着口号要抵制的人,请问一下,你们中有几个能抵制一辈子的?做不到就别把自己装的很nb的爱国!
法国只是一个,还有德国呢,美国呢,日本呢,你们倒是都抵制啊,干脆自闭国门吧?
不夸张的讲,国际上很多有奶就是娘的国家都在和中国对着干呢,
中国现在遇到的问题说明中国在国际上的低位还有待提高,
但是提高不是靠抵制来做到的,“给点法国佬颜色看看,让他们见识一下中国人的力量”是这样来实现的?
别让别人笑话了,中国缺乏的是自身的实力,中国经历满清到一仗后退几十年的情况,
想要提高自身实力就应该静下心来搞发展,把综合国力搞上去,
中国的国际地位要有足够后备支持,什么是后备支持?经济,军事,生产力这些硬实力,
靠几个天天喊抵制的愤愤之辈,中国怎么提高?
我不想去讨论老外是不是能在JLF的销售中攫取中国人的利润问题,
只要没有违反商业法则,竞争就是必要的,
把国外的企业抵制的干干净净你们就以为为中国的企业扫清障碍了?扯蛋!
国内那么多企业被保护的那么好,结果不是提高到国际水平,而是拿自己人开玩笑,造点不负责任的产品。
在恶劣的环境下生存,发展,超越,反击,这是每个中国人心里应该拥有的东西,卧薪尝胆,奋发图强,
而不是天天叫叫抵制!
任何东西需要更加包容和吸收,师夷长技以制夷,学习甚至是抄袭。
很久前看到国内的Meizu搞自己的手机在德国被查了,骂声一片,说中国人只会抄,没自己的创造,
你们骂的人里面有没有现在在喊抵制的?
实在是搞笑,自己的技术落后人家这么多,不要寄希望于一夜超越,你们当中国是superman啊?
模仿甚至是抄袭很多时候都是必经之路,问题是,我们在不在提高?国人有没有看到进步?
好了,我会该申明一下我爱自己的国家了,否则又有愤青看到这个要骂我卖国贼了,虽然我不会生气而会觉得可悲。我的每一份心都在向着自己的国家,不过不是盲目的保护,而是理性的看待。
理性的为国家出力,看待国家的发展,不要国家一有贪污就说国家完蛋了,国外一施压就觉得我要抵抗了。
中国总是有这么一帮人唯恐天下不乱,何必呢?
Tags -
Author: "xeric " Tags: "心情[SPIRIT]"
Send by mail Print  Save  Delicious 
狼和狗   New window
Date: Saturday, 19 Jan 2008 04:30
听话的狗就能拿到吃的,安逸的活着,拿到所有的荣誉和赞赏。
狼无论如何都只能靠自己的努力,在恶劣的环境下,试图生存。
要有尊严的活着。

写在工作三年的纪念日。
Tags -
Author: "xeric " Tags: "心情[SPIRIT]"
Send by mail Print  Save  Delicious 
Date: Tuesday, 18 Dec 2007 02:06
最近在用两套框架做对比编码,说说我的一些感觉吧。
Php的framework有点大同小异这是废话,因为php原生是不支持MVC的,
所以基本所有的框架最主要的一点就是解决MVC框架的问题,
两者都是通过主入口分发请求的模式来完成的。
在MVC的模型设计上zendFramework更趋近于ROR,基于controller-action的模型。
而symfony则是一种app+module+action的模式。
你可以把symfony的module理解成为controller的一种演变模式。
symfony提供了一个叫做symofony的命令行形式,前提是你要使用PEAR进行安装一些额外的东西,
当然,如果不想安装也可以,不过就要用复杂的php /symfony-path/symfony这样的命令来做一些事情。
zendFramework框架比起symfony的框架相对简单很多也清晰很多,对于使用者来说,
你不光光要知道你运行的代码是怎么工作的,更多的是要知道内部做了什么,
否则你可能连require都弄不明白。
symfony则相对复杂,封装了相当多的细节,由于有脚手架,因此很多事情你只要明白怎么做,
真的要深究的话,那个地方还是很绕的来着。
大部分情况下,zend的代码是全部要自己写的,包括controller的继承关系,
脚手架上,symfony学ror算是学的不错,从初始化安装部署到清理缓存,都可以用命令行来操作。
下面提一些细节的,个人认为,认证机制上,zendframework的框架更加完美清晰,
symfony把user对象继承了session对象总觉得怪怪的,而且丢了一个myUser.class.php放在lib里面,
有时真觉得这个myUser有点bad smell,想改个名字都不行。
权限控制上,zend通过代码完成,而symfony通过配置完成,熟悉了的话,symfony的更加统一。
路径问题,有时觉得symfony的路径奇怪的不得了,但是不管怎么说还是正常工作着的,
或许是我还不够熟悉的原因吧,但是zend的路径就简单很多。
模板上,zend肯定推荐集成smarty了,而symfony我还没看到怎么集成。
下面是最关键的一个,也是我放弃zend转向使用symfony的关键,
zend不支持页面上的js的form_tag,这个意味着什么,用过ror的朋友肯定知道,
对的,你所有的操作有一部分不支持js操作,例如删除,你甚至不能控制其变成一个伪js操作来保护REST路径。
symfony做的不错,虽然还没ror那么完美,但是已经有了,前端也默认集成prototype,这个选择不错。
还有一个就是,symfony有一个dev环境,这个环境下很有用的一个东西就是代码执行跟踪,
这样将会很容易发现开发中出现的一些错误。非常有用:)
by the way,symfony至今的中文文档少的可怜(不过E文的绝对不少哦)。
好了,随着深入开发,我想还会有更多的体会的,以后有机会再来写。
Tags - , , ,
Author: "xeric " Tags: "开发[DEV]"
Send by mail Print  Save  Delicious 
Date: Sunday, 28 Oct 2007 17:02
我也不喜欢没事找谁谁谁去链接一把来着,除了好朋友之外,
其实我公告那边就写了,来申请链接的朋友请帮我先做好链接,
如果是我找你申请的,那我肯定是要先做好的,
结果经常来几个申请链接的都不做好就跑来申请,我过去一看,找不着,
这样我帮你做了我还要反向通知你啊,我又不喜欢callback的接口,同步的不行么?
今天看到的哥们更搞笑,说链接已经做了,让我帮他做,结果去看看人家blog,没有,
我怎么感觉被开涮来着的。。。。
以后这样的留言我也一起删除了啊,我觉得交换链接谁申请就先帮做好撒,
我平素里面也不可能有那么多时间还去检查你们做没做我链接的,天天好多事情来着,
可能有些人觉得我也太斤斤计较了,其实做个链接没啥的,
可是我这边做的链接都放在首页啊,页面拉的老长可不好看。
Tags -
Author: "xeric " Tags: "心情[SPIRIT]"
Send by mail Print  Save  Delicious 
Date: Friday, 12 Oct 2007 02:23
简单说就是喉咙好疼啊~~~
然后晚上睡不好,一睡好,咽了个口水,然后就疼醒了,郁闷啊。
现在还慢慢出现疼的发痒的感觉,就咳嗽,咳了更疼,
有时一个恶性循环,想死扛着不吃西药的来着,今早终于妥协了,
去配了个什么清开灵胶囊的,然后我又额外要了一份西瓜霜,想想总能缓释一下疼痛吧。
千万别生病,生病了就没激情,没追求,没理想,没力气了:(
Tags -
Author: "xeric " Tags: "闪[FLASH]"
Send by mail Print  Save  Delicious 
Date: Wednesday, 10 Oct 2007 03:29
直接被台风搞定了,感冒不知道要几天,我又尽量不吃西药的,
只能喝喝板蓝根了,头痛的很~~
站点依旧在推广中,真希望这个系统能给大众带爱足够的便利。
最近天气实在无常,大家也当心点来着了。
Tags -
Author: "xeric " Tags: "心情[SPIRIT]"
Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader