7
votes
1answer
146 views

MV* Pattern for a board game

I have made a small game in Javascript, while simultaneously learn about the ever so popular model view controller. The game is this, there are 3 players(green, purple, yellow) and they have to try ...
6
votes
0answers
2k views

Discussing jQuery Mobile and Backbone.js integration with a simple FAQ App [closed]

Discussing jQuery Mobile and Backbone.js integration with a simple FAQ App This project is hosted on github here: faq-app-client-mobile-comparison I can't post more than 2 hyperlinks (my reputation ...
3
votes
2answers
939 views

Simple registration form with Backbone

I am trying to create simple registration form with Backbone. I need to validate fields on blur, and whole form on submit. HTML: ...
3
votes
1answer
93 views

How to refactor this series of JavaScript promises?

This is part of a class for paginating a Backbone collection. The paginateTo method is for paginating to a model id. It returns the model if it's already in the ...
2
votes
1answer
139 views

Need review and best practice tips for a Backbone project

I made a simple app that fetches the favourite programming language of a Github user, by simply inserting their username. The full code is uploaded on Github, please feel free to fork it from ...
2
votes
1answer
473 views

A generic context menu with generically bound events

I've taken a stab at making a context menu using BackboneJS. Here's the overall structure: Collections: /collection/contextMenuGroups /collection/contextMenuItems Models: ...
2
votes
1answer
33 views

Proper techniques for allowing many views to subscribe to window.unload?

I would like to execute code for many views whenever the window is unloaded. For instance, I could have something like this in a view's initialize: ...
2
votes
1answer
244 views

Is my Backbone.View organized properly and stylistically correct?

I'm learning BackboneJS and I just made an attempt at converting a pre-existing module to a Backbone.View. I was hoping to get some feedback on my attempt and learn. I've been using the annotated ToDo ...
2
votes
1answer
122 views

Can I use jQuery's .when() to make this code DRY?

I'm trying to run a bit of code when my loginManager is logged in. It might be already, or I might be waiting: ...
2
votes
1answer
194 views

First attempt incorporating backbone.js in my code

I have a feeling I might be doing it wrong, what major things would you improve in this code? The code is basically handling a tour on first login, showing it only for first login users (activated ...
1
vote
1answer
284 views

Rendering a large collection using BackboneJS and LoDash — is this an appropriate way to achieve this?

I have a Playlist object which contains many PlaylistItem children. If I have 10,000 children then the UI gets blocked from rendering until all 10,000 children have been processed. To avoid this, ...
1
vote
1answer
1k views

Backbone.js App approach not very scalable - nested views

I'm creating a Backbone App, and although everything seems to work i'm afraid i might need to refactor very soon if I keep adding functionalities and views with this approach. I'm using Parse in the ...
0
votes
0answers
46 views

Validating a model and focus to the element if validation fails

I am using Backbone Marionette - I would like to set the user name and password if that passes the model validation method. I am highly confused with that. Please show me a handy approach or correct ...