Home | Computers | Web Site
Coldfusion Components also known as CFC’s. A lot of people who program Coldfusion and do not use CFC’s have an excuse; it’s too hard to learn! It’s too hard to learn?? No way!! It’s very easy to learn. It’s just another way of thinking than you’re used to. You must see CFC’s as building blocks. By constructing “building blocks” you’re code is much cleaner and far more reusable, thus quicker to build your application. Most (if not every) Coldfusion developer knows UDF’s (User Defined Functions) and Custom Tags. CFC’s are almost the same as Custom Tags, but have some differences: Custom Tags have a single entry point; CFC’s can have multiple entry points. This makes it possible to create a single component that does many related actions. (To do that with custom tags you would need multiple tags or cumbersome switch processing.) Custom Tags have no formalized parameters passing and validation mechanism; CFC’s do. In other words unlike custom tags, CFC’s can validate passed data, enforce data types, check for required parameters, and optionally assign default values. Custom Tags cannot persist; CFC’s can. Custom Tags are blocks of code that are executed as is, while CFC’s are objects and can be treated as such. Custom Tags are designed to contain code; CFC’s are designed to contain both code and data. Custom Tags are accessible only by Coldfusion and only locally; CFC’s can be accessed as web services, opening up a whole new world of reuse possibilities. To sum it up, CFC’s and Custom Tags are quite different. Although their functionality does overlap a little, they really do not solve the same problems at all. So to learn the basics of CFC’s while head right on it and start with some sample “spaghetti code” and transform it to a structured and reusable way; a CFC.
Article Source: http://www.exclusive-article.com
We are here to provide you all the latest techniques and processes related to designing and development. For more information visit www.softwaredevelopmentblog.com">Offshore software development blog
Please Rate this Article
5 out of 54 out of 53 out of 52 out of 51 out of 5
Not yet Rated
Powered by Article Dashboard