ColdFusionMX programming guide basic management operations and getting started

Source: Internet
Author: User

Phase II:Basic management operations and entry-level programs

Preface

Before explaining the basic management operations and getting started procedures of ColdFusion MX, let's take a look at the differences between different ColdFusion MX versions. Currently, ColdFusion MX is divided into two parts: the commercial version and the developer version. The commercial version also includes the Professional edition and the Enterprise Edition. As the name suggests, the developer version is provided to individual developers. This version has some functional limitations. For example, the developer version of ColdFusion MX Server imposes restrictions on the ip addresses accessed at the same time, there is no support for Macromedia Cluster (web Server Load balancer), and there are also some enterprise-level functions, both developer and professional editions are not available. In addition, ColdfusionMX has a version tailored to the J2EE platform, such as weblogic and websphere. The following is a detailed description of the differences between Coldfusion MX versions.


Part 1 Basic ColdFusion MX management operations

From the content in the first phase, we learned about the structure of ColdFusionMX, so what about ColdFusionMX? /SPAN> before coding ColdFusionMX scripts, we must first learn how to configure our ColdFusionMX server. This part explains the basic knowledge of ColdFusionMX management, and each detailed department will be explained in the actual programming in the future.

First, after ColdFusionMX is installed, enter the following address: http: // localhost: 8500/CFIDE/administrator/index. cfm, or click the start button and select the administrator option in Macromedia Coldfusion MX of the Program Group to open the management interface, as shown in:

If the Management Homepage is not displayed, perform the following operations to troubleshoot the problem:

1. Recall that you chose the Standalone mode during installation. In this tutorial, you can also choose to bind it with IIS, Apache, and other webservers during installation.

2. Check whether the port number is correct.

3. Check whether the related services in the management tool are started. In normal environments, three Macromedia Coldfusion MX related services should run.

4. List your own errors. Go to the ColdFusionMX section of the flash client exchange center or the DreamweaverMX section of the blue ideal classic forum for help. I believe our friends here will try to explain them to you as much as possible.

5. query related information on the Macromedia Website in English only. Be patient.

In short, if the installation process is fully followed by the first installation process, there will be no errors.

After you see the management interface above, enter the management password (this management password is set during installation and is case sensitive ). The following interface is displayed:

The figure above is the master management interface of ColdFusionMX, which consists of four parts. The upper left corner shows the two links that return to the Management Homepage and exit the management interface. Most text areas in the lower-right corner show different management content areas after you click different links in the six parts of the graph. They are the main parts of the management configuration, and the six parts of the management configuration, it will be explained one by one in the following content.

L The first part of the Management Interface

After clicking the above four links, you will see different cfmx-based information in the main part of the management interface. Documentation is mainly a document in English pdf, but it is very useful. It is very complete from installation to development. I will not repeat it here. I just want to remind you that some tags of cfmx are very different from those of coldfusion5. You can refer to the manual more when using cfmx. In the future, we will also talk about this with the tag explanation. TechNotes is the knowledge base for accessing the official website of Macromedia. If your operating system is Chinese, some Technotes Based on cfmx about Chinese will be opened, but you should not hold too much hope, currently, the Chinese technotes page is empty. After clicking Release Notes, you will see the resources and documents about coldfusionMX released by Marcomedia. For Chinese operating systems, visit http://www.macromedia.com/go/prod_releasenotesto obtain relevant information. Version Information is used to view the configuration of ColdFusionMX installed on your system. Indicates whether the version installed on the machine is developer, professional, and enterprise.

L the second part of the Management Interface

This section mainly involves configuring Server parameters for ColdFusionMX. The following is a brief introduction. Settings is used to configure a series of parameters for request access and error suspension. For example:

Limit simultaneous requests to n indicates the number of synchronous Requests received by the configuration server; Timeout requests after (seconds) n indicates the server request Timeout time. The standard unit is seconds, that is, if the request exceeds a certain period of time (in seconds), the server will automatically stop the request. Use UUID for cftoken to process transactions using the Globally Unique Identifier UUID when using the cftoken tag, UUID = Universally Unique Identifier; Enable HTTP status codes allows status encoding when the server does not handle error pages; Enable Whitespace Management allows the CFMX server to Enable space Management, for example, to compress unnecessary spaces and indentation to compress the capacity of the CFML page, Missing Template Handler provides the ability to create and pass common. cfm template method, that is, when the server finds that the request does not exist on the page The CFMX server displays a page containing Error information when an Error occurs in the Site-wide Error Handler by default, the difference between it and the previous one is that there are no pages and there are two types of page errors that can be defined separately compared with the browser display templates.

The Caching option is used to set the cache of the CFMX server. For example:

Template cache size (number of templates) n indicates the amount of memory used for Template cache. The default value is 1024. We recommend that you do not increase the value here too much when you do WebSite, or set it to 0, the actual values are determined based on the website's access conditions. After the Trusted cache is selected, it does not check whether the pages in the cache have been updated. This is not a good choice. Of course, if your website is not updated for a hundred days, we recommend that you check this option to accelerate the display of the web page; limit the maximum number of cached queries on the server to n indicates the number of queries stored on the CFMX end. the default value is 100. This will speed up the repeat of the same query.

Client Variables is a set of local information storage for visitors who access the site through a browser. Cookies and sessions in Asp are also available in CFMX. You can set them using this option. For example:

ColdFusionMX uses three methods to store customer variables. The first is the well-known cookie method, the second is to write Customer Variables to the system registry of the cfmx server, and the third is to select a database, add Customer Variables to the database. For beginners, the author only needs to remind you that you are not recommended to write customer variables into the registry, especially for highly interactive programs with forums and exchange centers on the site, for such a program, writing customer variables into the server registry will greatly reduce your site performance.

Memory Variables is used to manage the validity of the application and session in CFMX. In addition, it can also use Session Variables of J2EE. For example:

Maximum Timeout is the longest time-out period. It is defined here and cannot be overwritten by the settings in the page code, that is, the Maximum time for a Session to exist here is 2 days, in this case, you set a Session to be valid for three days. Default Timeout indicates that if you do not set the application and session Timeout on the page, the time here will take effect.

Mappings is a processing method that creates a name on the CFMX Server to represent the directory path. For example:

The figure shows that the root directory of the CFMX site points to the file in the path C: \ CFusionMX \ wwwroot \ in the physical path. Similarly, you can add a name to define the physical path of the header file to be referenced on your page. For example, add a/header that points to the path C: \ test \ headers.

The Mail Server is the CFMX Mail Server. In fact, it is best to use a third-party mailServer, such as Imail, instead of the Mail Server that comes with IIS, friends who have used it naturally have a clear understanding of its functions. For example:

If you are a beginner, enter 127.0.0.1 in MailServer. Do not forget to start the Mail server that comes with IIS in IIS manager. For other parameters, use the default setting. Also, check the Verify Mail Server Connection option to Verify whether the Mail Server is successfully connected.

Charting is the latest way to manage charts added to CFMX. The most exciting cfchart will be explained in subsequent tutorials. It replaces cfgraph and the functions of Macromedia Generator. The management interface is shown in the following figure:

We recommend that you use the default settings for beginners, especially when determining the Cache Type as not Disk Cache rather than Memory Cache. If your site uses a lot of cfchart, there are many generated charts, therefore, we strongly recommend that you use Disk Cache, and the website only has one or two charts. Therefore, Memory Cache can accelerate the display speed.

Java and JVM are the Java Virtual Machine Settings, which are not described here. You can use the default settings.

Archives and Deployment involve high-end applications. For example, if you configure your own files and submit them to the server for management, you can manage the files. the car method is stored in the machine and imported through the browse server. What information is contained in the documents that can be managed? Including file name and path, data source setting, Verity full-text search index, and so on. The management interface is shown in the following figure:

Settings Summary This is a report about the CFMX server configuration in real time.

L The third part of the Management Interface

The third part of the management interface includes data source settings, Verity full-text retrieval index management and maintenance, and Verity K2 Server full-text retrieval Server parameters. CFMX uses coldfusion and ,. net and Java generate standard web Services wsdl file management. As these four parts involve the actual development and programming work, the author will explain them in detail in the future.

L Management Interface part 4

As the name suggests, this part of content is the Server debugging and log management part. Debugging Settings provides developers with the configuration of how to configure the server so that CFMX displays the information and the configuration of what information is displayed after an error occurs on the page. For every piece of information, see the official document admin.pdf. The specific configuration is not provided here because each developer has different requirements for the Debugging program. However, I would like to remind you that if you need to Debug, You must select the first option Enable Debugging.

Debugging IP Addresses is for Team development, that is, your Team members can view the debug result through the allowed ip address. The default value is 127.0.0.1. If you are a beginner, you can use this default setting. If you are a team developer, you can consider adding an external ip address that allows access.

Logging Settings is used to configure parameters for viewing various logs. Developers with special requirements can view official documents or online help.

Log Files are used to view, delete, and add system Log Files.

Scheduled Tasks allows developers to periodically generate reports from dynamic data sources, which is very useful for enterprise development solutions, for example, regular generation of static sales reports from standard sales data.

System Probes helps developers understand the CFMX application status through simple settings, and generates reports for reference.

Code Analyzer naturally analyzes the Code. When you create a page, you can check whether there are incorrect syntaxes and tags. Of course, this function is not omnipotent, if there is a problem with your development logic, it cannot do anything.

L Part 5 and Part 6 of the Management Interface

The fifth part is the work to be done after the application of CFMX reaches an advanced stage, such as configuring the self-developed cfx tag and configuring the connector of CORBA. The sixth part is to re-Modify the CF admin password and the RDS Password required in DreamweaverMX and coldfusionStudio. In addition, you can also set the ColdFusionMX security.


Part 2 your first CF Program

Speaking of this, everyone may be impatient. After talking about so much management, no program can be seen. Don't worry. The following program will surprise you immediately. First, create a folder named cffirst under C: \ CFusionMX \ wwwroot \ (you can set this name by yourself ). Create a hello text file in cffirst and write the following code in the text file:

<Cfset var1 = "Hello ColdFusion! ">

<Cfoutput>

# Var1 #

</Cfoutput>

Then, change the suffix of the TXT file to the suffix of. cfm. Finally, enter:

Http: // localhost: 8500/cffirst/hello. cfm

OK !!! See what is displayed in the browser !!!

I think it is very difficult. If I think this programming method is still very difficult, I would like to advise you not to work on program development.

Here is a more complex example:

<! --- Set variables --->

<Cfset name = "hello">

<Br>

<! --- Output information --->

<Cfoutput> # name # </cfoutput>. Welcome to the CFMX world!

<Br>

<Cfquery datasource = "cfsnippets" name = "test">

SELECT Department

FROM Employees

Order by LastName

</Cfquery>

<Cfoutput name => # Email # <br> </cfoutput>

Save the file as hello2.cfm, and enter the following in the browser:

Http: /localhost: 8500/cffirst/hello2.cfm

Let's see what happened again. If you don't know what hello2.cfm has done, I can tell you that you have made a database query !!! Think about how much learning asp has taken in the Age of learning asp, and you have not yet understood asp database operations, so here we will implement it step by step. Hello2.cfm:

A friend who may have learned asp may ask, How can I output a field cyclically without doing loop processing? It's amazing. Don't worry. The tutorials will be more exciting in the future.

The third tutorial will explain how to get started with ColdFusion programming, including some basic syntaxes and basic process operations.

Part 3 resource list

For more information about the Macromedia MX series, visit:

Http://www.macromedia.com/

Http://www.macromediachina.com/

Http://www.flashempire.net/

Http://www.blueidea.com/

For more information about Macromedia policy analysis, visit:

Http: // 61.156.17.126/efe_news/newsread. php? Id = 123

To download the Macromedia MX series, visit:

Http://www.macromedia.com/software/trial_download/

* Macromedia ColdFusion MX and JRun4 can get the developer version on the official website for free. Compared with the commercial version, they only limit the developer version's ip access restrictions and server advanced report tools, server Load balancer and other advanced functions.

Note:

JRun4, ColdFusion MX, Flash MX, Dreamweaver MX, and Fireworks MX are all registered products of Macromedia.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.