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
  • Design Pattern Seminar in Europe

    design regex architecture
    6
    0 Votes
    6 Posts
    3 Views
    T
    You have "The User Experience 2007 Conference", Barcelona 4 November. http://www.nngroup.com/events/barcelona/agenda.html[^]
  • 0 Votes
    4 Posts
    3 Views
    L
    Does the quote ID have to be numeric or could you use a string? Does it have to be sequential or just unique within the system? How about a combination of unique employee ID and time? Assuming it takes longer than a second to generate a quote then you would only need the date-time stamp with seconds. You could then encode this as a string in base 36 (all 26 letters and 10 numbers)
  • Passing data between layers

    database question csharp sql-server design
    3
    0 Votes
    3 Posts
    3 Views
    M
    If you are looking at using an object-oriented data layer then you should read this article[^]. Mark Churchill Director Dunn & Churchill
  • State Machine Diagram for client-server communication

    sysadmin
    2
    0 Votes
    2 Posts
    2 Views
    D
    You're joking, right? Why should anyone send you the documentaion they wrote for their own systems?? Considering that this is a security risk in any organization, I seriously doubt you'll ever get someone to hand over their doc's... A guide to posting questions on CodeProject[^] Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic      2006, 2007
  • Fault Exception Error

    help
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    8 Posts
    3 Views
    A
    you could try mixing it up a bit. i'm trying diamond binding (dunnchurchill.com) at the moment (some guy on here suggested it recently), which takes care of the data-end really well. seems to be based on nhibernate - and you can do custom mappings manually using attributes. it doesnt do the gui side though, but i've found the data layer it creates is really clean, so you could use whatever tool you wanted (i'm just using the inbuilt databinding in VS). not sure if anyone can suggest a good business object to gui framework?
  • Populating Objects from Db

    database help question discussion
    3
    0 Votes
    3 Posts
    3 Views
    E
    Mark Churchill wrote: If you are really insistant on DIY you could tag all your fields with attributes and then write a templated base class that uses reflection to populate the fields. If you only have a few tables, it will probably be easier to not use a data layer at all to be honest. You might be interested an article here on CP, the Tale of the Three Monkeys or something like that, basically outlining pros and cons of using hand-written DALs, Reflection generated DALs and thirdly (whole point of the article) generated custom code using Reflection.Emit and DynamicMethods.  Just search google with monkey site:codeproject.com and it should be first link.
  • Using RDL to Define Flat File Exports

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Refactoring Properties into Classes

    css help question announcement
    7
    0 Votes
    7 Posts
    5 Views
    H
    It looks like a composition, but I'm my opinion, he's implementing the Observer Design Pattern. I think in his project (as in many others), a property from an object is more than a property -- since it's shared among many members, it could be seen as an object itself. So, you create and object and delegate to punch when the state changes. I think many people tend to believe since "it's just an int" or "it's just a string" it's not a object.
  • POS discount headache

    sales design question
    8
    0 Votes
    8 Posts
    3 Views
    R
    Well, I've done POS systems in the past - my first one was probably 13 years ago, in Clipper - and what I would do is create a hierarchy database of formulas that should be evaluated according to the chain of events in your hierarchy. You can use that not only to discounts, but to other stuff. I come from Brazil and we're know to have the most complex tax systems in the world (do a search on Google and you would understand what I am talking about - even SAP has an engine specifically created to work with our out-of-this-world tax rules). So, on the top of hierarchy you would have the more general items (for example, State, if you want people from out of state to have a different discount, for example) and go down the "tree". The formula you're going to use is the one that goes to the utmost item (further down the tree). Then you can use any expression evaluator available in the internet (there are tons of them for C# and other languages). You can even create your own language - supporting IF statements, for example - to accomplish more complicated tasks. I've done this successfully in a pretty interesting project in the company I currently work for. Hope this helps. Robson Siqueira Enterprise Architect
  • Keyboard Wedge Barcode Scanner

    sales workspace
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Off-site Backup Service [modified]

    design security tutorial lounge
    8
    0 Votes
    8 Posts
    6 Views
    B
    We are looking at Macro Scheduler[^] as a possible client side assist, but then I will still setup up the basic repository and web UI access for clients. When I have looked at Macro Scheduler later today I will know more, but I would still like some comment on my two design issues. "Once in Africa I lost the corkscrew and we were forced to live off food and water for weeks." - Ernest Hemingway My New Blog
  • Change CSS according to Browser?

    css question
    2
    0 Votes
    2 Posts
    3 Views
    P
    You can - it's a hack, but it is possible: <!-- [if IE 7]><link rel=...><![endif]--> By the way, this is the wrong forum for this question. It should be on the Web Development forum. Deja View - the feeling that you've seen this post before.
  • Error States

    question csharp help tutorial
    4
    0 Votes
    4 Posts
    3 Views
    L
    Yes, I think along similar lines. Some more remarks: 1. you are allowed to catch Exceptions to your hearts content, but not to hide them: i.e. you should remedy the problem or somehow let it ripple upwards. There are three ways to do that: - not catching the exception at all; - rethrowing the same exception (a simple "throw;" does that); - and the favorite: throw a new exception, more specific to your class or method, that holds the original exception as an "inner Exception". 2. Your background thread probably already has a Done event, thru which it reports results; you could use that same event to report problems, so there may not be a need to add another event. 3. there are situations where exceptions are more difficult to catch, such as in a constructor, on a thread you have no control over (say a timer tick), in native code, ... . The framework has some provisions to catch and handle these too, but I haven't grasped it completely yet. Things related to this are: - having try-catch in static Main(); I recommend this, it helps during development, especially is you show its entire ToString() as one always should. - AppDomain.CurrentDomain.UnhandledException - Forms.Application.ThreadException Greetings, Luc Pattyn [Forum Guidelines] [My Articles] this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
  • encapsulation VS development time

    visual-studio oop lounge career
    3
    0 Votes
    3 Posts
    3 Views
    D
    If it's a persuading management thing then I'd always argue that if I left and someone else had to look after the code then it would be easier and more cost-effective with regards to training and hand-over for it to be written in a proper OO way. I'd also always argue that something written well is always easier to extend later on if needed, whereas something that isn't is more likely to cause problems later on. That last argument is always easier to argue if the system hasn't been running without problems for a while.
  • Remove Quote from Writeline output

    adobe database sysadmin help question
    2
    0 Votes
    2 Posts
    2 Views
    H
    Have you tried windows version of sed or awk? They will strip quotes instead of you ;) Attached code shouldn't return quoted string, so i think quotes are added during saving to file. H.
  • How to generate code from Rational Rose Diagrams?

    tutorial question
    4
    0 Votes
    4 Posts
    3 Views
    E
    Hallo, my company works on Rational Suit 2003 if you created the class digram, you should open it then go to tools menu,and select the programming language, then you can see the Create Code option, select it, so the code will be generated if there is no errors in your digram. Best Wishes, Good Luck Eng. Mai...
  • Recording a wave file

    csharp design performance help question
    5
    0 Votes
    5 Posts
    4 Views
    C
    Also, you could add in support for both. This way for people who wish to record large amounts they have the option of recording to hard disk. But also include a restraint option in the config dialog similar to what you'll have for in memory recording. This statement was never false.
  • 0 Votes
    2 Posts
    2 Views
    P
    It's not common to combine the two patterns to perform Undo/Redo. I would suppose that you would need to identify against each action whether or not it was specified with a Memento or a Command. This is not a good design. Deja View - the feeling that you've seen this post before.
  • Design question for a Plugin Framework

    help workspace design security debugging
    3
    0 Votes
    3 Posts
    5 Views
    S
    No i have not, thanks for the heads up and i will take a look.