So I've been talking about relaunching CFLib for over four years now, and I've finally gotten around to doing it. If you haven't visited CFLib today, take a quick peak.
So what's behind the change? First and foremost, I want to give credit to Justin Johnson. He not only did the design but provided me with simple templates to make my life easier. He also did all the jQuery work. So all credit really goes to him. With that said, let me talk abit about what I changed and why. The main difference is that this version is a heck of a lot simpler than the old site. I wanted a design that focused on the UDFs and made it easier to get to the code. The site basically has three main pages: Home Page, Library Page, and UDF page. That's it (again, pretty much). You can also get the code for a UDF from the library page. I dropped all the other pages. There aren't comments anymore, but they have been disabled for quite sometime anyway. I also got rid of the user system completely. Again - the idea is that you can come in, get the UDF, and get out. Behind the scenes I'm using Model-Glue 3, ColdSpring, and Transfer. It is completely stupid and irresponsible to use Alpha software for a production site. Make sure you get that. But that being said, I thought it would be really cool use MG3 and heck, it's my site, I'll be dumb if I want to. I really loved the "helpers" feature of Model-Glue 3. So for example, to generate my captcha random text, I did:1 <cfset captcha = helpers.util.makeRandomString()>
To format required CF version into a nicer string, I did:
1 #helpers.util.formatVersion(udf.getCFVersion())#
And so on. You get the idea. I also made heavy use of the beans feature. So my UDFController has this at top:
1 <cfcomponent output="false" extends="ModelGlue.gesture.controller.Controller" beans="UDFService,LibraryService,config">
And here is an example of where I use it:
1 <cffunction name="getLatestUDFs" output="false">
2 <cfargument name="event" />
3 <cfset arguments.event.setValue("latestudfs", beans.udfService.getLatestUDFs()) />
4 </cffunction>
I did not use the new SES URL feature as I had a bit of trouble generating my links. Instead I simply used IIRF, a free IIS-based URL rewriter. Locally I used Apache rewrite. I ran into one problem with my SES URLs. When I did a redirect from an event at a SES url, it wanted to go to index.cfm, not /index.cfm. I added this to ColdSpring.xml to fix it:
2 <cfargument name="event" />
3 <cfset arguments.event.setValue("latestudfs", beans.udfService.getLatestUDFs()) />
4 </cffunction>
1 <property name="defaultTemplate"><value>/index.cfm</value></property>
Notice the / in front. Also, note that the old site let you use URLs like this:
http://www.cflib.org/udf.cfm/isemail
Thew new site still supports that, but also lets you get even shorter with:
http://www.cflib.org/udf/isemail
The code coloring is done using ColdFish. jQuery is used on the library page to both animate and load it in via Ajax.
Outside of that it's a pretty simple site. I was lazy and didn't bother doing an admin. I'll just use the old site's admin for now. I did run into some Transfer problems, but I'll blog about that later.
Lastly - you may remember that I had said I was considering supporting custom tags and CFCs. While I think there is some merit to that - I really wanted to keep things simple. So for now, it's just UDFs (all 1k of them).
Comment 1 written by Dan Vega on 9 June 2008, at 12:07 PM
Comment 2 written by charlie griefer on 9 June 2008, at 12:09 PM
Comment 3 written by Will B. on 9 June 2008, at 12:37 PM
Comment 4 written by Edgar Soto on 9 June 2008, at 1:04 PM
Comment 5 written by Andrew Ekaett on 9 June 2008, at 1:39 PM
[nit]
I much prefer seeing all of a library's funtions on one page instead of 20 at a time.
[/nit]
Comment 6 written by Raymond Camden on 9 June 2008, at 1:46 PM
Comment 7 written by Mark Mazelin on 9 June 2008, at 1:55 PM
I like the new look, but the items in the library view appear to be in some random order. They are certainly not alphabetical. Any hints as to what order you chose?
Comment 8 written by John Allen on 9 June 2008, at 1:56 PM
Comment 9 written by Sami Hoda on 9 June 2008, at 2:01 PM
Comment 10 written by Raymond Camden on 9 June 2008, at 2:03 PM
@Sami: It does, but it should be the same. I'll take a look at that a bit later though.
Oh I know what it is. On the library page the code is an Ajax request, so the CSS isn't loaded. Again though I'll look at it later.
Comment 11 written by Sami Hoda on 9 June 2008, at 2:07 PM
Comment 12 written by Raymond Camden on 9 June 2008, at 2:19 PM
Comment 13 written by Che on 9 June 2008, at 2:21 PM
Comment 14 written by Raymond Camden on 9 June 2008, at 2:25 PM
Comment 15 written by James Moberg on 9 June 2008, at 2:31 PM
http://www.dopefly.com/projects/pagination/
As much as I appreciate simple Next/Prev links, they are too constraining when I want to go straight to the end of the list.
I liked it better before with all of the tags on a single page... I could easily use my browser's CTRL-F to find tags based on the brief description.
Comment 16 written by James Edmunds on 9 June 2008, at 2:34 PM
Thanks from all of us....
Comment 17 written by Raymond Camden on 9 June 2008, at 2:36 PM
@JamesE (and all): Thanks and I'm happy you guys are liking it.
Comment 18 written by James Moberg on 9 June 2008, at 2:48 PM
I've mentioned this before, but when sending email to subscribers, please set a return-path/sender values to one of your internal email addresses so that SPF (Sender Policy Framework) does not block messages or mark it as spam. More information is available here:
http://www.openspf.org/Best_Practices/Webgenerated...
BTW: I do like the new look, but it now takes me longer to find what I am looking for.
Comment 19 written by Matt Williams on 9 June 2008, at 2:51 PM
If none of that is happening, fine, I'll survive. A note to others though, you can jump around from beginning to end or whatever by changing the url "/start/xx" where xx is the record number you would like to start on.
Comment 20 written by sethron on 9 June 2008, at 3:00 PM
Am I the only one who still uses the Studio CFLib UDFBrowser menu button?
I have the CFLIB.Org UDF Browser v1.1 and the ScriptX package installed and it was working. Would you have any insight to update this line in
C:\Program Files\Macromedia\ColdFusion Studio 5\udfbrowse\udfbrowse.htm?
var CFLIBURL = "http://www.cflib.org/cfcs/udf.cfc";
Comment 21 written by Raymond Camden on 9 June 2008, at 3:19 PM
@sethron - Sorry - but I'm no longer supporting the Homesite/CFS browser. You are probably one of two people left on the planet still using it. :) I do, however, support the SnipEx browser still
Comment 22 written by Chad Stander on 9 June 2008, at 6:05 PM
Comment 23 written by Charlie Arehart on 9 June 2008, at 9:53 PM
As for your comment to Sethron, that he was "probably one of two people left on the planet still using CFS/HS+", hey, I resemble that remark. :-) Seriously, I don't want to hijack this thread to reopen a debate on that can of worms, but let's please not perpetuate the mistaken assumption that "no one uses those anymore". They have their place, and not just for luddites and newbies!
Comment 24 written by Charlie Arehart on 9 June 2008, at 9:56 PM
Comment 25 written by Raymond Camden on 10 June 2008, at 8:43 AM
Ping www.cfib.org.
Note the IP
Edit your hosts file and add a record for the IP and hostname, old.cflib.org
Try to open old.cflib.org. You should see the old site. If so, edit the HomeSite code and change that CFLIBURL to use old.cflib.org.
Again, this SHOULD work, but I'm not officially supporting it.
Comment 26 written by Bruce Stenberg on 10 June 2008, at 10:22 AM
Comment 27 written by Tyler Clendenin on 10 June 2008, at 10:28 PM
Pagination: thumbs down. As a user I must suggest removing pagination altogether. I can't see any situation where I would want pagination, I know I need to view the full list when I am browsing for a UDF I would like.
Comment 28 written by Tyler Clendenin on 10 June 2008, at 10:49 PM
1. RSS feed per Lib.
2. RSS feed per UDF.
3. Whole library as SVN Repo.
4. More labels for UDFs (i.e. Arrays could be tagged as "ArrayLib" and "DataLib").
5. Generate your own library: let users tag udfs and allow them to generate their own custom library download.
6. Let users post "upgrades" to existing UDFs, letting them know that any "upgrades" must be fully backward compatible. (to ensure this youcan allow users who post udf's to include some sort of test case materials.
7. What about UDFs that need to be cffunctions because they need to use tags that don't have cfscript equivalents.
8. Could cflib also be used to share custom tags?
9. API
BTW meant to post before, site looks good, nods to Justin Johnson.
Comment 29 written by Raymond Camden on 11 June 2008, at 6:15 AM
1. RSS feed per Lib.
2. RSS feed per UDF.
Last two items: Note that I update UDFs like once a week or so. So this would make for RSS files that never/rarely change, and I don't think 2 makes sense.
3. Whole library as SVN Repo.
Maybe.
4. More labels for UDFs (i.e. Arrays could be tagged as "ArrayLib" and "DataLib").
This one doesn't make sense to me.
5. Generate your own library: let users tag udfs and allow them to generate their own custom library download.
We used to have that actually.
6. Let users post "upgrades" to existing UDFs, letting them know that any "upgrades" must be fully backward compatible. (to ensure this youcan allow users who post udf's to include some sort of test case materials.
We already kind of support this - you are allowed to send me an update to a UDF. However - I only want one version of a UDF. I don't want 5 isEmail UDFs.
7. What about UDFs that need to be cffunctions because they need to use tags that don't have cfscript equivalents.
Eh? We support tag based UDFs already. :) Have since they came out.
8. Could cflib also be used to share custom tags?
If you read the announcement, you know this was considered. It may still happen.
9. API
We have multiple APIs already. An RSS feed, and the SnipEx API.
Comment 30 written by Tyler Clendenin on 11 June 2008, at 11:42 PM
When I spoke of more labels for UDFs I meant that even though DataManipulationLib is a logical and good place to store UDFs, I always found that more often then not when i was looking for a UDF I already knew which data type I wanted to manipulate. So say the Array() UDf would be tagged as DataManipulationLib and ArrayLib (perhaps ArrayLib as a sub label of the DataManipulationLib) Currently it's not a big deal, there aren't really enough UDFs to be a burden to find the right one, without paging of course =].
Also I hope that you didn't take my comment i the wrong way. We all know how poorly intent comes across over the internet. I wanted to say great job and thank you for reinvigorating the best CF resource on the net (aside from the livedocs).
Comment 31 written by Raymond Camden on 12 June 2008, at 6:03 AM
No worries (re: your last paragraph) - I know it's all just ideas here going back and forth. :)
Comment 32 written by James Moberg on 12 June 2008, at 9:02 AM
Also, I like the integration of SIFR. We've been using it for a while and it really helps to brand a website using non-traditionally installed fonts.
http://www.google.com/search?q=sifr
You should add a favicon for the site. We do this for every client website. The good (and free) Windows program to create favicons is IcoFX at http://icofx.ro/ (I can make one for you if you wish.)
Comment 33 written by Raymond Camden on 12 June 2008, at 9:30 AM
If you want to send over a favicon, be my guest. I'm not going to launch VMWare just for that Windows app. ;)
Comment 34 written by James Moberg on 12 June 2008, at 9:41 AM
Re: favicon. Here it is:
http://www.ssmedia.com/temp/favicon_cflib.ico
There may be a Mac favicon programs available... not sure. I know there are plenty of online services that will do the conversions, but the application that I recommended is incredibly feature rich (and portable) and I thought that any designer/developer with access to Windows could benefit from it.
Comment 35 written by Raymond Camden on 12 June 2008, at 9:47 AM
I'll get search pagination in next build. I have code to support nicer URLs for libraries (www.cflib.org/library/strlib) but I'm waiting on a bug to be fixed in MG3 before I push it.
Comment 36 written by James Moberg on 12 June 2008, at 10:01 AM
When you update the URLs, could you add the UDF URL to the comments of the UDF itself so that it can be easily looked up instead of searched for? Before I fix a slight bug or add a new feature, I search CFLib for the UDF to see if there has been an update. If a direct URL is part of the comments (like many .js libraries), it will make the process much easier to check as well as re-review the posted example.
Comment 37 written by Raymond Camden on 12 June 2008, at 10:02 AM
Comment 38 written by Raymond Camden on 12 June 2008, at 10:26 AM
Comment 39 written by Raymond Camden on 13 June 2008, at 1:23 PM
[Add Comment] [Subscribe to Comments]