Monday, June 26, 2006

Importing file VS All-in-one

When we comes into programming, there is always a debate between codes written all-in-one file or write separatedly and then import it back to become one. Today I came across a ColdFusion file while I labelled it as "body.cfm". When I look at the bottom of the page, it imports another ColdFusion file which I label as "details.cfm". Inside "details.cfm", I found a imported javascript file labelled as "details_ctrl.js". When translated into diagram it should be displayed like this:

body.cfm(main file as we request from server) -> details.cfm -> details_ctrl.js

I spend some time to trace where all the javascript functions went to, and this is not over yet. The validation for details.cfm are written at the top of body.cfm. If you are the one who assigned to write a program, which way would you choose? The way like the example I given, or trash everything into one file?

Come come, feel free to comment about your programming habit. :)


Oh, by the way before ending my today post, I want to wish my Alicia jie jie HAPPY BIRTHDAY~!~!~!.... Wishing jiejie to be healthier, prettier, cuter, smarter and of course happier. Hope you read this... ;)

0 comments: