|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.
In his session at @ThingsExpo, Tony Shan, Chief Architect at CTS, will explore the synergy of Big Data and IoT. First he will take a closer look at the Internet of Things and Big Data individually, in terms of what, which, why, where, when, who, how and how much. Then he will explore the relationship between IoT and Big Data. Specifically, he will drill down to how the 4Vs aspects intersect with IoT: Volume, Variety, Velocity and Value. In turn, Tony will analyze how the key components of IoT influence Big Data: Device, Connectivity, Context, and Intelligence. He will dive deep to the matrix...
Oct. 6, 2015 06:00 AM EDT Reads: 246
Scott Guthrie's keynote presentation "Journey to the intelligent cloud" is a must view video. This is from AzureCon 2015, September 29, 2015 I have reproduced some screen shots in case you are unable to view this long video for one reason or another. One of the highlights is 3 datacenters coming on line in India.
Oct. 6, 2015 05:45 AM EDT Reads: 155
The broad selection of hardware, the rapid evolution of operating systems and the time-to-market for mobile apps has been so rapid that new challenges for developers and engineers arise every day. Security, testing, hosting, and other metrics have to be considered through the process. In his session at Big Data Expo, Walter Maguire, Chief Field Technologist, HP Big Data Group, at Hewlett-Packard, will discuss the challenges faced by developers and a composite Big Data applications builder, focusing on how to help solve the problems that developers are continuously battling.
Oct. 6, 2015 04:00 AM EDT Reads: 407
When it comes to IoT in the enterprise, namely the commercial building and hospitality markets, a benefit not getting the attention it deserves is energy efficiency, and IoT’s direct impact on a cleaner, greener environment when installed in smart buildings. Until now clean technology was offered piecemeal and led with point solutions that require significant systems integration to orchestrate and deploy. There didn't exist a 'top down' approach that can manage and monitor the way a Smart Building actually breathes - immediately flagging overheating in a closet or over cooling in unoccupied ho...
Oct. 5, 2015 11:45 PM EDT Reads: 200
SYS-CON Events announced today that IBM Cloud Data Services has been named “Bronze Sponsor” of SYS-CON's 17th Cloud Expo, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. IBM Cloud Data Services offers a portfolio of integrated, best-of-breed cloud data services for developers focused on mobile computing and analytics use cases.
Oct. 5, 2015 11:00 PM EDT Reads: 608
The enterprise is being consumerized, and the consumer is being enterprised. Moore's Law does not matter anymore, the future belongs to business virtualization powered by invisible service architecture, powered by hyperscale and hyperconvergence, and facilitated by vertical streaming and horizontal scaling and consolidation. Both buyers and sellers want instant results, and from paperwork to paperless to mindless is the ultimate goal for any seamless transaction. The sweetest sweet spot in innovation is automation. The most painful pain point for any business is the mismatch between supplies a...
Oct. 5, 2015 03:30 PM EDT Reads: 126
Mobile messaging has been a popular communication channel for more than 20 years. Finnish engineer Matti Makkonen invented the idea for SMS (Short Message Service) in 1984, making his vision a reality on December 3, 1992 by sending the first message ("Happy Christmas") from a PC to a cell phone. Since then, the technology has evolved immensely, from both a technology standpoint, and in our everyday uses for it. Originally used for person-to-person (P2P) communication, i.e., Sally sends a text message to Betty – mobile messaging now offers tremendous value to businesses for customer and empl...
Oct. 5, 2015 01:15 PM EDT Reads: 158
SYS-CON Events announced today that ProfitBricks, the provider of painless cloud infrastructure, 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. ProfitBricks is the IaaS provider that offers a painless cloud experience for all IT users, with no learning curve. ProfitBricks boasts flexible cloud servers and networking, an integrated Data Center Designer tool for visual control over the cloud and the best price/performance value available. ProfitBricks was named one of the coolest Clo...
Oct. 5, 2015 01:00 PM EDT Reads: 724
“The Internet of Things transforms the way organizations leverage machine data and gain insights from it,” noted Splunk’s CTO Snehal Antani, as Splunk announced accelerated momentum in Industrial Data and the IoT. The trend is driven by Splunk’s continued investment in its products and partner ecosystem as well as the creativity of customers and the flexibility to deploy Splunk IoT solutions as software, cloud services or in a hybrid environment. Customers are using Splunk® solutions to collect and correlate data from control systems, sensors, mobile devices and IT systems for a variety of Ind...
Oct. 5, 2015 12:00 PM EDT Reads: 572
Organizations already struggle with the simple collection of data resulting from the proliferation of IoT, lacking the right infrastructure to manage it. They can't only rely on the cloud to collect and utilize this data because many applications still require dedicated infrastructure for security, redundancy, performance, etc. In his session at 17th Cloud Expo, Emil Sayegh, CEO of Codero Hosting, will discuss how in order to resolve the inherent issues, companies need to combine dedicated and cloud solutions through hybrid hosting – a sustainable solution for the data required to manage I...
Oct. 5, 2015 12:00 PM EDT Reads: 420
You have your devices and your data, but what about the rest of your Internet of Things story? Two popular classes of technologies that nicely handle the Big Data analytics for Internet of Things are Apache Hadoop and NoSQL. Hadoop is designed for parallelizing analytical work across many servers and is ideal for the massive data volumes you create with IoT devices. NoSQL databases such as Apache HBase are ideal for storing and retrieving IoT data as “time series data.”
Oct. 5, 2015 11:45 AM EDT Reads: 447
Clearly the way forward is to move to cloud be it bare metal, VMs or containers. One aspect of the current public clouds that is slowing this cloud migration is cloud lock-in. Every cloud vendor is trying to make it very difficult to move out once a customer has chosen their cloud. In his session at 17th Cloud Expo, Naveen Nimmu, CEO of Clouber, Inc., will advocate that making the inter-cloud migration as simple as changing airlines would help the entire industry to quickly adopt the cloud without worrying about any lock-in fears. In fact by having standard APIs for IaaS would help PaaS expl...
Oct. 5, 2015 11:30 AM EDT Reads: 435
As more and more data is generated from a variety of connected devices, the need to get insights from this data and predict future behavior and trends is increasingly essential for businesses. Real-time stream processing is needed in a variety of different industries such as Manufacturing, Oil and Gas, Automobile, Finance, Online Retail, Smart Grids, and Healthcare. Azure Stream Analytics is a fully managed distributed stream computation service that provides low latency, scalable processing of streaming data in the cloud with an enterprise grade SLA. It features built-in integration with Azur...
Oct. 5, 2015 10:00 AM EDT Reads: 730
Apps and devices shouldn't stop working when there's limited or no network connectivity. Learn how to bring data stored in a cloud database to the edge of the network (and back again) whenever an Internet connection is available. In his session at 17th Cloud Expo, Bradley Holt, Developer Advocate at IBM Cloud Data Services, will demonstrate techniques for replicating cloud databases with devices in order to build offline-first mobile or Internet of Things (IoT) apps that can provide a better, faster user experience, both offline and online. The focus of this talk will be on IBM Cloudant, Apa...
Oct. 5, 2015 09:45 AM EDT Reads: 436
SYS-CON Events announced today that HPM Networks will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. For 20 years, HPM Networks has been integrating technology solutions that solve complex business challenges. HPM Networks has designed solutions for both SMB and enterprise customers throughout the San Francisco Bay Area.
Oct. 5, 2015 09:00 AM EDT Reads: 563
As enterprises capture more and more data of all types – structured, semi-structured, and unstructured – data discovery requirements for business intelligence (BI), Big Data, and predictive analytics initiatives grow more complex. A company’s ability to become data-driven and compete on analytics depends on the speed with which it can provision their analytics applications with all relevant information. The task of finding data has traditionally resided with IT, but now organizations increasingly turn towards data source discovery tools to find the right data, in context, for business users, d...
Oct. 5, 2015 08:00 AM EDT Reads: 376
SYS-CON Events announced today that MobiDev, a software development company, will exhibit at the 17th International Cloud Expo®, which will take place November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. MobiDev is a software development company with representative offices in Atlanta (US), Sheffield (UK) and Würzburg (Germany); and development centers in Ukraine. Since 2009 it has grown from a small group of passionate engineers and business managers to a full-scale mobile software company with over 150 developers, designers, quality assurance engineers, project manage...
Oct. 5, 2015 05:00 AM EDT Reads: 726
Learn how IoT, cloud, social networks and last but not least, humans, can be integrated into a seamless integration of cooperative organisms both cybernetic and biological. This has been enabled by recent advances in IoT device capabilities, messaging frameworks, presence and collaboration services, where devices can share information and make independent and human assisted decisions based upon social status from other entities. In his session at @ThingsExpo, Michael Heydt, founder of Seamless Thingies, will discuss and demonstrate how devices and humans can be integrated from a simple clust...
Oct. 4, 2015 12:00 PM EDT Reads: 623
SYS-CON Events announced today that Cloud Raxak has been named “Media & Session Sponsor” of SYS-CON's 17th Cloud Expo, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. Raxak Protect automates security compliance across private and public clouds. Using the SaaS tool or managed service, developers can deploy cloud apps quickly, cost-effectively, and without error.
Oct. 3, 2015 01:15 PM EDT Reads: 582
Who are you? How do you introduce yourself? Do you use a name, or do you greet a friend by the last four digits of his social security number? Assuming you don’t, why are we content to associate our identity with 10 random digits assigned by our phone company? Identity is an issue that affects everyone, but as individuals we don’t spend a lot of time thinking about it. In his session at @ThingsExpo, Ben Klang, Founder & President of Mojo Lingo, will discuss the impact of technology on identity. Should we federate, or not? How should identity be secured? Who owns the identity? How is identity ...
Oct. 3, 2015 11:00 AM EDT Reads: 416