Welp, we're into week three. Left Friday with an assignment to work on our "Twitter apps". I had been doing pretty well, got that master AJAX call working on most components, but then my brain turned to mush and I kept running into problems I couldn't think of any solution to other than throwing more code at them. By Monday my app was kind of a mess with everything half working. The profile would update but all the picture links were broken. The database would be updated with new friends that wouldn't be written into my HTML table. The thing that drove me craziest trying to figure out was the 'Delete' buttton that only worked after two clicks.
I took a look at a classmate's JavaScript. He kept his code much more organized than mine and made good use of constructors to make his objects. I think I've just been trying to push ahead so long I lost sight of the big picture of how it all works together. My classmate's code worked better than mine, but even if it wasn't demonstrable more efficient, I think there's a lot to be learned from writing a working version of code in another style, just to gain deeper understanding of how your own code works.
Half an hour after class ended, I had my app rewritten and working perfectly. Ready to tackle today's assignment.
We had our introduction to Angular. I still don't know exactly what to call Angular. It's like a JavaScript add-on MVC framework thingy. All I know is it's supposed to simplify the JavaScript calls we've been writing. I don't have enough of a grasp on it to see how it'll make things that much easier, but I got a good start on today's assignment, so at least I have a feel for how to write it. Hope it comes in handy.
No comments:
Post a Comment