Questions tagged [object-model]

Use this tag for questions related to object-model.

An object-model can be said to be a "Collection of objects or classes using which an application or program can manipulate specific behavior/activity of its world."

For example, the Document Object Model (DOM) is a collection of objects which represent a page in browser.

Attribution: http://en.wikipedia.org/wiki/Object_model

167 questions
128
votes
7 answers

JavaScript: What are .extend and .prototype used for?

I am relatively new to JavaScript and keep seeing .extend and .prototype in third party libraries I am using. I thought it had to do with the Prototype javascript library, but I am beginning to think that is not the case. What are these used for?
Andrew
  • 227,796
  • 193
  • 515
  • 708
36
votes
8 answers

How do I get started designing and implementing a script interface for my .NET application?

How do I get started designing and implementing a script interface for my .NET application? There is VSTA (the .NET equivalent of VBA for COM), but as far as I understand I would have to pay a license fee for every installation of my application. It…
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
34
votes
7 answers

Multilingual data modeling on MongoDB

I am trying to model my objects on MonogoDB and not sure how to proceed. I am building a Product catalog that will be: No frequent changes to product catalog. A bulk operation may be done weekly / fortnight. Product information is in multiple…
Abdel Raoof Olakara
  • 19,223
  • 11
  • 88
  • 133
30
votes
3 answers

AngularJS : How should controllers and factories/services be structured with a rich, hierarchical object model?

I read these two great articles: The state of angularjs controllers by Jonathan Creamer and Rethinking AngularJS Controllers by Todd Motto In these articles, the authors talk about the right way to use controllers (making them anemic bridges between…
richard
  • 12,263
  • 23
  • 95
  • 151
27
votes
5 answers

In Python, what is the difference between an object and a dictionary?

After an object has been created, I can add and remove slots at will, as I can do with a dictionary. Even methods are just objects stored in slots, so I probably can add methods to a dictionary as well. Is there something I can do with a…
Cephalopod
  • 14,632
  • 7
  • 51
  • 70
21
votes
2 answers

What's the difference between data model and object model?

CWM is data modeling UML is object modeling. Can someone explain the difference that a layman can understand?
user198729
  • 61,774
  • 108
  • 250
  • 348
18
votes
2 answers

Using TFS API, how can I find the comments which were made on a Code Review?

I'm trying to figure out a way to find details about a Code Review Request / Response item in TFS2012. I can query for all Code Review Request/Response items in the following way: const string TfsUri = "http://mytfsserver:8080/tfs/Default…
RoelF
  • 7,483
  • 5
  • 44
  • 67
18
votes
5 answers

Load a previous model version

I am loading a NSManagedObjectModel model with the initWithContentsOfURL: constructor like this: NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"MyDocument" withExtension:@"momd"]; NSManagedObjectModel *mom = [[NSManagedObjectModel alloc]…
SystematicFrank
  • 16,555
  • 7
  • 56
  • 102
11
votes
2 answers

Nested singleton class method lookup

First of all, I understand that this question has no application in real world, I'm just curious. Imagine we have a class with a singleton method: class Foo def self.bar end end If we call Foo.bar, it will first search for a method in a…
Dima Knivets
  • 2,418
  • 7
  • 28
  • 40
11
votes
3 answers

Custom structure/type that can be used with switch()

One of my projects has a value type/struct that represents a custom identifier string for a video format. In this case, it's going to contain a content type string, but that can vary. I've used a struct so it can be strongly type when it's passed…
Deanna
  • 23,876
  • 7
  • 71
  • 156
10
votes
4 answers

Domain Model and Object Model

What is Domain Model? What is Object Model? Are Domain Model and Object Model the same thing? What is the difference between these two? Please explain with simple example. I'm new in this concepts. I searched a lot in Google. But I couldn't get…
Asish AP
  • 4,421
  • 2
  • 28
  • 50
9
votes
1 answer

Designing DTOs that have foreign key relationships

I am using Java + Spring framework for a web-application. I am not using any ORM tool. Instead I am trying to model the db relations as Java objects using simple DAO/DTO pattern. Whenever the DTO exactly corresponds to a single table in the…
Keshav
  • 4,408
  • 8
  • 31
  • 50
9
votes
1 answer

When should transient properties in CoreData be included in the object model?

I am unsure about the correct definition of transient properties: One can define transient properties in the object model and then calculate them when needed in the related class. But things work just as well if you specify a class and define…
8
votes
7 answers

How to determine if a javascript object is simple or complex?

Basically I need to tell apart the following two: var simple = 5 // or "word", or 56.78, or any other "simple" object var complex = {propname: "propvalue", "otherprop": "othervalue"}
Andrey
  • 20,487
  • 26
  • 108
  • 176
8
votes
1 answer

At what point does the lifetime of a trivial type created by placement-new start?

During a dive into dynamic memory, it occurred to me it appears contradictory how trivial types begin their lifetime. Consider the snippet void* p = ::operator new(sizeof(int)); // 1 // 2 new (p) int; // 3 When does the int start its…
Passer By
  • 19,325
  • 6
  • 49
  • 96
1
2 3
11 12