For a week or so now I've been talking about my plans to create a web site in Node and Express. I finally decided to pull the trigger and upgrade my AppFog account. I'm now running JavaScriptCookbook.com with a real domain and am really (honest!) ready for submissions. As I stated originally, my goal here is to create a site that shares a set of common problems (and solutions!) that folks run into with JavaScript. Yes, there is Stackoverflow. I use it myself. But I wanted a site that would be more of a directory. Something more focused and easy to search. Hell, maybe it won't take off. If I don't get any submissions than I'll still use it myself. But I hope folks can find some use in it - and even better - help contribute.
One of my biggest concerns with client-side development lately is that there seems to be a wealth of information for beginners - some more information for experts - but not a lot in the middle. Folks who know JavaScript but need help in using it better.
I hope this site can be some help in that regard.
Finally, if you want to check out the code behind the site (and feel free to critique it, I'm new to Node), you can find it on GitHub here: https://github.com/cfjedimaster/javascriptcookbook
p.s. Anyone want to come up with a nice favicon? I can pay you with unicorns and magic!
Archived Comments
Getting this when I visit the site
We're really sorry, but it looks like the site you're attempting to navigate to is unable to respond. Please check back in a few moments.
I forgot to make it support "www". Please test now. Fixed.
There we go :)
I'm so embedded with jQuery that all my useful snippets use it.
Would I have to write them in pure js for them to be approved?
Here's an example:
$('form').on('click','input:submit[name="Delete"][value="Delete"]',function() {
return window.confirm(this.title || 'Delete this record?');
});
If this is where you're going. . .
'One of my biggest concerns with client-side development lately...'
I'm in. . .
Phillip: I wouldn't say I'm against jQuery. I would say that I prefer to go w/o a framework and show folks the nuts and bolts. That's my thinking now.
Jose: It is something I'm kinda passionate about now. I think it is where I can have the most impact in this community.
Oh Ray. Stick to ColdFusion, buddy.
You betcha, Toppa. ;) Been a while man, where ya been?
You blocked me the last time I hurt your feelings. Friends? *hugz*
How is it you attract such a diverse group of douches, Ray?
Heh, the thing about Topper/Toppa is that s/he is the slowest troll I've ever seen. Maybe 1 post every 4 months. I've asked - numerous times - if s/he would like to *really* engage in conversation about whatever problem s/he has with me, but s/he never responded. Meh. Anyone so lame as to troll anonymously is probably at home in their parents basement working on their level 85 warrior in Warcraft. ;)
I would really like to be able to subscribe to the feed. Any intention of adding that in the future?
In theory I could add a RSS feed in seconds. I thought about it but didn't add it.
I like the idea and would love to to watch and contribute. However, I can forsee myself forgetting to check in without an rss feed.
I've added it, but not deployed it yet. If you check Github you can see it there.
I'm adding one more feature for the next deployment, and that is a "select all and dump to JSON" feature. I'll be honest and say that only reason I'm adding is that - unlike with MySQL - I don't know how to do a database backup.
It would be really cool to allow users to revise or add alternatives to the original post. This would ultimately lead to an array of good solutions.
Perhaps a user would post an alternative method, it would receive a number of stars, the system would then move it in place or adjacent to the original post.
Just an idea based on this thread. http://www.javascriptcookbo...
It's not that I'm against frameworks, they most definitely save time. Sometimes though, they're overkill. . .
Zach, I'd need to set up user accounts and it would be a lot more work.
Fantastic! As more than a beginner but not quite an expert in Javascript, I could really find the in-between stuff helpful in developing a solid understanding of best-practices and improving my basic skills.
One suggestion: Some way to mark a post/technique/etc when it becomes outdated or no longer valid/supported. At some point certain methods or property names will change, or be replaced by another technique to achieve the same thing. I think it would be helpful to link the "old way" with the "new way" somehow, or just to plainly show that Technique A worked back in 2008, but its not really used anymore because Technique B is much better/faster/simpler/etc.
I think what I'll do is use commenting for that. I can see adding a comment, "Here is the old code I had that I replaced on date X cuz technique Y doesn't make sense."
RSS is live now. Support for 'More Info' as a property is live. (Although not using it yet.)
Nice work Ray! I can see how this could turn into a really useful site. I wonder how you can make it more than just a searchable collection of articles. Seems like being able to browse a TOC might be helpful, or even adding some chat rooms so that people can get instant help from the community. You may be thinking pure JS right now, which is definitely useful, but not many people code strictly in pure JS. Might as well create space for all the popular frameworks and libraries.
I'm actually trying *not* to have it grow. I'd rather keep it simple and direct. As it stands, I know that some frameworks already have their own cookbook. There's one being worked on now for jQuery Mobile.
Well, it's your site! :) As a counterpoint, the name "JavaScript Cookbook" is, by the nature of its name, common to all frameworks, and therefore, my guess is that your users would want a place to discuss the gamut of everything JS. Just my take on it, for what it's worth.
Hey Ray, just a friendly comment to let you know I can't view your site. I get a 'unable to respond' type page referring to appfrog instead. I'll check again later. Sounds good though!
Haha! "AppFog"... Sorry, bad phone typing skills.
Steve, when did you notice this? The site crashed overnight and I restarted it around 7. I see your comments are at 6:50 my time, so that was it.
As an FYI, I do not know why it crashed. I've got a support ticket open with AppFog.
When I hear more, I'll share my experience so folks can know.
To me - how a company handles a problem is a HUGE indicator of their value. :)
Yeah it was at the time of my comment. I'm in Australia so an off time for you guys and thought maybe it was even related to maintenance or something. I didn't think much of it but thought I'd just let you know.
I'm with you on judging value based on a company's reaction and response! It goes a long way. :-)
The links from the RSS feed are not pointing to the correct location. Article is missing an "L".
http://www.javascriptcookbo...
Ugh. Thanks, updating right now.
If you could confirm the fix, I'd appreciate it.
Post descriptions are not supporting character entities.
Example:
"Worker location is determined relative to the html page not to the script that calls them. So if you need to call a worker from a script that might be called as <src='script.js'> on one page and <src='js/script.js'> on another this pattern lets you avoid using absolute URLs."
Thanks - I forgot I was already escaping the input.