Thursday, July 29, 2010

CF Community Keynote

Places to find help
#coldfusion Twitter
htp://www.tweetpml.org/colfusion-bologgers/
http://www.listorious.com/aqlong/coldfusion/
http://www.CF411.com
http://groups.adobe.com/pages/usergroups
http://occfug.groups.adobe.com/

Conferences, mailing lists, books, CF Web App contraction book, etc.

Done. No more shameless self promotion...

Making Bad Code Good

Given by Dan Wilson - DataCurl

Very broad overview of reasons we write bad code. Generally , every reason we are rushing day in and out to push our code for the build. Kind of seemed like a principle yelling at us for running in the halls.

Some very broad ideas:
- Change Boolean evaluations into functions
- Try never to nest conditionals even thou they may be easier to develop at first, someone else doesnt need to go through the same process you did just to make a small change
- Its not always about writing less lines of code, sometimes its better to write larger functions then smaller ifelse so others can read the true function of the conditional or loop easier
- Put evaluations at the top in silents and configurations so someone can easily modify setups.

Broad elementary discussions on the advantages of commenting

Since we are using SVN, why would we comment out large blocks of code, use small comments with revsions stated to make files easily readable by others

Save money on kb being sent:
- Use upper level styles and less lower level duplication of styles
- Put those styles stored externally and loaded into the browser only once on the site
Example: use the over with classes for header areas

Stop Code:
put conditionals that stop the rest of the page from processing at the top to save kbs and time for others reading

Elementary overview of why descriptive naming is import and why common naming is bad

Strong final emphasis on using var scoping to prevent var leaking.

Making bad code good...

OK,

Had to do it..
Left that other one... Wow, horrible.

Be explicit

Example:

<cfset aThing = false>
<cfloop query="blah">
<cfif something IS true>
<cfset aThing = true>
</cfif>

<cfif NOT aThing>
sfsdf
</cfif>

Use this instead..

<cfif aThing IS true>
asdsas
</cfif>

Inline classes with lots of code, like
<td class="rowBody">

Should be set in CSS to avoid extra bandwidth usage..

More text means more noise..

Rule 1: Be clear, or be clearer..
So, if something is shorter doesn't mean its better.

Start with things that get you out of the file vs all the positive statements..
If you don't meet the conditions, get out of the file..

Look at <cfontent type="text/plain" reset="yes"> to control whitespace...
Example was outputting xml content inline without worry about including whitespace at top of file...

Mixing in <cfscript> just to "feel" more programmy, stop doing it... Harder to debug and more lines of code overall..

Stop naming variables like objX, give them names that people can follow if they need to go through code later (including yourself)

Similarly name queries with meaningful names, so it makes it easier to debug.

CF and the Open Source Landscape

"Once upon a time, if you wanted to develop applications in ColdFusion, you had to pay for any third party tools you needed - and you rarely got the source code. Things have changed! These days there are free and open source options right across the board to help you get your job done faster, cheaper and with more confidence. Find out how the burgeoning open source community can help you - and, perhaps, how you can help the open source community in return!"

~~~
Open Source can be better quality than Proprietary - Apache, Linux, because they have so many eyes on the code.

~~~
Key is the copyright license.
~~~
So far this is a talk more about the concepts of Open Source... he's just starting into CF specifics.
~~~
CF Exchange - mostly paid.
Why is CF so small? - Historically
PHP/Linux were OS from the start - have that mindset.
- CF was originally Windows and Proprietary, that continued.
Now?
Frameworks changed that - Fusebox, ModelGlue etc.
RIAForge - is almost all CF (720)

Applications in CF?
BlogCFC
Mango Blog
Only forum: Galleon
Mura /FarCry- CMS
Tools:
CFEclipse http://www.carehart.org/cf411/#tools


CFML Engines:
Smith Project (CF6)
Open Blue Dragon (Cf7 - but moving up)
Railo (Cf9+extensions)


4CFF: For ColdFusion Foundation - http://4cff.org - just started... rolling out soon.


Social Coding:
SVN
GIT
codesion
unfuddle
assembla
github : This apparently is the best of the lot.



Accessible Javascript

I'm alive... We'll see how this goes from there...

Section 508.. Wow, serious?

ADA?? http://www.ada.gov/adastd94.pdf

(Who is this person?)

Accessibility:
Development of Information Systems flexible enough to Accommodate the needs of the broadest range of users, regardless of age or disability...

God, this is so boring so far...

Accessibilty constraints in Javascript...

Worthless to us...

Wednesday Night



Leesberg has rednecks! In the Downtown Saloon you can smoke, strip, and play any kind of music: Country OR western!




Wednesday, July 28, 2010

ColdFusion and jQuery: Two Great Tastes that Go Great Together

More of an introduction, but we'll see if there are any useful nuggets..

<cfmap> example to start off...

CF9 - New tag cfmediaplayer

CF8 - cfwindow

ColdFusion uses extjs behind the scenes.

<cfajaximport tags="cfmediaplayer">

href="javascript:ColdFusion.Window.show('my_window')">link</a>

Then use
<cfwindow name="my_window"
otherAttributes>

OR

href="javascript:ColdFusion.Mediaplayer.stopPlay("companyVideo");">Video</a>


Guy talks really fast. Interesting, but I think I may wait on any other stuff until after the conference when more detailed info is available on this talk.