What Is Software Design?

程式設計不是 “building software”,而是 “designing software”。

Is Design Dead?

軟體系統的設計是演進來的,不能一步到位,而是要藉由憑繁與使用者互動得到的回饋來修改系統設計。

Programming is Gardening, not Engineering

與其把程式設計比喻成蓋房子,實際上更像是園藝。

Orthogonality and the DRY Principle

所有程式設計活動其實都是維護,因為絕大部分的時間都在改code,寫一點改一點。即使是新專案,也很快需要回頭作修改。

顯示具有 Angular js 標籤的文章。 顯示所有文章
顯示具有 Angular js 標籤的文章。 顯示所有文章

2013年7月19日 星期五

AngularJS 練習 ngBind

step1.

進入  http://plnkr.co/edit/?p=preview

step2.

左邊選擇index.html

將以下的code全部覆蓋

<!doctype html>
<html ng-app>
  <head>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script>
    <script src="script.js"></script>

  </head>
  <body>

<div ng-controller="Ctrl">
  Enter name: <input type="text" ng-model="name"><br>
  Hello <span ng-bind="name"></span>!
</div>


  </body>
</html>


step3.

左邊選擇script.js

貼上以下的code

function Ctrl($scope) {
  $scope.name = 'Whirled';
}

step4. 觀看結果


在上面有一個button run的請您按下會看到以下的結果

Enter name: 
Hello Whirled!


請您再輸入的框框中 輸入值 會直接Bind 顯示到<span ng-bind="name"></span>

讓您寫起程式更加方便清楚明白



2013年7月1日 星期一

Angular js 練習 say hi

1.
首先開啟
http://jsbin.com

2.
在做上方的 add library

3.
加入 angular js 的 js檔
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>

4.
在 <html> 標籤上,加上一個 ng-app 屬性
這就是所謂的 宣告式語法 (Directives),以 ng-app  來說,這是用來宣告整份 html 都屬於 AngularJS 的管轄!

5.
在<body>標籤中加入以下的code

<label>Name:</label>
 <input type="text" ng-model="yourName" placeholder="Enter a name here">
 <hr>
 <h1>Hello {{yourName}}!</h1>


接下來您可以在output中看到結果 ~!!