[Prototype-core] Re: Prototype in 10 steps... what are they?
On Nov 18, 5:11 am, T.J. Crowder [EMAIL PROTECTED] wrote: ... 1. Master the $ and $$ Functions 2. Use instance methods to perform common tasks on elements 3. Master event observing (including delegation) 4. Push the envelope with Ajax 5. Use Enumerable to manage collections 6. Master binding 7. Treat functions like first-class objects 8. Really understand closures 9. Write class-based JavaScript 10. Have your mind blown by custom events ... No reason a list of ten can't be broken into two parts, as you suggest. Prototype in 10 Steps Basics: 1-5 Advanced: 1-5 (comprised of 6-10) That kind of organization would have definitely come in very handy when i first played with Prototype. Hell, i ended up rewriting hundreds of lines of code when i finally grasped Function.bind(). My next effort is understanding event delegation. i guess i like learning in reverse. -joe t. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Prototype in 10 steps... what are they?
I agree with Jerod about the binding part. Here's the modified list that I would suggest (probably that was my own learning curve) : 1. Master the $ function 2. Use instance methods to perform common tasks on elements 3. Master event observing 4. Use Enumerable to manage collections 5. Master binding and understand closures 6. Push the envelope with Ajax 7. Treat functions like first-class objects 8. Master the $$ function with event delegation 9. Write class-based JavaScript 10. Managing custom events The first 4 items would suggest that one has to get familiar with the wrapping property of Prototype over the usual Javascript programming for cross-platform scripting, and error-less coding. Everything to acquire good programming habits and use the library methods propertyl. The next 2 items jumps in the fun part (the why people want to learn Prototype in the first place). The last 4 items goes more in depth in making the scripts more maintainable, object-oriented, and structured. One could argue that making the script more OO and structured should be in the top priority, but I think that even though I agree, up to these points, Prototype may well be used on casual personal sites and hobby coding, and these do not necessarily need that kind of structure in their projects. Of course, this list could be argued for a long time, but I think that the general idea is the same. -yanick On Nov 18, 11:05 pm, Jerod Venema [EMAIL PROTECTED] wrote: I like TJs list. However, I'd move binding up in priority. Despite it being a more advanced use of javascript, it's vital to understanding the items listed as 3 and 4 (events and AJAX [callbacks]). -Jerod Venema On Tue, Nov 18, 2008 at 8:57 PM, Andrew Dupont [EMAIL PROTECTED]wrote: On Nov 18, 4:11 am, T.J. Crowder [EMAIL PROTECTED] wrote: That list falls neatly into two categories: Basic techniques not requiring *too* much in terms of conceptual understanding (the first five items), then more conceptual (and powerful) stuff (the last five items). I probably would have put Enumerable lower down except that it goes well with the basic techniques group. Yeah, that's the hard part. I think $$ and Enumerable go together because so many novice use cases for Enumerable will involve filtering DOM result sets. So I'd be inclined to move $$ to #5. Nit-picking, Treat functions like first-class objects sounds as though they aren't, but we're treating them like they are. I'd say the focus should be on the student learning that in JavaScript, functions *are* first-class objects. It's one of the most powerful concepts in the language. The phrasing assumes that the user probably hasn't come from a language where functions _are_ first-class objects; that's all that was intended. Thanks for your feedback, everyone. Cheers, Andrew -- Jerod Venema --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Prototype in 10 steps... what are they?
I'd add event delegation in there. On Nov 18, 7:02 am, Tom Gregory [EMAIL PROTECTED] wrote: Good list. I'd add function chaining and element selectors ($$, et al). ... But that pushes the list to eleven. #6 is vague ... it could mean many different things (even contain its own list of 10!) TAG On Nov 17, 2008, at 10:56 PM, Andrew Dupont wrote: I'm thinking about how we can flatten the learning curve. If you were to teach someone how to use Prototype in 10 incremental steps, what would they be? I've got only nine so far, but here they are: 1. Master the $ Function 2. Use instance methods to perform common tasks on elements 3. Master event observing 4. Push the envelope with Ajax 5. Use Enumerable to manage collections 6. Use Prototype's helper methods on built-in objects 7. Treat functions like first-class objects 8. Have your mind blown by custom events 9. Write class-based JavaScript Can you add a tenth to this list? Or do you have a completely different list? Let's hear it. Cheers, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Prototype in 10 steps... what are they?
That's a great list. It's difficult to know where to stop in terms of teaching JavaScript as opposed to teaching Prototype; to get the best out of the latter, you're well-served understanding the former in ways that many (most?) still don't. Frankly, only small comments -- the list looks good as-is. But FWIW, I'd fiddle with the order a bit, probably subsume #6 into the other topics, add closures, add binding, and tack $$ onto the $ discussion: 1. Master the $ and $$ Functions 2. Use instance methods to perform common tasks on elements 3. Master event observing (including delegation) 4. Push the envelope with Ajax 5. Use Enumerable to manage collections 6. Master binding 7. Treat functions like first-class objects 8. Really understand closures 9. Write class-based JavaScript 10. Have your mind blown by custom events That list falls neatly into two categories: Basic techniques not requiring *too* much in terms of conceptual understanding (the first five items), then more conceptual (and powerful) stuff (the last five items). I probably would have put Enumerable lower down except that it goes well with the basic techniques group. Nit-picking, Treat functions like first-class objects sounds as though they aren't, but we're treating them like they are. I'd say the focus should be on the student learning that in JavaScript, functions *are* first-class objects. It's one of the most powerful concepts in the language. But again, all that's pretty much small stuff. -- T.J. Crowder tj / crowder software / com On Nov 18, 5:56 am, Andrew Dupont [EMAIL PROTECTED] wrote: I'm thinking about how we can flatten the learning curve. If you were to teach someone how to use Prototype in 10 incremental steps, what would they be? I've got only nine so far, but here they are: 1. Master the $ Function 2. Use instance methods to perform common tasks on elements 3. Master event observing 4. Push the envelope with Ajax 5. Use Enumerable to manage collections 6. Use Prototype's helper methods on built-in objects 7. Treat functions like first-class objects 8. Have your mind blown by custom events 9. Write class-based JavaScript Can you add a tenth to this list? Or do you have a completely different list? Let's hear it. Cheers, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Prototype in 10 steps... what are they?
On Nov 18, 4:11 am, T.J. Crowder [EMAIL PROTECTED] wrote: That list falls neatly into two categories: Basic techniques not requiring *too* much in terms of conceptual understanding (the first five items), then more conceptual (and powerful) stuff (the last five items). I probably would have put Enumerable lower down except that it goes well with the basic techniques group. Yeah, that's the hard part. I think $$ and Enumerable go together because so many novice use cases for Enumerable will involve filtering DOM result sets. So I'd be inclined to move $$ to #5. Nit-picking, Treat functions like first-class objects sounds as though they aren't, but we're treating them like they are. I'd say the focus should be on the student learning that in JavaScript, functions *are* first-class objects. It's one of the most powerful concepts in the language. The phrasing assumes that the user probably hasn't come from a language where functions _are_ first-class objects; that's all that was intended. Thanks for your feedback, everyone. Cheers, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Prototype in 10 steps... what are they?
I like TJs list. However, I'd move binding up in priority. Despite it being a more advanced use of javascript, it's vital to understanding the items listed as 3 and 4 (events and AJAX [callbacks]). -Jerod Venema On Tue, Nov 18, 2008 at 8:57 PM, Andrew Dupont [EMAIL PROTECTED]wrote: On Nov 18, 4:11 am, T.J. Crowder [EMAIL PROTECTED] wrote: That list falls neatly into two categories: Basic techniques not requiring *too* much in terms of conceptual understanding (the first five items), then more conceptual (and powerful) stuff (the last five items). I probably would have put Enumerable lower down except that it goes well with the basic techniques group. Yeah, that's the hard part. I think $$ and Enumerable go together because so many novice use cases for Enumerable will involve filtering DOM result sets. So I'd be inclined to move $$ to #5. Nit-picking, Treat functions like first-class objects sounds as though they aren't, but we're treating them like they are. I'd say the focus should be on the student learning that in JavaScript, functions *are* first-class objects. It's one of the most powerful concepts in the language. The phrasing assumes that the user probably hasn't come from a language where functions _are_ first-class objects; that's all that was intended. Thanks for your feedback, everyone. Cheers, Andrew -- Jerod Venema --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Prototype in 10 steps... what are they?
Good list. I'd add function chaining and element selectors ($$, et al). ... But that pushes the list to eleven. #6 is vague ... it could mean many different things (even contain its own list of 10!) TAG On Nov 17, 2008, at 10:56 PM, Andrew Dupont wrote: I'm thinking about how we can flatten the learning curve. If you were to teach someone how to use Prototype in 10 incremental steps, what would they be? I've got only nine so far, but here they are: 1. Master the $ Function 2. Use instance methods to perform common tasks on elements 3. Master event observing 4. Push the envelope with Ajax 5. Use Enumerable to manage collections 6. Use Prototype's helper methods on built-in objects 7. Treat functions like first-class objects 8. Have your mind blown by custom events 9. Write class-based JavaScript Can you add a tenth to this list? Or do you have a completely different list? Let's hear it. Cheers, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---