3
votes
2answers
163 views

messaging class and global state

This is a front end project that is using socket.io for all communication with the server. This allows for push which is good, but recently we have been asked to provide a pause button. The pause ...
2
votes
2answers
199 views

I'm struggling with abstracting my animation code in my game using a functional style. How can I do this?

My game is a top down 2D shmup programmed in a functional style. I'm struggling with abstracting the code that is responsible for animating the projectiles. There are many types of guns with many ...
0
votes
2answers
166 views

How to remove redundant code that enables button. Or “if” statement

I got probably "micro optimization" problem. I got "History number", "Next Number", "Reset" buttons, as well "label" for text. Every time I click At "Next number" button I would like to show random ...
0
votes
0answers
185 views

Design advice for building pluggable componentry in AngularJS

I'm currently working on a team that's developed several, extremely similar web applications in flash, and wants them ported into JavaScript. They also want a single application harness to host all of ...
5
votes
4answers
739 views

Refactoring jQuery spaghetti code to use DDD [closed]

Most of my client side code ends up as a long script in one file the mostly looks like this: <script> function someFunction1(){/*...*/} function someFunction2(){/*...*/} ... var ...
2
votes
2answers
336 views

Refactored to a fancy global variable?

I am currently refactoring an application that i built in JavaScript. The application uses a starting hour and a total working hour count in order to construct a timetable for daily, weekly and ...
1
vote
3answers
389 views

Monitoring App: Client side or Server Side?

I have a monitoring web application which has a .Net Backend and a Silverlight frontend. The application crunchs big chunks of data, process them and presentates to user. Then user can interact with ...
3
votes
2answers
79 views

How to refactor to cleaner version of maintaing states of the widget

Backstory I inherited a bunch of code that I'd like to refactor. It is a UI application written in javascript. Current state: We have main application which consist of several UI components. And ...
3
votes
3answers
228 views

Bothering to cater to non-JavaScript clients? [duplicate]

Considering that it's April, 2013; do I still need to worry about non-JavaScript capable/enabled clients? Note: This question excludes having helper text with: JavaScript is required to view this ...
2
votes
1answer
274 views

Shift Javascript framework - What pattern is this? MVP, MVC or something else

I have created a very tiny framework to be able to get away from all the clutter while developing. The point of the framework is not to replace any library of choice but simply segregate the code to ...
39
votes
6answers
3k views

How safe are hidden AJAX requests that fake performance?

What is a hidden AJAX request? I've noticed an increase in the usage of hidden AJAX requests designed to make a user's action appear to happen immediately. I'll refer to this type of AJAX request as ...
0
votes
1answer
394 views

How to structure our Javascript so that it is easily editable, testable, and can make calls to render a view without knowing specifics about the view

I am working on a web app that displays some data and uses javascript. Right now, we are serving up parts of our js (to display certain types of information, ie "Render a View") via our server which ...
12
votes
4answers
513 views

What are the Advantages of a “Combined” Getter/Setter VS Individual Methods?

This is what I call a "combined" getter/setter method (from jQuery): var foo = $("<div>This is my HTML</div>"), myText; myText = foo.text(); // myHTML now equals "This is my HTML" ...
6
votes
1answer
222 views

Event Aggregator.. not getting a response, how to determine completion?

I'm rewriting a vehicle tracking application, a google maps based thing.. The users are able to search for a vehicle by typing a few characters of the vehicles "callsign". My application is based ...
11
votes
4answers
5k views

Are UML class diagrams adequate to design javascript systems?

Given that UML is oriented towards a more classic approach to object orientation, is it still usable in a reliable way to design javascript systems? One specific problem that I can see is that class ...
5
votes
13answers
858 views

Limitations of Polymorphism in statically typed languages

I program mostly in statically typed languages, like C++ and Java. A common strategy employed in languages like these to handle dealing with collections of objects which are related, but which need ...
33
votes
16answers
4k views

Should I continue my self-taught coding practice or learn how to do coding professionally? [closed]

Lately I've been getting professional work, hanging out with other programmers, and making friends in the industry. The only thing is I'm 100% self-taught. It's caused my style to extremely deviate ...
3
votes
4answers
260 views

Evidence of Bad Design: Updating feature A breaks/interferes with existing feature B

I am working on a Javascript Web App & I am finding as I expand the program & add new features(new animations) it causes existing features to break or work differently than prior to adding ...
2
votes
3answers
342 views

How can I refactor client side functionality to create a product line-like generic design?

Assume the following situation similar to that of Stack Overflow: I have a system with a front-end that can perform various manipulations on the data (by sending messages to REST back-end): Posting ...
4
votes
1answer
354 views

Does anyone have suggestions for design or open source libraries specifically for a single page AJAX application? [closed]

I'm working on a major new version of a browser based application and I'm looking for comments/suggestions about the architecture/design. It's a single page application using AJAX and client side ...
9
votes
6answers
677 views

JavaScript - Why do frameworks bind to $() [closed]

Disclaimer: I know there is no strictly correct answer to this, but I've come across something that does not make sense to me, and I'd like to try to understand it better by seeing what other people ...
5
votes
3answers
2k views

Javascript, Text Annotations and Ideas

I am very curious to hear input from others on a problem I've been contemplating for some time now. Essentially I would like to present a user with a text document and allow him/her to make ...