MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Manuel d'utilisateur Page 2

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 44
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 1
2 CHAPTER 30 Extending ColdFusion with CFX
When To Write (and Avoid Writing) a CFX Tag
Given the choice between creating a CFX tag or creating a CFML-based extension such as a custom
tag, UDF, or CFC, it is generally best to consider one of the CFML-based alternatives first. Why?
Mainly because CFML is so simple, and generally provides a rich enough feature set to get most
tasks done with ease. Whenever possible, I recommend that you consider creating a CFML-based
extension first.
That said, there are plenty of situations where creating a CFX tag makes lots of sense. In general,
most CFX tags are created for one of the following reasons:
To take advantage of a third-party C++ or Java API that makes something possible that
isn’t otherwise possible in ColdFusion. Perhaps the API knows how to connect to some
kind of legacy mainframe database system, or knows how to create a special type of image
file. In this situation, the CFX tag can be thought of as wrapper around the API.
To take advantage of legacy code, open source code, or other snippets that have already
been written in Java or C++. If you’re working on a complex project, and you already
have Java or C++ code available that can provide part of the functionality, it may make
sense to just turn that code into a CFX tag, even if it would be possible to port the logic
to CFML. If it’s faster and easier for you and your project, go for it!
To take advantage of faster processing. In general, your regular ColdFusion pages are
compiled into Java classes that perform quite well. However, there will always be niche
situations where you could write custom Java or C++ code that runs more efficiently.
To circumvent method-selection problems or other errors when using Java classes (or
Beans). Most Java classes can be used via
<cfobject> or CreateObject() as discussed
in Chapter 29, “Extending ColdFusion with Java”. However, some Java methods and
constructors are overloaded in such a way that ColdFusion can’t determine which form
to use at runtime, even if you use
JavaCast(). In such a situation, you can create a CFX
tag that acts as a sort of “poor man’s proxy” between ColdFusion and the Java class.
Choosing Between C++ and Java
You can program a CFX tag in either Java or C++. Much of the time, the decision will have been
made for you, because whatever third-party API or other existing code you are planning to use will
force you to use one or the other.
The most obvious advantage to programming the CFX in Java is that it will be able to run on a
ColdFusion server using any operating system (OS). Tags created with C++, however, will need to
be recompiled for each OS you want to support. Of course, cross-platform support doesn’t mean
much if the nature of your project is such that the tag will be bound to one OS or the other anyway,
so the importance of this advantage may or may not mean a whole lot to you. For instance, if you
want the CFX tag to call native Windows APIs, then a C++ tag is the obvious choice; you’ll probably
only have to compile it once for any Win32 platform.
Vue de la page 1
1 2 3 4 5 6 7 ... 43 44

Commentaires sur ces manuels

Pas de commentaire

Atec JDSU-SmartClass-OTS-55 podręczniki

Instrukcje obsługi i podręczniki użytkownika dla Ekwipunek Atec JDSU-SmartClass-OTS-55.
Dostarczamy 1 pdf podręczników Atec JDSU-SmartClass-OTS-55 do pobrania za darmo według typów dokumentów: Instrukcja Użytkownika






Więcej produktów i instrukcji dla Ekwipunek Atec

Modele Rodzaj dokumentu
EXFO-BRT-320A Instrukcja Użytkownika   Atec EXFO-BRT-320A User Manual, 2 strony
JDSU-ONT Series Instrukcja Użytkownika   Atec JDSU-ONT Series User Manual, 20 strony
EXFO-FTB-5500 Series Instrukcja Użytkownika   Atec EXFO-FTB-5500 Series User Manual, 6 strony
JDSU-C8555 Instrukcja Użytkownika   Atec JDSU-C8555 User Manual [fr] , 8 strony
Fluke-Linkrunner-Pro-Duo Instrukcja Użytkownika   Atec Fluke-Linkrunner-Pro-Duo User Manual, 2 strony
Fluke-FTK400 Instrukcja Użytkownika   Atec Fluke-FTK400 User Manual, 2 strony
Fluke-FTK450 Instrukcja Użytkownika   Atec Fluke-FTK450 User Manual, 3 strony
Microtest-CERTIFIBER Instrukcja Użytkownika   Atec Microtest-CERTIFIBER User Manual, 2 strony
JDSU-OLP-87 Instrukcja Użytkownika   Atec JDSU-OLP-87 User Manual, 4 strony
EXFO-FIP-400 Instrukcja Użytkownika   Atec EXFO-FIP-400 User Manual, 5 strony
Fluke-Networks-FTK1450 Instrukcja Użytkownika   Atec Fluke-Networks-FTK1450 User Manual [fr] , 4 strony
JDSU-FBP-P5000 Instrukcja Użytkownika   Atec JDSU-FBP-P5000 User Manual, 3 strony
JDSU-OLP-34-35-38 Instrukcja Użytkownika   Atec JDSU-OLP-34-35-38 User Manual, 4 strony
Exfo-FOT-932X Instrukcja Użytkownika   Atec Exfo-FOT-932X User Manual, 8 strony
Exfo-PPM-350B-EG Instrukcja Użytkownika   Atec Exfo-PPM-350B-EG User Manual, 4 strony
JDSU-FIT Series Instrukcja Użytkownika   Atec JDSU-FIT Series User Manual, 4 strony
Fluke-Certifiber Instrukcja Użytkownika   Atec Fluke-Certifiber User Manual [en] [fr] , 8 strony
JDSU-T-Berd2000 Instrukcja Użytkownika   Atec JDSU-T-Berd2000 User Manual, 4 strony
JDSU-4000 Instrukcja Użytkownika   Atec JDSU-4000 User Manual, 4 strony
Fluke-OmniScanner2 Instrukcja Użytkownika   Atec Fluke-OmniScanner2 User Manual, 2 strony