博客园 - 阿不 View RSS

No description
Hide details



10年总结,得到与失去 - 阿不 8 Jan 2015 6:58 PM (10 years ago)

【摘要】太久没有在博客园写博客了,纠结了几次,原本不想陷入感性思维之中。人一旦感性了,就容易说出格的话,写有争议的东西。可正值工作10年和马上要开始的新的职业生涯,还是觉得有必要给自己来一个流水账是的书面总结。因为文笔一直不好,所以说是流水账式的。 2014是我工作的第10个年头,这是一个有纪念和转折意义的... 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

Windows phone7 软件发布:理财计算器(包括wp7房贷计算器,wp7个税计算器,wp7存款利息计算器) - 阿不 27 Sep 2011 8:30 PM (13 years ago)

【摘要】前一段时间,需要经常用到贷款计算器的功能,这样有利于我们做出更好的决策。但是我们只能通过银行的工作人员的计算器来计算,给我带来了极大的不便和损失,由此便萌生了开发一个Windows phone7版的贷款计算器的功能。 此计算器目前的最新版本为:1.1.0.0,具有房贷计算器,2011个税计算器,存款利息计算器的功能: 房贷计算器:根据不同的贷款类型(商业,公积金,组合贷款),选择不同的还款方式(等额本息,等额本金),计算不同的贷款金额以年限的条件下,需要支出的月供情况情况 ,包括每期的月供明细。以供购房者选择合适的贷款方式提供参考。 个税计算器:根据2011年新版的个人所得税条例,计算公民.. 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

从.NET到Mono-记Kooboo CMS对Mono的兼容历程:三、平台的兼容性 - 阿不 26 Jun 2011 3:32 PM (13 years ago)

【摘要】从基于.NET Framework迁移到Mono平台,除了经常会遇到大小写敏感的问题之外,还会经常遇到一些平台不兼容性的问题,这也是我的经历当中,遇到的另一个比较麻烦的问题。其实关于Mono平台的兼容性,在官方的文档中已经释放了比较明确的信息,他们就明确的一句话来描述Mono的兼容性:“Everything in .NET 4.0 except WPF, EntityFramework and W... 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

从.NET到Mono-记Kooboo CMS对Mono的兼容历程:二、大小写敏感问题,到处都是地雷 - 阿不 15 Jun 2011 7:27 AM (13 years ago)

【摘要】在Linux/Unix系统中,对任何文件路径,文件名,URL地址的处理都是大小写敏感。对于这点设计,让我们长期从事基于Windows平台开发和工作的开发人员情何以堪啊。尽管可能这样设计是有它的特殊目的和出发点,但我直到现在仍然认为这点是一个非常蛋疼的设计。我试图找到一些理由来解释Linux为什么处理这些字符串使用大小写敏感,但是得到的答案都是一些无关痛痒的理由: 大小写敏感后,可以用更短的文件名来表示更多的文件。比如a.txt和A.txt它们是不是一样的文件,但是大小写不敏感后,它们只能表示同一个文件。 大小写敏感,让字符串(文件名)更容易排序。 Linux是用C语言写的,在C语言里面,字符串 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

从.NET到Mono-记Kooboo CMS对Mono的兼容历程:一、Mono以及移平台的基本注意要点 - 阿不 31 May 2011 5:13 AM (13 years ago)

【摘要】前言 话说Mono是一个非常有意思的平台,它提供了对.NET程序的跨平台迁移的可能性,它是一种看上去可以粉碎诟病者对.NET平台软件不具跨平台性质疑的技术。我非常喜欢.NET平台,同时我也非常希望它具... 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

ASP.NET MVC3 on Mono的折腾(一):Windows下的部署 - 阿不 19 Feb 2011 11:45 PM (14 years ago)

【摘要】Mono 2.10支持MVC3和Razor的消息着实让我兴奋了好一会儿,因为支持MVC3后,我就有可能做Kooboo CMS3兼容Mono的相关测试工作。可是没一会儿,我就发现,离我的目标还是有一点距离。不晓得是Mono 2.10本身存在的bug,还是我的原因,我总是无法很完美的在Mono运行起MVC3的站点,即使是用默认的MVC3站点模板创建的非常简单的站点也是一样。长期生活在微软Windows/.NET平台的滋润环境中,没有Linux平台的使用经验和基于配置文件的Web部署习惯,让我花了不少的时间来解决原本很简单的问题的。从使用XSP失败,到折腾Windows下使用Nginx+FastCG 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

ASP.NET MVC3 on Mono的折腾(二):Linux(openSUSE)下的部署 - 阿不 19 Feb 2011 11:43 PM (14 years ago)

【摘要】续上篇介绍Mono在Window下的部署,对于我而言,相比于Windows平台下的部署,Linux平台下的部署挑战性会更大一点。从来没有Linux使用经验的我,要在Linux下部署Mono,遇到的不仅仅是Mono部署的问题,还有各种Linux操作的问题。我是使用的从Mono官方下载的安全配置好的虚拟机,安装方面的问题就可以暂时先跳过去,不过这里还是要先总结一下,先熟悉一下的几个常用的openSUSE操作。 1)配置网卡,进行文件管理都需要超级用户(su)密码,官方下载的虚拟机,su密码是:mono。刚开始不知道,还是小小的折腾了一会儿。其实,访问http://localhost 的默认首页就有 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

迟到的2010总结 - 阿不 11 Feb 2011 11:26 PM (14 years ago)

【摘要】中国人的年,是以春节为准的。春节过后,才真的算是一年的结束,新的一年的开始。而今天已经是2011年2月12日了,现在看着2010的字眼,总是觉得那么遥远,第一感觉就像是过了好几年似的。今天原本是周末,不过按国家规定,今天还是一个工作日。不过前几天的忙碌结束以后,今天还算终于事情比较少一点。早上折腾了手机之后,下午也需要好好思考一下未来的工作安排了。 原本没想写这个2010年总结了,但是看着别人的总结,再看看自己过去曾经所写的总结。怎么看,虽然都是流水帐似的,但还是很有意义。通过这样的记录,至少能让我知道过去的一年都做了一些什么样的事情,在技术和认识上都有什么新的变化。几年下来,当然我们再将这些 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

周末随想之移动随笔 - 阿不 14 Jan 2011 9:10 AM (14 years ago)

【摘要】手头没有电脑,只有一部低端的Android手机。而且有比较长的空闲时间,突发奇想用这个仅有的互联网设备来发一篇博文吧,也算赶一下潮流吧。话说最近的热点就是微博了,做为一名互联网的从业者,我也很早就有了twitter账户了,但是每天FQ我也没那个体力,加上交友圈的问题,那并不是个适合我的场所。国内很早也有了类似的网站,但是由于外力的因素没有存活下来,否则说不定没有新浪微博什么事了。新浪的微博是目前中国最成功的微博社区(没有之一),即使是我现在使用的腾讯微博规模也不去他。个人总结中国模式的微博,一个是监管,另一个是名人效应。微博虽然在国内已经很火了,按中国网民的惯例,已经有一个专有名词来形容这么一 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

NVelocity for ASP.NET MVC - 阿不 13 Jan 2011 6:37 AM (14 years ago)

【摘要】在我的这篇博文中,有这么一段话:“我一直在想,有没有办法可以单独限制View中的代码的访问权限,类似于trust level,只是这个trust level是用来限制模板中的代码。”。有读者johngeng问,为什么要用trust level来锁住view,他不是很理解。我的本意是,希望在view中,开发人员只能写某一些特定功能的代码,调用某一些特定开放的API,对于大部分安全级比较高的代码,比如读写文件等API或类库,不允许在view当中使用。这对于我们将模板开放出来,在线提供给我们的用户去修改的需求下是非常重要的。而目前,不管WebForm还是Razor,都是非常自由的模板,在View能做 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

ASP.NET 4.0在IIS6原生支持没有后缀名的URL请求 - 阿不 25 Dec 2010 6:36 AM (14 years ago)

【摘要】看到haack的这篇文章《ASP.NET MVC 3 Extensionless URLs on IIS 6》,我才知道在IIS6的环境下运行ASP.NET4.0程序,我们已经可以原生的支持没有后续名(扩展名)的URL请求,而不需要再做通配符映射,这对我们在IIS6部署ASP.NET MVC站点来说,相当的重要。 在以前,我们要让ASP.NET MVC程序可以正常工作在IIS6上面,要么在我们的程序路由中添加*.mvc(或其它任意后缀),并且在部署时添加isapi映射规则,把*.mvc映射到aspnet_isapi.dll,让他交由ASP.NET处理程序进行处理,但一般情况下,这种做法我们都不 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

闲语MVC3和Razor - 阿不 16 Dec 2010 6:58 AM (14 years ago)

【摘要】原本没有这篇博客,直到看到ScottGu的这篇文章ASP.NET MVC 3: Razor’s @: and text syntax。我才决定,把我这几天对MVC3和Razor的一些观点记录一下。 关于Razor 因为最近我身边的朋友和博客的博友,似乎对MVC3和Razor没有什么好感,甚至于认为微软开发Razor是走在另一条错误的路上。虽然我也没有在项目中实际用到Razor,但是一直以来都还是挺关注Razor的进展,对它的语法也是了解一二,总体感觉就是更为干净和流畅了,其它的并没有更深的认识。晚上在看ScottGu文章的时候,一段代码片段立即吸引了我: 你知道这段代码哪里吸引了我吗?没 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

ASP.NET MVC3 RC2和一些小bug - 阿不 12 Dec 2010 3:38 AM (14 years ago)

【摘要】@重典童鞋前几天就在说ASP.NET MVC3 RC2已经发布了,我赶紧上网去找发布消息,没有相关的发布消息,回过头才知道是只对部分订阅用户开发下载。不过按这个时间点来看,对外发布也已经不远了,果然在周五的时候,Scottgu按照惯例在它的博客上正式发表一个发布公告以及相关的Releas Notes细节,Announcing ASP.NET MVC 3 (Release Candidate 2),同时它还简单的介绍了刚刚发布的VS2010 beta1对MVC3的影响,其实也只是说明一下MVC3可以工作在VS2010和VS2010 Beta1环境下。 老早以前就对MVC3虎视眈眈了,但是由于现在 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

ASP.NET MVC 的统一异常处理有多难?(衍生的意图,出错后如何保持表单的状态?) - 阿不 4 Dec 2010 10:12 PM (14 years ago)

【摘要】一个比较顺手的开发框架,我们都希望开发人员不要去太关心异常的处理,除了一个特定异常需要特定处理外,我们都希望我们很多普通的异常都能由框架来帮我们搞定。比如异常的日志记录,异常信息的提示,异常的进一步分类的判断等等,我们都不希望开发人员去使用相同或类似的代码去完成。简单来讲,我们不希望我们的代码中出现太多的try…catch 代码。如果在一个项目中,频繁出现try…catch的代码块,一方面代码不太优雅,另一方面也会给我们的代码编码带来一定的障碍,由于变量作用域(try和catch属于不同的代码块)的问题,我们很多时候不得不把变量定义在try…catch之外的代码块当中。因此,在很多业务逻辑的代 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

DataAnnotation脱离MVC独立验证 - 阿不 7 Nov 2010 3:05 AM (14 years ago)

【摘要】我们知道DataAnnotations是一个通用的数据模型元数据定义框架,其中最主要的部分是验证框架的定义。DataAnnotations可用户.NET平台的任何应用框架,但我们的项目中都是借助MVC来使用DataAnnotations。在MVC框架中,还对DataAnnotations进行了很多的扩展和适配:比如需要根据定义的DataAnnotations,生成客户端的验证;在Controller模型中绑定模型对数据进行有效性验证等等。我们的数据模型如果都是通过MVC入口,用户输入有的有效性验证的工作都可以交给MVC框架和DataAnnotations来完成。在我们的实践中,这样确实给我们带 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

Attribute与TypeDescriptor的故事 - 阿不 23 Oct 2010 10:59 PM (14 years ago)

【摘要】前因 使用ASP.NET MVC时,我们必不可少的要与Attribute打交道,利用Attribute来做元数据的定义是一种非常老套的方法,但是相对于其方便快捷以及低廉的维护成本,还是在MVC框架中得到了充分的运用,主要是用于定义ModelMetadata。在现在的开发框架中,Attribute处理一个非常重要的地位。但是在使用Attribute过程,还是重复遇到了几回相同的问题,但由于缺少记录,... 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

DataContext是否可以静态化? - 阿不 9 Oct 2010 9:03 PM (14 years ago)

【摘要】在LINQ2SQL和Entity Framework中都有类似的DataContext对象,它是整个数据映射的载体和数据操作的入口。DataContext是一个标准的Unity of Work的实现,它可以保证在一个DataContext上下文的多个数据操作,保持事务的原子性。DataContext还具有数据容器的性质,维护了所有操作数据的状态,它会跟踪您对所有检索到的实体所做的更改,并且保留一个“标识缓存”,该缓存确保使用同一对象实例表示多次检索到的实体。即使是LINQ2SQL和Entity Framework还有很多的不同,但是DataContext的行为都基本差不多。 DataConte 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

今日手记:ASP.NET进程内的定时任务 - 阿不 8 Oct 2010 7:12 AM (14 years ago)

【摘要】很多时候,我们程序需要在后台线程定时执行一些任务,比如定时发送邮件。简单点,我们可以自己创建一个Timer对象来定时,通过定制它的回调事件来完成具体业务需求。对于比较复杂的业务要求,稳定性要求比较高,我们可以使用一些开源框架,比如Quartz.NET创建Windows Service的方式来执行定时任务。 虽然单独的Windows Service具体有稳定性较好等特点,Quartz.NET也可以满... 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

有趣的同名不同约束泛型扩展方法的编译问题 - 阿不 18 Sep 2010 7:08 AM (14 years ago)

【摘要】我们时常会为某一种具有相同的类(基类)或接口定义泛型的扩展方法,此时我们只需要在泛型扩展方法上加上泛型约束后,编译器在使用该类的派生类时就会自动筛选出可用的扩展方法。如下的定义:此时我们为Interface1定义一个扩展方法如下: 这很好,泛型的约束很好的表达了我们的意图。这个约束这时候能很好的避免这个扩展方法污染到其它类型的对象。接下来,当我们希望为再为其它的类型或接口定义相同的扩展方法时,有兴... 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

在程序中动态执行T4模板,如何传参数给T4模板? - 阿不 4 Sep 2010 9:28 PM (14 years ago)

【摘要】T4模板Visual Studio IDE的应用越来越多,现在在VS中,只要与代码生成相关的场景,我们都可以通过修改 T4模板来自定义生成格式,比如MVC的视图模板,Entity Framwork的DataContext模板等等。同时我们还可以自己创建T4模板文件(.tt),使用C#(VB)语法来编写T4模板,它的语法与ASP.NET的语法非常类似,大大降低了.NET程序员的学习成本,关于T4的模... 阅读全文

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?