Programming Notes – Matt Jorgensen

August 23, 2008

No longer updating

Filed under: Uncategorized — flexprimer @ 10:52 pm

I am no longer updating this site

June 2, 2008

AutoHotkey utility

Filed under: misc — flexprimer @ 2:01 pm

AutoHotkey automates keystrokes:

http://www.autohotkey.com/

April 10, 2008

coldfusion instances

Filed under: coldfusion — flexprimer @ 2:24 pm

In CF8, to add instances directly through CF Admin:

Click Instance Manager.

Add New Instance.

Enter a name in the Server Name field.

Enter the path to the server in the Server Directory field.

To configure w/Apache or IIS: http://www.adobe.com/devnet/coldfusion/articles/multi_instances04.html

March 18, 2008

crossdomain xml file

Filed under: misc — Tags: , , — flexprimer @ 1:35 pm

The Flash player has a security sandbox that disallows loading data (a swf) from other domains, including subdomains. To get around this, install a crossdomain.xml file in the web root:

<?xml version=”1.0″?>
<!DOCTYPE cross-domain-policy
SYSTEM “http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd”>
<cross-domain-policy>
<allow-access-from domain=”*.mywebsite.com” />
</cross-domain-policy>

March 14, 2008

swf alignment

Filed under: misc — Tags: , , — flexprimer @ 1:42 pm

Note to self on swf dropping down, out of alignment, on firefox and safari. Code that was causing this is the following javascript function:

<script type=”text/javascript”>

AC_FL_RunContent(‘codebase’,'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=9,0,28,0′,’width’,’300′,’height’,’250′,’src’,'#request.baseURL#

#Request.BannerAdImageBasePath##qry_getAd_RightSide_Bottom.AdFlashImage#’,'quality’,'high’,'wmode’,'transparent’,

‘pluginspage’,'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,'movie’,'#qry_getAd_RightSide_Bottom.AdFlashImage#’ );

</script>

Possible fix recommended elsewhere is with using the swfobject javascript library to embed flash:

http://blog.deconcept.com/swfobject/

trac config

Filed under: misc — Tags: , — flexprimer @ 1:36 pm

Note on configuring Trac debugger from the command line. To add users, do:

D:\Program Files\Apache Group\Apache2\bin

htpasswd -c htpasswd usernamehere

This creates a file for authenticating users. File has username and encrypted passwords.

To update, do:

d:\program files\apache group\apache2\bin

From there, do:

htpasswd passwd usernamehere

Other commands are here:

http://httpd.apache.org/docs/2.0/programs/htpasswd.html

February 1, 2008

coldbox notes

Filed under: coldfusion — Tags: , — flexprimer @ 8:22 pm

Notes I put together when I was learning Coldbox and Transfer. Some of this is taken from elsewhere.

OVERVIEW:
Coldbox is an open source, object-oriented framework that does away with the xml dialects used in Fusebox.

Handler section: these are the CFCs that control application flow. They respond to events, such as requests for page views, calls to business layers, etc.

View section: these are all your display pages.

Com section: this is where all the database interaction takes place. For most part you just need the dao and service files. The service file is what’s called by the event handler, which creates links to dao and gateway. For example the ‘save’ code in the service file grabs the arguments and then calls the save function in the dao.

Config section: includes the Transfer xml file (http://www.transfer-orm.com/) (http://www.coldspringframework.org/). You should only have to add to the Transfer file after you’ve created new db tables.

EXAMPLE:
An example of a form being submitted: the form is submitted and executes the processing code listed in its action target. For ex., my form has this action:

action=”/DiscountPrograms/processDiscountForm”

So it hits the ‘processDiscountForm’ section in its event handler. That code takes the event collection and puts it into the rc, the request collection (The request collection is a data structure where all variables can be stored and shared among an execution request, like the ‘attributes’ scope in fusebox. This is how data gets moved around from event handlers to views and layouts to plugins and anything running inside of the framework.):

<cfset var rc = event.getCollection()>

Then you create a variable and dump in a new empty Transfer object of the type you need from the Transfer config:

<cfset var oDiscount = “”>
<cfset oDiscount = rc.Transfer.new(“Discount.Discount”)>

Then you populate the transfer object with the form data:
<cfset getPlugin(“beanFactory”).populateBean(oDiscount)>

Then you save the Transfer object to the db w/the save function of the Transfer object:
<cfset rc.Transfer.save(oDiscount)>

Then you send the user to the thank you page in the view section:
<cfset setNextSESEvent(“DiscountPrograms.thankYou”)>

For more, Russ’ post explains how it all works: http://angry-fly.com/index.cfm/2007/11/16/Its-Magic-The-ColdBox-BeanFactory-Plugin

January 3, 2008

coldbox framework

Filed under: coldfusion — Tags: , — flexprimer @ 2:32 pm

An alternative to the popular Fusebox framework for developing Coldfusion applications is Coldbox. Coldbox is an open source, object-oriented framework that does away with XML dialects. Instead it uses an event-driven CFC handler that responds to all requests for page views, calls to business layers, etc.

Coldbox site:

http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/ColdBox

November 30, 2007

coldfusion meetup

Filed under: Uncategorized — flexprimer @ 5:33 pm

Coldfusion Meetup has a large number of interesting presentations:

http://coldfusion.meetup.com/17/messages/boards/view/viewthread?thread=3147031.

November 21, 2007

prototype documentation

Filed under: ajax, javascript — Tags: , — flexprimer @ 2:19 pm

Great explanation of Prototype library features:

 http://www.sergiopereira.com/articles/prototype.js.html

Older Posts »

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.