Code Review: Am I Using JQuery Effectively?
I'm working on a back-end image gallery management page. This particular page is purely for asset organization so there's no user input being stored in the DB, the only thing happening is relational table entries being added or deleted.
I just feel like my code is extremely bloated and there's a lot going on. I'm using JQuery and JQuery UI for a lot but I'm wondering if my own personal functions and objects are being used where JQuery code would better suffice. I work with C# mostly and I have a lot of JS experience but all really procedural stuff. I'm just learning how to implement various JS design patterns.
The page in question is here:
http://photography.stevenleoncooper.com/Admin/GalleryManager.php
I'm mostly interested in knowing if I'm coding efficiently and if I'm neglecting to use any convenient JQuery features that could make my code a little more readable. Everything on this page is Asynchronous because I wanted the interface to be server-independant; everything interacts with JSON objects and could easily be ported to an ASP or CF website instead of PHP.
The big daddy of all the scripts (Besides JQuery itself) is my sg.admin.interface.js file:
Unfortunately it was too big to paste in here. Here's a link: http://photography.stevenleoncooper.com/Admin/Scripts/sg.admin.interface.js
Basically everything is wrapped into a single object with a one-time constructor and I tried to separate major functions so that it was easier to read. That's why there's a UI object which is separate from the Async Handler object (the Async handler could easily modify the UI but I didn't want it getting messy).
I also liked the idea of States for determining the layout of particular objects. Currently my states only have classes attached to them but I think I want to implement more properties such as self-invoking functions to animate or modify the elements when the state changes.
Any help is much appreciated,
-Steve