Home arrow JavaScript arrow Object-Oriented JavaScript: Building Real-World Examples

Object-Oriented JavaScript: Building Real-World Examples

In the first two parts of this series, we've explored the most important points related to object-oriented JavaScript. In this final part, we go through the development of some practical examples for creating helpful objects that can be used in different JavaScript applications.

Author Info:
By: Alejandro Gervasio
Rating: 2 stars2 stars2 stars2 stars2 stars / 93
December 12, 2005
  1. · Object-Oriented JavaScript: Building Real-World Examples
  2. · The first hands-on example: building object-based pop-up windows
  3. · Object-oriented AJAX: creating http requester objects
  4. · A final example: building quick and dirty form validating objects

print this article

Object-Oriented JavaScript: Building Real-World Examples
(Page 1 of 4 )


Welcome to the last installment of the series “Object-oriented JavaScript.” In three parts, this series introduces the core concepts for working with user-defined object in JavaScript, and shows how to use them, particularly in large applications, where a bunch of reusable objects can very often yield better results than using conventional JavaScript functions.

In order to refresh the concepts deployed during the previous articles, let’s reflect briefly on some of the most important points regarding the usage of user-defined objects in the JavaScript terrain. For obvious reasons, the first tutorial went through the key points for defining constructor functions and object instantiation, as well as for declaring properties and methods. Also, a few additional object-based features were conveniently illustrated, by taking a brief look at the “constructor” property and “Functions” objects, and their appropriate implementation through hands-on examples.

Going one step further in the learning curve, in the second tutorial I explained the use of the “prototype” property, which, as you may have realized, is extremely helpful for applying inheritance between objects. It allows the definition of base constructor functions, followed by the derivation of as many objects as required from the corresponding functions. In fact, the most remarkable aspect of using the “prototype” property is the ability to encapsulate as much functionality as possible in base (or parent) objects, and then create child objects that eventually will override or annex properties and methods inherited from the base constructor functions. Pretty nice, right? If you were thinking that only full-fledged programming languages were capable of offering inheritance capabilities, this is really good news.

Having walked a long way through the nitty-gritty of user-created objects in JavaScript, the question is: what’s next? Well, in this final tutorial I’ll develop some real-world examples that obviously will include custom objects, so you can have a pretty clear idea of how to implement them in modern Web applications. The journey will begin building in pop-up window constructors, as well as http requester objects, and end up developing form validating objects, which you can easily introduce in your scripts. Sounds good enough to you? All right, let’s get started.

blog comments powered by Disqus

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials