As I'm working with ColdBox, I was reminded just how handy snippets and trigger text can be. ColdBox has a metric ton of snippets available for CFEclipse, most of them with trigger text all ready to go. So I wanted to take a moment to go through how you can create your own snippets and trigger text to speed up common operations When to use snippets Sometimes it's just not worth writing a snippet. I could go nuts and create one for every CF function, but in the end I'd spend more time trying to remember my trigger text than
Read more...
Aggregated from: http://www.dansshorts.com/?day
Things have been rough on the work front lately, but I'm starting to finally move forward again. It's been about 6 months since I've actually built anything worth mentioning, and I'm finally starting to get back into it :) So today I'm working on a top secret app using ColdBox, ColdSpring, and Transfer, the super trifecta of ColdFusion development (that's my own personal opinion, your mileage may vary) and I'm starting to get the hang of it. I'm doing all of this development locally on my Mac using a VMWare installation of Windows Server 2003 and SQL Server 2005 with
Read more...
Aggregated from: http://www.dansshorts.com/?day
As I'm working with ColdBox, I was reminded just how handy snippets and trigger text can be. ColdBox has a metric ton of snippets available for CFEclipse, most of them with trigger text all ready to go. So I wanted to take a moment to go through how you can create your own snippets and trigger text to speed up common operations When to use snippets Sometimes it's just not worth writing a snippet. I could go nuts and create one for every CF function, but in the end I'd spend more time trying to remember my trigger text than I would coding. So building a snippet for a <cfset&cfgt; probably isn't worth your time, but building a snippet for a multi-line piece of code that you write constantly can save you a ton of time. Take the following code as an example: <tr> <th><label for="MyID">Form Label: </label></th> <td><cfinput type="text" name="MyName" id="MyID" value="#MyObject.getMyName()#" /></td> </tr> That's a common piece of code to drop into a form for saving an object back to the database, and entering those lines over and over again for each and every property of the object is both time-consuming and error-prone. The perfect job for a snippet. Retooling the Code Before actually opening the Snippets view and starting to add a new snippet, I usually take the code I want to create as a snippet, and rework it directly in CFEclipse before copy/pasting it into the Snippet view. The New Snippet dialog is cramped and hard to work in, so this makes the process a little smoother. Here's what my code looks like after refactoring it for use as a Snippet: <tr> <th><label for="$${ID}">$${Label}: </label></th> <td><cfinput type="$${Type:text|hidden|password|radio|checkbox}" name="$${Name}" id="$${ID}" value="$${Value}" /></td> </tr> Notice that I've replaced each of the changeable values of my original code to a Snippet variable. Replace name="MyName" with name="$${Name}" will cause Eclipse to display a dialog for me to fill in the blanks when I insert the snippet. Also, the type Snippet variable is followed by a pipe separate list of prefilled values that I can choose from when I insert this snippet, making it even less error prone and fast. Creating the Snippet Now that I have my code ready to go, I can create my snippet. The first thing to do is to make sure you have the Snip Tree View panel available to you in Eclipse. You can enable this view by choose Window > Show View > Other, and then choosing Snip Tree View from the CFML category. After that's complete you should see your Snip Tree View and you can drag it wherever you'd like within the interface. To keep things organized you click click the box looking icon (Create a new snip package) in the toolbar for the panel to create new folders. I'm going to create a Layout folder and then a Forms folder to hold my new snippet. After creating the new folders, select the Forms folder and click the Plus icon to create a new Snippet. You can see there's a lot of information here to work with: Snippet Name: this will display in the Snippets panel so you can easily find your newly created workflow enhancer Trigger Text: the Trigger Text value is a short value that you can use in Eclipse to quickly add the snippet using a shortcut key. I'll cover that at the end. Snippet Description: A description of just what this snippet does. Snippet start block: If your snippet is designed to wrap around something, this is what would go before the selection in the Eclipse editor window. If your snippet isn't design to wrap around something, this is where you'll put the full text of your snippet. Snippet closing block: The closing block of your snippet, if it has one. Use this snippet as a file template: You can actually create entire files from a single snippet. I've been using these to create my base Gateways and Service objects so that I don't have to type as much, and I never forget the code that every single one of them needs. Template extension: If you're going to create a file template, this is the file extension it'll get So now that we know all of that information. This is what my newly created snippet is going to look like with the dialog completed: Using the Snippet There are two ways to use snippets. The first is by simply finding it in the Snip Tree view and double clicking the snippet. This is how you'll have to do use if you have a snippet that has a start and closing block and you want it to wrap around your current selection. The second way is to use the trigger text (my preferred method). To use snippet trigger text, simply type the trigger text (in our case inprow) into the Eclipse editor, and with the cursor at the end of the trigger text, press Ctrl/Cmd + J to activate the snippet. Now you should see the snippet dialog with fields for each of the variables you declared: Now just complete the form and click OK and you have all of your code complete and ready to go: Hopefully this little tutorial helps you become more efficient with Eclipse. Happy coding!
Read more...
Aggregated from: http://www.dansshorts.com/?day
Things have been rough on the work front lately, but I'm starting to finally move forward again. It's been about 6 months since I've actually built anything worth mentioning, and I'm finally starting to get back into it :) So today I'm working on a top secret app using ColdBox, ColdSpring, and Transfer, the super trifecta of ColdFusion development (that's my own personal opinion, your mileage may vary) and I'm starting to get the hang of it. I'm doing all of this development locally on my Mac using a VMWare installation of Windows Server 2003 and SQL Server 2005 with Eclipse as my development IDE of choice. As I move forward, I'm hoping to have the time to post some of my thoughts here on how it all fits together. I've done lots of OO programming over the last two years, but nothing quite like the "pure" MVC that ColdBox and the rest of the frameworks work within. I've generally developed with a View and a Model, but never with the controller in the middle. The new app I'm working on will have external non-CF clients that will need access to the model and a completely different set of views, so I think this is really going to take my development skills to the next level. So as I move forward, my sincere thanks (already) to Luis Majano and Mark Mandel for all the work they do in both building and supporting their frameworks.
Read more...
Aggregated from: http://www.dansshorts.com/?day
After seeing that MX Unit on Railo had some issues, I switched over to ColdFusion and I'm impressed. Marc, Bill, et al have done a really great job. They've resolved a number of issues that I had with CFCUnit, and really embraced the "Integrated" in "Integrated Development Environment." I know I'm late to the party, but [...]
Read more...
Aggregated from: http://www.barneyb.com/barneyb
After seeing that MX Unit on Railo had some issues, I switched over to ColdFusion and I'm impressed. Marc, Bill, et al have done a really great job. They've resolved a number of issues that I had with CFCUnit, and really embraced the "Integrated" in "Integrated Development Environment."
I know I'm late to the party, but it's good stuff. When I was doing a lot of Java, having JUnit right there as a fast view in Eclipse was great. Having to go launch a browser, find the runner app, type in the test case I wanted, and then hit submit with CFCUnit just seemed to stupid. And if you don't want (or maybe don't have) the plugin for a specific test, running it from the browser is a snap. Just hit the 'runTestRemote' method of the CFC and you're done. No external runner app required.
One thing that I found confusing was webroot, component path, and facade location settings. It seems focused on one Eclipse install per CF instance, while I pretty much run one project per CF (or Railo) instance. And having to specify the remote facade explicitly seems unnecessary. You should be able to give it at the root URL of the application, and it'll figure out the default one from there. Obviously specifying a full path would be desired, but for the default, having to figure out what to type seems unnecessary. Once I figured it all out, it wasn't a big deal, but it seemed like more work than it ought to be.
Finally, the UI is kickass. Not that a web-based test runner really needs a nice interface, but it's appreciated. And having the ability to switch between the rich Ext-based UI and the simple HTML one (along with the XML formats) is appreciated.
I just pulled down the 1.0 release of MX Unit, and was most disappointed to see that it only works on ColdFusion: ...no definition for the class with the specifed name [coldfusion.cfc.CFCProxy] could be found... Since I do most of my CFML development on Railo now, it kind of leaves me stuck. Fortunately, CFCUnit works flawlessly, but [...]
Read more...
Aggregated from: http://www.barneyb.com/barneyb
Back in February I wrote a blog post on SQL Injection that included an example of how a malicious user might inject into a character field even though ColdFusion escapes single quote marks. The attack involved other forms of escaping single quotes... [More]
Read more...
Aggregated from: http://www.coldfusionmuse.com/
I just pulled down the 1.0 release of MX Unit, and was most disappointed to see that it only works on ColdFusion:
...blah... no definition for the class ... [coldfusion.cfc.CFCProxy] could be found ...blah...
Since I do most of my CFML development on Railo now, it kind of leaves me stuck. Fortunately, CFCUnit works flawlessly, but with it's definitely the less compelling choice of the two.
Alright Adobe... Time to step up to the plate. Mozilla is putting their full support behind Firebug and creating a new team. Shouldn't Adobe do the same with CFEclipse? It's obvious that Homesite+ and Studio are gasping for air and Dreamweaver sure doesn't fill the gap. Come on Adobe. Help Mark Drew out!
Read more...
Aggregated from: http://www.schmittworks.com/bl
ColdFusion Event Gateway Reference : getData Description Returns the data Map that contains the message contents and other gateway-specific information. Category Event Gateway Development Syntax Map getData() See also setData, CFML CFEvent structure, "CFEvent class" in the ColdFusion Developer's Guide Returns The event data structure, or null. This structure includes the message contents being passed by the gateway and any other gateway-specific information. Usage The contents of the data Map depends on the event gateway type. Typical fields include the message contents, originator ID, destination ID, and if a gateway (such as the ColdFusion SMS gateway) supports multiple commands, the
Read more...
Aggregated from: http://feeds.feedburner.com/~r
ColdFusion Event Gateway Reference : getCFCTimeout Description Gets the time-out, in seconds, for the listener CFC to process the event request. Category Event Gateway Development Syntax String getCFCTimeout() See also getCFCMethod, getCFCPath, setCFCTimeout, CFML CFEvent structure, "CFEvent class" in the ColdFusion Developer's Guide Returns The listener CFC time-out, in seconds, as set by the setCFCTimeout method, or null. Usage Most gateways do not need to use this function. When ColdFusion calls a listener CFC method to process the event, and the CFC does not process the event in the specified time-out period, ColdFusion terminates the request and logs an error
Read more...
Aggregated from: http://feeds.feedburner.com/~r
ColdFusion Event Gateway Reference : getCFCPath Description Gets the path to the listener CFC that processes this message. Category Event Gateway Development Syntax String getCFCPath() See also getCFCMethod, getCFCTimeout, setCFCPath, CFML CFEvent structure, "CFEvent class" in the ColdFusion Developer's Guide Returns An absolute path to the application listener CFC that will process the event, as set by the setCFCPath method. If the setCFCPath method has not been called, returns null, not the path specified in the ColdFusion Administrator and used by default by gateway services. Outgoing messages that are returned by a CFC in response to an incoming message also
Read more...
Aggregated from: http://feeds.feedburner.com/~r
ColdFusion Event Gateway Reference : getCFCMethod Description Gets the name of the CFC method that processes the message. Category Event Gateway Development Syntax String getCFCMethod() See also getCFCPath, getCFCTimeout, setCFCMethod, CFML CFEvent structure, "CFEvent class" in the ColdFusion Developer's Guide Returns For incoming messages, the name of the method that gateway services will call in the listener CFC, as set by the setCFCMethod method. If setCFCMethod has not been called, returns null, and not onIncomingMessge, which ColdFusion gateway services uses by default. Outgoing messages that are returned by a CFC in response to an incoming message also have the CFC
Read more...
Aggregated from: http://feeds.feedburner.com/~r
ColdFusion Event Gateway Reference : getGatewayID Description Returns the gateway ID field of the CFEvent object. Category Event Gateway Development Syntax String getGatewayID(CFEvent event) See also CFEvent, CFML CFEvent structure, "CFEvent class" in the ColdFusion Developer's Guide Returns The gateway ID of the CFEvent object, or null. Usage Most gateways do not need to use this method. The gateway ID is set in the CFEvent constructor and normally corresponds to the gateway that is handling the event.
Read more...
Aggregated from: http://feeds.feedburner.com/~r
For the most part, migrating your ColdFusion site from Microsoft's SQL 2000 server to SQL 2005 is a snap. Import the databases from 2000 to 2005, re-point your data sources to the new instance using the ColdFusion Administrator and you are done. N... [More]
Read more...
Aggregated from: http://www.coldfusionmuse.com/
Use the getFileInfo() function.
GetFileInfo returns a structure with the following information: filename, path, parent directory, type, size, when the file was most recently modified, whether the file has read permission, write permission, and is hidden.
Read more...
Aggregated from: http://www.coldfusioncookbook.
I received a response back from Adobe early this morning about the new case sensitivity issue that I have been dealing with that appeared in a hot fix applied to a ColdFusion 8.0.1 instance. The response pointed me to a newly created Adobe Tech No...
Read more...
Aggregated from: http://www.mkville.com/blog/in
ColdFusion Positions In Chennai and Hyderabad(India) " Petra Technologies Inc (Chennai, India) is looking for a ColdFusion Consultant with minimum Experience. Requirements include 10G Oracle Database, MVC Framework skills, as well as Knowledge...
Read more...
Aggregated from: http://www.akbarsait.com/blog/
Last night was the kickoff meeting for D-Flex which is the Dallas Flex User Group. This meeting was planned in conjunction with the Flex 3 Launch and featured a presentation by local Flex guru Mark Pillar, of Midnight Coders, Inc who delivered a presentation that was created by Adobe. As he went through the presentation, I took some very high level notes in bullet point format. One thing of note specific to ColdFusion - Not *once* in Adobe's presentation materials did they even give the slightest mention to CF and how gracefully it natively interacts with Flex. As a CF
Read more...
Aggregated from: http://daveshuck.instantspot.c