Tech Blog

Author Archive

ColdFusion 9 and ColdFusion Builder public beta available now

by Rolando on Jul.13, 2009, under ColdFusion

Adobe has released ColdFusion 9 (Centaur) and ColdFusion Builder (Bolt) public beta versions today. As I write this post, I’m downloading the installers for both. I look forward to see the new features CF 9 brings us.

The new features that mostly caught my attention are:

  • Built-in ORM based on Hibernate, this is a great addition and probably the biggest change to the product. I’m a fan of Transfer ORM and thankful for all the work Mark Mandel has put into the project for the CF Community. I don’t know if the built-in ORM will be better than Transfer or not yet. But having a ORM built-in to CF is definitely a great option to have. Especially when working with clients that are skeptical or have policies against Open Source software.
  • Implicit getters and setters (finally!). This seemed obvious for sometime now. I’ve been using snippets to create the getters & setters for a long time but now I can better spend my time. One thing I hope and that is that the methods can be overwritten if needed.
  • Closed gap between CFML and CFSCRIPT.  I write most of my code in CFScript so this is a big one for me. I’m not sure exactly what this means but if it means I can do everything that CFML does using only CFScript then (whoohoooo!) this makes me extremely happy.
  • ColdFusion services exposed for Flex and AIR via Actionscript libraries.  This is powerful stuff and indeed one of the best additions to the product.

The ColdFusion Builder, which is based on the Eclipse IDE also looks very promising and is probably the most anticipated part of this release.  The community has been asking for a CF-IDE for sometime now, especially since the release of the Flex Builder.  With the CF Builder you will be able to manage servers and deploy projects right from the IDE by using FTP.  The IDE will also help by completing tags as you type and by listing things like datasources when typing “datasource=” inside a cfquery tag. For a list of the new features checkout the post by Ben Forta at http://www.adobe.com/devnet/coldfusion/articles/cfbuilder_whatsnew.html

To download the public beta version of the products visit http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_coldfusion9

Leave a Comment :, , , more...

EnvironmentConfig - About

by Rolando on Jun.03, 2009, under EnvironmentConfig

EnvironmentConfig (EC) aims to solve a problem developers face when using multiple tiers in the development lifecycle.  That is that each server/environment may have properties that do not match the other servers. For instance, in a three tier development setup (development, staging and production) you may find that the data-source names (DSN’s), mail server address and credentials, path to certain folders, etc. differ from server to server.  On each deployment or every time a patch is applied, the developer must ensure those variable properties are correct or else the application will break.  Ensuring each environment contains the right values for each property may become a tedious process, especially if the application evolves constantly.

EnvironmentConfig address this issue by allowing the developers define each environment and properties in an XML file once. This file is processed when the application starts and EC will automatically detect the environment the application is running at, based on the domain name. The environment’s specific properties are loaded and available to the developer for use in a several ways depending on configuration set.

stProperties

By default EC will return two structures with the properties set in the XML file. One follows the exact configuration set in the XML where you can declare both, simple values and structures of properties. This one is called stProperties .

stFlattened

stFlattened return the same properties and values as stProperties, however it flattens all structure properties and contains a single structure with all properties as single values.

GlobalConfig object

EC can be configured to create a GlobalConfig object (CFC). GlobalConfig is the default name but it can be named as desired and the path where is created can be set as well. If told to, EC will create this ColdFusion Component on the fly as a Bean with setters and getters for all the properties of that environment. The setters are set to private access while the getters are set to public encapsulating the properties and making them read-only through the life of the application.

You can choose to use any of the three options mentioned above to store and access the application properties. To make the accessible from anywhere in the application, you should place the selected option in the Application scope.

Notice that if the structures are used to handle the properties without the GlobalConfig object, these can be overwritten at anytime during the life of the application, while the properties are protected if the GlobalConfig object is used.

To Install EnvironmentConfig you can create a ColdFusion mapping to the EnvironmentConfig folder or just drop it in the root of your website.

Leave a Comment :, more...

EnvironmentConfig 1.1 - Beta

by Rolando on Jun.03, 2009, under EnvironmentConfig

EnvironmentConfig (EC) has been revamped and now gives you more power and flexibility to set an application properties. You can now use complex values (structures) as properties and reuse properties as variables throughout the config file. Another neat feature added to this version is the ability to use ColdFusion methods that return a simple value in the config (XML) file, as well as the ability to create a ColdFusion component (CFC) as a config Bean populated with the properties on the fly.

As of version 1.1 you can:

  • Use complex values as structures in the form of map->property (just like in ColdSpring). Thanks to Paul Marcotte for adding this functionality
  • Use ColdFusion functions to format or generate output. For instance you can use #expandPath("/uploads")# and you will get the absolute path of the folder as the value of a property like “C:\sites\mysite\assets\uploads”
  • Reuse properties as variables in the config file using the syntax ${propertyName}. For instance let’s say you have a folder path of /assets, but under assets you have /images, /videos, etc. You can now set a property for assets as
    <property name="assetsPath">/assets</property>
    then you can set the images and videos path as
    <propertyname="imagesPath">${assetsPath}/images</property>
    <property name="videosPath">${assetsPath}/videos</property>
  • EC now return two structures with the properties, one is a structure with sub-structures (if you use complex values) and another one flattened (thanks to Tom De Manincor)
  • Another new feature is that EC can create a properties Bean for you on the fly. So, if instead of using properties in a struct as properties.myProperty you can encapsulate them in a Bean object. The properties will be read-only and you would access them like GlobalConfig.getMyProperty(). You can specify where you want it written to by passing the object notation path as 'model.GlobalConfig', EC will create the file then under ‘/model’ as ‘GlobalConfig.cfc’  I prefer this over the structure as the application properties are read-only and no one can modify them during the application’s life.
  • If you use ColdSpring as your object factory, tell EC to create the ColdSpring definition file for you and all you have to do is add the include line at the bottom of your main ColdSpring file. From there on you can ask ColdSpring for the properties bean as you’d do with any other object.

This version still on Beta, but if you want to try it feel free to download it from the RIA Forge page http://environmentconfig.riaforge.org/

I look forward to getting feedback from you on features you’d like to see added. Report bugs at the RIAForge page.

Following will be a series of posts with samples of the multiple ways you can use EnvironmentConfig.

1 Comment :, more...

Adobe Certified Expert in Advanced ColdFusion 8 –arrived

by Rolando on Apr.22, 2009, under ColdFusion

The ACE certificate (or I should say, certificates) arrived in the mail yesterday!  For some reason I got two; one says Advanced the other one doesn’t.  I’m not sure if that’s how it was supposed to be but certainly, I’d have prefer to get two copies of the one with “Advanced” on it.

I’ve never been a big fan of certifications but they certainly help and many companies require them to give you the job. That is indeed why I got the certification (I’m still hapily with AboutWeb), because we needed it to get a contract. So, I finally had to confront the elephant in the room. Now, I only whish I had done this earlier.  Maybe my fear was the “what if”, but at the end I was “forced” to do it and got a score of 95%.

I’m glad I took it and encourange everyone in the CF Community to take the test.  Is good to have the peace of paper to back up your resume.  Think of it as a letter of recommendation from Adobe’s President & CEO …yes it’s signed by him.

P.S. I wanted to have an e-copy of the certificate and tried out lighting technique that worked pretty good. This is what I got:

ACE Advanced CF8 Certificate

ACE Advanced CF8 Certificate

For details on how I took the picture go to my Photography blog

2 Comments :, more...

Fix error: Blank line before XML declaration in Wordpress RSS

by Rolando on Apr.20, 2009, under wordpress

If you check your RSS feed and find this error have fun digging through php files until you find the one(s) with the problem.  Basically you need to find php files that end with blank line after the php closing tag ?>

First make sure you get the blank line error when validating your RSS feed at http://validator.w3.org/feed/

In my case I had two blank lines at the beginning of the RSS feed and found the problem on these two files:

  • /wp-settings.php (in the root)
  • /wp-includes/functions.php

Is this doesn’t fix it, try these other files as explained in the W3C website (http://validator.w3.org/feed/docs/error/WPBlankLine.html)

  • /wp-config.php
  • functions.php inside your themes directory
  • wp-rss2.php
  • wp-atom.php

If you get the error still, start disabling your plugins one by one until the error goes away.

Hope this helps. Good luck!

Leave a Comment more...

New blog, new post …One year of absence!

by Rolando on Apr.20, 2009, under Misc, Uncategorized

It has been just over a year now since my last post.  If you have visited my blog before, you’ll noticed that I have switched it from MachBlog to Wordpress.

What seems to be a sudden change has been, actually, a long period of testing and contemplation of different blogging solutions.  Being mainly a CFer, I seriously considered several ColdFusion based blogging apps, as well as a JAVA based solution, Blojsom.  While they are very good I was convinced that the right solution for what I needed was Wordpress.  Why?

Even though my CF-Angel tells me not to go with a PHP based blogging engine, the truth of the matter is that I just need a solution that works well, adapts to changes in technology and blogging trends (ie Social media/micro-blogging) and is easy to manage. Wordpress is very well known and used, stable with tons (literally) of plugins and templates right off the bat.  I really don’t want to modify the code under the hood to get what I want and this seems to have everything I need want so far:

  • Easy plugin install (over 4,000 of them and I can search & install them right from the admin)
  • Easy theme switcher (thousands of them free)
  • Easy import from RSS feeds (I had to write code to import the comments though)
  • Permalink support (pretty URLs)
  • Multiple RSS formats
  • Twitter plugin (better than many of the plugins I’ve seen from other blog engines)
  • Facebook plugin (various plugins & features)
  • SEO plugin (powerful) (continue reading…)
3 Comments :, , , more...

LiveCycle ES Update 1 Beta Released

by Rolando on Apr.01, 2008, under LiveCycle ES

LiveCycle ES Update 1 Beta has been released to the public.  If you work with LiveCycle, make sure to enroll in the LiveCycle ES Prerelease Program to obtain a copy of this beta version.  If you're wondering what's new with this update, Greg Wilson has posted a summary of the new features on his blog.

Leave a Comment more...

Attending to CF.Objective!

by Rolando on Mar.28, 2008, under ColdFusion

I finally got approval to go to CF.Objective this year!  I've been wanting to go since I heard great things about last year's conference.  This year schedule looks promising too, with great speakers and tracks.  I don't see myself sticking to one track but rather picking the best (for me) of the different sessions.

By glancing through the schedule I'm already looking forward to Advanced Techniques With The ColdBox Framework  by Luis Majano; ColdSpring 1337 by Chris Scott; Transfer ORM Caching Mechanics by Mark Mandel.  There are other ones which I need to make my mind for since they overlap like the workshop by John Paul Ashenfelter (I attended to one of his pressos in CFUnited and it was great) and CF with Air by Samer Sadek ( a coworker of mine).

Regardless of what I pick,  I'm sure this will be a great learning experience as well as a good chance to share the great guys of the CF community. If you haven't buy your tickets yet, hurry up and get registered!

See you at Objective!

Leave a Comment : more...

Prepopulate Form with Logged in user info in LiveCycle ES

by Rolando on Mar.26, 2008, under LiveCycle ES

I’ve seen several questions in the LiveCycle user forum about how to pre-populate a form with user data in the Workspace, so I’ve decided to demonstrate how to accomplish this. Notice that although this explanation is digested enough so that a beginner can accomplish the task, you need to have a good understanding of how forms are rendered in LiveCycle, basic understanding of the XML Path Language (XPath) & how to set the XML schema to your form.

First let’s understand how LiveCycle renders a form in the workspace for a specific process. When you set your process you set an input variable which holds the form to render. LiveCycle by default assigns the “Default Renderer” service to this variable so that it gets rendered properly in the Workspace. This “Default Renderer” is just a short-lived process with several activities that sets variables and enables your form for the workspace.

If you want to pre-populate a form with data, all you have to do is create your custom renderer service. For instance, let’s say you want to render a PDF form in the Workspace. So we need the “Render PDF Form” (see image 1) from the “Samples Forms” category (this samples should be in your process list unless you/the administrator didn’t upload the LiveCycle Archives that comes with the installation). This process takes a PDF form and renders it to the Workspace. First the short-lived process sets some parameters, then renders the form using the renderPDFForm operation from the Forms Service, and then enables the PDF Form to be rendered in the workspace.

    

Render PDF Process

Render PDF Process

Image 1: Render PDF Form Process Design
 

To pre-populate the form we need to get the logged in user info and inject that into the form before getting to the “render Form” activity. To do that you can copy the “Render PDF Form” process into a new process. Then to your new process you want to: <more />

1-      Add two input variables: one called “userId” of type string and another one xmlData of type xml. 

2-      In the first step of the process you want to extract the form’s XML data and assign that to the xmlData variable. 

3-      Then, use the “Query Single Row” operation from the “JDBCService” and query the LiveCycle database to get the user’s info based on the “userId” variable. You can use the LiveCycle’s default datasource which should be “IDP_DS”. Your query will look something like 

SELECT canonicalname, commonname, email, organization, address
                FROM edcprincipalentity e
                                WHERE e.id = [xpath to your userId variable]

4-      Now that you have the form’s XML data you can assign values to the fields by using XPath. So, (continue reading…)

9 Comments more...

Speaking at Baltimore Adobe User Group Inaugural Meeting

by Rolando on Mar.24, 2008, under ColdFusion, LiveCycle ES

This Wednesday, I'll be speaking at the new Baltimore Adobe User Group (BAUG) on LiveCycle ES.  If you live around the Baltimore area, this is a great opportunity to learn what is LiveCycle ES and what it can do for your company.  My presentation comprise two parts as described below:

What’s all the buzz about Adobe LiveCycle ES?

Have you heard about LiveCycle and how great it is but never had a chance to see it in action? Maybe you’ve heard how it can unlock PDF documents, control who can view/print/copy documents even when these have left your network, render forms in multiple formats (HTML, PDF and SWF) all with a single file. Learn why the buzz about LiveCycle ES and why renowned companies like Wachovia and the Federal Government are using LiveCycle ES to automate their business processes.

Unleash the power of Reader Extensions ES

Have you ever filled out a PDF form and, after all the effort, noticed you cannot save your data? Or maybe try to add attachments, comments, signatures, connect to a database but are unable because of the limitations of Adobe Reader? Learn how you can use LiveCycle Reader Extensions ES to unlock these and more capabilities for single or bulk PDF documents.

 

I'll be preceded by Curtis Layton, whom will be speaking on: Intro to Object Oriented Programming in ColdFusion.

You can get more details about the event at the BAUG website: http://baltimore-aug.org/

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...