»
ColdFusion Tutorial - Review
Published 05/19/2006
Page 5 — Review In this final day, we learned several techniques to increase nap time, including: - how to select, sort, format, and limit data in ColdFusion templates for the betterment of yourself and the world in general;
- how to use CF to create dynamically generated headers and footers that will allow you to change the look of your site with a simple flick of the wrist and a nod to your admirers;
- how to troubleshoot pages that you've screwed up and where to go when you're puzzled by ColdFusion's vague error messages;
- how to win friends and influence clients by furthering your CF knowledge through Allaire's online docs and forums;
- how to ignore Microsoft Office's dancing paper clip because it's little more than a pain in the butt;
- and how posing as a woman on the Web will get results faster than you can say "horny geeks."
Best of luck on your ColdFusion development. Remember, it's all about saving time, baby - time better spent on developing Web hoaxes, discussing conspiracy theories, and predicting Y2K doomsday scenarios.
|
»
ColdFusion Tutorial - More Information on ColdFusion
Published 05/19/2006
Page 4 — More Information on ColdFusion ColdFusion comes complete with an HTML manual, but it's still the kind of program best learned by trial-and-error experimentation. Go ahead and butt your skull against the wall a few times; you'll be all the better for it. The resource you'll probably turn to most is ColdFusion's CFML language reference, which is a big list of CF tags, functions, and JavaScript statements. You'll find it along with other developer docs at Allaire's developer site. They're in Adobe Acrobat's PDF format, so you'll need the free reader, unless you can read hex code on the fly. The company also provides a ColdFusion-driven (surprised?) support forum on its extensive site. There you'll find all sorts of CF nerds who can answer your toughest questions. If you're a guy, pose as a woman and you'll get an answer in a hurry. CF's documentation assumes that you're already familiar with SQL statements, but if you aren't, try Jim Hoffman's SQL tutorial for a good overview. Your SQL capabilities are determined by your database software, so also try reading your program's help files. If you're a Microsoft user, you'll have to deal with that little dancing paper clip, but the time spent will be well worth the trouble. Let's proceed to the final section and recap.
|
»
ColdFusion Tutorial - Testing and Troubleshooting Your Templates
Published 05/19/2006
Page 3 — Testing and Troubleshooting Your Templates First, make sure that you're testing your templates through your Web server rather than as a file. The URL in your browser should read http://www.yourdomain.com/some_template.cfm rather than file://C:\web_site\some_template.cfm. ColdFusion only works in conjunction with Web server software. This may seem obvious, but when you're coding like the wind and Alt+Tabbing between a text editor and your browser, it's easy to forget. If you're using an outside Web provider, this means that you'll have to upload your templates before you can test them, unless you're lucky enough to afford a copy of CF on your own machine. If you've botched up your code somehow, ColdFusion will return an error message rather than the expertly formatted HTML you hoped to see. Some of the most common errors come from bad SQL statements in your queries. If you get one of these, check your query statement to make sure you're using text operators for text fields and numeric operators for numbers. Also be sure that every field name you mention in your CFQUERY and CFOUTPUT sections actually appears in your table. Just one stray character will screw things up. You might also encounter a situation in which you see the top part of your page (headers, etc.) but nothing below. This occurs when ColdFusion processes your CFQUERY successfully but then gets hung up on something in your CFOUTPUT section. By and large, ColdFusion's error messages are pretty cryptic, but, once you develop a few templates, you'll get a feel for where to look for problems. As mentioned before, we're really only fiddling with the tip of the iceberg here. Once you start using the program, your idea bulb will light at odd moments as you envision more time-saving devices, and you'll want to delve deeper into CF's docs. Most of these ideas come in the middle of the night, and by the time you wake up and get some coffee, you've forgotten them. That's why I'll cover some great resources in the next section.
|
»
ColdFusion Tutorial - Headers and Footers
Published 05/19/2006
Page 2 — Headers and Footers This whole ColdFusion thing is all about saving time while designing sites. If you've taken your personal time to read this far, it's likely that you're putting a lot of faith in the idea that I'm going to help you increase your leisure hours so you have more time to rearrange the items on your desk, play Minesweeper, and whatnot. I'll try not to disappoint. Back when I was designing a site for the book publisher mentioned in Day 1, I realized that with the publisher's three already-fat databases and about 15 to 20 ColdFusion templates, I could build a site that would seem enormous to the end user fairly quickly. But being the sort that likes to minimize productive output as much as possible (to free up time for stuff like researching bad Web pages and crank-calling pay phones), I started to wonder if there wasn't a way to take a shortcut to the shortcut, so to speak. <CFQUERY NAME= "banner_ad" DATASOURCE= "our_stuff"> SELECT Code FROM HTML WHERE Name IS "banner_ad" </CFQUERY> <CFQUERY NAME= "top_nagivation_imagemap" DATASOURCE= "our_stuff"> SELECT Code FROM HTML WHERE Name IS "top_navigation_imagemap" </CFQUERY> <CFQUERY NAME= "bottom_nagivation_bar" DATASOURCE= "our_stuff"> SELECT code FROM html WHERE name IS "bottm_navigation_bar" </CFQUERY> My CFOUTPUT tags then looked like this: <HTML> <CFOUTPUT QUERY= "banner_ad"> #Code# </CFOUTPUT> <CFOUTPUT QUERY= "top_navigation_imagemap"> #Code# </CFOUTPUT> The actual text of the page would appear here: <CFOUTPUT QUERY= "bottom_navigation_bar"> #Code# </CFOUTPUT> </HTML> I saved that page as a read-only reference point so I wouldn't overwrite it later if a brain freeze occurred. Then each time I created a new ColdFusion template, I started with that page and inserted whatever text or tags needed to appear in the middle. If I later decided to add a mailto link to the bottom of each page, all I had to do was add it to the HTML code in the Code field in the record named bottom_navigation_bar. Or if the company didn't like the goofy navigation image map I created, all I had to do was change the Code field for the appropriate record in the database. Then the whole site would be updated automatically. Rocket science it ain't. Next, you'll learn what to do if your page doesn't work.
|
»
ColdFusion Tutorial - More Template Building
Published 05/19/2006
Page 1 — More Template Building In Lesson 1 and Lesson 2 of this tutorial, we used ColdFusion to display a database that contained a definitive record of the content of my pockets. As fascinating as these items may be, I feel it's time to move on to a new hypothetical database so that I can demonstrate some of ColdFusion's sorting functions. We'll assume that I have a second database called links_to_bad_sites.mdb and that we've already defined it as the DSN links_to_bad_sites in ColdFusion Administrator. Within this database, there is a single table called Links. It's the product of hours of research and contains the names, URLs, and descriptions of really bad Web sites I've turned up. There's also a field that indicates the date the record was added to our database. Now let's complicate matters further by assuming that we're writing a template for a What's New page on our site. We'd probably name it whats_new.cfm or - for increased job security - aAEr348u234.cfm. We want our What's New page to list only the links that we've added in December, and we want them to appear on our page in alphabetical order by site name. Our query statement would look something like this: <CFQUERY NAME= "new_links" DATASOURCE= "links_to_bad_sites"> SELECT * FROM links WHERE date IS LIKE "December%" ORDER BY name ASC </CFQUERY> You should already be familiar with everything in this query statement except the ORDER BY part. This defines the field we want to sort by and specifies whether we want the results in ascending order (ASC) or descending order (DESC). If you don't put ASC or DESC, ColdFusion will default to ASC. Now that we've set up a query, the CFOUTPUT section of our What's New page might look like this: <HTML> <H3>Really Bad Sites Found in December</H3> <CFOUTPUT QUERY= "new_links"> Site Name: #Name# <BR> URL: <A HREF="#URL#">#URL#</A> <BR> Description: #Description# <P> </CFOUTPUT> See how damn clever we are? We used the #URL# variable twice so that we get the text of the URL and also make a live link to the site. Let's take it a step further and assume that we only want to output two links from the month of December, just two tiny morsels to whet the appetite. We could use CF's MAXROWS specification within our CFOUTPUT tag, like this ... <CFOUTPUT QUERY= "new_links" MAXROWS="2"> ... and the rest of the CFOUTPUT statement would remain the same. The code above would return a page that looks like this: Two Really Bad Sites Found in DecemberSite Name: Ideagirl's Homepage URL: http://i.am/bitchfromhell Description: Ideagirl must have really studied the list of "Top Ten Things NOT to Do on Your Web Site," because she takes great pains to use all of them here: blinking text, unreadable text colors, loads of animated GIFs stolen from other sites, MIDI files on every page, and lots of endless blathering about nothing at all. We recommend it highly. Site Name: EverythingBlows.Com URL: http://www.everythingblows .com Description: These curmedgeons seem to be angry about everything they've ever seen, touched, or tasted in the world. They're the sort of guys you'd find huddled in the corner at a party, pointing out the fashion faux pas and false mannerisms of the other guests. Highly recommended. Now you know how to select, sort, format, and limit data in ColdFusion templates. But before you run off and start bragging in the bars, I should tell you that you've only scratched the surface. Let's move on to some handy tips for veteran loafers.
|
PSDTop offers Royalty Free files like PSDs and JPGs. PSD files are prepared for instant use in collages, banners, animations and other computer graphic related tasks - PSD files : PSD stock images & much more...!!! Files are multi layered and isolated. Just download a file, imort it to a program able to read .psd format (Adobe Photoshop, GIMP, other) and that's it - a new layer is added. PSD files are zipped to make transfer faster.
|