Skip to content

Design and Architecture

Discussions on Design, Patterns and Architecture

This category can be followed from the open social web via the handle design-and-architecture@forum.codeproject.com

5.3k Topics 10.4k Posts
  • LINQ

    question csharp linq design business
    8
    0 Votes
    8 Posts
    0 Views
    B
    Well I would love to see an article Why not to use Linq or This is is how to use Linq in a three tier layer. I am sure many will be intersted in your experience :-O
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Class data members

    question
    8
    0 Votes
    8 Posts
    0 Views
    P
    Just when they need to. "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
  • Interfaces

    question csharp c++ com functional
    11
    0 Votes
    11 Posts
    0 Views
    M
    Yep, but rather than the nicely broken like you get in .Net, it was horrible horrible things like stack corruption or jumping to a completely wrong location ;) Mark Churchill Director, Dunn & Churchill Pty Ltd Free Download: Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio. Alpha release: Entanglar: Transparant multiplayer framework for .Net games.
  • Arguments

    csharp performance question
    2
    0 Votes
    2 Posts
    0 Views
    R
    CodingYoshi wrote: However, I also know that all objects are passed by reference. That is not correct. By default, objects references are passed by value. Do not confuse variable data types (value types vs. reference types) with argument passing mechanisms (pass-by-value vs pass-by-reference). For example, arrays are reference types. When you create an array, a block of memory is allocated and your array variable contains a "reference" the to the memory area (typically a four-byte address). For example: In Visual Basic: Dim values(10) As Integer In C#: int[] values = new int[10]; The variable, values, contains a reference to a block of ten integers. If you pass your array to a method as an argument, the reference to the array is passed by value (important). You can modify the elements of the underlying array but you cannot assign a new array to it. To illustrate what I am talking about, take a look at this C# code: using System; class Program { static void Main() { int[] values = { 1, 2, 3 }; TestMethod(values); Console.WriteLine("{0}, {1}, {2}", values[0], values[1], values[2]); } static void TestMethod(int\[\] values) { int\[\] newArray = new int\[\] { 4, 5, 6 }; values = newArray; } } This code will print "1, 2, 3". Why? First, an array containing { 1, 2, 3 } is created. The TestMethod() creates a new array with { 4, 5, 6 } and attempts to point your array reference to it. But when TestMethod() returns, the reference is not changed because the reference was passed by value. However, you can change the underlying data pointed to by the reference. If TestMethod() did this: static void TestMethod(int[] values) { values[0] = 4; values[1] = 5; values[2] = 6; } ... the values would be changed (i.e., it prints "4, 5, 6") because you passed a reference to the data contained in values, which TestMethod() is free to change. CodingYoshi wrote: when arguments are passed byVal it hinders performance since a copy needs to be made Nah. Performance differences are usually insignificant. Maybe if you need to pass really large value types (like large structures) and you really need to t
  • 0 Votes
    2 Posts
    0 Views
    P
    This article[^] might help you gain an understanding. Deja View - the feeling that you've seen this post before. My blog | My articles
  • Method Parameters

    question
    2
    0 Votes
    2 Posts
    0 Views
    P
    If it's purely an argument, and is not data that should be encapsulated by the object then pass it in as an argument to the methods. You should really only use members when they encapsulate data for the object. Deja View - the feeling that you've seen this post before. My blog | My articles
  • want to create a cms in asp

    csharp asp-net tutorial
    4
    0 Votes
    4 Posts
    0 Views
    A
    http://www.google.ca/search?hl=en&q=Building+a+CMS&meta=[^] I'm finding the only constant in software development is change it self.
  • About MVP architecture

    architecture help
    3
    0 Votes
    3 Posts
    0 Views
    A
    Even better than an example code: http://martinfowler.com/eaaDev/uiArchs.html[^] I'm finding the only constant in software development is change it self.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Making a menu editable.

    csharp asp-net com question discussion
    4
    0 Votes
    4 Posts
    0 Views
    B
    My bad not stating it's an ASP.NET menu control I want to make editable, so it already renders a left hand, vertical tree structure that I would like to use for editing, also with a property page in the main pane. Unscrambling Eggs: Decompiling ASP.NET
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Command pattern implementation for testing

    csharp asp-net database design testing
    6
    0 Votes
    6 Posts
    0 Views
    L
    Lowest of the Low wrote: I think I'll post in the C# forum about Linq Dude, there's a LINQ and .NET 3.5 forum Last modified: after originally posted -- hahaha Link! That was a good one! led mike
  • Dynamic DB Connection based on user type

    database question sql-server design sysadmin
    4
    0 Votes
    4 Posts
    0 Views
    M
    and if the master database goes down....? :P Mark Churchill Director, Dunn & Churchill Pty Ltd Free Download: Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio. Alpha release: Entanglar: Transparant multiplayer framework for .Net games.
  • 0 Votes
    5 Posts
    0 Views
    N
    I presume you are talking about the "Web Application" project type that was introduced in VS2005 SP1, versus the "Web Site" option? AFAIK, there is no difference in performance: they are both ASP.NET applications, just with different solution explorer rules. I may be wrong... You might have more luck posting this in the ASP.NET forum[^]. ---------------------------------- Be excellent to each other :)
  • 0 Votes
    4 Posts
    0 Views
    P
    Pete O'Hanlon wrote: Microsoft's Composite Application Block Looks interesting enough :) "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
  • Dogfooding?

    dotnet com tools help question
    3
    0 Votes
    3 Posts
    0 Views
    P
    Pete O'Hanlon wrote: To avoid the circular dependency, you could always dynamically invoke the dynamic proxy generator. I could do that, but in this case I've changed my mind and decided not to use a dynamic proxy generator at all. I'll just have to bite the bullet and do my IL verification with either PEVerify, or in the worst case, I'll write my own runtime verifier. Thanks anyway, Pete! :) Do you know...LinFu?
  • Refactoring the code or dessign?

    architecture question
    22
    0 Votes
    22 Posts
    0 Views
    L
    dojohansen wrote: AS IF I have uttered anything even remotely suggesting that one should not use unit tests. I assumed you were DELIBERATELY misunderstanding but I am beginning to doubt if you can control it. No, but I did lose the thread as it has been a long one so, yes, I was wrong, you are correct, you never suggested that, my mistake. We were basically talking about two different things in regards to unit tests and it seems we might actually have similar views on both of them. Therefore it is at least partly my fault, if not completely, that we ended up in a confrontation rather than a discussion. dojohansen wrote: Have a nice weekend. thanks, same to you. led mike
  • Live dashboard

    help wcf sysadmin
    12
    0 Votes
    12 Posts
    0 Views
    D
    I don't know if it is fine or not; I'm just going by some very crude speculation. A second is a very long time in computing terms. If I launch task manager and visit the networking tab, then select columns to show the number of unicasts and non-unicasts per interval, then convert this to per second (at "normal" update speed task manager appears to use an interval close to 2 seconds) I see that the activity varies a bit but is between 50 and 100 "casts" per second when idle. My network utilization varies between 0.01% and 0.03%. Another crude thought: When loading a web page, the browser requests the document and then issues separate requests for all the linked resources, such as js files, style sheets, and above all images. It seems to me this load must be many thousand times greater than what you're trying to do, yet I am sure a much greater proportion of PCs on our corporate network than just one in thousand is browsing the web at any given time. I don't know if there even is a general answer to your question (since network capacity might vary rather a lot in the world and you've said little about the network on which this will operate), and if there is one I don't have the knowledge to provide it. So I cannot say at what level you should be concerned. But very simple and crude common sense observations seem to me to indicate that it would be a non-issue. I may be wrong of course, but until someone presents me with some better basis than just my own arrogant speculation :) I *think* adding a few bytes per second to the network traffic of each PC translates into adding less than 1% overhead to the network overall. Check your own stats, I'm sure you'll have at least a kilobyte per second in network traffic when your PC is idle!
  • Desgin pattern...

    design regex architecture question
    16
    0 Votes
    16 Posts
    0 Views
    P
    This[^] message explains my problem with the name. I prefer the static name you suggest though - it sounds better. Deja View - the feeling that you've seen this post before. My blog | My articles