|
The Grand Negus wrote:
Actually, OOP developed out of biologist/programmer Alan Kay's notion that programs are like living beings, their "objects" like living cells. That is the notion I'm arguing against.
Maybe its conception. But not its adoption. Its adoption is pretty wide spread wouldn't you say? I say that's because it effectively solved some complex design requirements fairly elegantly.
This statement was never false.
|
|
|
|
|
I don't think its profitable to force what we do into these narrow terms.
And what difference would it make to consider them as tools or machines.
But I think a valid point is missed. Take the automobile for instance. You can take the brakes and use them with one auto or another. Parts are interchangeable. An engine is a complete object consisting of other objects. It has input and output. But, it is an object. Not a function. Its action is a function of those objects' interactions. In this case, I'd like to put my 350 from my Blazer and drop it into my Jeep. A few other objects and viola! I can do it. I liken software to this. The assemblage of parts.
Looking at the human being. The liver is an object. It performs a function. That function is encapsulated. Taking the heart for instance, we've even been able to supplant the human heart with it, and acheive the desired functioning irrespective of the host object. Human or pig.
Procedurally this can't happen. Only with objects. In your world maybe the only objects are the concepts of modules and routines and sub-routines.
This statement was never false.
|
|
|
|
|
Let's start by saying I don't think procedural solutions should be banned. I've never advocated one over the other. But subscribe to a balance.
How would you procedurally replace a human heart with a pig heart? Easily enough, as that is in fact a procedure. But, is the heart itself a procedure? Can you swap out the pig procedure for the human procedure? Maybe, but its stretching it to make it fit. An object description works better in this case. I would have the heart be an object, and the transplant a procedure.
Really, can you argue against a blend of paradigms? Is procedural absolutely the best for all cases?
This statement was never false.
|
|
|
|
|
The Grand Negus wrote: But OOP has it all inside-out, just like many here who strongly resist (but don't understand) what I'm saying. For example, I've said repeatedly that specialized syntaxes can be used within a Plain English program where they are more effective in getting the job done; but the overall framework should be the natural language, not the special one. We write math books in English (the framework) with the formulae (special syntax) inserted in appropriate places, not the other way around.
Math books are talking to humans. You wouldn't use it to solve the problems.
When I'm performing mathematics I prefer mathematical syntax. I break word problems first down to a set of images that break out the problem into mathematical notational concepts then work with the math syntax to solve the problem. I can't solve the problem using English. When I am writing music I rely upon time signatures to dictate the pace and feel, and I depend on notation and the key signature to dictate the notes and range of the melody. I rely upon chordal notation and the circle of fifths to plan progressions. I rely on that same circle to work out complementary tensions to use in chordal movements, say when writing a sax spread for a jazz standard. When I'm performing code construction aimed at talking to a machine, I prefer the C-Style of syntax. The same as with music and math, I would not want to conceive of and develop the solutions in English. But, now we've left the procedural vs object debate we were originally discussing.
This statement was never false.
|
|
|
|
|
That prefers to work with objects.
This statement was never false.
|
|
|
|
|
I want to draw class diagram inside visual studio 2005 web application. I know that i can add a new item of type "class diagram" to my solution but the .net class diagram is very poor. I can't add multiplicty for my relation. I can't add an association class. I can't make a dependency between two classes. so, can anyone help me to find a better way to draw a good class diagram and to get the generated C# classes from it?
Thank You
Ahmed
|
|
|
|
|
Enterprise Architect from Sparx, supply an add-in for full UML support in VS 2005.
|
|
|
|
|
Hope im in the right board for the type of questions i am about to ask.
I'm turning into the BLL / DAL 3 tiers architecture and i'm confused a bit.
Just to clear things up
- i'm working on VStudio 2005, .net 2.0
- my DAL implementation would be in an xsd file (typed dataset)
- my BLL will be my own "wrapper" around the DAL
1) What is the relation between a Database Table, a DAL/BLL set, and a set of operations
i.e: Say i have an Order Editing form. I will in this form Delete full orders, by means of an orders list, and i will be able to Edit some order details, as Both the order header (Master table) and the order rows (Child Table).
Now, should i create a DAL containing both Tables or should i work with 2 DAL/BLL objects, one containing my master table, the other containing my details table ?
On my Shipping Form, i need access to both Order Master/Details and Inventory because when i ship some items, my inventory has to decrease. I also need to validate that i have enough inventory to complete the operation... should inventory be part or the same DAL Definition ?
Should i create a new DAL / BLL ?
I'm sure you can see i'm really confused and i will appreciate any pointers to guide me.
DB
|
|
|
|
|
Howdy
I recently read a 3 part article by Imar Spaanjaars on n-tier (basically 3 tier) architecture in C#. Coming from many years of n-tier architecture in Java I found this article a very good read. It covers the basics real well and explains the important decisions.
The article can be found at
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=416[^]
Cheers Q
|
|
|
|
|
Hi Guys,
Anybody knows the difference between dependency and association.
I think if there is a association then it implies dependency. right ??
Is it possible to find a clear border to separate these two terms ??
Any help is appreciated..
Thanks in Advance
Krishnan
If u can Dream... U can do it
|
|
|
|
|
You can think of a dependency as being the case where changes to one object results in a change in the other object. An association refers to a family of links.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
It will be gr8 if you provide one example.
If u can Dream... U can do it
|
|
|
|
|
Your explanation is good.
Can you look the following sample class, and tell which will be the best relation.
class A
{
A(B *p)
{
p->SomeFunc(); // here no pointer checking
}
};
class B
{
public :
void SomeFunc(){ // hehe nothing inside }
};
since A doesn't have default constructor , i think it is dependency. right ?
If u can Dream... U can do it
|
|
|
|
|
Hi,i Have to implement design pattern in my HR module(in.net).I have made Use cases for that. But i m unable to Identify Suitable Design Pattern for it.
Can Anybody Help me ???
|
|
|
|
|
Without knowing anything about what you are trying to achieve, then nobody will be able to help you here. You have all of the information about the problem you are trying to solve, so only you can make the decisions about what patterns to implement.
It's like me posting a question saying that I want to design a mode of transport, and could anybody help me with it - without saying whether it has an engine or not, or whether or not if flies.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Use the ID Ten-T pattern
led mike
|
|
|
|
|
led mike wrote: Use the ID Ten-T pattern
I really don't know whether to laugh or not.
|
|
|
|
|
Colin Angus Mackay wrote: I really don't know whether to laugh or not.
That remindes me of my reaction to the first 3 to 4 technical forums I visit each morning here at CP, I really don't know whether to cry or not.
led mike
|
|
|
|
|
|
When you learn something, you deeply want to see it in action, in your project and show others that you're using design patterns.
1- Please take some time to read about Gang of Four, Design Patterns Book
2- Read it very very carefully
3- When finished you will see that you can use more than one pattern in a single project!
4- When you are equipped with design patterns, take some time and read anti-patterns.
Dont give up, just read read read, this is real world, not hollywood's "hacker 9 - movie"
One more thing:
"There is no spoon"
-richard
____________________
http://www.swbox.com
|
|
|
|
|
I'm looking for a software which measure Software Quality Metrics of my projects and I'm looking for FREE one which measure C# projects. I couldn't find any FREE one for C# in asp.net. Thanks for any information.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
Software Quality Metrics is pretty broad topic and finding anything free will be tough.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Who can tell me the difference between Composite Pattern and Iterator Pattern?
Thanks!
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
|
Hey all,
I was reviewing some C# code today that really made me wince. Although I didn't like it, I struggled to think of a better solution, so I thought I would throw it open here and learn something.
class ABC
{
int doSomething(int a, String b, bool c)
{
return doSomething(a,b,c,-1);
}
int doSomething(int a, String b, bool c, int d)
{
return doSomething(a,b,c,-1,-1);
}
int doSomething(int a, String b, bool c, int d, int e)
{
}
}
Now examining the code in the last doSomething, I could make plenty of comments, it was appalling, but I kept getting drawn back to the nasty overloaded doSomething. In C++ I would have used defaults instead and had one method instead of three but this wasn't possible in C#.
Under the current circumstances the third doSomething function has ended up with lots of ugly tests like if(d=-1) doDefault() etc, that execute logic that look like it belongs in the parent doSomething. I feel the functionality of the doSomething would better delegated out of the class altogether, into another class that is perhaps instanced each time, setup for each different circumstance and then executed ... the Command pattern.
Any better ideas ?
|
|
|
|