Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rapid Web Development by Example

Rapid Web Development by Example

Szu-Kai Hsu (brucehsu)

May 09, 2012
Tweet

More Decks by Szu-Kai Hsu (brucehsu)

Other Decks in Programming

Transcript

  1. SELECT isbn, title, price, price * 0.06 AS sales_tax FROM

    Book WHERE price > 100.00 ORDER BY title;
  2. 比較表 ORM SQL 寫法 安全性 LOC 結語 OO Query 較佳

    因人而異 少 多 潮 勝 回不去了 不要怕 加班
  3. return $('[id^=del_]').click(function(event) { var post_id; event.preventDefault(); post_id = /del_(\d+)/.exec($ (this).attr('id'))[1];

    return $.ajax({ type: 'delete', url: '/delete/post/' + post_id, data: $(this).serialize(), success: function(data) { if (data['success']) { return $('.post_' + post_id).fadeOut(); } else { return alert('Failed!'); } } };
  4. return $('[id^=del_]').click(function(event) { var post_id; event.preventDefault(); post_id = /del_(\d+)/.exec($ (this).attr('id'))[1];

    return $.ajax({ type: 'delete', url: '/delete/post/' + post_id, data: $(this).serialize(), success: function(data) { if (data['success']) { return $('.post_' + post_id).fadeOut(); } else { return alert('Failed!'); } } });