ColdFusion Markup Language

Cold Fusion Markup Language (CFML)
Paradigmimperative, object-oriented
Designed byJeremy Allaire, Joseph J. Allaire
DeveloperAdobe Systems (ColdFusion), Lucee Association (Lucee), New Atlanta and aw2.0 (openBD), The Railo Company (Railo)
First appeared1995; 29 years ago (1995)
Stable release
2023 Release / 2023; 1 year ago (2023)
Implementation languageJava
OSCross-platform
LicenseDepends on the implementation. Proprietary, LGPL, and GPL-licensed engines are all available.
Filename extensions.cfm, .cfc
Websitewww.adobe.com/products/coldfusion
Major implementations
Adobe ColdFusion, Lucee, Railo, BlueDragon, Open BlueDragon
Influenced
Lucee

ColdFusion Markup Language, more commonly known as CFML, is a scripting language for web development that runs on the Java virtual machine (JVM), the .NET framework, and Google App Engine. Several commercial and free and open-source software implementations of CFML engines are available, including Adobe ColdFusion, Lucee, New Atlanta BlueDragon (Java and .NET versions), Railo, Open BlueDragon, and other CFML server engines.

Synopsis

In its simplest form, like many other web scripting languages, CFML augments standard HTML files with database commands, conditional operators, high-level formatting functions, and other elements to produce web applications.[1][2] CFML also includes many other constructs including ColdFusion Components (CFCs), CFML's version of objects, that allow separating business logic from presentation.

CFML can be written using either tags or CFScript, which resembles JavaScript (ECMAScript).

The pages in a CFML application include the server-side CFML tags and functions in addition to HTML tags. Modern CFML applications also tend to have CFCs that are accessed by the CFML pages for executing business logic. When a web browser requests a page in a ColdFusion application, it is automatically pre-processed by the ColdFusion application server.[3]

CFML can also be used to generate other languages, aside from HTML, such as XML, JavaScript, CSS, and so on.

Despite the name, CFML is not a markup language. It is also not SGML, since certain core CFML features prevent it from complying.

The CFML engine is configured in such a way that certain file extensions on the server (.cfm, .cfc) are handed off to the CFML engine for processing. In the case of the Java-based engines this is accomplished via Java servlets. The CFML engine only processes CFML tags and functions; it returns text outside of CFML tags and functions to the web server unchanged.[4]

History

Named Cold Fusion at the outset, the software was created in 1995 by the Allaire Corporation, originally located in Minnesota. It later moved to Cambridge, Massachusetts and then finally to Newton, Massachusetts before being acquired by Macromedia in 2001. Allaire Cold Fusion thus became Macromedia Cold Fusion. At the release of version 4, the space in the name was removed to become ColdFusion. Adobe acquired Macromedia in 2005. As of 2023, it is still actively developing ColdFusion.

In 1998 Alan Williamson and his Scottish company, "n-ary", began creating a templating engine for Java to simplify common programming tasks.[5] Williamson was using curly-brace notation instead of tags, but when he saw an example of CFML and how it was solving similar problems (although not in Java) using a tag syntax, he started developing what would eventually become BlueDragon, which was the first Java implementation of the CFML language. (ColdFusion was written in C and C++ until version 6.0, the first Java-based version, was released in 2002.) New Atlanta licensed BlueDragon around 2001 and made it available as a commercial product, eventually creating a .NET implementation of CFML. Open BlueDragon is a fork of the commercial BlueDragon product and was first released in 2008.

The Railo CFML engine began as a student project in 2002 and was first launched as a commercial project in 2005.[6] Railo announced they were making the engine open source in 2008, and the first open source version was released in 2009.

On June 18, 2009, Adobe announced at the CFUnited conference that it had formed a CFML Advisory Committee[7] that would be responsible for guiding and reviewing changes to the CFML language. This effort was disbanded in 2010. The Google Group CFML Conventional Wisdom was created as a forum for open, public discussions about language and engine features; its use has dwindled since 2011.[citation needed]

In 2012, the OpenCFML Foundation was launched. Its function is to push open-source CFML applications and platforms.

Former Railo lead developer Michael Offner launched Lucee, a fork of Railo, in London on January 29, 2015. Backed by community supporters and members of the Lucee Association, the goal of the project is to provide the functionality of CFML using fewer resources, giving better performance and to move CFML past its roots and into a modern and dynamic Web programming platform.

Syntax

CFML tags have a similar format to HTML tags. They are enclosed in angle brackets (< and >) and generally have zero or more named attributes, though some tags (e.g. cfset, cfif) contain an expression rather than attributes. Many CFML tags have bodies; that is, they have beginning and end tags with text to be processed between them. For example:

<cfoutput>
   #value# Bob!
</cfoutput>

Other tags, such as cfset and cfftp, never have bodies; all the required information goes between the beginning (<) character and the ending (>) character in the form of tag attributes (name/value pairs), as in the example below. If it is legal for tags not to have a body, it is syntactically acceptable to leave them unclosed as in the first example, though many CFML developers choose to self-close tags as in the second example to (arguably) make the code more legible.

<cfset value = "Hello">
<cfset value = "Hello" />

Even if the tag can have a body, including a body may not be necessary in some instances because the attributes specify all the required information. In these cases, as with the second example above, the end tag (and hence, the tag body) may be omitted and the tag may be self-closing as in the following example:[8]

<cfexecute name="C:\\winNT\\System32\\netstat.exe" arguments="-e" outputfile="C:\\Temp\\out.txt" timeout="1" />

Various tags offer the ability to type-check input parameters (e.g. cffunction, cfparam, cfqueryparam) if the programmer declares their type specifically. This functionality is used with cfqueryparam to secure web applications and databases from hackers and malicious web requests such as SQL injection.

Built-in tags

Nearly 100 tags and many more functions make up the heart of the CFML language. The following lists CFML tags by their function or purpose.[9]

Custom tags

CFML allows language extensions in the form of custom tags, which are tags created by the developer that are not part of the CFML language itself. Custom tags are regular CFML files which are intended to be invoked as tags, although it is possible to treat a template as both a custom tag and a regular template. Custom tags are written in CFML and are typically invoked by prefixing the custom tag's file name with cf_, although there are other ways to invoke custom tags.

If a template is invoked as a custom tag, the attributes used to invoke that tag are available within the tag in an attributes scope and the variables for the calling page are accessible via the caller scope.

For example, if writing a custom tag to perform addition, taking two attributes and adding them together, the tag would be an addition.cfm file which could look like this:

<cfset caller.addition = attributes.first + attributes.second />
<cfexit method="exitTag" />

Assuming the tag is in the same directory as the file (or in a pre-defined customtags directory), it can be invoked thus:

<cf_addition first="1" second="2">

CFX tags are custom tags which are developed using Java or C++, and are prefixed with cfx_ just like cf_. Java and C++ tags are added to the CFML runtime environment using the CFML engine's administrator or by editing configuration files.

On some CFML engines JSP tags can also be included in CFML pages using the <cfimport> tag.[citation needed]

Functions

ColdFusion Markup Language includes a set of functions that you use to perform logical and arithmetic operations and manipulate data.

function reference code
Array [10] (ArraySort, ArrayAppend, ArrayDeleteAt...)
Conversion [11] (URLEncodedFormat, ToString...)
Date and time [12] (LsTimeFormat, DateAdd, DateDiff...)
Decision [13] (IsDefined, IIF...)
Display and formatting [14] (CJustify, NumberFormat...)
Dynamic evaluation [15] (DE, Evaluate...)
Extensibility [16] (CreateObject, ToScript...)
Image [17] (ImageRotate, ImageAddBorder...)
International functions [18] (SetLocale, GetTimeZoneInfo...)
List [19] (FindOneOf, ListSetAt...)
Mathematical [20] (Randomize, Sqr...)
Other functions [21] (WriteOutput, GetBaseTemplatePath...)
Query [22] (QueryAddColumn, QuerySetCell...)
Security [23] (Encrypt, Decrypt...)
String [24] (Reverse, HTMLCodeFormat...)
Structure [25] (StructKeyExists, StructDelete...)
System [26] (GetTickCount, GetTempFile...)
XML [27] (XMLParse, GetSOAPResponse...)

ColdFusion Components (CFCs)

CFCs provide some (not all) of the typical features and functionality that are provided by object-oriented (OOP) languages. To create a CFC:

Create a file with a .CFC extension (this distinguishes CFCs from ColdFusion templates, which have a .CFM extension).
Use four tags to create the components, define their functions and arguments, and return a value.
<cfcomponent>: Defines a CFC
<cffunction>: Defines the functions (methods) within a CFC
<cfargument>: Defines the arguments (parameters) that a function accepts
<cfreturn>: Returns a value or result from a function

CFCs are plain CFML. Within a CFC any CFML tag, function, custom tag, other components, etc. may be used.

CFCs can be used in various ways. If a method contained in a CFC simply needs to be invoked, the <cfinvoke> tag will create an instance of the CFC, invoke the desired method, and then destroy the instance of the CFC. <cfinvoke> takes the name of the component (minus the .cfc extension) and the method to execute. To access any returned data, the RETURNVARIABLE attribute provides the name of a variable to contain whatever the function returns. CFCs are created using four tags, saved as .CFC files, and invoked using the <cfinvoke> tag.[28]

In the example below, component temperature.cfc has a method FtoC which converts temperature from Fahrenheit to Celsius. The test.cfm template invokes the method and converts 212 degrees Fahrenheit and outputs the result.

<!--- temperature.cfc --->
<cfcomponent>
  <cffunction name="FtoC" access="public" returntype="numeric">
    <cfargument name="fahrenheit" required="yes" type="numeric" />
    <cfset answer= (fahrenheit - 32)*100/180 />
    <cfreturn answer />
  </cffunction>
</cfcomponent>
<!--- test.cfm --->
<cfset fDegrees = 212 />
<cfinvoke component="temperature" method="FtoC" returnvariable="result">
  <cfinvokeargument name="fahrenheit" value="#fDegrees#" />
</cfinvoke>
<cfoutput>#fDegrees#&deg;F = #result#&deg;C</cfoutput> <br />

CFCs may also be instantiated as objects. Assuming a CFC file called Person.cfc, an instance of this CFC would be instantiated as follows:

<cfset person = CreateObject("component", "Person") />

CFCs also form the basis of the ability to create web services in CFML. A CFC is created in the usual way, and the attribute access="remote" added to any function within the CFC will make that function available to be called as a SOAP-based web service. The CFML engine auto-generates a WSDL and creates all the necessary stubs for the web service to function.

References

  1. ^ Adobe ColdFusion 8 – About Internet applications and web application servers Archived 2012-05-13 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  2. ^ Open BlueDragon Manual. Openbd.org. Retrieved on 2013-09-17.
  3. ^ Smith, Michael What is ColdFusion? fusionauthority.com
  4. ^ Tags Archived March 24, 2008, at the Wayback Machine
  5. ^ Open BlueDragon Steering Committee Interview Series – Alan Williamson. alan.blog-city.com
  6. ^ About Railo Archived 2011-06-30 at the Wayback Machine. Getrailo.org. Retrieved on 2013-09-17.
  7. ^ http://corfield.org/entry/CFML_Advisory_Committee Archived 2009-01-07 at the Wayback Machine CFML Advisory Committee – An Architect's View. Corfield.org. Retrieved on 2013-07-21.
  8. ^ Tag syntax Archived May 27, 2008, at the Wayback Machine
  9. ^ Tags by function Archived 2008-05-09 at the Wayback Machine. (PDF) Retrieved on 2013-09-17.
  10. ^ Array functions Archived 2008-12-10 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  11. ^ Conversion functions Archived 2008-12-08 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  12. ^ Date and time functions Archived 2008-12-02 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  13. ^ Decision functions Archived 2009-02-01 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  14. ^ Display and formatting functions Archived 2008-12-20 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  15. ^ Dynamic evaluation functions Archived 2008-12-07 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  16. ^ Extensibility Archived 2009-02-14 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  17. ^ Image functions Archived 2009-01-31 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  18. ^ International functions Archived 2009-02-08 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  19. ^ List functions Archived 2008-12-10 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  20. ^ Mathematical functions Archived 2008-12-07 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  21. ^ Other functions Archived 2009-01-30 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  22. ^ Query functions Archived 2009-02-21 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  23. ^ Security functions Archived 2008-12-05 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  24. ^ String functions Archived 2009-01-29 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  25. ^ Structure functions Archived 2009-02-14 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  26. ^ System functions Archived 2009-02-01 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  27. ^ XML functions Archived 2009-02-20 at the Wayback Machine. Livedocs.adobe.com. Retrieved on 2013-09-17.
  28. ^ Forta, Ben Using ColdFusion components. adobe.com

Read other articles:

artikel ini perlu dirapikan agar memenuhi standar Wikipedia. Tidak ada alasan yang diberikan. Silakan kembangkan artikel ini semampu Anda. Merapikan artikel dapat dilakukan dengan wikifikasi atau membagi artikel ke paragraf-paragraf. Jika sudah dirapikan, silakan hapus templat ini. (Pelajari cara dan kapan saatnya untuk menghapus pesan templat ini) SMA Kristen 1 BPK PENABUR BandungInformasiDidirikan1965JenisSwastaKristen ProtestanAkreditasiA (Amat Baik)Nomor Pokok Sekolah Nasional20219730Kepa...

 

Auditorium of the former Transperience transport museum, February 2010 Transperience was a short-lived museum of passenger transport located at Low Moor, in the south of Bradford in West Yorkshire, Northern England. It opened in July 1995, but closed only 2 years later in October 1997, with debts of over £1 million.[1] Museum The museum was built on the site of Low Moor railway station, (which had closed in 1965), at a cost of £11.5 million.[1] It included a 1,100-...

 

Cet article concerne l'entité administrative. Pour la région historique et culturelle, voir Occitanie (région culturelle). Pour les autres significations, voir Occitanie. Pour les articles homonymes, voir LRMP. Occitanie Logo du conseil régional d'Occitanie Blason Administration Pays France Siège du conseil régional Toulouse (siège principal)Montpellier (siège des assemblées plénières) Préfecture Toulouse Départements et collectivités territoriales Ariège (09)Aude (11)Aveyr...

1977 filmTutti defunti... tranne i mortiDirected byPupi AvatiScreenplay by Pupi Avati Antonio Avati Gianni Cavina Maurizio Costanzo[1] Story by Pupi Avati Antonio Avati Gianni Cavina Maurizio Costanzo Produced by Gianni Minervini Antonio Avati[1] Starring Gianni Cavina Francesca Marciano Carlo Delle Piano Greta Vayan CinematographyPasquale Rachini[1]Edited byMaurizio Tedesco[1]Music byAmedeo Tommasi[1]ProductioncompanyA.M.A. Film S.r.l.[1]Distri...

 

Untuk istana yang bernama sama di Malaysia, lihat Istana Negara, Jalan Duta. Istana NegaraIstana Negara ketika masih bernama Paleis te Rijswijk tahun 1925Informasi umumGaya arsitekturIndische Empire styleLokasiJalan Veteran, no. 17, Jakarta Pusat, IndonesiaMulai dibangun1796 Istana Negara merupakan Istana Kepresidenan Indonesia yang terletak di Jalan Veteran, Jakarta Pusat. Istana Negara juga terletak satu kompleks dengan Istana Merdeka yang letaknya di bagian selatan Istana ini. Dengan total...

 

Stara Sušica Localidad Stara SušicaUbicación de Stara Sušica en CroaciaCoordenadas 45°22′30″N 14°59′45″E / 45.375, 14.9958334Entidad Localidad • País Croacia • Condado Primorje-Gorski Kotar • Municipio Ravna GoraSuperficie   • Total 9,6 km² Altitud   • Media 731 m s. n. m.Población (2011)   • Total 262 hab.[1]​ • Densidad 21,35 hab/km²Huso horario UTC +1 • en verano UT...

  لمعانٍ أخرى، طالع رفائيل إيتان (توضيح). رافائيل إيتان معلومات شخصية الميلاد 11 يناير 1929(1929-01-11)تل عدشيم الوفاة 23 نوفمبر 2004 (75 سنة)ميناء أشدود تعديل مصدري - تعديل   رفائيل ايتان (بالعبرية: רפאל רפול איתן)‏ (11 يناير 1929 - 23 نوفمبر 2004) هو وزير إسرائيلي سابق ورئيس هيئة الأركان...

 

غراند إنكامينت     الإحداثيات 41°12′30″N 106°47′28″W / 41.208333333333°N 106.79111111111°W / 41.208333333333; -106.79111111111  تقسيم إداري  البلد الولايات المتحدة[1]  التقسيم الأعلى مقاطعة كربون  خصائص جغرافية  المساحة 1.60 ميل مربع4.136227 كيلومتر مربع (1 أبريل 2010)  ارتفاع 1910 مت...

 

U.S. Marine Corps Major General Wood Barbee KyleMG Wood B. Kyle, USMCBorn(1915-03-03)March 3, 1915Pecos, Texas, U.S.DiedOctober 25, 2000(2000-10-25) (aged 85)Carlsbad, California, U.S.AllegianceUnited States of AmericaService/branch United States Marine CorpsYears of service1936–1968Rank Major generalService number0-5369Commands heldCamp Pendleton4th Marine Division5th Marine Division3rd Marine Division4th Marine Regiment1st Battalion, 2nd MarinesBattles/warsYangtze PatrolWor...

Berikut daftar Kepala Daerah dan Wakil Kepala Daerah di 12 kabupaten/kota di Riau adalah: Kabupaten/Kota Foto Bupati/Wali Kota Bupati/Wali Kota Foto Wakil Bupati/Wali Kota Wakil Bupati/Wali Kota Mulai Menjabat Selesai Menjabat(Direncanakan) Ref KabupatenBengkalisDaftar Bupati/Wakil Bupati Kasmarni Bagus Santoso 26 Februari 2021 26 Februari 2024 [1] KabupatenIndragiri HilirDaftar Bupati/Wakil Bupati Herman(Penjabat) 23 November 2023 MenungguPemilihan umum Bupati Indragiri Hilir 2024 &#...

 

В Википедии есть статьи о других людях с фамилиями Гандельсман и Журбин. Александр Журбин Основная информация Имя при рождении Александр Борисович Гандельсман Дата рождения 7 августа 1945(1945-08-07) (78 лет) Место рождения Ташкент, Узбекская ССР, СССР Страна  СССР Р...

 

Japanese manga series Marriage RoyaleMarriage Royale manga volume 1.マリッジロワイヤル(Marijji Rowaiyaru)GenreHarem Light novelWritten byShingo HifumiIllustrated byAoi NishimataHiro SuzuhiraPublished byASCII Media WorksMagazineDengeki G's MagazineDemographicMaleOriginal runJanuary 2006 – May 2011 MangaWritten byNavelIllustrated byKoko NatsukiPublished byASCII Media WorksMagazineDengeki G's MagazineDemographicSeinenOriginal runApril 2007 – January 201...

2019 single by Nicki Minaj MegatronSingle by Nicki MinajReleasedJune 21, 2019 (2019-06-21)Genre Dancehall[1] hip hop[2] Length3:11Label Young Money Cash Money Republic Songwriter(s) Onika Maraj Brittany Chi Coney Denisia Blu June Andrews Haldane Wayne Browne Pop Wansel Producer(s) Pop Wansel Nova Wav (add.) Nicki Minaj singles chronology BAPS (2019) Megatron (2019) Extravagant (2019) Music videoMegatron on YouTube Megatron (stylized in all caps) is a song by Tri...

 

The neutrality of this article is disputed. Relevant discussion may be found on the talk page. Please do not remove this message until conditions to do so are met. (April 2022) (Learn how and when to remove this template message) The Cathedral College of the Immaculate Conception in 2012. Cathedral Seminary House of Formation was a Roman Catholic seminary college in the Douglaston, Queens section of New York City. It was founded in 1914 as a minor seminary for the Diocese of Brooklyn, eventua...

 

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article possibly contains original research. Please improve it by verifying the claims made and adding inline citations. Statements consisting only of original research should be removed. (May 2020) (Learn how and when to remove this template message) This article is missing information about history, usage and impact of its topic. Plea...

Sports season2013–14 Mid-American Conference men's basketball seasonLeagueNCAA Division ISportBasketballNumber of teams12Regular seasonLeague championsWestern Michigan and ToledoSeason MVPJavon McCreaTournamentChampionsWestern Michigan  Runners-upToledoFinals MVPDavid BrownMid-American men's basketball seasons← 2012–132014–15 → 2013–14 Mid-American Conference men's basketball standings vte Conf Overall Team W   L   PCT W   L   PCT East Buffa...

 

Greyfriars Kirk pre-restoration William Wishart (secundus) (1691/92–1753) was a Scottish clergyman who served as the Principal of Edinburgh University from 1736 to 1753. He served as Moderator of the General Assembly for the Church of Scotland in 1745. Life Engraving of the kirk as it looked before 1785 The grave of Rev William Wishart, Greyfriars Kirkyard (Covenanters Prison) He was born in Leith the son of William Wishart where his father was minister of South Leith Parish Church. In 1707...

 

У этого термина существуют и другие значения, см. Варшавский договор (значения). Варшавский договор Тип договора мирный договор, договор о союзе Дата подписания 18 (по шведскому календарю) (28) ноября 1705 года Место подписания Варшава Подписали Шведская империя, Ре...

Ci DurianTji Doerian, Chi Kandi, Tji kandi, Cikande, Tji kandeLokasiNegara IndonesiaProvinsiBantenCiri-ciri fisikHulu sungaiPuncak Kondang (Taman Nasional Gunung Halimun Salak) - lokasiperbatasan Banten dan Jawa Barat - koordinat6°42′39″S 106°27′06″E / 6.7108°S 106.4516°E / -6.7108; 106.4516 - elevasi1.850 m (6.070 ft) Muara sungaiLaut Jawa - lokasiTanara, Serang - koordinat6°01′27″S 106...

 

Korean noble (1870–1917) In this Korean name, the family name is Yi. Prince Yeongseon영선군永宣君Duke of UnhyeongungReign1912–1917PredecessorPrince Imperial HeungSuccessorYi UBorn23 July 1870Unhyeongung, Hanseong, Kingdom of JoseonDied22 March 1917 (1917-03-23) (aged 46)Unhyeongung, Keijō, Keiki-dō, Korea(today Seoul, South Korea)SpouseLady HongLady KimFatherPrince Imperial HeungMotherLady Hong of the Pungsan Hong clanReligionConfucianismMilitary careerService/branchMili...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!