|
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 ?
|
|
|
|
|
Ray Kinsella wrote: Any better ideas ?
yes, you can still chain the methods together but in the opposite direction.
In the DoSomething (by the way, that should really be Pascal Cased rather than camel Cased) with the least parameters do everything you can that only needs those parameters. Then with the DoSomething with the extra parameters call the first DoSomething and add the additional functionality that needs the extra parameter. Then for the DoSomething with the most parameters add the extra functionality that requires all parameters then call the middle DoSomething, which in turn will call the first DoSomething.
Of course, it really depends on what you are doing overall. If it is sufficiently complex it may be better to abstract some of the functionality out in to private methods and have each of the DoSomething methods call the approprate private methods. However, that may cost slighly more to maintain as you'd have to duplicate the call to the private methods in upto three places. But, if the overall code is easier to read it might be worth it.
|
|
|
|
|
Yeah!, your right, should be the other way around. It was on the tip of my tongue, it just didn't feel right before ... must be loosing my edge.
Thanks for that.
|
|
|
|
|
Interesting, what you are saying seems to be exact opposite of what I though is how to do default parameter values in C#, what am I missing?
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Colin's recommending a way that gets around having to put ugly kludges in the code, e.g. using -1 to indicate a missing value.
Deja View - the feeling that you've seen this post before.
|
|
|
|