Quantcast
Channel: Frank Sun
Browsing latest articles
Browse All 23 View Live

Image may be NSFW.
Clik here to view.

Ruby on Rails FAQ

from: http://momosuyu.iteye.com/blog/2033980 1 ruby是什么? Ruby,一种为简单快捷面向对象编程而创的脚本语言,它综合了Perl,Python,Java等语言的特 点写成,有强大的文字处理能力,简单的语法,并且完全的面向对象。同时,Ruby是解释型语言,不需编译即可快捷地编程。Ruby由日本的 Yukihiro...

View Article



Image may be NSFW.
Clik here to view.

How to freaking deploy on CloudBees, CloudFoundry, Heroku, Windows Azure,...

from: http://osintegrators.com/node/145 Introduction The following are the installation notes/instructions that correspond with our article in Infoworld entitled “Which Freaking PaaS Should I Use?“....

View Article

Rails Transactions

Question: I have an example Action in a Controller. def some_action product =Product.new product.name ="namepro"if product.save client.update_attribute(:product_id,product.id)endend How to add...

View Article

Auditing and model lifecycle management for instances and their associations?

from: http://stackoverflow.com/questions/1615977/auditing-and-model-lifecycle-management-for-instances-and-their-associations   CRUD operations must be logged, including what the operation was, who the...

View Article

Rails practice: use after_commit

A relational database, like mysql, provides transactions to wrap several operations in one unit, make them all pass or all fail. All isolation levels except READ UNCOMMITTED don’t allow read data...

View Article


Different Ways to Set Attributes in ActiveRec

Rails 4 allows the developer to change ActiveRecord attributes in various ways. Each one does it slightly differently with sometimes unique side-effects. It’s important you understand which method to...

View Article

苹果的编程语言——Swift简介

Thanks Lucida for his work. http://zh.lucida.me/blog/an-introduction-to-swift/ 关于 这篇文章简要介绍了苹果于WWDC 2014发布的编程语言——Swift。 原文作者: Lucida Blog 新浪微博 豆瓣 转载前请保留出处链接,谢谢。 前言 在这里我认为有必要提一下Bret Victor的Inventing on...

View Article

DAO如何与业务层解耦

在没有使用代理模式的时候,使用者和被使用者耦合。 使用代理模式之后,使用者和代理耦合,代理和被使用者耦合。 为什么要解耦呢?通常是应为变化,需求变化导致最终的程序实现变化,如果耦合度高,出现变化时所需要修改的程序就多,如果进行解耦,那修改的程序就少(被解耦的部分已经不需要修改,因为和变化的地方没有直接的关系了)。   下面举个不太恰当的例子。...

View Article


J2EE中几种业务代理模式的实现和比较

什么是业务代理模式(buiness proxy)? 在J2EE系统中,一般划分为表现层和业务逻辑层,为实现表现层和业务逻辑层之间的最大限度解耦,引入业务代理模式,这样,当表现层或业务逻辑层具体实现技术发生时,对彼此的影响很小,当然,如果希望实现完全解耦,我们可以使用消息系统JMS来实现,本文章只讨论同步系统范畴。...

View Article


Annotation与工厂模式解耦dao与service

开发中往往service、dao并行完成,但是service层又需要调用dao层的CRUD方法,这意味着dao必须先于service完成。这在开发中会极大降低效率的。 通过注解(Annotatoin)我们可以轻松实现两个层次的解耦   首先写一个注解类 @Retention(RetentionPolicy.RUNTIME) public @interface getClassAnnotation{...

View Article
Browsing latest articles
Browse All 23 View Live




Latest Images

Vimeo 10.7.0 by Vimeo.com, Inc.

Vimeo 10.7.0 by Vimeo.com, Inc.

HANGAD

HANGAD

MAKAKAALAM

MAKAKAALAM

Doodle Jump 3.11.30 by Lima Sky LLC

Doodle Jump 3.11.30 by Lima Sky LLC

Doodle Jump 3.11.30 by Lima Sky LLC

Doodle Jump 3.11.30 by Lima Sky LLC

Vimeo 10.6.1 by Vimeo.com, Inc.

Vimeo 10.6.1 by Vimeo.com, Inc.

Vimeo 10.6.0 by Vimeo.com, Inc.

Vimeo 10.6.0 by Vimeo.com, Inc.

Re:

Re:

Re:

Re: