Hoạt động tuần 10 - 14/06/2009

Hoạt động tuần này gồm những mục như  sau :
Củng cố kiến thức cho các thành viên vắng mặt 1 số tuần
Hướng dẫn lại component, helper và behavior
Demo component, helper và behavior

Đánh giá chung : các thành viên đều tiếp thu tốt vấn đề

Nội dung tuần tới :
Hướng dẫn về upload hình ảnh và tập tin trong cakephp
Sử  dụng helper để publish file cho download
Demo hướng dẫn

No Comments

Hoạt động tuần 5 - 10/05/2009

Tuần này bà con đi không đông đủ cho lém, tính ra cũng 5 tuần sinh hoạt rồi nên nhóm tổng kết lại cakephp. Nội dung gồm những phần sau :

  • Tổng kết model, view, controller
  • Giải thích rõ hơn về Component, Behaviour và Helper
  • Phổ biến đề tài cho mọi người thực hành là một trang web bán hàng, quản lý các phần như sau : users, category, product, cms. Mọi người cố gắng làm và xem thắc mắc phần nào club sẽ hỗ trợ thêm

Về đề tài sắp tới xin mọi người cho ý kiến, mình có 1 số options sau :

  • Zend Framework
  • Joomla
  • Ruby on rails
  • Typolight
  • Magento
  • Codeigniter

Bà con có options nào nữa thì post lên nhé

Thanks .. thanks

2 Comments

CakePHP - Comprehensible Concepts from a General Viewpoint

Dear all,

The following technical contribution article is all about CakePHP written by Richard Nguyen for the sharing purpose in accordance with our Coding Club’s spiritual norm - “profoundly increasing, developing and riching people’s knowledge so as to effectively assist our coding lives and future careers with more eases.” - For such actively efforts, hopefully to give you a broader view and comprehensive savvy on general perspective aspects of this really stunning and engaging PHP Framework out there - The CakePHP Framework.

Technical Contribution Article on CakePHP

According to a recent study, PHP is one of the most popular programming languages in the world. In spite of this, PHP is often criticized for its inconsistent naming conventions, its lack of important features as compared to other languages (like namespaces) and its inherent disorganization. Furthermore, PHP is very easy to learn, and this has often led to the common misconception that most PHP developers are inexperienced and that their code is therefore prone to security vulnerabilities and exploits.

This is all true, to a certain extent. PHP itself offers virtually no real structure or organization, and thereby leaves coders free to express themselves in the most unpredictable and dangerous ways: programming logic mixed with presentation elements, disorganized inclusion of other source files anywhere in a script, unnecessary and often forgotten database connections, and so on. These are obvious and common mistakes that can make PHP code completely unmaintainable.

PHP Needs a Framework

In recent years, PHP has re-invented itself, allowing Object Oriented Programming (OOP) to enter the scene with a plethora of new rules and functionality, all of which are ingrained in more mainstream programming languages like C++ and Java. Gradually, more and more PHP developers have embraced this new philosophy and started developing frameworks, drawing their inspiration from other more-established languages in the pursuit of creating a structure for an inherently unstructured language.

Many frameworks are available on the Internet, each with its own specific set of rules and conventions, achievements and failures. Some degenerate into unusable and intricate collections of pre-built libraries and tools that enslave developers into complex and truly unusable programming methodologies; others do not.

Ruby on Rails has definitely played a key role in inspiring the quest for the perfect web framework in programming languages other than Ruby. Thanks to the Rails phenomenon, more frameworks have appeared on the scene, offering functionality that’s very similar to Ruby on Rails. These frameworks are often labeled Rails Clones.

Some of the frameworks’ developers have openly admitted that they tried to port Rails to other languages, but often they overlook the fact that Ruby on Rails was built in Ruby for a reason: Ruby has features that no other programming language offers. At the same time, at least one person gave up on the idea of totally cloning Rails in PHP, but instead, decided to borrow its structure and basic concepts to make PHP more organized:

While it’s difficult to copy Rails in PHP, it’s quite possible to write an equivalent system. I like the terseness of Ruby code, but I need the structure that Rails provides, how it makes me organize my code into something sustainable. That’s why I’m ripping off Rails in Cake.

- CakePHP’s founder, commenting on a famous blog post.

This is what makes CakePHP not only different, but one of the most popular frameworks for PHP: its modest, yet important goal is to provide an appropriate structure for PHP applications.

CakePHP’s Approach to the MVC Architecture

Readers who already know Ruby on Rails may find CakePHP very similar to it. For one thing, Cake is based on an MVC-like architecture that is both powerful and easy to grasp: controllers, models and views guarantee a strict but natural separation of business logic from data and presentation layers.

Controllers contain the logic of your application. Each controller can offer different functionality; controllers retrieve and modify data by accessing database tables through models; and they register variables and objects, which can be used in views.

Models are active representations of database tables: they can connect to your database, query it (if instructed to do so by a controller) and save data to the database. It is important to note that in order to correctly apply the MVC architecture, there must be no interaction between models and views: all the logic is handled by controllers.

Views can be described as template files that present their content to the user: variables, arrays and objects that are used in views are registered through a controller. Views should not contain complex business logic; only the elementary control structures necessary to perform particular operations, such as the iteration of collected data through a foreach construct, should be contained within a view.

This architecture can greatly improve the maintainability and the organization of your site’s code:

It separates business logic from presentation and data retrieval.
A site is divided into logical sections, each governed by a particular controller.
When testing and debugging an application, any developer accustomed to CakePHP’s structure will be able to locate and correct errors without knowing all of the details of the code.

Controllers, models and views are stored in pre-defined directories within CakePHP’s directory structure. Here’s the directory structure that’s used:

app/
config/
controllers/
models/
plugins/
tmp/
vendors/
views/
webroot/
cake/
config/
docs/
libs/
vendors/

This directory scheme must be preserved, as it is essential if the framework itself is to work. Cake, like Rails, believes in the importance of convention over configuration: in order to deploy an application, rather than modify dozens of different configuration files, it’s important only to place everything in its proper place; then, you can let the framework do the rest.

Although this may seem worrisome for some developers, it’s a good compromise that can really accelerate the development process.

Best regards,
Richard Nguyen

No Comments

Hoạt động tuần 3 - 26/04/2009

Tuần thứ 3, trời mưa, bà con đi đường bị ướt nhẹp cái áo mưa, nhưng cũng đến đông đủ cả, :D.
Chủ đề tuần này đi sâu vào phần View và Model còn phần Controller sẽ hẹn vào tuần kế tiếp.

Bài tập về nhà cho tuần này :
Liệt kê tất cả user và số role tương ứng của từng user. Anh chị em làm nha, có gì théc méc post lên đây pà con giải đáp, … Thanks :)

Một số hình ảnh nè pà con :

Hình 1

Hình 2

Hình 2

,

1 Comment

Trung cau y kien ve blog/forum

Chao moi nguoi.

Qua 1 tuan ra mat website Coding-Club, da co 18 bai dang xipam len blog cua club.

Tuy nhien, ngay tu tuan dau, blog da xuat hien 1 nhuoc diem la cac bai viet tuy chua cu, nhung da bi push sang trang 2, 3 khi co bai viet moi xuat hien.

Dieu nay se lam cho cac bai` hoi y’ kien cua moi nguoi khong duoc the hien, va nhung comment moi cung duoc highlighted.

Vi vay, minh de nghi moi nguoi cho y kien ve 1 cau truc blog/forum sao cho:

1. la noi cac thanh vien trao doi y kien, dat cau hoi, tim kiem cau tra loi, thong bao su kien. Nhung bai viet moi phai duoc noi bat len tren. Yeu cau nay giong nhu 1 forum thuong gap.

2. La noi dua ra cac tin tuc su kien, tong hop thong tin luom lat hang ngay. Cac thong tin co tinh thoi su, nen chu trong ve mat thoi gian, chi lam noi bat thong tin moi. Yeu cau nay giong nhu 1 blog/news bulletin.

3. La noi luu tru cac bai viet hay, kinh nghiem cua coder truyen dat lai. Bai viet ton tai theo thoi gian, it mang tinh thoi su ma mang tinh giao khoa nhieu hon.

Duong nhien, mot cau truc website nhu vay se la 1 website lon. Do cung la muc tieu cua coding-club. Vi vay, de nghi cac ban cho y kien de xay dung coding-club tot hon.

Cheers,

2 Comments

Web resource

 

Some very useful web resources and articles

Web design

Read the rest of this entry »

No Comments

Developer resource

Người lính ra trận có súng. Người nông dân ra đồng thì có cày, có cuốc. Còn developer như cốt đinh cờ lắp thì có IE và Firefox. Công cụ có lúc trục trặc, debug mệt mỏi, nhất la IE. Chúng ta chỉ biết chửi rủa Microsoft va Bill Gate.

Tuy nhiên, có một số plugin giúp cho việc debug dễ dàng hơn:

IE:

 * DebugBar - http://www.debugbar.com/

Firefox:

 * Firebug - http://getfirebug.com/

 * Web Developer - https://addons.mozilla.org/en-US/firefox/addon/60

,

No Comments

Lập trình sư

Là lập trình viên đẳng cấp cao, tự lập trình được cho bản ngã, chương trình chạy ít lỗi, tiết kiệm tài chính, bảo mật, an toàn trước tai hoạ và môi sinh, ổn định trước nổi trôi của thế cuộc, khiến cuộc sống bản thể thêm kỳ diệu lo âu mà huyền ảo, khiến xã hội thêm đa dạng rối ren mà phong phú.
Read the rest of this entry »

No Comments

Đạo lập trình - Phần 9

Phần 9 – Lời kết

Lập trình sư nói: “Giờ ngươi có thể xuống núi”

Nguồn : Google

No Comments

Đạo lập trình - Phần 8

Phần 8: Phần cứng và phần mềm

Lập trình sư nói: “Không có gió, cỏ cây bất động. Không có nhu liệu, phần cứng vô dụng”

8.1
Đồ đệ hỏi: “Thưa ! con biết 1 công ty máy tính vĩ đại hơn tất cả công ty còn lại, ví như gã khổng lồ với bầy lùn, mỗi phần nhỏ có thể sánh với thương nghiệp hoàn chỉnh. Sao lại như thế ?”
Lập trình sư nói: “Đừng hỏi ta vớ vẫn thế. Công ty lớn vì nó lớn. Nếu nó chỉ bán phần cứng, không ai mua nó. Nếu nó chỉ bán nhu liệu, vô nhân dụng đến. Nếu nó chỉ là hệ thống bảo trì, thiên hạ xem như bậc nô tỳ. Vì nó kết hợp tất cả, thiên hạ tin đó là trời !

8.2
Hôm nọ lập trình sư đến chỗ lập trình phu. Y đang bận tâm vào trò chơi điện tử cầm tay. Lập trình sư nói: ”Này, ta có thể thử nó được không ?” Lập trình phu (vẻ bất ngờ) trao nó cho lập trình sư.

“Ta thấy thiết bị yêu cầu 3 mức độ: dễ, trung bình, khó. Ngay cả mỗi thiết bị có mức độ chơi khác, khi thiết bị không chế ngự được con người, hay không được con người chế ngự.”

“Thưa ! Con cầu xin đại sư. Làm sao tìm được cách cài đặt thần bí kia” Lập trình phu hỏi, vẻ náo nức

Lập trình sư quăng thiết bị xuống sân, lấy chân nghiền nát. Ngay lúc đó, lập trình phu đạt đại ngộ !

8.3
Lần nọ, một lập trình phu làm việc trên bộ vi xử lý:
“Hãy nhìn tôi đi. Thật là sảng khoái. Tôi có hệ điều hành của chính tôi và thiết bị lưu trữ. Tôi không chia sẻ tài nguyên với bất cứ kẻ nào. Nhu liệu của tôi trước sau như một, sử dụng nhẹ tựa lông hồng. Sao bằng hữu không bỏ thứ đó và tham gia với tôi ?”

Lập trình phu trên máy tính lớn nói:
“Một máy tính lớn trông giống bậc hiền nhân đang tọa thiền giữa trung tâm dữ liệu. Đĩa cứng xếp chồng bất tận ví như đại dương bao la. Nhu liệu của nó như các góc cạnh của viên kim cương. Các chương trình, lần lượt, đi qua như dòng thiên hà chảy xiết. Đó là vì sao tại hạ cảm thấy hoan hỷ trong hiện tại”

Lập trình phu nọ nghe xong, im lặng. Nhưng cả hai đã trở thành bằng hữu cho đến cuối đời.

8.4
Phần cứng gặp phần mềm trên đường đến đỉnh Changtse. Mềm nói: “Các hạ là Âm, còn tôi là Dương. Nếu ta đi cùng nhau sẽ được nổi tiếng, kiếm được nhiều tiền” Và cả hai lên đường, mưu tính đại sự.

Rồi họ gặp Phần Dẻo (Firmware), ăn mặc rách rưới, tay chống cây gậy bước tới: “Đạo tồn tại giữa Âm và Dương. Đạo tĩnh lặng tựa mặt hồ không chút gợn sóng. Đạo không cần tên tuổi, bởi vậy không ai biết sự hiện diện của Đạo. Đạo không cần tiền bạc, Đạo đã hoàn mỹ trong Đạo. Đạo tồn tại trên Thời gian và Tài nguyên !”

Phần cứng, Phần mềm, cảm thấy hổ thẹn, bèn quay về nhà.

No Comments