ooad

Abstraction VS Information Hiding VS Encapsulation

Can you tell me what is difference between ABSTRACTION and INFORMATION HIDING in software development? I am confused abstraction hides detail implementation and information hiding abstracts whole details of something. updated: I found good answer for these three concepts. From here: http://www.itmweb.com/essay550.htm Abstraction: ...

Best practices with jQuery form binding code in an application

We have an application with a good amount of jQuery JSON calls to server side code. Because of this, we have a large amount of binding code to parse responses and bind the appropriate values to the form. This is a two part question. What is the reccomended approach for dealing with a large number of forms that all have different data. ...

When should you use a class vs a struct in C++?

In what scenarios is it better to use a struct vs a class in C++? ...

OO Design, open/closed principle question

I've been thinking about this object oriented design question for a while now and have unable to come up with a satisfactory solution, so thought I'd throw it open to the crowds here for some opinions. I have a Game class that represents a turn based board game, we can assume it's similar to Monopoly for the purposes of this question. I...

How does one elaborate design using CRC cards?

I've always been wondering how people use CRC (class responsiblity collaboration) cards. I've read about them in books, found vague information on the internet, but never grasped it really. I think someone ought to make a youtube video showing a session with CRC cards, since one of my books described it as being very hard to formulate in...

Is there a benefit to having both an abstract class and an interface?

I started out with a generic interface called ILogin. The interfaces requires that you implement two properties: UserID and Password. I have many login-type classes that implement this interface. As my project grew and grew, I found that many classes repeated the UserID and Password code. Now I decide that I need a base Login class. ...

Inheritance and interfaces

This is somewhat of a follow-up question to this question. Suppose I have an inheritance tree as follows: Car -> Ford -> Mustang -> MustangGT Is there a benefit to defining interfaces for each of these classes? Example: ICar -> IFord -> IMustang -> IMustangGT I can see that maybe other classes (like Chevy) would want to implement...

How to develop *real life* oop skills?

I've been studying OOP for quite a while now and I have a good grasp of the theory. I read the Head First book on OOP and, while it reinforced a lot of the theory, I found the case studies to be somewhat trivial. I find that I'm applying OOP principles to my code each day, but I'm not sure if I'm applying them correctly. I need to get...

How do I use composition with inheritance?

I'm going to try to ask my question in the context of a simple example... Let's say I have an abstract base class Car. Car has-a basic Engine object. I have a method StartEngine() in the abstract Car class that delegates the starting of the engine to the Engine object. How do I allow subclasses of Car (like Ferrari) to declare the En...

Help with design

I think I am pretty good with programming C# syntax. What I am looking for now is some resources, books(preferable), websites, blogs, that deal with the best way to design object oriented Desktop Applications and Web applications, especially when it comes to data and databases. Thanks ...

Object Oriented Analysis and Design

Why I can't able to specify static type of methods in interface. Is there any alternative to do this?? but I should use only inerface insted of abstract class. / Is there any problem in specifing acess specifier in interface? I want to specify the events in Interface and that should be acessed only by implemented class so i want pr...

Constructors vs Factory Methods

While modeling classes what is the preferred way of initializing it, Constructors Factory Methods and what would be the considerations of using either of them. In certain situations I prefer having a factory method which returns null if the object cannot be constructed. This makes the code neat. I can simply check if the returned va...

Decorators and Virtual Methods

The decorator design pattern is a very good solution for extending a class functionality. For instance if I want pre and post processing methods on an existing class method I can create a decorator and override the existing method in the base class and call my pre and post processing methods respectively. My question here is, the requir...

What is the difference b/w Design and Architecture ?

What is the difference b/w Design and Architecture ? hi , i have asked this question from many teachers but no one gave me satisfactory answer . these two terms are very diffused .. i am not getting them correctly .. waiting for an accurate answer... any real time example or scenario that can elaborate this difference ?? ...

what is the difference b/w Layer and Tier ?

Duplicate: What’s the difference between “Layers” and “Tiers”? HI , i am having confusion about these two terms what does these two terms mean ? what is the difference b/w Layer and Tier ? ...

Company & Contacts Object Design Help

I am hoping that someone (or some people) could help us with a problem that we have wrangled with for a few days. How to organize our business objects given the attached diagram? We are looking for any assistance (ideas about where to or how to search for the design pattern(s)/object model(s) we could use in order to solve this probl...

What is the difference between composition and aggregation?

What is the difference between composition and aggregation? can anybody give me a sample of this OOAD? ...

What is an Anti-Pattern?

Hi, I am Studying about Patterns and Anti-patterns . I have a clear idea about Patterns. but I am not getting Anti-Patterns. Web Definitions and Wikipedia is confusing me a lot. can anybody explain me in simple words that what is anti-pattern ? what is the purpose . what they do ? .. is it a bad thing or good thing ? ...

How to Show Aggregation in terms of A Programming Code ?

Hi, I know about Association and Aggregation and Composition and Generalization what they are by definition. inheritance is "is a" relationship and composition is "has a" relationship. Class A { } Class B extends A { // this is Generalization } Class C { A ob; // this is composition } now my question is how the Aggregation and si...

What is Abstractness vs. Instability Graph ?

Hi, I recently used NDepend and it produced a good report on my .net assemblies and related pdbs. The most interesting thing I found in the report was abstractness vs. instability graph. I wanted to understand this in real detail, I read their docs and online metrices but it could only help to an extent. Primarily I wish to understand...