|By Charlie Arehart||
|August 23, 2002 12:00 AM EDT||
With each new release of CFMX some features are trumpeted a lot and others seem to fall between the cracks. I call these "hidden gems,"and in CFMX there are quite a few.
In this article I'll uncover several features that don't warrant publicity in the popular top 10 (or even top 20) lists that Macromedia and others might put out. Perhaps they won't influence the average IT buyer considering an upgrade. Sure, things like J2EE integration and XML/Web services support are critical to many organizations, and things like CFCs and Flash remoting may fundamentally change the way we develop CF apps.
But it's been my experience that what really intrigues most developers is the little things that have changed, some of which just may serve to make every day of our development lives easier without any substantial changes in current practices.
The big new things in CFMX are of course praiseworthy, and I don't mean to diminish them. It's just that maybe for some developers one or more of these hidden gems could be the real "gotta have" trigger that motivates them to upgrade. Or solve a long-standing problem.
I've broken the topics into a couple of categories. I'm not even mentioning all the hidden gems, nor even all the important changes to CFMX. As such, this article shouldn't be considered a compendium of all hidden gems. I can only highlight several.
Before proceeding, I want to point out that there are addititional new features of CFMX that may not get quite as much widespread acclaim. I don't consider them to be hidden gems since they're talked about often and are well documented. If you haven't yet looked into them, you should:
- CFFUNCTION: Creates UDFs that can include tags
- CFLOGIN, related tags: Support standardized login processing
- CFIMPORT: Enables JSP custom tags
- CFCHART: Replaces and exceeds CF5's CFGRAPH
- Automatic compilation of CF templates
- Support for internationalization (UNICODE)
- Improved debugging with CFTRACE
At the end of this article I'll point out several resources available for learning more about these and the other features I'll mention.
Hidden Gems in CFML
I've grouped the first set of hidden gems in a general category of CFML (ColdFusion Markup Language) gems, meaning new or changed tags and functions.
New Variable Scopes
More and more CF variable scopes have become available to use as structures. CFMX adds to this list the variables, caller, and server scopes. The value here is that you can use the CFLOOP COLLECTION tag to loop over the values in these scopes, or, more simply, you can display all the variables in a given scope with CFDUMP, among other things.
For instance, if you're not familiar with the server scope, try <CFDUMP VAR="#server#">. The output will show several useful variables you may never have known about, including several describing the CF server and the operating system it runs on. The server scope can also be written to, in which case any user on the entire server has shared access to the variables placed in that scope.
It's now possible to programmatically override the "request timeout" duration for a given template, using <CFSETTING REQUESTTIMEOUT="nn">, where "nn" is a number of seconds. The CF Administrator has a value set that controls the maximum time a CF template is allowed to run before the server "times out" the template. If you have a template that needs to run longer than that default, this is the means to programmatically indicate that it should be allowed to run longer.
Some will recognize this as an alternative to (and in some ways an improvement over) the long-existing means to make this sort of template-specific request to override the "request timeout" value. In previous releases you could add REQUESTTIMEOUT=nn to the query string of a URL requesting a template, and that indicated the maximum runtime for the template. That approach had its pluses and minuses, but it's important to note that this old query string approach is no longer supported (any value provided is ignored).
Try/catch in CFSCRIPT, UDFs
Prior to CFMX, there was no way to perform try/catch exception handling in the CFSCRIPT language (which was the means to create User-Defined Functions). This limitation has been lifted and there is now a Try and a Catch statement available in CF SCRIPT. See the documentation references provided later for more details.
Note: As opposed to CFML's CFTRY and CFCATCH tags, in CFSCRIPT, a Catch is not embedded within a Try. Also, while there are CFTHROW and CFRETHROW tags in CFML, there are no corresponding throw and rethrow statements in CFSCRIPT.
"Importing" CF Custom Tag Libraries, "Adaptive Tags"
In my article "Using JSP Custom Tags in CFMX" (CFDJ, Vol. 4, issue 5), I showed how you can use the new CFIMPORT tag to allow your applications to use JSP custom tags. One thing I didn't mention is that there's a side benefit to CFIMPORT, even if you're not using JSP custom tags. You can also use it to point to a directory that holds one or more CF custom tags (any directory with a relative path or using a mapped path in the CF Administrator). With that, you can then use JSP-style custom tag syntax to refer to your CF custom tags.
For instance, if you used <CFIMPORT TAGLIB="pathname" PREFIX="mytags"> to create a reference to some directory of tags that included sometag.cfm, you could now refer to it in your code with <mytags:sometag>.
There's also an interesting new possibility being referred to as "server-side HTML" or "adaptive tags." If you leave off the PREFIX in a CFIMPORT or set it to the empty string, then CF will process every tag (other than CF tags and taglib:-prefixed tags) as if it's a custom tag. It will look in the named TAGLIB to see if there's a template of that name, and will run it if there is. So if you had a page with such a CFIMPORT and had a file named form.cfm tag in such a taglib, a <form> tag on that page would cause CF to run form.cfm like a custom tag as it processed the page. Very interesting possibilities. Again, it cannot be used to override CF tags.
By the way, for those using CFIMPORT for JSP custom tags, I failed to mention in the article (available online at www.sys-con.com/coldfusion/article.cfm?id=435) that the feature of importing JSP custom tags is not supported in the Professional edition of CFMX. It's available only in Enterprise (or the Evaluation or Developer edition, which it becomes after 30 days of trial). I should clarify, however, that the notion of using CFIMPORT to work with CF custom tags does indeed work in all editions.
Evaluations Within Expressions
This hidden gem may not excite many, and it's actually a return to the way things were done in the past. You can now perform evaluations within expressions without needing to use the evaluate() function. For instance, if you wanted to display how long it took to run a query that was just executed, you couldn't (in CF5) just say:
<cfoutput>Time used:You'd need to use an evaluate around the expression cfquery.executiontime/1000. That's no longer needed. Removing it where it's not needed could yield a modest performance boost.
Miscellaneous Hidden Gems
Several other hidden gems that aren't part of CFML are worth pointing out.
CFMX Tag Updater for CF Studio
Folks who are still running CF Studio/HomeSite 4.5 or 5 will be thrilled to learn that they can arrange to install a "tag update" for the CFMX tags and functions. This way, the tag/function insight, tag editor, and tag/function help features work for most CFMX tags and functions (see www.macromedia.com/software/ coldfusionstudio/productinfo/resources/tag_updaters/). Also, there's an update for the Studio/HomeSite Help References (Help>Open Help References Window), available at http://download.macromedia.com/pub/homesite/ updates/cfml_ref.zip. Though the instructions in the zip suggest it works only for HomeSite + (part of the new Studio MX), the update also works in Studio/ HomeSite 4.5 or 5.
Free CFMX Hosting
If you're reluctant or unable to install CFMX, you may want to seek out a hosting company to do your testing. Fortunately, as of July, one company is offering free CFMX hosting for trial (nonproduction) purposes. See www.hostmysite.com/cfmx.hms for signup details. If anyone learns of other such instances, please let me know, or you can simply add them to the comments area of the online version of this article (see the end of this article for more on that).
Running CFMX on Mac OS X
Precompiling ColdFusionMX Templates
You may know that CFMX now compiles templates into Java classes. You may also have noticed that this means the first user to run a template after it's created or changed will suffer a small hit (up to a couple of seconds) when it's compiled the first time.
You can alleviate that wait by precompiling one or more templates. Unfortunately, the steps to do this take a little more room than we have for this article, so I'll save them for next month. There's also the matter of how to compile templates outside the default wwwroot directory (for those that have set up their servers to support that). In the meantime you can check out my blog at http://cfmxplus.blogspot.com/ for a preview of the topic.
Other Changes Worth Investigating
There are still more changes and/ or new features that I just don't have time to discuss. As mentioned in the next section, there are several resources from which you can learn more about these. Consider whether any of them may be of interest to you:
- Several Query of Query enhancements.
- Several CFLDAP changes.
- CFMAIL spooling option changes.
- Sort order in ListSort, ArraySort.
- Date processing functions have short, medium, long formats.
- Localization functions now follow Java standard rules.
- Several Regular Expressions support changes.
- CFTHROW can now throw an OBJECT.
- CFLOG now always writes thread, date, and time.
- CFHTTP reading text file in as query, new FIRSTROWASHEADERS attribute.
- COM object access improvements.
- Dynamic class reloading.
- New commenting flexibility.
- How to save the compiled template as .java (versus .class) files.
- Can indicate alternative directory for templates outside of normal <cfusionmx_home>\wwwroot.
- At least two Security Bulletins currently available.
- Many CF admin settings are now saved in <cfusion_home>\lib\neoruntime.xml.
- Examples in online CFML Reference are now housed at Macromedia.com (avoids security issues of running them locally).
There are still many others. You really owe it to yourself to read the resources mentioned next to make sure there aren't changes that could concern you.
Indeed, some of these issues fall more into the area of "hidden traps" for migration. I intentionally am not writing about those aspects of the upgrade. There are ample resources for that, not the least of which is the new manual, Migrating CF5 Applications, available within the substantial new CFMX documentation set. See the next section for how to obtain that both in print and online.
Finding More Information
The sources of many of the features I've mentioned here are the very documents that come with the new release. The thing is, many people don't know they exist or for some reason don't bother to or don't have the time to read them. I always point them out when possible, and it's especially important for this new release.
The entire CFMX documentation set has been revamped and added to. There are four updated and five new books. If you're not aware that there is documentation, or figure the books are just for reference, you really need to check them out. So many questions people ask are answered in the manuals.
The most substantial of them, Developing ColdFusion MX Applications with CFML, is a whopping 900 printed pages! No need to wait for books to hit the market: Macromedia has written one, and it's been improved over previous releases. Besides covering all the new features in a user-guide (rather than reference) style, it even has improved discussions of "old" subjects such as Query of Queries, UDFs, and CFSCRIPT.
You may find the manuals on your server at http://<yourserver>/cfdocs/dochome.htm. They're also available online at http://livedocs.macromedia.com/cfmxdocs/, and in PDF form at www.macromedia.com/support/coldfusion/documentation.html. Or you can buy them in print format (only $50 for the set) at http://dynamic.macromedia.com/bin/MM/store/US/ product.jsp?category=/BooksVideos/Documentation/ ColdFusionServer&type=FULL.
The books do indeed cover most of the new features, but there are always hidden gems in the "Release Notes" ( www.macromedia.com/support/coldfusion/ releasenotes/mx/releasenotes_mx.html), the "Documentations Updates" ( www.macromedia.com/v1/Handlers/ index.cfm?ID=22811&Method=Full), and the "Documentation Additions" ( www.macromedia.com/v1/Handlers/ index.cfm?id=22993&Method=Full).
There is also substantial coverage of new features on the Macromedia Designer/Developer site ( www.macromedia.com/desdev/mx/coldfusion/). And the "Upgrade FAQ" ( www.macromedia.com/software/coldfusion/ productinfo/faq/upgrade/) and "New Feature Comparison Grid" ( www.macromedia.com/software/coldfusion/ productinfo/upgrade/comparison.html) can also be useful.
Finally, don't miss the example applications that you'll likely find installed on your CFMX server, at http://<yourserver>/cfdocs/exampleapps/index.cfm.
There's a lot more to CFMX than it may seem at first. Indeed, I'd say "there's gold in them thar hills." Keep mining these resources for still more hidden gems, and feel free to add them to the online version of this article (whose link I'll offer on my list of articles at www.systemanage.com).
|dedi 05/04/03 12:42:00 AM EDT|
give me for mare information about available resources.
The 17th International Cloud Expo has announced that its Call for Papers is open. 17th International Cloud Expo, to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, APM, APIs, Microservices, Security, Big Data, Internet of Things, DevOps and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportunity. Submit your speaking proposal today!
Jul. 3, 2015 05:30 PM EDT Reads: 468
The basic integration architecture, as defined by ESBs, hasn’t changed for more than a decade. Most cloud integration providers still rely on an ESB architecture and their proprietary connectors. As a result, enterprise integration projects suffer from constraints of availability and reliability of these connectors that are not re-usable across other integration vendors. However, the rapid adoption of APIs and almost ubiquitous availability of APIs amongst most SaaS and Cloud applications are rapidly redefining traditional integration approaches and their reliance on proprietary connectors. ...
Jul. 3, 2015 04:45 PM EDT Reads: 834
The 5th International DevOps Summit, co-located with 17th International Cloud Expo – being held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real results. Among the proven benefits, DevOps is corr...
Jul. 3, 2015 04:15 PM EDT Reads: 422
SYS-CON Events announced today that Secure Infrastructure & Services will exhibit at SYS-CON's 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. Secure Infrastructure & Services (SIAS) is a managed services provider of cloud computing solutions for the IBM Power Systems market. The company helps mid-market firms built on IBM hardware platforms to deploy new levels of reliable and cost-effective computing and high availability solutions, leveraging the cloud and the benefits of Infrastructure-as-a-Service (IaaS...
Jul. 3, 2015 04:15 PM EDT Reads: 616
17th Cloud Expo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises are using some form of XaaS – software, platform, and infrastructure as a service.
Jul. 3, 2015 01:45 PM EDT Reads: 559
It is one thing to build single industrial IoT applications, but what will it take to build the Smart Cities and truly society-changing applications of the future? The technology won’t be the problem, it will be the number of parties that need to work together and be aligned in their motivation to succeed. In his session at @ThingsExpo, Jason Mondanaro, Director, Product Management at Metanga, discussed how you can plan to cooperate, partner, and form lasting all-star teams to change the world and it starts with business models and monetization strategies.
Jul. 3, 2015 12:00 PM EDT Reads: 2,375
Today air travel is a minefield of delays, hassles and customer disappointment. Airlines struggle to revitalize the experience. GE and M2Mi will demonstrate practical examples of how IoT solutions are helping airlines bring back personalization, reduce trip time and improve reliability. In their session at @ThingsExpo, Shyam Varan Nath, Principal Architect with GE, and Dr. Sarah Cooper, M2Mi’s VP Business Development and Engineering, will explore the IoT cloud-based platform technologies driving this change including privacy controls, data transparency and integration of real time context wi...
Jul. 3, 2015 11:45 AM EDT Reads: 1,251
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Architect for the Internet of Things and Intelligent Systems, described how to revolutionize your archit...
Jul. 3, 2015 11:15 AM EDT Reads: 977
WebRTC converts the entire network into a ubiquitous communications cloud thereby connecting anytime, anywhere through any point. In his session at WebRTC Summit,, Mark Castleman, EIR at Bell Labs and Head of Future X Labs, will discuss how the transformational nature of communications is achieved through the democratizing force of WebRTC. WebRTC is doing for voice what HTML did for web content.
Jul. 3, 2015 10:00 AM EDT Reads: 894
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists addressed this very serious issue of profound change in the industry.
Jul. 3, 2015 09:00 AM EDT Reads: 1,328
Internet of Things (IoT) will be a hybrid ecosystem of diverse devices and sensors collaborating with operational and enterprise systems to create the next big application. In their session at @ThingsExpo, Bramh Gupta, founder and CEO of robomq.io, and Fred Yatzeck, principal architect leading product development at robomq.io, discussed how choosing the right middleware and integration strategy from the get-go will enable IoT solution developers to adapt and grow with the industry, while at the same time reduce Time to Market (TTM) by using plug and play capabilities offered by a robust IoT ...
Jul. 3, 2015 08:15 AM EDT Reads: 2,139
"We have a tagline - "Power in the API Economy." What that means is everything that is built in applications and connected applications is done through APIs," explained Roberto Medrano, Executive Vice President at Akana, in this SYS-CON.tv interview at 16th Cloud Expo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 3, 2015 08:00 AM EDT Reads: 1,155
Internet of Things is moving from being a hype to a reality. Experts estimate that internet connected cars will grow to 152 million, while over 100 million internet connected wireless light bulbs and lamps will be operational by 2020. These and many other intriguing statistics highlight the importance of Internet powered devices and how market penetration is going to multiply many times over in the next few years.
Jul. 3, 2015 07:45 AM EDT Reads: 2,261
To many people, IoT is a buzzword whose value is not understood. Many people think IoT is all about wearables and home automation. In his session at @ThingsExpo, Mike Kavis, Vice President & Principal Cloud Architect at Cloud Technology Partners, discussed some incredible game-changing use cases and how they are transforming industries like agriculture, manufacturing, health care, and smart cities. He will discuss cool technologies like smart dust, robotics, smart labels, and much more. Prepare to be blown away with a glimpse of the future.
Jul. 3, 2015 07:30 AM EDT Reads: 988
SYS-CON Events announced today that BMC will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. BMC delivers software solutions that help IT transform digital enterprises for the ultimate competitive business advantage. BMC has worked with thousands of leading companies to create and deliver powerful IT management services. From mainframe to cloud to mobile, BMC pairs high-speed digital innovation with robust IT industrialization – allowing customers to provide amazing user experiences with optimized IT per...
Jun. 29, 2015 12:15 PM EDT Reads: 2,783
There will be 150 billion connected devices by 2020. New digital businesses have already disrupted value chains across every industry. APIs are at the center of the digital business. You need to understand what assets you have that can be exposed digitally, what their digital value chain is, and how to create an effective business model around that value chain to compete in this economy. No enterprise can be complacent and not engage in the digital economy. Learn how to be the disruptor and not the disruptee.
Jun. 29, 2015 11:00 AM EDT Reads: 2,236
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists will addresses this very serious issue of profound change in the industry.
Jun. 29, 2015 09:45 AM EDT Reads: 2,590
Business as usual for IT is evolving into a "Make or Buy" decision on a service-by-service conversation with input from the LOBs. How does your organization move forward with cloud? In his general session at 16th Cloud Expo, Paul Maravei, Regional Sales Manager, Hybrid Cloud and Managed Services at Cisco, discusses how Cisco and its partners offer a market-leading portfolio and ecosystem of cloud infrastructure and application services that allow you to uniquely and securely combine cloud business applications and services across multiple cloud delivery models.
Jun. 28, 2015 11:00 AM EDT Reads: 2,307
In his General Session at 16th Cloud Expo, David Shacochis, host of The Hybrid IT Files podcast and Vice President at CenturyLink, investigated three key trends of the “gigabit economy" though the story of a Fortune 500 communications company in transformation. Narrating how multi-modal hybrid IT, service automation, and agile delivery all intersect, he will cover the role of storytelling and empathy in achieving strategic alignment between the enterprise and its information technology.
Jun. 27, 2015 10:00 AM EDT Reads: 2,319
Buzzword alert: Microservices and IoT at a DevOps conference? What could possibly go wrong? In this Power Panel at DevOps Summit, moderated by Jason Bloomberg, the leading expert on architecting agility for the enterprise and president of Intellyx, panelists peeled away the buzz and discuss the important architectural principles behind implementing IoT solutions for the enterprise. As remote IoT devices and sensors become increasingly intelligent, they become part of our distributed cloud environment, and we must architect and code accordingly. At the very least, you'll have no problem fillin...
Jun. 26, 2015 12:00 PM EDT Reads: 2,310