Today I saw a job description that requires "significant experience coding in C++ and a thorough grounding in structured design principles", so I thought about what these principles are. First I felt it was a little odd to see C++ and "structured design" in one sentence, then I thought, OK C++ is a multi-paradigm programming language, so...
loosely speaking, Liskov Substitution Principle states that a derived class can be substitute in place of the base class without affecting the user.
In the case when the base class is an abstract class, which means no user is using an instance of the base class, does the Liskov inheritance restrictions still apply to the derived class?
...
I have a small community of members inside a forum. For the sake of entertainment, I a planning to introduce a small game based on reputations. The idea is that send updates to a user (X) about another user (Y) based on how much X ranks Y. This is just a fun game, but the way I thought of implementing it was in one of the following ways:...
Develop a elegant Pub-Sub architecture in web-oriented-apps is a real challenge.
Although there are some very interesting solutions using long-polling-connections (e.g. COMET) and repetitive-timeouts (e.g. js setTimeout). IMHO AJAX push still looking like a layer of tweaks and hacks forcing the innocent HTTP protocol.
So what do you thi...
I'm currently designing a small system and i'm currently using structureMap as IoC. I just recently got the point of interface segregation...and I'm wondering now.
If I have a certain business object, that will implement say, three interfaces... how should I handle this in the configuration and instatiation of code?
Assuming I have two...
Today I came to a fundamental paradox of the object programming style, concrete types or interfaces.
Whats the better election for a method's return type: a concrete type or an interface?
In most cases, I tend to use concrete types as the return type for methods. because I believe that an concrete type is more flexible for further use ...
I have been doing code for a few years and still feeling that my knowledge still not broad enough to become a professional. I have studied some books related to Design Pattern but I know there are many others.
So could anyone list the one which you think it is good to learn to become a better programmer and more professional?
Programm...
I have two tables in the DB
FuelStation (fuel_station_id: int (PK), fuel_station_name: varchar, fuel_brand_id: int(FK))
FuelBrand (fuel_brand_id: int (PK), fuel_brand_name: varchar)
As we can see, both tables are linked via. foreign key (fuel_brand_id)
Now, I want to design an object model corresponding to the above data model but I...
Hi all,
Does using virtual methods violates LSP( L part of SOLID principles) or there are some exceptions?
Thanks in advance,
Saghar Ayyaz
...
I came across the following piece of code during a code review.
My intuition is telling me that this isn't following proper OOP.
I'm thinking that instead the LoadObject method should return a new SomeObject object, instead of modifying the one passed into it. Though I can't really find a proper explanation of why this is better.
Is ...
Is there any design guideline on the number of Activities an application could have? If there is a limit, what would be the ideal number of Activities that can be bundled in an Android application.
...
I'm currently stuck how I should make designing skills as a programmer better. I've seen over a dozen questions about (algorithmic) programming challenges. Defining and verifying a good design isn't as trivial. You can objectively measure how good an algorithm is, but not the design used to implement that algorithm.
I do see problems wi...
I'm using a tool to automatically generate a class representation of a hierarchically organized XML file. The XML file is a settings file my app need to be able to access (read-only).
If I pass in the top-level node (e.g., AppSettings) to a class that needs to access one or more settings, I can easily end up with code that looks somethi...
hi......
what is mean by dependency inversion principle in oops?
what it does?
thanx....
...
Using
Visual Studio 2010
.Net Framework 4
C#
Linq to Entities
Issue
I would like to be able to apply Object Oriented Principles like DRY and SOLID to some Linq Projections. With compiled queries or passed parameters I can apply these to the rest of Linq successfully so far, just not in the projections.
Please let me know if this i...