Archive for July, 2009

Open CFC

You will see a small icon at the top toolbar which looks like this :
This icon is the “Open CFC” icon. Clicking this icon will list all the CFCs opened in the navigator view. Lets say you have n no of projects opened in the navigator and you want to quickly refer to a method in one of the CFCs. Instead of finding the project and then searching for the CFC from so many in the Project, just click this icon and the list of open CFCs will be available.
Not just that, all these CFCs are listed with their fully qualified names making it easier for you to choose.
Good things indeed come in small packages… :)

Adobe Dev Summit 2009

Adobe Dev Summit, 2009 has been announced. The summit is on 4th August, 2009 at Lalit Ashok, Bangalore. I will be speaking there on “Whats new in ColdFusion 9″ specifically covering CFBuilder.
You can sign up for a Gold pass, which is absolutely free. You can also sign up for a Platinum pass and get Flex Builder 3 Professional license for free.
What’s in this Dev Summit for you?
See the new, improved and rocking LiveCycle Data Services 3 in action! If you are a Java developer, you wouldn’t want to miss this one!
If you are a PHP/Java developer, get on the RIA expressway using the new Data Centric Development features on Adobe Flash Builder 4
If you’re into enterprise-wide RIA development, things have just got hot! Check out the brand new version of ColdFusion with the sparkling new developer IDE – ColdFusion Builder.
User Interfaces are a thing of the past now. Build User Experiences of tomorrow with Adobe Flash Catalyst. Quicker than ever!
Sign up for a Platinum Pass and get the award winning Adobe Flex Builder 3 Professional license worth USD 699 FREE!
Please find more details and register here http://www.endtoend.in/ete2009/adobe/devsummit/mailer.html.

Apply CF Nature

I am sure most of you must be aware but still wanted to pen this one down.
This one’s specifically for converting your non-CF or non-CFBuilder Project into a CF Project.
If you wish to work on your existing projects in CF Builder, i.e. the projects that were created using any other IDE, then these projects will not open as CF Projects. They will be generic projects. Which means you need to convert them to CF Projects in order to use all the features(Editor features/Preview/Debug/Extensions etc) of CFBuilder.
This can be done in two ways:
1. Import Project: You can import the existing project that you wish to work on. When you are on the Import Project Wizard, enable the “Show All Projects” checkbox.
This will enable the “Apply CF Nature…” optoin. Select that one as well.
Now your project is ready to get imported as CF project.
1.JPG
2. You have a project in the workspace already on which you were working prior to using CF Builder(or you imported one w/o applying CF nature) and now you want to continue working on it. For converting this Project into a CF Project right click on the Project and “Apply CF Nature”.
This should also convert your project to a CF Project.
2.JPG
Simple and Handy!
P.S.: To identify that a Project in the workspace is a CF Project just check if the folder icon has a CF on it, like this   icon.JPG

Refactoring in ColdFusion Builder

Refactoring feature of ColdFusion Builder has been explained on
http://askjayvir.blogspot.com/2009/07/refactoring-in-coldfusion-builder.html

Setting Background color for comments

Many of you are used to Dreamweaver style color coding.
Check out a nice blog post by my colleague Sandeep Paliwal on setting back ground color for comments here.

Colorization of more than 500 columns in CFBuilder

Some people reported bugs saying CFBuilder does not seem to colorize more than 500 columns. This issue is majorly hit upon by people who have or write single line tag code spanning over many columns. This is not a bug. There is a setting in Preferences to get around this problem.
Go to Window->Preferences->HTML->Editors->Advanced tab->Set ‘Maximum no. of columns to colorize’ as per your requirement. Hope this helps.

Debugging in CFBuilder

Debugging in ColdFusion 8 was done using the CFDebugger (plugin on CFEclipse),This Debugger with a few more improvements is now a part of CFBuilder.
It is hence possible to create projects-preview them-debug them all under one roof.
The nicest part(and enhancement over the earlier debugger) is that its not mandatory for you to create debug configurations for each project, if you don’t create debug configs the CFBuilder will do it for you by default! We unofficially call this ‘Single Click Debugging’
I have uploaded a video of Local and Remote Debugging in CFBuilder so that its easier to follow the steps and you don’t get lost reading the essays :)
Just a note, the most essential requirement to debug is to Enable Debugging in CF Administrator so don’t miss checking that part of the video as well.
Video:
Using ColdFusion Debugger
Suggestions are welcome!

Code hyperlinking

Have you tried this out? This is a handy thing indeed and is one of my favorites. Code hyperlinking works on CFCs, UDF calls in local and included files, and CFC methods. Just doing a Ctrl+Click on the CFC or method name takes you to the CFC or the method code respectively. It also works on the template file in <cfinclude> tag. As for CFCs, it works within createObject(), <cfobject>, <cfinvoke>, new operator, and in ‘extends’ and ‘implements’ attributes of cfcomponent. Hyperlinking works with method calls in <cfdump> as well. In addition to these, if you have variables mapping for CFCs in your project, Ctrl+Click-ing on variable_name.CFC_method_name takes you to the method code.

Remote Server Setup – MultiServer/ J2EE installation

Remote server setup for a Multiserver is explained here. Its a long post but I hope its worth it :)
Setting up a Remote MultiServer:
What do you need: A Remote MultiServer, A local CFBuilder installation, AdminServerComponents.zip
Setup: Unzip only two files – admin_jvm.config, and adminstart.bat/adminstart.sh from the AdminServerComponents.zip in the JRun4\bin directory of the remote machine. Example: C:\JRun4\bin
Procedure:
Steps: On the Remote Machine:
A1. Connect to your remote machine(lets call it ‘bhakti04′) and ensure that the files adminstart.bat, adminstart.sh, admin_jvm.config have been extracted to {JRun4_home}\bin
A2. Change the security Properties file located at {JRun4_home}\lib and change the
jrun.subnet.restriction and jrun.trusted.hosts to *. This is done that there is unrestricted
access to your remote CF Server. You could even add the IP of the machine on which CfBuilder is running. But for the demo purpose I am going to make it *.
A3. Goto {JRun4_home}\bin and run the adminstart.bat(for Windows) or adminstart.sh(for MAC). A console will open and admin will start. Check the port on which the
admin is running.I am going to assume its ‘2910’ for further steps.

Steps: On the CFBuilder:

B1. Open the Add server Wizard.
B2. Fill the wizard fields as follows:
Screen 1:
Server Name: This is a user friendly name you want to give the remote server. I am going to call it. “Bhakti’s Desktop”
Description: The description for this server. I am going to say, ” This is a Standalone CF 8 server”
Host Name: The IP address or machine name. In my case, “bhakti04″
IsRemote: This should get automatically selected after entering the host name as “bhakti04″
Webserver port: The port on which your remote CF Server is running. Since my remote server is running on 8500, that would be my entry.
Context Root: If your install is a MultiServer install then you can ignore this. but if the CFInstall is a J2EE installation then specify the context root.
Application Server Name: If your install is a MultiServer install then you can ignore this. but if the CFInstall is a J2EE installation then specify the Application Server Name here.
RDS UserName: User Name of the RDS Server. This is the uname/pasword you specified for RDS while installing ColdFusion Server. If you dont enter this, your remote datasources and files will not be available to CFBuilder. My RDS Uname is ‘admin’
RDS Password: RDS Password. ‘admin’ in my case.
Screen 2:
Naming Port: This is the naming port of the admin server.In step A3 I asked you to keep a note of this one. Default is 2910 and so is it in my case.
User Name: This is the JNDI User Name. You can find it in jrun-users.xml at {CFServer_Home}\runtime\servers\admin\SERVER-INF
Password: This is the JNDI password. Found at same as above.
Document Root: Document root of the CF Remote Server. Precisely the location where your CFIDE resides. Its “C:\ColdFusion8\wwwroot” in my case. Other examples: C:\Inetpub\wwwroot or \opt\htdocs\wwwroot
B3. Hit Finish
You might see the status as ‘Unknown’ for a second or so. In such cases you will also see the “Getting Server Status” in the bottom right corner.After the “Getting Server Status” action is completed, the status should be seen as “Running”.
In case your status is “Unknown” even after the above mentioned operation is over, just switch to the console to check if any error is thrown.
I have specified the errors that you might face in the previous post. Do have a look in case you have missed it.
Apart from those if you face any other issues then please feel free to add them as a
comment.

Remote Server Setup- Standalone

The Remote Server setup in CFBuilder has been a topic of discussion on the forums and the response received for the remote setup hasnt been very positive. I tried to answer as many questions on the forum as I could but still there always remains some ambiguity.The documentation team has worked very hard to be explanatory but looks like it isn’t enough.
This is yet another try to simplify things.
I want the readers here to co-operate with me for two things:
1. Please dont have any pre-followed process or assumptions in your mind before reading this post or the following ones on the same topic.
2. Try to follow the steps mentioned here to set up a remote server(may be just a mock) to get the satisfaction that you could actually connect to one. :)
Instead of talking in general about a remote server setup I am going to split this to explain the setup for Standalone Servers and MultiServers.
So those of you who are not interested in Standalone can skip this one and read the following post.
Setting up a Standalone Remote Server:
What do you need: A Remote Server, A local CFBuilder installation, AdminServerComponents.zip
Setup: Unzip the AdminserverComponents.zip in the remote CF Server Home directory. Example: C:\ColdFusion8
Disclaimer: In case your remote server is CF9-beta you don’t need this .zip file. Just directly goto Step A3 below.
Procedure:
Steps: On the Remote Machine:
A1. Connect to your remote machine(lets call it ‘bhakti04′) and ensure that the files adminstart.bat, adminstart.sh, admin_jvm.config have been extracted to {CFServer_Home}\runtime\bin
A2. Change the security Properties file located at {CFServer_Home}\runtime\lib and change the
jrun.subnet.restriction and jrun.trusted.hosts to *. This is done that there is unrestricted
access to your remote CF Server. You could even add the IP of the machine on which CfBuilder is running. But for the demo purpose I am going to make it *.
A3. Goto {CFServer_Home}\runtime\bin and run the adminstart.bat(for Windows) or adminstart.sh(for MAC). A console will open and admin will start. Check the port on which the
admin is running.I am going to assume its ‘2910’ for further steps.

Steps: On the CFBuilder:

B1. Open the Add server Wizard.
B2. Fill the wizard fields as follows:
Screen 1:
Server Name: This is a user friendly name you want to give the remote server. I am going to call it. “Bhakti’s Desktop”
Description: The description for this server. I am going to say, ” This is a Standalone CF 8 server”
Host Name: The IP address or machine name. In my case, “bhakti04″
IsRemote: This should get automatically selected after entering the host name as “bhakti04″
Webserver port: The port on which your remote CF Server is running. Since my remote server is running on 8500, that would be my entry.
Context Root: Not Applicable for Standalone
Application Server Name: Not Applicable for Standalone
RDS UserName: User Name of the RDS Server. This is the uname/pasword you specified for RDS while installing ColdFusion Server. If you dont enter this, your remote datasources and files will not be available to CFBuilder. My RDS Uname is ‘admin’
RDS Password: RDS Password. ‘admin’ in my case.
Screen 2:
Naming Port: This is the naming port of the admin server.In step A3 I asked you to keep a note of this one. Default is 2910 and so is it in my case.
User Name: This is the JNDI User Name. You can find it in jrun-users.xml at {CFServer_Home}\runtime\servers\admin\SERVER-INF
Password: This is the JNDI password. Found at same as above.
Document Root: Document root of the CF Remote Server. Precisely the location where your CFIDE resides. Its “C:\ColdFusion8\wwwroot” in my case. Other examples: C:\Inetpub\wwwroot or \opt\htdocs\wwwroot
B3. Hit Finish
You might see the status as ‘Unknown’ for a second or so. In such cases you will also see the “Getting Server Status” in the bottom right corner.After the “Getting Server Status” action is completed, the status should be seen as “Running”.
In case your status is “Unknown” even after the above mentioned operation is over, just switch to the console to check if any error is thrown.
I have tried to prepare a list of the kind of errors thrown while connecting to Remote Server
and how to recover from them.
1. jrunx.rmi.RemoteInvocationHandler; ….. – We used to have a Version field earlier in Server Wizard. But that was creating a confusion. In the proocess of removing it and using some logic, this message gets Thrown. It is an absolutley HARMLESS message and can be *IGNORED*
2. Unable to fetch server mappings. Reason: null – Again this message is a bug from our side. It is a Harmless message and can be IGNORED.
3. The connection to the remote JNDI server on Host XYZ at port 2910 has failed(as have all backup hosts listed, if any) – please verify thet the server is running and the NamingService is available. – This message is thrown if your admin server is not running on the remote machine. You need to ensure if step A3 is performed.
4. One case where the status is “Unknown” and the console says “Server is available, getting server status”. The Status still remains unknown after that.- Connect to the remote machine and check the console of the admin that we ran in step A3. If it says “Security Alert….. ” then your Security.properties is not set properly. Check what you need to do in Step A2 above.
Apart from all these if you face any other issues then please feel free to add them as a
comment.
Will write the post for Multi Server in a couple of Hours.