当前位置: 首页 > 工具软件 > ColdFusion > 使用案例 >

coldfusion_为ColdFusion辩护

游安康
2023-12-01

coldfusion

After a decade of Web development, I’ve played with just about every language. I’ve dabbled in ASP, spent considerable time with PHP and, just recently, jumped into the world of ColdFusion.

经过十年的Web开发,我几乎使用了每种语言。 我涉足ASP,在PHP上花费了相当多的时间,最近才进入了ColdFusion的世界。

When I was first introduced to ColdFusion, I was against it. It was version 5.x at this point, and I couldn’t see anything about it that I liked. My counterpart on the East Coast had been using it for years and was a seasoned ColdFusion programmer. I was a seasoned PHP programmer who had just completed a major project for my department, and was now being asked to move to ColdFusion to come into line with worldwide operations. I was a rogue developer with my FreeBSD PHP Web server and I didn’t fit with the Microsoft world I was working in.

当我第一次被引入ColdFusion时,我反对它。 现在是5.x版本,我看不到任何喜欢的东西。 我在东海岸的同行已经使用了多年,并且是一位经验丰富的ColdFusion程序员。 我是一个经验丰富PHP程序员,刚刚完成了我部门的一个主要项目,现在被要求转到ColdFusion以与全球业务保持一致。 我曾经是FreeBSD PHP Web服务器的流氓开发人员,但不适合我所工作的Microsoft世界。

My company sent me to the East Coast to talk to this developer and to learn more about ColdFusion and why it would be a good move for us. Of course, I was skeptical; ColdFusion was a rich man’s language in my eyes. With the server costing $1,300 or more, not including the cost of MS Windows, etc., I couldn’t see how my little section could afford to make the leap. I spent a week on the East Coast shadowing this ColdFusion programmer, and when I left to come home, I had a stack of ColdFusion books and a new respect for the language.

我的公司派我到东海岸与该开发人员进行交谈,并了解有关ColdFusion的更多信息以及为什么这对我们来说是一个好举动。 当然,我对此表示怀疑。 在我看来,ColdFusion是富人的语言。 服务器的价格为1300美元或更高,其中不包括MS Windows等的价格,我看不到我的那小部分可以承受得起的飞跃。 我在东海岸度过了一个星期,与这位ColdFusion程序员交往,当我回家时,我有一堆ColdFusion书籍,并且对语言有了新的尊重。

Many of you, I’m sure, have at some point had to look at an alternative language for Web development. It’s not easy to move from a language you know, love, and have spent months or years mastering, to one that seems completely foreign. This is what faced me when I was asked to switch from my happy PHP world to the dark side of ColdFusion.

我敢肯定,你们中的许多人在某个时候不得不考虑一种用于Web开发的替代语言。 从您知道,喜欢并且已经花了几个月或几年的时间掌握的语言转变成看起来完全陌生的语言,这并不容易。 当我被要求从幸福PHP世界切换到ColdFusion的阴暗面时,这就是我所面临的。

Just over two years later, I’m a 100% ColdFusion shop. Sure, I still talk about PHP, and I still recommend it here and there, but I’ve learned that I can do things faster, cleaner, and — believe it or not – more cheaply than I could with PHP. You might be skeptical now, as I once was, but I hope that by the end of this article, you’ll start to see enough of the light to realize ColdFusion isn’t the dark side after all.

仅仅两年之后,我是一家100%ColdFusion商店。 当然,我仍然谈论PHP,并且仍然推荐它,但是我了解到我可以更快,更干净地做事,并且-信不信由你–与PHP相比,它更便宜。 您现在可能像我以前那样持怀疑态度,但我希望到本文结尾,您将开始看到足够多的光线可以意识到ColdFusion毕竟不是阴暗面。

背景 (Background)

First, some background on the ColdFusion language for those who are totally in the dark about it.

首先,为那些完全不了解它的人提供一些有关ColdFusion语言的背景知识。

ColdFusion was originally developed by the Allaire brothers in 1995. This then started the Allaire Company, which was later bought by Macromedia. Like most Web languages, it was meant to provide Web developers with a way to talk to a database and display data on Web pages. As with many such languages, in the early days, it was not the most advanced technology, but it was one of the more simplistic to implement, understand and use. This vision still holds true with today’s ColdFusion MX (version 6.x of ColdFusion). In fact, ColdFusion was the reason Microsoft released ASP, which was being developed by Aspect Software, a competitor of Allaire that was later bought by Microsoft. So, in a round about way, all you ASP programmers have the ColdFusion developers to thank for your programming language!

ColdFusion最初由Allaire兄弟于1995年开发。随后成立了Allaire Company,后来被Macromedia收购。 像大多数Web语言一样,它旨在为Web开发人员提供一种与数据库对话并在Web页上显示数据的方式。 与许多其他语言一样,在早期,它不是最先进的技术,但它是实现,理解和使用起来更为简单的一种。 对于今天的ColdFusion MX(ColdFusion的6.x版),这种愿景仍然适用。 实际上,ColdFusion是Microsoft发布ASP的原因,ASP是由Allaire的竞争对手Aspect Software开发的,后来被Microsoft收购。 因此,以某种方式,所有ASP程序员都请ColdFusion开发人员感谢您的编程语言!

Now, let’s get back to the background of the ColdFusion language. Besides a history of acquisitions and changes, ColdFusion has always been a Rapid Application Development (RAD) language built for the Web. ColdFusion accomplishes this RAD claim by providing the language in a tag-based usage, which will be familiar to any HTML programmers.

现在,让我们回到ColdFusion语言的背景。 除了获取和更改的历史外,ColdFusion一直是为Web构建的快速应用程序开发(RAD)语言。 ColdFusion通过提供基于标签的用法来实现RAD的这一要求,这是任何HTML程序员都熟悉的。

Many of the other languages out there use a programmatic approach to server side scripting, which is great for a seasoned programmer, but, to someone who’s spent most of their time with HTML tags, this can be a little daunting. A ColdFusion tag always looks like <cfTagName> with the "TagName" being replaced with the actual tag you are using. Similar to the way PHP uses the <?php and ASP uses <% to signify the start of code, the <cf tells the ColdFusion server, "Hey, here’s some ColdFusion to process".

那里的许多其他语言都使用编程方法来进行服务器端脚本编写,这对于经验丰富的程序员而言非常有用,但是对于那些大部分时间都在使用HTML标签的人来说,这可能会有些令人生畏。 ColdFusion标签始终看起来像<cfTagName> ,其中“ TagName”被替换为您正在使用的实际标签。 与PHP使用<?php和ASP使用<%表示代码开始的方式类似, <cf告诉ColdFusion服务器,“嘿,这里要处理一些ColdFusion”。

Most ColdFusion tags have an ending tag that makes up a tag pair. Like HTML tags, CF tags end with </cfTagName>. So, for example, you could use the following code:

大多数ColdFusion标签都有一个结束标签,该标签构成标签对。 像HTML标签一样,CF标签以</cfTagName>结尾。 因此,例如,您可以使用以下代码:

<cfloop index="i" from="1" to="10">
 <cfoutput>#i#<br /></cfoutput>
</cfloop>

Both the <cfloop> and <cfoutput> tags are the starting tags; the </cfloop> and </cfoutput> are there respective ending tags. As you can see from the above example, you can have code between tags, and you can even nest tags if your application so needs them.

<cfloop><cfoutput>标签都是起始标签; </cfloop></cfoutput>分别有结束标记。 从上面的示例可以看到,标记之间可以包含代码,如果您的应用程序需要它们,甚至可以嵌套标记。

You’ve just seen a very short snippet of ColdFusion code. It’s not my intention to teach you ColdFusion here, but to provide you with enough knowledge to make you curious to check it out further. To learn more about ColdFusion tags, aka ColdFusion Markup Language (CFML), visit the Macromedia Website or browse many of the fine articles here at SitePoint.

您刚刚看到了很短的ColdFusion代码片段。 我不是要在这里教您ColdFusion,而是要为您提供足够的知识,使您好奇地进一步检查它。 要了解有关ColdFusion标签(又名ColdFusion标记语言(CFML))的更多信息,请访问Macromedia网站或在SitePoint上浏览许多精美的文章。

ColdFusion神话被揭穿 (ColdFusion Myths Debunked)

You now have some very basic background information on the history of ColdFusion and how its tag-based language works. But, I’m sure you are not sold on ColdFusion yet — in fact, you’re probably thinking much like I was as this point. Let’s dive into some of the myths and misconceptions about ColdFusion, so we can clear the air a bit.

现在,您具有有关ColdFusion的历史及其基于标签的语言如何工作的一些非常基本的背景信息。 但是,我确定您还没有在ColdFusion上出售产品-实际上,您可能在想我这一点。 让我们深入了解有关ColdFusion的一些神话和误解,以便我们可以稍微澄清一下。

Myth #1: ColdFusion is a Rich Man’s Language

误解1:ColdFusion是一种有钱人的语言

False! Yes, if you go to Macromedia’s Website and look up the ColdFusion server, you’ll see a sticker price of $1300 for the standard edition, and if you head over to Zend’s Website you can purchase their PHP Performance Suite for around $1875. I know you don’t need the Performance Suite to run PHP applications, but the Performance Suite gives you "Dynamic content caching, Code acceleration and File compression technologies, as a single solution", which is what the Macromedia ColdFusion server gives you out of the box.

假! 是的,如果您访问Macromedia的网站并查找ColdFusion服务器,则标准版的标价为1300美元,如果您访问Zend的网站,则可以以1875美元左右的价格购买其PHP Performance Suite。 我知道您不需要Performance Suite来运行PHP应用程序,但是Performance Suite为您提供了“动态内容缓存,代码加速和文件压缩技术,作为一个单一解决方案”,这是Macromedia ColdFusion服务器为您提供的盒子。

This is a good time to point out that Macromedia doesn’t charge for development servers, just for the actual production server. So, what happens when you go to production? Well, if your group has the budget, you can purchase the Macromedia Standard or Enterprise versions, or you can opt for a free version of the ColdFusion server. Besides the developer edition, download any Macromedia ColdFusion server and, after 30 days, it becomes a full-featured developer edition.

现在是指出Macromedia不对开发服务器收费,仅对实际生产服务器收费的好时机。 那么,当您开始生产时会发生什么? 好吧,如果您的小组有预算,则可以购买Macromedia Standard或Enterprise版本,也可以选择免费版本的ColdFusion服务器。 除开发人员版本外,下载任何Macromedia ColdFusion服务器,30天后,它将成为功能齐全的开发人员版本。

A company named New Atlanta has its own version of the ColdFusion Server. This ColdFusion server is called Blue Dragon and it comes in 3 flavors, just like Macromedia’s servers. New Atlanta has a Server Edition, a Server JX version and a J2EE version, while Macromedia has Standard, Enterprise and Enterprise J2EE versions. The great thing about the New Atlanta Server version is that it’s currently free, and there are no signs of this changing any time soon. Why is it free? It doesn’t have all the CFML tags you’d get in the New Atlanta JX version or the Macromedia Standard Edition.

一家名为New Atlanta的公司拥有自己的ColdFusion服务器版本。 这种ColdFusion服务器称为Blue Dragon,与Macromedia的服务器一样,它具有3种口味。 新亚特兰大具有服务器版,服务器JX版和J2EE版,而Macromedia具有标准版,企业版和企业J2EE版。 新亚特兰大服务器版本的最大优点是它目前是免费的,并且没有任何迹象表明这种变化会很快发生。 为什么免费? 它没有您在新亚特兰大JX版本或Macromedia标准版中获得的所有CFML标签。

I’ve worked on the New Atlanta free server and I can tell you, it’s great. It does place some limitations on the tags you can use, and the kinds of databases you can connect to (it’s currently limited to MySQL, PostGreSQL or ODBC via ODBC / JDBC Bridge), but none of this is really going to impact on your development — most of the missing tags are Macromedia-specific. Performance-wise it was really hard for me to tell a difference, though it will probably vary from application to application, and server to server.

我已经在新亚特兰大免费服务器上工作,我可以告诉你,这很棒。 它确实对您可以使用的标签和可以连接的数据库种类(目前仅限于MySQL,PostGreSQL或通过ODBC / JDBC Bridge的ODBC)施加了一些限制,但是这些都不会真正影响您的开发-大多数缺少的标记是Macromedia特定的。 在性能方面,我很难说出区别,尽管它可能因应用程序和服务器而异。

The New Atlanta product does offer budding ColdFusion programmers the ability to deploy applications with little cost to the end users. You can even bundle the New Atlanta server with your application and deploy it all at once (special licensing is needed to accomplish this). So, ColdFusion is no longer just for the rich. New Atlanta has brought it to the masses.

新的亚特兰大产品确实为新兴的ColdFusion程序员提供了以很少的成本向最终用户部署应用程序的能力。 您甚至可以将新亚特兰大服务器与您的应用程序捆绑在一起,然后一次部署所有服务器(完成此操作需要特殊许可)。 因此,ColdFusion不再仅适用于富人。 新亚特兰大将它带到了大众手中。

Myth #2: ColdFusion is Slow

误解2:ColdFusion速度慢

False! ColdFusion is very fast, even for someone who is just starting out and hasn’t learned all the tricks.

假! 即使对于刚起步但还没有学到所有技巧的人,ColdFusion的速度都非常快。

Currently, ColdFusion MX is built using Java (in the past, it was developed on C++), and when your pages are run for the first time, they are compiled into Java bytecode. In layman’s terms, your ColdFusion pages are compiled when they are first run, much like a program, and are then stored on the ColdFusion Server as binary files. If your ColdFusion server is configured with Trusted Cache turned on, then your files will be compiled only once. If Trusted Cache is turned off, your files are compiled with each page load, or when the page expires (again, a discussion of the CFML code and server configuration details to do this are beyond the scope of this article).

当前,ColdFusion MX是使用Java构建的(过去,它是在C ++上开发的),当您的页面首次运行时,它们将被编译为Java字节码。 用外行的术语来说,您的ColdFusion页面在首次运行时就被编译,就像程序一样,然后作为二进制文件存储在ColdFusion服务器上。 如果您的ColdFusion服务器配置为启用“可信缓存”,则文件将仅编译一次。 如果关闭了“可信缓存”,则每次页面加载或页面到期时都会编译文件(同样,关于CFML代码和服务器配置详细信息的讨论不在本文讨论范围之内)。

So, what’s so special about the pages being compiled into bytecode?

那么,被编译为字节码的页面有何特别之处?

Bytecode is computer object code that is processed by a program, usually referred to as a virtual machine, rather than by the "real" computer machine, the hardware processor.

字节码是由程序(通常称为虚拟机)而不是由“真实”计算机(即硬件处理器)处理的计算机目标代码。

(Definition from Whatis.com)

(来自Whatis.com的定义)

Once the ColdFusion code is compiled into bytecode, your server can interpret the instructions of your program faster, since it’s in a language it already understands. Many current Web languages are interpreted at runtime, which means that they’re processed and compiled each time they’re run. Typically, the difference between bytecode and interpreted code on a Web page is milliseconds to seconds. Yet, these differences can add up quickly in a Web application, and could easily mean the difference between a happy customer and an unsatisfied customer.

一旦将ColdFusion代码编译为字节码,您的服务器就可以使用它已经理解的语言,更快地解释程序的指令。 当前许多Web语言都是在运行时进行解释的,这意味着它们在每次运行时都会进行处理和编译。 通常,网页上字节码和解释代码之间的差为毫秒到秒。 但是,这些差异可以在Web应用程序中Swift加总,并且很容易意味着满意的客户和不满意的客户之间的差异。

Myth #3: ColdFusion isn’t supported the way <insert language> is!

误解3:<插入语言>的方式不支持ColdFusion!

Wrong again! ColdFusion has a huge community of followers and is backed by one of the largest Internet companies. You can find loyal ColdFusion followers in just about every major city across the world. They typically belong to the local ColdFusion User Group (CFUG), and are always willing to lend a hand or some teaching to help you along the way. There are also ColdFusion communities springing up all over the place.

又错了! ColdFusion拥有庞大的追随者社区,并得到最大的互联网公司之一的支持。 在全球几乎每个主要城市中,您都可以找到忠实的ColdFusion追随者。 他们通常属于当地的ColdFusion用户组(CFUG),并且始终乐于助一臂之力。 各地也涌现了ColdFusion社区。

You can always find help at Macromedia’s Developer Center for ColdFusion, and here at SitePoint there’s also an active CF community. Some are now starting to offer ColdFusion classes and, of course, there are many sites offering courseware for ColdFusion and for ColdFusion Certification.

您总是可以在Macromedia的ColdFusion开发人员中心找到帮助,在SitePoint上也有一个活跃的CF社区。 现在有一些学校开始提供ColdFusion课程,当然,有许多站点提供ColdFusion和ColdFusion认证的课件。

Myth #4: ColdFusion doesn’t have the ability to <insert cool feature of another language>

误解4:ColdFusion无法插入其他语言的酷功能>

False! I have yet to find something that ASP, PHP, or JSP can do that ColdFusion can’t. ColdFusion has all the programmatic ability of the aforementioned languages, as well as a tighter integration with other Macromedia technologies like Flash or the new Flex language.

假! 我还没有找到ASP,PHP或JSP可以做ColdFusion无法完成的工作。 ColdFusion具有上述语言的所有编程能力,并且与其他Macromedia技术(如Flash或新的Flex语言)紧密集成。

One of the biggest things ColdFusion has over these languages is that most of these special features are built into ColdFusion. Take charting, for example. With a simple database query and a CFChart tag, I can create a bar, line, pyramid, area, cone, curve, cylinder, step, scatter or pie chart in Flash, JPG or PNG formats, and that graph can be 3D or 2D! This facility is offered out of the box with very little or no configuration needed.

ColdFusion在这些语言上具有的最大优势之一就是,大多数特殊功能都内置在ColdFusion中。 以图表为例。 通过简单的数据库查询和CFChart标签,我可以以Flash,JPG或PNG格式创建条形图,折线图,金字塔图,面积图,圆锥图,曲线图,圆柱图,阶梯图,散点图或饼图,并且该图可以是3D或2D ! 此功能是开箱即用的,几乎不需要或不需要任何配置。

ColdFusion also has hooks into other Web languages and objects such as C/C++, Java, COM, CORBA, XML, SOAP and more! You’re never limited to programming only in ColdFusion, thanks to all these hooks and APIs. Take my current employer, for example. Their code is 99% Java but, thanks to ColdFusion’s hooks into Java, I can take a Java developer’s class file and use it in my application, thereby increasing our code reuse. That’s pretty snazzy, if I do say so myself.

ColdFusion还可以连接到其他Web语言和对象,例如C / C ++,Java,COM,CORBA,XML,SOAP等! 由于所有这些钩子和API,您永远不会只限于ColdFusion编程。 以我目前的雇主为例。 他们的代码使用的Java是99%的Java,但是由于ColdFusion与Java挂钩,因此我可以获取Java开发人员的类文件并在我的应用程序中使用它,从而提高了代码复用率。 如果我自己这么说,那真是时髦。

Myth #5: ColdFusion encourages poor programming practices.

误解5:ColdFusion鼓励不良的编程习惯。

False! ColdFusion provides all the building blocks necessary to develop highly scalable, modular and maintainable code. ColdFusion does not enforce any particular development methodology but, instead, focuses on getting the job done. Many programmers who start out with ColdFusion do typically write less than perfect code, but you can find the same problems in ASP, or PHP.

假! ColdFusion提供了开发高度可扩展,模块化和可维护代码所需的所有构建块。 ColdFusion不会强制执行任何特定的开发方法,而是专注于完成工作。 许多以ColdFusion开头的程序员通常编写的代码都不尽如人意,但是您可以在ASP或PHP中发现相同的问题。

Two major development methodologies now exist: FuseBox, and MACH II. A developer using one of these methodologies can, over time, learn better coding practices, but it’s really up to the programmer and the project to determine what works best.

现在存在两种主要的开发方法: FuseBoxMACH II 。 随着时间的流逝,使用这些方法之一的开发人员可以学习更好的编码实践,但是真正由程序员和项目来确定哪种方法最有效。

That’s it for the top 5 myths about ColdFusion. For more Q&A, check out the CFFAQ site.

就是关于ColdFusion的前5个神话。 有关更多问答,请访问CFFAQ网站

ColdFusion的好处 (The Benefits of ColdFusion)

Now that we’ve cleared the air, let’s talk about some of the strong points of ColdFusion and why it could be a good fit for your company, or a good path for you to investigate.

现在我们已经清除了一切,让我们来谈谈ColdFusion的一些优点,以及为什么它可能适合您的公司,或者是进行调查的好方法。

Java基础 (A Java Base)

As I mentioned before, the ColdFusion Server is built using Java and is a Sun J2EE verified application. This means you can deploy and run ColdFusion and your application on a wide variety of application servers, such as Sun ONE, BEA, IBM WebSphere and many others. Macromedia even includes a fully licensed copy of JRUN 4 with the Enterprise Edition of ColdFusion.

如前所述,ColdFusion服务器是使用Java构建的,并且是经过Sun J2EE验证的应用程序 。 这意味着您可以在各种应用程序服务器上部署和运行ColdFusion和您的应用程序,例如Sun ONE,BEA,IBM WebSphere等。 Macromedia甚至随附带有ColdFusion企业版的JRUN 4的完全许可副本。

What does this mean for the average developer? Well, let’s say you create a really cool application and you sell it to a big company that, in the following months, decides to standardize on Java. If you had a PHP or ASP application, you might be in big trouble and lose your contract, but, with ColdFusion, you can rest easy. You application will run on their application server — it will even interface with their present and future Java code.

这对普通开发人员意味着什么? 好吧,假设您创建了一个非常酷的应用程序,然后将其出售给一家大公司,该公司在接下来的几个月中决定采用Java进行标准化。 如果您有PHP或ASP应用程序,则可能会遇到很大麻烦并失去合同,但是使用ColdFusion,您可以放轻松。 您的应用程序将在其应用程序服务器上运行-甚至可以与它们现在和将来的Java代码进行交互。

错误和错误修复 (Errors and Bug Fixes)

Another big issue for developers is debugging and receiving error messages from their applications. With ColdFusion, you can catch exceptions and respond to them however you like (just as you can in Java), or you can allow the server to display error messages to the user. From your ColdFusion Administration panel, you can set the level of detail you want the errors to contain, identify which IP addresses can see detailed errors, and even set up custom pages to handle errors or missing templates. With ColdFusion debugging, you receive a detailed error message that tells you exactly where your error is, what the stack trace was (the order of files called prior to the error), and a suggestion as to what the problem could be. It is very rare that you will receive an error message that causes you to think more and debug less.

对于开发人员来说,另一个大问题是调试和接收来自其应用程序的错误消息。 使用ColdFusion,您可以按自己喜欢的方式捕获异常并对其进行响应(就像在Java中一样),或者可以允许服务器向用户显示错误消息。 在ColdFusion管理面板中,可以设置要包含错误的详细程度,确定哪些IP地址可以看到详细的错误,甚至可以设置自定义页面来处理错误或缺少模板。 通过ColdFusion调试,您会收到一条详细的错误消息,该错误消息会告诉您确切的错误位置,堆栈跟踪的内容(错误之前调用的文件的顺序)以及关于可能出现问题的建议。 非常罕见的是,您会收到一条错误消息,使您进行更多的思考而减少调试。

On top of the great error messages, you also get a plethora of debugging information. When I load up a ColdFusion page on my development environment, I see the name of my application and the template I’m currently looking at. I can also see a complete stack trace, which includes page execution times and full paths to these pages. I see a full listing of all my Application, CGI, Cookie, Server, Session, Form, and URL variables. There is very little reason for me to print out a variable just to see its value when I can simply scroll through my browser and have a full report.

除了重要的错误消息之外,您还可以获得大量的调试信息。 在开发环境中加载ColdFusion页面时,我会看到应用程序的名称和当前正在查看的模板。 我还可以看到完整的堆栈跟踪,其中包括页面执行时间和这些页面的完整路径。 我看到了所有应用程序,CGI,Cookie,服务器,会话,表单和URL变量的完整列表。 当我只需在浏览器中滚动并获得完整报告时,几乎没有理由打印出变量以查看其值。

ColdFusion组件– CFC (ColdFusion Components – CFCs)

With the release of ColdFusion MX, Macromedia introduced the idea of ColdFusion Components (aka CFCs). These are a great leap for ColdFusion, and are one of the most popular features of the new system. See ColdFusion Components, an Introduction for more details.

随着ColdFusion MX的发布,Macromedia引入了ColdFusion组件(又名CFC)的概念。 这些是ColdFusion的巨大飞跃,并且是新系统最受欢迎的功能之一。 有关更多详细信息请参见《 ColdFusion组件简介 》。

One of the greatest features of CFCs is the ability to document your code without having to throw in a bunch of comment tags. By using the "hint" attribute in your CFC files and <cffunction>s, you can tell future users what your CFC does, what the individual methods (also referred to as functions) do, and what kinds of data they take (input) and display (output). You can then browse directly to the CFC, type in your administrator credentials and receive a very nice output of this information.

CFC的最大功能之一是无需编写大量注释标签即可编写代码的功能。 通过在CFC文件和<cffunction>中使用“提示”属性,您可以告诉未来的用户CFC的功能,各个方法(也称为函数)的功能以及它们获取(输入)的数据类型并显示(输出)。 然后,您可以直接浏览到CFC,输入您的管理员凭据,并收到很好的此信息输出。

If you’ve ever had to document your code, you’ll know what a royal pain it can be. I’ve found this feature to be invaluable in my day to day operations. Since the documentation changes with the code, it’s also very dynamic, so you can rest assured that your current documentation will include the new features you just added.

如果您曾经不得不编写代码文档,那么您会知道这是多么痛苦。 我发现此功能在我的日常操作中非常宝贵。 由于文档随代码的变化而变化,因此它也是动态的,因此您可以放心,当前文档将包含刚添加的新功能。

I hope that, by now, you’re looking at ColdFusion in a different light and see it as something to investigate further. I highly recommend you download a copy of either the Macromedia ColdFusion Server or the New Atlanta Server, and play around with it. I’m sure that with an open mind and a little time, you’ll see ColdFusion as a viable alternative to your current Web development efforts. If you have any questions, please feel free to contact me directly or follow up with a post in the SitePoint Forums.

我希望到目前为止,您以不同的眼光看待ColdFusion,并将其视为需要进一步研究的东西。 我强烈建议您下载Macromedia ColdFusion服务器或New Atlanta服务器的副本,并进行试用。 我敢肯定,只要开放思路和一点时间,您就会将ColdFusion视为当前Web开发工作的可行替代方案。 如果您有任何疑问,请随时直接与我联系,或者跟进SitePoint论坛中的帖子。

资源资源 (Resources)

For those who are ready to jump in and get started, here are some great resources:

对于那些准备入门的人,这里有一些很棒的资源:

  • Macromedia ColdFusion – Begin your journey here by downloading the various server versions. Be sure to grab the developer edition, which is good for 1 IP address.

    Macromedia ColdFusion –通过下载各种服务器版本在这里开始您的旅程。 确保获取开发人员版本,该版本适合1个IP地址。

  • New Atlanta Blue Dragon – Find the Free ColdFusion server as well as alternatives to the Macromedia Standard and Enterprise versions.

    新的亚特兰大蓝龙–查找免费的ColdFusion服务器以及Macromedia Standard和Enterprise版本的替代产品。

  • Forta.com – This guy is the chief evangelist for ColdFusion. Consider him the ColdFusion Godfather. Ben Forta has been doing ColdFusion and other related programming for many, many years. He has written many books on various ColdFusion subjects and other Web technologies, and is considered an expert in his field. His site offers links to his books, tips, tricks, hints, hosting links, and a Weblog where you can keep up with him and ColdFusion.

    Forta.com –这个家伙是ColdFusion的首席传播者。 考虑他为ColdFusion教父。 Ben Forta已经从事ColdFusion和其他相关编程已有很多年了。 他撰写了许多有关ColdFusion主题和其他Web技术的书籍,并且被认为是该领域的专家。 他的站点提供了指向他的书的链接,技巧,窍门,提示,托管链接,以及一个Web日志 ,您可以随时了解他和ColdFusion。

  • MXNA – The Macromedia XML News Aggregator is a central point for many of the Macromedia related blogs on the internet. Here you’ll find blogs for ColdFusion, Dreamweaver, Flash and many more Macromedia topics. This is a great central point for Macromedia knowledge.

    MXNA – Macromedia XML News Aggregator是Internet上许多与Macromedia相关的博客的中心。 在这里,您将找到有关ColdFusion,Dreamweaver,Flash和其他Macromedia主题的博客。 这是Macromedia知识的重要中心。

  • SitePoint ColdFusion Blog and Forums – You can never go wrong with any of the sitepoint.com resources and these two are no exception.

    SitePoint ColdFusion博客论坛-您永远不会错失任何sitepoint.com资源,这两个也不例外。

翻译自: https://www.sitepoint.com/making-case-coldfusion/

coldfusion

 类似资料: