SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 46 of 46
  1. #26
    zai_afridi
    SitePoint Community Guest
    specially i need of java script note justlike a meth obj and window obn and string obj seen me a notes i chapter to 8 chapter ok
    thanks a lot

  2. #27
    doron
    SitePoint Community Guest
    what about using prototype?

  3. #28
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look at Part 2 which discusses it.

    -Ryan

  4. #29
    dennis bartlett
    SitePoint Community Guest
    Typo in the example above:
    pimitive should be "primitive"

    var pimitiveString1 = "This is a primitive string";
    var pimitiveString2 = String("This is a primitive string");

  5. #30
    louis
    SitePoint Community Guest
    Great tutorial!! I used it for my first piece of OO based js function. It resizes an image to fit into its container, depending on whether the width or height is longer, yet keeping the aspect ratio.

    Help yourself if needed:

    function resizeImgOO(el)
    {
    function imgRatio(){
    return (el.height / el.width);
    }
    function holderRatio(){
    return (el.offsetParent.offsetHeight / el.offsetParent.offsetWidth);
    }
    function fitToContainer(){
    if(imgRatio>holderRatio)
    {
    el.height = el.offsetParent.offsetHeight;
    }
    else
    {
    el.width = el.offsetParent.offsetWidth;
    }
    }

    this.imgRatio = imgRatio;
    this.holderRatio = holderRatio;
    this.resize = fitToContainer;
    }




    var img = new resizeImgOO(document.getElementById('yourImgId'));

    img.resize();

  6. #31
    Naved
    SitePoint Community Guest
    excellent explaination

  7. #32
    SitePoint Member
    Join Date
    Jul 2007
    Location
    New York, NY
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very nice tutorial!

    i've been trying to wrap my head around OO in JS for some time, and found this very easy to understand.

    one suggestion: now that Part 2 does exist, maybe change the last sentence (starting with "Look out for Part 2") to an active link:
    http://www.sitepoint.com/article/oriented-programming-2

    thanks!
    Atg
    Last edited by aarontgrogg; Sep 5, 2007 at 07:13. Reason: Added Part 2 URL

  8. #33
    Basim
    SitePoint Community Guest
    Great Explanation, this gives different imagination about Java Script.

  9. #34
    pradeep
    SitePoint Community Guest
    great article.It clearly explain the fundamentals of oops features in javascript

  10. #35
    Eli Manobella
    SitePoint Community Guest
    Well written article. Clear and easy to understand. I find the information very useful for me.

  11. #36
    Gaurav Vaish
    SitePoint Community Guest
    Inconsistent and factually incorrect article:

    1. Title reads, "JavaScript Object-Oriented..."
    2. Content reads, "First of all, JavaScript is not a full-blown OOP (Object-Oriented Programming) language, such as Java, but it is an object-based language".

    Secondly, JavaScript is 100% Object-Oriented language. It supports all three pillars of OO as suggested by Grady Booch.

    Yes, of course, if the author has his own definition of OOPS, then it's a different matter.

    Have a look at:

    eduzine.edujini-labs.com/archives/34-Exploring-OOPS-JavaScript-Style-Part-1-Encapsulation.html
    eduzine.edujini-labs.com/archives/35-Exploring-OOPS-JavaScript-Style-Part-2-Inheritance.html
    eduzine.edujini-labs.com/archives/36-Exploring-OOPS-JavaScript-Style-Part-3-Polymorphism.html

    (Please add http-colon-slash-slash yourself)

    -Gaurav

  12. #37
    Daren
    SitePoint Community Guest
    Guarav, you are arguing on semantics but the truth is the author is correct. It is not a full-blown OOP language. Just because it uses a round-about way of satisfying the pillars of OOP, it can't do it directly so it doesn't "fully" qualify.

  13. #38
    Nivas
    SitePoint Community Guest
    Nice article.

  14. #39
    Ty
    SitePoint Community Guest
    Ty for the nice tutorial

  15. #40
    The Designer
    SitePoint Community Guest
    Nice tutorial, I'm used to C programming (procedural) style coding but now going into OOP programming and this helps alot...thanks!

  16. #41
    dhondi-srikanth
    SitePoint Community Guest
    Nice article for oop java script beginners...

  17. #42
    Amit
    SitePoint Community Guest
    Very cool stuff and nice way to represent things which are eas to understand.
    Thanks a Lot!

    Keep it UP !!!

  18. #43
    anon
    SitePoint Community Guest
    thanks for putting it up - excellent resource

  19. #44
    Steve
    SitePoint Community Guest
    Nice tutorial for a person who is starting, thank you.

  20. #45
    Niki
    SitePoint Community Guest
    Finally! Someone who explained it as God rules!! Great work: clear and usefull!

  21. #46
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Amazing, thank you so much for this. It's been about 5 years since I've coded in OOP and this totally refreshed all of the concepts.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •