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
  • Got that bad feeling ....

    csharp c++ regex question workspace
    8
    0 Votes
    8 Posts
    21 Views
    C
    Here's a coded example of what I mean: This is the first example where the methods are chained from most parameters to least parameters. This assumes that the methods with additional parameters are doing more work. public void DoSomething(int a, int b, int c) { // Do stuff with a, b and c } public void DoSomething(int a, int b, int c, int d) { // Do some preliminary stuff with d - optional DoSomething(a, b, c); // Do additional stuff with d - optional. // Note: You must do something with d } public void DoSomething(int a, int b, int c, int d, int e) { // Do some preliminary stuff with e - optional DoSomething(a, b, c, d); // Do additional stuff with e - optional // Note: You must do something with e } NOTE: It is sometimes the case where the version with the most parameters is actually going to do all the work, and the other overloads just provide default values into the method that does the work. Think MessageBox.Show (A lot of its overloads just provide default values for the buttons, icon and so on.) However, if the work is incrementally increased with the number of parameters then the code I showed above is likely to be better. Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
  • Difference Between Association and Dependency : UML

    help question
    3
    0 Votes
    3 Posts
    11 Views
    J
    It will be gr8 if you provide one example. If u can Dream... U can do it
  • 0 Votes
    2 Posts
    6 Views
    R
    Do your own research. Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch
  • Software Architect

    question
    5
    0 Votes
    5 Posts
    13 Views
    A
    One good thing to read that is focused on just this is Microsoft's architecture journal[[^](http://Microsoft's architecture journal)]. In issue number 8 they started a section where they interview architects about their work and the roles they play withing companies. Really good read and should give you some perspective. _____________________________________________________________________ Our developers never release code. Rather, it tends to escape, pillaging the countryside all around. The Enlightenment Project (paraphrased comment) Visit Me at GISDevCafe
  • Membership Provider and Permissions

    database discussion
    4
    0 Votes
    4 Posts
    11 Views
    P
    No bother - we're here to help.:-D Deja View - the feeling that you've seen this post before.
  • Efficient Exception Bubbling

    debugging question
    3
    0 Votes
    3 Posts
    9 Views
    T
    Excelent, thanks. Food for thought. It was option 2 actualy, but there are an excessive quantity of Try / Catch blocks in existance which do nothing. I'm actualy trying to bring order to chaos and have a good clean up of an existing code base that throws meaningless errors. :( Cheers Tris ------------------------------- Eats: Software Sleeps: Software Drinks: Decaf
  • DoFactory.com

    csharp com design question
    4
    0 Votes
    4 Posts
    10 Views
    P
    ma se wrote: Are you very familiar with patterns?? Well, I've been using them for several years now, so I guess the answer is yes. ma se wrote: Do you know if there are any sample web apps, besides the Do Factory website, that shows exaples of how patterns are used? Try this, http://msdn2.microsoft.com/en-us/practices/default.aspx[^] ma se wrote: Would you recommend any good reading material with patterns and .NET 2.0? If you want to know patterns, you really should start with the GoF (Gang of Four) book. http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612[^]. Once you know how they work, there are any number of sources (on-line and in book format) for using patterns along with .NET (primarily in C# it has to be said). Deja View - the feeling that you've seen this post before.
  • restrict read/ write access to USB drive

    question json help
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • bookkeeping agency

    database csharp sysadmin
    3
    0 Votes
    3 Posts
    11 Views
    A
    thanks anyway
  • Base Classes and Factory Pattern

    business regex question
    4
    0 Votes
    4 Posts
    10 Views
    B
    Yes, but the same one. Until a point, I have separated the sender ID from the business information, as at the interface to our other system there is always only one sender, but I prefer not to fix a single sender ID in my transport. Therefore between the transport layer getting a message to send, and sending it, it must determine a sender ID. At the moment it's passed with the message as a parameter. My Blog
  • Populate C1Report Control with VB.Net

    csharp visual-studio xml tutorial
    2
    0 Votes
    2 Posts
    5 Views
    P
    This forum is for Design and Architecture questions. In other words, questions like "Which patterns are more applicable in Scenario X, Y and Z." Why do you think that anybody will give you detailed code? You are more likely to get hints and directions to explore so that you will learn and grow as a developer. Deja View - the feeling that you've seen this post before.
  • [UI Design] presenting a filename to the user.

    design help question
    2
    0 Votes
    2 Posts
    5 Views
    R
    Have an edit box for the path, filled initially with some good default path Have another edit box for the file name have a third for the extension (defaulted as for the path) when the user changes either the path or extension, save the changes as new defaults Use a static/label to display the full path
  • SHBrowseForFolder not working in wince 5.0(x86) processor

    c++ linux json help
    2
    0 Votes
    2 Posts
    6 Views
    P
    This really isn't the forum for this. Try the C++ forums instead. Deja View - the feeling that you've seen this post before.
  • hi..

    2
    0 Votes
    2 Posts
    5 Views
    D
    Hi, The "Paint" application that is bundled with Windows distributions is not open-source, so nobody will give you the sources. Anyway, you can take a look at the Paint.NET: http://www.getpaint.net/download.html It is open-source, whole project is monitored by Microsoft, so it'll give you the idea on how graphics editor works. Hope it helps, - Dmitry. ------------------------- Don't worry, be happy :o)
  • Database design suggestions/feedback/pointers wanted

    7
    0 Votes
    7 Posts
    18 Views
    1
    Alsvha wrote: ...it is funny you should mention thinking from the perspective of a printing catalogue, as that is excatly what the scope of the project is, creating a new catalogue... I am attempting to draw inspiration as to the various other methods of designing the database; such as pro and cons with dynamic table creation, many nullables in each row of a table and so on... I'm attempting to keep it on a somewhat abstract level to better get the whole picture. Our company, years ago, developed a program specifically designed to handle large amounts of printed information of all kinds in the simplest possible way - we call it a wysiwyg "pagebase" and since the pages themselves are the database, it is fast, efficient, easy to understand and use, etc - there is no "translation" from database format to viewing format and back, and the user's idea of the thing is identical to the developer's. We've been using it for all of our corporate data for almost ten years now. I can send you a PDF of the documentation (about 100 pages) if you're interested in this kind of "inspiration", but you'll have to email me directly so I have a place to send it (you can use the email button below).
  • Store an encryption key

    question docker algorithms security tutorial
    5
    0 Votes
    5 Posts
    12 Views
    N
    I'm using VC++ without managed code. However it seems that DPAPI could solve this problem, either using a machine-store or a user store. For the latter, a point is not clear for me: for user-store it seems DPAPI use the windows user logon credentials to generate the master and session keys. The CryptProtectData and CryptUnprotectData functions have the chance to show a dialog to allow the user to insert a password. Is this only necessary if the windows user has no password set (may be a standalone machine) ?
  • dOOdads O/R mapping

    csharp algorithms question
    6
    0 Votes
    6 Posts
    13 Views
    Z
    You're right. dOOdads is a tool for O/R mapping and code generation of data layers. Here is the link Network integrated solutions
  • OLAP Design

    sql-server database design sysadmin learning
    3
    0 Votes
    3 Posts
    8 Views
    X
    This book is great. Thanks.
  • Sequence Diagram

    question graphics tutorial
    5
    0 Votes
    5 Posts
    13 Views
    D
    Exactly. I don't think Sequence diagrams are supposed to depict if / else. Infact, for any if and else you need to have a new sequence diagram. Thats the whole intenet of a sequence diagram.
  • ATL/COM/.NET/PHP - Need Direction

    csharp c++ java php
    7
    0 Votes
    7 Posts
    21 Views
    L
    ASP.Net C# & MSSQL - best way 2 go