Posts tagged with 'javascript'
Welcome to another "Weekly Concerns". This is a post-a-week series of interesting links, relevant to programming and programmers. You can check out previous Weekly Concerns posts in the archive.
- A platform to write apps in Ruby for ANY phone that uses SMS: Dumb Store.
- Password manager that doesn't actually store passwords: AnyHash.
- It took 54 years, but Xanadu is finally released as OpenXanadu.
- ECMAScript (aka the JavaScript spec) 6 is scheduled to be done by the end of this year. Of course, that doesn't really mean every browser will support every feature.
- Tetris was first created 30 years ago.
If you have an interesting link that you'd like to see in Weekly Concerns, leave a comment or contact me.
A project I'm working on now has a SPA project that uses the doT template engine.
Using it isn't terribly different from other JS templating engines (like Mustache), so if you have experience with those, it should look pretty similar.
First, you need a template. Just define it in a <script></script> block like so:
Notice the {{ }} areas in the template? That's what doT is going to fill in with whatever data we want (i.e. interpolation). The data that will be passed in is simply a JavaScript object, and this template knows that object by the name "it". So you can think of "it" as kinda like a keyword.
The next step would be to get the data, get the template, and combine them together to get an output.
Note that I'm using jQuery for convenience, but it's not required.
doT also offers conditionals and looping. It claims to be the "fastest + concise" templating engine for Node.js and browsers. If performance is a major concern for your templating engine, you can check out their benchmarks. Seems to be a close race depending on the browser, but doT is no slouch. Personally, I believe that templating is (hopefully) such a small part of the overall performance of a typical SPA app that it won't keep me up at night.
Welcome to another "Weekly Concerns". This is a post-a-week series of interesting links, relevant to programming and programmers. You can check out previous Weekly Concerns posts in the archive.
- Need a real API for demonstrating Ajax stuff? Check out The Example API. It provides all kinds of methods (GET, POST, etc), content responses (JSON, JSONP, XML, etc), response codes (404, 500, etc). Great for cross-domain testing, and it's what I used for my jsonp example post.
- Something to think about: Why Link Shorteners Harm Your Readers
- How to create better cards (in Pivotal, LeanKit, whatever card tracking/PM system you're using). I find the idea of gherkin/cucumber tests in the card to be an intriguing one.
- Need a dummy placeholder image? Use dummyimage.com to get them dynamically.
Ever experience the new wave? Next wave? Dream wave? Flava flav? A guy named Dave? Men's aftershave? A voodoo conclave? 12 Years a Slave? Shortwave? OR CYBERPUNK!? Ever stared at a CRT wistfully?
I didn't think so.
If you have an interesting link that you'd like to see in Weekly Concerns, leave a comment or contact me.
Welcome to another "Weekly Concerns". This is a post-a-week series of interesting links, relevant to programming and programmers. You can check out previous Weekly Concerns posts in the archive.
- 50 Years of BASIC
- Why is it called "logging in"?
- I've been working with CKEditor recently, whereas most of my experience is with TinyMCE. I asked a question on Stack Overflow about manipulating the HTML in a CKEditor instance.
- Resizing images in your ASP.NET project? Check out ImageResizer. It's API and functionality had me crying tears of joy compared to the cludgy mess of System.Drawing and System.IO stuff I was using.
- Equality in JavaScript sure is cuh-razy!
If you have an interesting link that you'd like to see in Weekly Concerns, leave a comment or contact me.
Welcome to another "Weekly Concerns". This is a post-a-week series of interesting links, relevant to programming and programmers. You can check out previous Weekly Concerns posts in the archive.
- 10 Mistakes that C# Programmers Make, from Toptal.
- The user is drunk - how to think about UIs by picturing a drunk user...
- ...which reminds me of the $5 Guerrilla User Test - buy someone a drink at a bar and observe them try to complete tasks...
- ...which reminds me of Steve Krug's excellent book, Don't Make Me Think, which is now in its 3rd edition.
- Video of Brian Cavalier presenting "AOP-ing your JavaScript" at SpringOne2GX 2013.
If you have an interesting link that you'd like to see in Weekly Concerns, leave a comment or contact me.