background preloader

Architecture

Facebook Twitter

Web workers

Browser history. Backbone. Modules management. Templating. Reviews of some MVC frameworks. UPDATE 1/14/2012: Added Batman.js and Angular.js due to popular demand and because they looked impressive. Over the last several months I have been in a constant search for the perfect javascript MVC framework. Driven by a dire need for the right level of abstraction and features, I have tried out - some more cursorily than others - every framework I could get my hands on. Here lies a brief synopsis of each framework. Lastly, I share the framework which I ultimately decided on. Specifically, the following four features are very important to me: UI Bindings - I'm not just talking about templates, I'm talking about a declarative approach to automatically updating the view layer when the underlying model changes.

The Contenders Here is a table showing all of the frameworks support for the above features. 1. Backbone.js is the web's darling framework. Pros: Strong community and lots of momentum. Cons: Lacks strong abstractions and leaves something to be desired. 2. Pros: Bindings support. 3. Designing Javascript APIs. We at Filepicker.io spend a lot of time thinking about APIs. With the release of our Version 1.0 javascript API, we thought about best practices for javascript API design, and wanted to share them so that when we use your API, it’ll be just as awesome as when you use ours. Rules of your Javascript API Rule 0: Never make breaking changes to your API. Unless you must. An API is a contract between you and the developers who use your product. Don’t violate it. The developers building on your API have invested time and energy into learning how to use your product and integrating it into theirs.

However as your knowledge about how people are using your product and API grows, the original API will become stale and a refresh will be in order. Over the course of our early customer development during YC, the product and feature set was changing so fast it essentially meant we just piled more and more on to the API. Rule 1: Provide wood and nails, and a complete house for your API In summary:

The Developer Experience (Large Slides) Spine. Buyer Protection Program When you buy a domain name at Dan.com, you’re automatically covered by our unique Buyer Protection Program. Read more about how we keep you safe on our Trust and Security page. Next to our secure domain ownership transfer process, we strictly monitor all transactions. If anything looks weird, we take immediate action. And if the seller doesn't deliver on their part of the deal, we refund you within 24 hours.

Fast & easy transfers 98% of all domain ownership transfers are completed within 24 hours. Hassle free payments Pay by bank wire and get a 1% discount or use one of the most popular payment options available through our payment processor, Adyen. Scalable JavaScript Application Architecture. CSRF protection and Single Page Apps. You're in luck! Just about 2 weeks ago I was asked the same question, and after a bit of head-scratching, I came up with the following.

Please keep in mind that this is not well peer-reviewed, so we'll see how the comments and voting goes. Personally, I think it's a good technique. 1. Once you receive the first request to load your application, generate a secure random identifier and store it in a session variable on the server, then send it to the client.

<script>setToken('<% print SESSION[TOKEN] %>');</script></body> Your setToken() would assign the token value to the variable in which you'd keep the token. 2. With each request you'd add that token to the list of parameters, like token=TOKEN, and the serve would check it against the one stored in the session variable. 3. It's not really mandatory, but it's a good idea to refresh the token every once in a while, say 15 minutes. Note: A key element in the process is HTTPS usage.