CFLib 2008
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:
<cfset captcha = helpers.util.makeRandomString()>
To format required CF version into a nicer string, I did:
#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:
<cfcomponent output="false" extends="ModelGlue.gesture.controller.Controller" beans="UDFService,LibraryService,config">
And here is an example of where I use it:
<cffunction name="getLatestUDFs" output="false">
<cfargument name="event" />
<cfset arguments.event.setValue("latestudfs", beans.udfService.getLatestUDFs()) />
</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:
<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).
Comments
[nit]
I much prefer seeing all of a library's funtions on one page instead of 20 at a time.
[/nit]
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?
@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.
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.
Thanks from all of us....
@JamesE (and all): Thanks and I'm happy you guys are liking it.
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.
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.
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";
@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
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!
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.
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.
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.
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.
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).
No worries (re: your last paragraph) - I know it's all just ideas here going back and forth. :)
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.)
If you want to send over a favicon, be my guest. I'm not going to launch VMWare just for that Windows app. ;)
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.
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.
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.

