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
  • What pattern should I use?

    regex question
    3
    0 Votes
    3 Posts
    0 Views
    N
    Thanks for the response Jon!
  • Advices designing a document-centric application

    help question design tutorial
    5
    0 Votes
    5 Posts
    0 Views
    P
    There's no easy way to do this internally. You could always store the extension and the type it relates to in a database/config file and then perform the instantiation based on that. "WPF has many lovers. It's a veritable porn star!" - Josh Smith My blog | My articles | MoXAML PowerToys
  • How to create DFD

    help tutorial
    5
    0 Votes
    5 Posts
    0 Views
    L
    Ohhhh, did I ever walk right into that one! :laugh:
  • Disign of Web service

    design tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    M
    That is a mistake. Sorry for that. Regards, Pavas
  • Documenting Design

    design database tools question career
    7
    0 Votes
    7 Posts
    0 Views
    K
    I did find the "Methods" button in Visio. I've also found that I can customize much of what goes into the report document. I might be on to something here.
  • Software development

    help question
    2
    0 Votes
    2 Posts
    0 Views
    C
    Are you looking to develop plugin's that you can attach to these messangers. If yes Check the below links, on which platform these are developed should not matter. finally you just have the executable. http://developer.yahoo.com/messenger/[^] http://dev.aol.com/aim/plugins[^] http://channel9.msdn.com/forums/TechOff/101812-MSN-Messenger-Development/[^] http://forum.skype.com/index.php?s=606f036c3cec316698882051231177d0&showforum=16[^] http://code.google.com/apis/apps/[^]
  • Database Queries

    database design sales tutorial question
    10
    0 Votes
    10 Posts
    0 Views
    J
    Glad I understood your questions. ;) Regarding the next few. I'll start with networks. I call a 'network' a 'graph'...actually, I call trees or networks 'object graphs'. This is actually a very good question, and its also pretty much exactly WHY we have O/RM systems. To give you a clearer idea of what an ORM is...Object/Relational Mapper. The concept behind this term is that the way we work with objects is not directly translatable to how we store and manage data. Objects are usually represented by a 'graph' (or network, if I understand you correctly) in memory. A set of objects related through pointers, with a variety of navigability (sometimes we can only go from parent to child...sometimes we can go from parent to child and child to parent). Data is usually represented as sets of tuples (many tables of rows), with relationships defined external to the tuples themselves (foreign keys defined for tables rather than tables containing direct pointers). These differences create what we call the impedance missmatch between objects and databases, and its this impedance missmatch that O/RM's are specifically trying to solve. Object relational mappers handle the process of 'bridging the gap' for you so you don't have to worry about it. That gap is where the process of building an object graph, or network, from relational data needs to happen. L2S can handle object graphs very well, and can build an entire network of objects from a single result set queried from the datase in most situations. Sometimes a graph is too complex to be retrieved in a single query, or sometimes the missmatch between your conceptual model and the database schema is too great, and additional queries are required. Regardless of what is needed for each specific scenario, the benefit of an O/RM is that it does the gritty work of solving that problem for you. All you need to worry about, once the O/RM is in place, is querying your conceptual model (note, when you query with an O/RM, you arn't really querying the database...your querying your model). If a parent object needs a pointer to its children, and all of its children need pointers back to the parent, the O/RM sets those pointers up for you...when you get a graph result back from your O/RM, its fully constructed and all relationships are in tact. As for LINQ being dynamic. It actually is very dynamic, but its not obvious in the first few glances how. Critical thing about LINQ is that its what we call delay-loaded, or delay-bound. When you write a LINQ statement, that statemnt is actua
  • 0 Votes
    11 Posts
    0 Views
    J
    Unit testing and statics are always a rich topic of discussion. ;) Ultimately, what it boils down to is whether you think testing the static Globalization type is acceptable when your actually unit testing something else. If you are unit testing UserMapping, and mocking GlobalizationAdapter, your also interaction testing Globalization. At some point, you need to interaction test, to make sure that when A uses B, the interaction of the two behave like you would expect. Sometimes you can achieve this with a mock...sometimes you need to test the interaction of two real objects. Testing has a variety of forms: unit testing, interaction testing, acceptance testing, build verification testing, etc. Unit tests will only take you so far, and you can plug the holes and double up by performing other kinds of testing. In the case of your static Globalization class, it sounds like its a pretty simple type that acts as a lazy-loaded lookup? If its basically just a facade around a dictionary and some loading logic, I would not bother mocking it away, and just include it with your UserMapping unit tests. If Globalization is a richer class, and provides a variety of globalization services, it might be better to mock it away. You would want to unit test Globalization in isolation as well, to make sure you cover code that wouldn't be covered by interaction testing. If you do indeed need to mock away static types, there is one product that will let you do it: TypeMock Isolator. TypeMock's Isolator lets you mock absolutely anything, statics included. Its a pretty unique mocking framework that really helps you get the job done when nothing else will. Couple caveats: 1) its not free, and 2) it requires that all testing processes be spawned from its isolator root process that enables all the advanced call interception and whatnot.
  • 0 Votes
    10 Posts
    0 Views
    J
    LOL, let me know what you think. ;) I'm still evaluating it myself, but and it does have a couple drawbacks (i.e. the isolator is a 'wrapper' program that must be running for method intercepts and the like to function during execution, and it costs money). When it comes to testing locked-down legacy code, though, its truely unique.
  • Stylesheet in VS2008

    visual-studio tutorial
    2
    0 Votes
    2 Posts
    0 Views
    C
    Sorry but how is your question related to Design and Architecture? Try Visual Studio message board.
  • Who can show me the process and method of Scrum?

    business help question
    4
    0 Votes
    4 Posts
    0 Views
    A
    Yes, learn to use your initiative. Bob Ashfield Consultants Ltd
  • Implementing SOA in .Netframework

    architecture csharp asp-net dotnet workspace
    2
    0 Votes
    2 Posts
    0 Views
    R
    I think you've drinking a bit too much of the buzzword juice. In any case, this "question" is much too vague and general to generate any useful answers. There are several good books on the general topic of implementing SOA with .Net. This one by Juval Lowy[^] is quite good.
  • Interprocess communication

    csharp database com tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    L
    You could convert the WM_COPYDATA-solution to a C#-counterpart. Windows-messaging is fast, and you'd retain compatibility with the old version. Alternatively you could use a HttpServer, and use WebRequests; easier to debug than Windows-messages, and you can send/receive messages from beyond the local desktop. I are troll :)
  • Downloading URLs with Python ??

    python php html question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Multiple database support

    database sql-server oracle design sysadmin
    6
    0 Votes
    6 Posts
    1 Views
    J
    heyitsAtul wrote: Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks. It can be done in several ways. First of all you need to have an abstraction layer. That layer needs to be a generic layer that matches the interface for both databases. Secondly, I'll recommend that use a factory. Try to take a look at the following link for inspiration: Connection pool[^] HTH -- Jess Nielsen, b.sc. Security Analyst http://jessn.blogspot.com/ modified on Monday, November 8, 2010 3:20 AM
  • Database transaction boundaries in three tier

    question csharp database help
    7
    0 Votes
    7 Posts
    0 Views
    H
    I think using TransactionScope Class[^] will solve most of your problems. Hesham A. Amin My blog
  • 0 Votes
    11 Posts
    0 Views
    U
    I would give the same estimate for a given project regardless of methodology. When I give an estimate, I am essentially saying "I think this will take N days if done using reasonable development techniques." These do not have to be the exact development techniques used previously. Methodologies evolve, and what you're describing is the kind of incremental adjustment in methodology which is assumed to be going on all the time in any good shop. Hopefully you will get faster over time, and the estimating model should always be updated as discrepancies are observed, but there's no immediate need that I perceive for you to adjust it right now. Also, I do not think I have ever seen or heard anyone claiming to use the "waterfall method." It's considered a perjorative term these days, almost like saying "my coding style is spaghetti" or "our team's style is garage hacker." When you say "my estimating technique works for waterfall" you're basically saying it's an estimating model for bad techniques. Finally, I think Agile is much better than waterfall, or (as proponents of Agile might say) it's much better than BDUF (Big Design Up Front). I don't think there's much value anymore to the style (call it waterfall, BDUF, or just mid-90s orthodoxy) in which the architect types spend weeks or months dicking around with object hierarchies, UML, etc. before coding ever starts. That time almost always ends up wasted, in my experience. In the absence of code, the architects don't have any real basis for their decisions. Programming instructors are quite wise when they implore us to use natural language, pencil and paper, diagrams, etc., but I think many of us in the 90s went too far in this direction. Also, I think people attempted to over-formalize good technique. What emerged from this effort was a bunch of simplistic, canned methodologies that isolated "design" into its own step at the beginning of the process, performed by an elite cadre of non-programmers. Hopefully we have left, or are leaving, this era! modified on Thursday, December 4, 2008 4:57 PM
  • Assertion vs. Exception

    database visual-studio debugging help
    4
    0 Votes
    4 Posts
    0 Views
    M
    Ah ok, well I'll put in my 2c on your questions then. 1. Assertions and Exceptions are pretty different concepts. Assertions are a test that you absolutely expect to succeed, and indicates a design/breach of contract error if it fails. A failing assertion needs to perform an action, and this would commonly be throwing an exception (or getting a TraceListener to do something). I'd tend towards throwing an ArgumentException in these cases. 2. Trace is like Debug. Instead of the DEBUG conditional compilation constant, it is dependant on TRACE being defined (which is defined in release mode by default). 3. It won't compile. ReleaseResources can't see adapter or connection due to scoping. Even if you made these static, your method wouldn't be thread-safe. 4. IMO theres no need to "enterprise" up a DAL with all sorts of abstraction if you are doing simple enough things that could be handled by the built-in IDE databinding. If you do need a proper ORM solution, then coding one by hand with sufficient functionality is going to take a long time. 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
    1 Posts
    0 Views
    No one has replied
  • Releasing .Net programs

    database csharp com business question
    9
    0 Votes
    9 Posts
    0 Views
    P
    No worries. I should have been a little more clear. "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