Dragonsaber Website Design Banners Computer Art Print Design Kerwin"s Resume About Dragonsaber

March 24, 2010

ColdFusion Builder Tour Notes (Part 2)

Although I've tried CFEclipse and ColdFusion Builder BETA, I always ended up reverting back to the old, outdated copy of ColdFusion Studio for 2 reasons. Neither of these advanced programs had a good batch search/replace and neither had keyboard shortcuts for commonly used HTML tags. Both of these issue were addressed last night:

RegEx Replace
Ben Nadel, one of pioneers in the language was also a CF Studio/Homesite user for the same reason. So fortunately, he wrote the RegEx Replace extension that does a better search/replace than CF Studio. There's a preview & commit since any batch processing can be dangerous. It also visually highlights the changes made so there are no surprised at the end. The only con is that it doesn't process multiple files or directories. But just having this extension available was a major factor for me in purchasing ColdFusion Builder. There's always potential for a future release to cover multiple files.

Keyboard Shortcuts
I can't live without keyboard shortcuts. I'm used to developing with the mouse and keyboard at the same time, so shortcuts are essential to productivity. Since ColdFusion Builder evolved from Eclipse and not the CF Studio/Homesite family, it lost the common shortcuts for HTML code. It's already second nature for me to hit CTRL+B for STRONG, CTRL+I for EM, CTRL+SHIFT+A for links, etcs. So I felt CF Builder was inefficient when all of these went missing. There are shortcuts for common CF tags, which balances things out. At the meeting, Adam Lehman also mentioned that an XML-based config file could be hacked for custom shortcuts. So I think I can add these back in... more updates when my copy arrives.

ColdFusion Builder Tour Notes (Part 1)

Presented by Adam Lehman
ColdFusion Product Manager
Adobe


March 23, 2010
NYU Medical Center
550 1st Avenue
New York, NY

Introduction
Adobe found that an IDE was more in demand than any other CF feature. It's something that always came up whenever they surveyed users. We didn't really have an official one since ColdFusion Studio since CFEclipse was from the community. Adobe saw IDEs as a way to attract new developers. It makes CF a legitimate, accepted language. A productive language needed a productive environment. Adobe is fully dedicated to this product as it has a rapid development roadmap:

  • CB2 BETA by end of 2010
  • CB2 = Storm
  • CB3 = Thunder (will release before or at the same time as CF Server X)
  • CFX = Link


Pricing
As expected, ColdFusion Builder sells for $299... the usual price for a basic Adobe product... same as Dreamweaver. It's worth every penny as there are a ton of productivity features packed into it. Additionally, FlashBuilder Standard is included with the buy. Both ColdFusion Builder and ColdFusion Server 9 are FREE for educational and non-profit organizations. Volume pricing and package deals are available.

ColdFusion Server 9
The most attractive selling point of the new version is performance. Without even converting to the new code, it's already 40% faster than version 8 and 6 times faster than version 7 right out of the box. CFCs also get a significant boost... 8x faster for creation and 3x faster for invocation. UUIC creation is a whopping 100x faster!

Office Integration
Previously, in order to get data from Oracle to an Excel spreadsheet, we would have to make a CF page with queries, save the output as HTML and open it up in Excel. CF9 allows us to go directly to Excel. Features include:
  • generate PPT from HTML/CFM content
  • create, read, update XLS
  • XLS formulas
  • visual formatting controls
  • supports PowerPoint '97 through 2007
  • supports OpenOffice.org


Productivity
The intelligence of the new code insight is a huge time saver because one previously had to open up Toad, SQL Developer or SQL*Plus to reference a table. Now, all of the fields show up as the query is typed in CFQUERY. It’s smart enough to pull them up even if the datasource is a variable! Other than CFM, the insight also works for SQL & JS. Tag Wizard allows users to display a form (for each tag) that contains all possible attributes.

March 23, 2010

ColdFusion Builder Tour


Adobe launched the long awaited ColdFusion Builder yesterday. As part of their tour, Product Manager, Adam Lehman presented tonight at the NY ColdFusion User Group. Notes coming soon!

February 26, 2010

Snow Day II

February 10, 2010

Snow Day

January 14, 2010

Donations to Haiti

I gathered some links for donating to the earthquake relief efforts in Haiti. Each item below was personally link-checked to make sure there was an option for the specific crisis:

Also check out NY1's relief list. They made it a point to review organizations to insure that donations would really make it to their intended destinations.

Please feel free to republish this post on your own blog. Click here to download the source code for Blogger.

Thank you.

January 11, 2010

ColdFusion / SAML (Part 2)

The XML

I'm going to start with the base XML (before adding in the ColdFusion processing) to give an idea of what I'm going to generate. Here it is below with the items you need to replace marked off as ColdFusion variable calls:


<?xml version="1.0" encoding="UTF-8"?>

<samlp:Response Destination="#SPService#" ID="#ssouser.uuid#" IssueInstant="#nowDateTime#" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">

<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">#IDPDomain#</saml:Issuer>

<samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status>

<saml:Assertion ID="#ssouser.uuid#" IssueInstant="#nowDateTime#" Version="2.0" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">

<saml:Issuer>#IDPDomain#</saml:Issuer>

<saml:Subject>

<saml:NameID>#ssouser.email#</saml:NameID>

<saml:SubjectConfirmation Method="urn:oasis:names:tc:2.0:cm:bearer">

<saml:SubjectConfirmationData InResponseTo="#ssouser.uuid#" NotOnOrAfter="#nowDateTimePlus1#" Recipient="#SPService#"/>

</saml:SubjectConfirmation>

</saml:Subject>

<saml:Conditions NotBefore="#nowDateTime#" NotOnOrAfter="#nowDateTimePlus1#">

<saml:AudienceRestriction>

<saml:Audience>#SPDomain#</saml:Audience>

</saml:AudienceRestriction>

</saml:Conditions>

<saml:AuthnStatement AuthnInstant="#nowDateTime#">

<saml:AuthnContext>

<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>

</saml:AuthnContext>

</saml:AuthnStatement>

<saml:AttributeStatement>

<saml:Attribute Name="screenName">

<saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">#ssouser.name#</saml:AttributeValue>

</saml:Attribute>

</saml:AttributeStatement>

</saml:Assertion>

</samlp:Response>



- #IDPDomain# = The base URL of the IDP
- #SPService# = The full URL of the SP's authentication system
- #ssouser.uuid# = The user ID from the IDP that will be used as a unique identifier in several parts of this file
- #nowDateTime# = The current date/time to mark the initiation of the assertion
- #nowDateTimePlus1# = A date/time stamp after the current date/time to limit the time frame an assertion can occur. This prevents a user from trying to simulate/mimic one. Generally a 1 min differential is good. Assertions will always occur behind the scenes through one or more redirects.
- #ssouser.name# = Username/Display Name
- #SPDomain# = The base URL of the SP

The #SPDomain# and #SPService# will come from the SP and can just be hardcoded into the XML template. The #ssouser.uuid# and #ssouser.name# will be pulled from the IDP database or cookie. The date/time stamps will be pulled from #Now()#.

Now here's that same XML wrapped in ColdFusion:


<cfoutput>

<cfset nowDateTime = "#DateFormat(DateConvert('local2utc', Now()),'YYYY-MM-DDT')# & #TimeFormat(DateConvert('local2utc',Now()),'HH:mm:SS.LZ')#">

<cfset nowDateTimePlus1 = "#DateFormat(DateConvert('local2utc', Now()),'YYYY-MM-DDT')# & #TimeFormat(DateConvert('local2utc', DateAdd('n',1,Now())),'HH:mm:SS.LZ')#">


<cfsavecontent variable="responseOpen">

<?xml version="1.0" encoding="UTF-8"?>

<samlp:Response Destination="#SPService#" ID="#ssouser.uuid#" IssueInstant="#nowDateTime#" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">

<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">#IDPDomain#</saml:Issuer>

<samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status>

</cfsavecontent>


<cfxml variable="samlAssertionXML">

<saml:Assertion ID="#ssouser.uuid#" IssueInstant="#nowDateTime#" Version="2.0" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">

<saml:Issuer>#IDPDomain#</saml:Issuer>

<saml:Subject>

<saml:NameID>#ssouser.email#</saml:NameID>

<saml:SubjectConfirmation Method="urn:oasis:names:tc:2.0:cm:bearer">

<saml:SubjectConfirmationData InResponseTo="#ssouser.uuid#" NotOnOrAfter="#nowDateTimePlus1#" Recipient="#SPService#"/>

</saml:SubjectConfirmation>

</saml:Subject>

<saml:Conditions NotBefore="#nowDateTime#" NotOnOrAfter="#nowDateTimePlus1#">

<saml:AudienceRestriction>

<saml:Audience>#SPDomain#</saml:Audience>

</saml:AudienceRestriction>

</saml:Conditions>

<saml:AuthnStatement AuthnInstant="#nowDateTime#">

<saml:AuthnContext>

<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>

</saml:AuthnContext>

</saml:AuthnStatement>

<saml:AttributeStatement>

<saml:Attribute Name="screenName">

<saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">#ssouser.name#</saml:AttributeValue>

</saml:Attribute>

</saml:AttributeStatement>

</saml:Assertion>

</cfxml>


<cfsavecontent variable="responseClose">

</samlp:Response>

</cfsavecontent>

</cfoutput>



The immediate question is why do I have the XML split up into 3 variable? The whole thing could be enclosed as 1 inside <CFXML>. The reason is that I ran into a bug (to come in Part 3) where I had trouble traversing the DOM beyond the first level of depth. So by cutting out the opening and closing <SAMLP:RESPONSE> tags, I can deal with the middle piece by itself, where <SAML:ASSERTION> is the root level. It might not make sense yet, but I promise it will be cleared up once you read Part 3!

So on to the other ColdFusion pieces:

1) The 2 <CFSET>s in the beginning handle the 2 date/time stamps (now & 1 minute later). I'm not sure if they actually need to be formatted this way, but the other sites I studied had it like this and it worked for me as well.

2) The 1st and 3rd variables I'm saving out use <CFSAVECONTENT> because I'm going to be adding these back in after the signing process and they don't need to be recognized as XML yet.

3) The 2nd variable needs to use <CFXML> rather than <CFSAVECONTENT> because it needs to retain the XML DOM. Later on, when I create and insert the signature piece, it will need to reference this 2nd variable as if it were a valid XML document.

While your at this step, I encourage you to dump out these variables right on the document you're creating so you can get a visual of the unsigned XML to compare with the signed version later on. Just be sure to delete it when it's finalized.

January 8, 2010

Frommer's Slideshow

Just before the holidays, one of the projects that I was devoted to was a new slideshow format for Frommers.com. We wanted something that highlighted the photo. It also had to be fast and easy to navigate. I went with a neutral color scheme so the only colored item on the page would be the photos. Here are some of the one's we've published so far:


On the technology side, the play/pause feature is actually very simple. It's just a basic META refresh that's controlled by a URL variable, but it works well and fast. I threw in another script that activates the arrow keystokes to manually move forward and back in the slideshow. I'm used this feature from Facebook and Picasa and think every slideshow should have it. The links pass the slideshow URL over to the top social networks. "Get Link" uses a JQuery modal window with an autoselect onFocus so users can grab and save the URL of each photo.

Malware Detection

This a pretty useful tool in trying to weed out malware from a website. It checks against a database of blacklisted sites created by Google. All of the good browsers (Firefox, SeaMonkey, Safari & Chrome) check against this database whenever you visit a site.



November 1, 2009

Strata-Art 2009 Updates

It's been about a full year, but Strata-Art just got updated with a bunch of new paintings. Here's the list:

  • Cabs in Lower Manhattan (in "Metropolis")
  • Strolling in Union Square (in "A Glance")
  • Outside the Door (in "A Glance")
  • Cats on the Patio (in "A Glance")
  • Ladies at the Farmer's Market (in "Social Animals")
  • Holiday, Hudson River Park (in "Social Animals")
  • Reflection, Park Avenue (in "Social Animals")
  • Union Square Farmer's Market (in "Social Animals")
  • Coney Island Boardwalk (in "Thoughtful Crowd")
  • Levels, Museum of Modern Art (in "The Arts")
  • Vase on a Table (in "Urban Still Life")
  • Still Life with Blue Bottle (in "Urban Still Life")
  • July, Hudson River (in "Travel")
  • The Grecian Urn (in "Travel")
  • Farmer's Market Shopper (in "Sketches")

Also check out Richard Fox's new blog at http://open.salon.com/blog/rhfox

 
Dragonsaber