Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9148027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:09:37+00:00 2026-06-17T11:09:37+00:00

I have a web application that uses the Backbone.js framework (which is prototype-based). However,

  • 0

I have a web application that uses the Backbone.js framework (which is prototype-based). However, there is object oriented code that isn’t Backbone.js code. My question is: How can I document the application modeling with UML if not all of the code is object-oriented?
How can i model a style prototype-based and combine it with OO? Is it possible and/or correct? Can anyone point me to some documentation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:09:38+00:00Added an answer on June 17, 2026 at 11:09 am

    You could argue that as long as you simply use the *.extend({...}) style class definitions in Backbone, then your Backbone class model will be a standard. object oriented class model.

    Consider:

    //a base class
    var ViewBase = Backbone.View.extend({
      //constructor
      initialize: function() {
        //instance field
        this.someProp = "value";
      },
    
      //overrides a superclass method
      remove: function() {
         this.cleanup();
         //call superclass method
         Backbone.View.prototype.remove.apply(this, arguments);
      },
    
      //overrideable method
      cleanup: function() { ... },
    
      //an abstract method that must be implemented. It's not a compile
      //time contract, but will crash in runtime if you don't implement it
      getContext: function() { throw new Error("NotImplemented"); }
    });
    
    //derives a new class, doesn't affect the base class implementation
    var ListItemView = ViewBase.extend({
      //constructor
      initialize: function() {
        //instance field
        this.someOtherProp = "value";
    
        //constructor chaining
        ViewBase.prototype.initialize.apply(this, arguments);
      },
    
      //add new method
      filterUsers: function() { ... },
    
      //hides a superclass method
      cleanup: function() { ... },
    
      //implement an abstract method
      getContext: function() { ... }
    
    }, {
      //a static (class) method
      create: function() { ... }
    }); 
    
    //instantiates a class
    var view = new ListItemView();
    
    //modifies the instance, but does not modify the prototype
    //i.e. class definition
    view.foo = 'bar';
    

    While it’s true that internally Backbone uses prototypal inheritance chaining, no “prototypal characteristics” are being employed here. The extend function does not modify existing object’s prototype, and unless you later on monkey patch a superclass prototype, the with something like ViewBase.prototype.something = 'foo', the superclass prototype will be unchanged throughout the application’s lifetime.

    What’s missing of course are private/protected properties, but otherwise the Backbone class model is no different from, say, Java or C#, so I don’t see why a standard UML class diagram would not be able to describe it?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that uses TONS of javascript, and as usual, there
I have a web application that uses the CDO Message object to email reports.
I have a web application that uses a library which resides in TOMCAT_HOME/common/lib. This
I have a web application that uses the Spring Framework (3.1) and persistence through
I have never written any code that uses threads. I have a web application
I have a web based application that uses a self signed certificate. When you
I have a web application that uses an ActiveX COM component, for example: <OBJECT
I have a web forms application that uses entity framework, the application is deployed
I have a web application that uses ajax with prototype.js ( Ajax.Updater ). new
I have a web application that uses .NET Framework 4, MVC 4, Ninject 3.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.