サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Pixel 9
www.bennadel.com
Yesterday, I looked at how to create a simple modal window system in AngularJS. In that exploration, I used the $rootScope to bridge the gap between the modal Service and the modal directive. In the past, I've used the same approach to bridge the gap between a global uploader service and its Plupload directive. As it turns out, the scope tree acts as a wonderful pub/sub (Publish and Subscribe) mec
When I first got into AngularJS, I started using the $resource service to communicate with the backend. This wasn't a decision that I made based on thoughtful analysis; rather, I was simply doing what I saw in various AngularJS tutorials. In retrospect, it was an unfortunate decision. There's nothing inherently wrong with $resource - it just provides a lot of ceremony and abstraction that I don't
Out of the box, AngularJS gives you routing and the ngView directive. With these two features, you have the ability to map routes onto templates that get rendered inside of the ngView container. This works for simple, one-dimensional web sites; but, unfortunately, if you have a site that requires deep routing, AngularJS leaves you up to your own devices. In order to achieve deep routing, I've foun
Last year, at cf.Objective(), I was watching Elliott Sprehn give a presentation on Production Ready JavaScript. In part of the presentation, he was talked about client-side errors and recommended that everyone log client-side errors to the server. To be honest, before he mentioned it, I don't think that it had ever occurred to me! Before that, I had only ever logged server-side errors. But, now th
Let's say that someone makes a request to your server with data that is in the correct format, but is simply not "good" data. So for example, imagine that someone posted a String value to an API endpoint that expected a String value; but, the value of the string contained data that was blacklisted (ex. preventing people from using "password" as their password). What HTTP status code would you retu
Earlier this week, I talked about mapping RESTful resource URIs onto URL parameters and server-side events. When developing a thick-client application, much of the same URL routing functionality is required on the client. Only, with the ever-growing complexity of rich user interfaces, routing and partial page rendering on the client becomes much more difficult. Lately, I've been looking at Google'
Object Calisthenics 9 steps to better software design today, by Jeff Bay http://www.xpteam.com/jeff/writings/objectcalisthenics.rtf http://www.pragprog.com/titles/twa/thoughtworks-anthology We’ve all seen poorly written code that’s hard to understand, test, and maintain. Object-oriented programming promised to save us from our old procedural code, allowing us to write software incrementally, reusi
After playing with Deferred Objects for the first time yesterday, I've definitely gotten deferred on the brain. I've known about deferred objects for a long time and never really understood them; as such, I'm quite eager to wrap my head around exactly what it is that they are capable of doing. Last night, just after I posted my previous blog entry, it occurred to me that they might be useful for a
For years, Javascript developers have had the MouseOver and MouseOut events for triggering events when a user mouses over and out of a given HTML element. For anyone who's tried to use these, you know that they are great, but that they come with a huge problem: the mouseover and mouseout events fire for a given element if the user mouses over or out of an element nested within the given element. T
As I have been experimenting with HTML5's new features (SQLite, Cache Manifest, Offline Application Cache), I've started to build up a vision in my head of some very cool mobile web applications for my iPhone. In particular, I'm in love with the idea of creating a rich, offline web client for my Dig Deep Fitness web application. Ideally, I would like people to bookmark the Dig Deep Fitness applica
Flickr-Style Photo Tagging With jQuery And ColdFusion Enable Create | Disable Create Enable Delete | Disable Delete Enable Create | Disable Create Enable Delete | Disable Delete
Skip to main content nav#close" data-nav-open-class="open" class="m-sl-nav-bar m-sl-nav-bar--no-photo"> The jQuery Photo Tagger plugin allows you to add Flickr-style photo tagging to your images. You can create box-like overlays on top of your image and assign messages to each box. The plugin communicates with the server using the supplied API URLs such that the photo tags can be saved, persisted,
When people first start to learn about arrays, they usually learn about the push() and pop() methods, if their particular language supports it; at least, I know I did. These two methods append elements to an array and remove an element from the an array respectively. Both of these methods work at the end of the array, where the index is largest. Javascript arrays have native support for these two
Building frameworks in jQuery (or any other language for that matter) is very new to me; I don't claim to be any good at it. In fact, when I started looking into jQuery-based frameworks, I had no intention of creating my own. As I started to do my research, however, I quickly encountered two major problems with what was avilable: Most examples were so small that I could not see how they might be a
corMVC - jQuery-Powered Client Model-View-Controller (MVC) Framework M/Model: Domain-specific representation of application data. V/View: Renders the model into a form suitable for interaction. C/Controller: Receives input and creates a response using Models & Views. Welcome to corMVC - My jQuery-powered Client MVC Framework. CorMVC is a jQuery-powered Model-View-Controller (MVC) framework that ca
Yesterday, Dan G. Switzer, II was giving me some really great jQuery tips. Among the things that we discussed was the ability to define an anonymous function and then call it immediately: This is not jQuery specific, but the benefits of doing this is that you can create a totally private memory space in which to execute your anonymous function. In this memory space, locally declared variables won'
A while back, I wrote a proof-of-concept about enabling step-debugging in your jQuery selector paths. In that previous demo, you had to enter your jQuery selector values into a form and execute it manually within the test environment. This morning, I took that same concept and rolled it into a jQuery plugin. The plugin both lives as a utility function off of the jQuery library as well as a functio
The Camtasia Studio video content presented here requires a more recent version of the Adobe Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.
Over the weekend, I was working on my in-depth jQuery presentation for the New York ColdFusion User Group. As part of the presentation, I wanted to discuss the beauty of Javascript "closures" and how jQuery makes tremendous use of them. Javascript closures can be a very hard thing to wrap your head around, especially when you are faced with vague definitions like: A "closure" is an expression (typ
Below, we are going to create a sliding image puzzle using a DIV that contains a given image.
Since I have been getting into jQuery a lot lately, what with reading the books and playing around with code, I felt I should try a more complicated type of plug-in. As such, I have created this jQuery demo plug-in which creates sliding-image puzzles based on containers that have images. Running the demo page we get this output: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:
I am just starting to really get into jQuery, the JavaScript API that makes writing sweet-ass JavaScript easy and fun. As with ColdFusion, I like to really dive into it by plowing through the documentation (yeah, I actually do like reading documentation so I can see what the possibilities are!). jQuery.com and VisualjQuery.com provide great documentation and visual representations of the API, but
I was beating my head against the wall today for a bit trying to figure out why some values coming back from my ColdFusion JSON-esque solution where not evaluation properly. I had the following code in my AJAX data handler:
このページを最初にブックマークしてみませんか?
『Recent Blog Posts By Ben Nadel』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く