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
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • UML C# tools

    csharp delphi visual-studio design algorithms
    4
    0 Votes
    4 Posts
    0 Views
    P
    Pete O'Hanlon wrote: Enterprise Architect I agree, it is a good one. Do you know of any open source ones? Doesn't have to be as good, but something to fiddle with. "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
  • 0 Votes
    3 Posts
    1 Views
    R
    If you have the requirements documented and putting aside the management and other support activities. Technically the ration between System Design, Development and Testing is 25::50::25. The Development will include Unit Testing. This is a standard practice we follow for high level estimations... however the type of applications can make the ratio different.
  • application Integration

    csharp java design sysadmin tutorial
    7
    0 Votes
    7 Posts
    0 Views
    K
    Ok, what about using a smart client, will that work? I think I should think of another architecture. I couldn't change the JSF web application. But I can try another means for the desktop client. The client application is a biometric authentication application(uses face and fingerprint). The JSF web application uses this application for avoiding double registration in some system. there is also some data exchange between the two applications. Can I develop it in ASP.net? I think it may be very slow as there is scanner and cammera interface and other computation. Or what should i do? The importtant thing is that the two projects should be deployed as one project(there should be some integration)
  • Hibernate-style coding?

    java question
    5
    0 Votes
    5 Posts
    0 Views
    C
    Glad I could help! "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty
  • 0 Votes
    4 Posts
    0 Views
    C
    If you have your employee class built then you can do the following: public EmployeeCollection { // You can use any collection but dictionary will help you spot them easier through their id private Dictionary<string, Employee> _employees; public EmployeeCollection() { this._employees = new Dictionary<string, Employee>(); } public void Load() { // Ask the DAL class to get all the employees EmployeeCollectionMgr manager = new EmployeeCollection(); this._employees = manager.Retrieve(); // The manager can either grab the records from the database and create employee objects, add // to the collection and return the collection OR // the manager can grab all the employee ids from the database and then create an employee object and // ask the employee object to load itself. // In the first approach you need one trip to the database but you will do some of Employee's work // In the second approach you will need 1 trip per employee to the database and one to get all the ids // but Employee will do all the work // You can have many other methods here depending on the domain model at hand. } } CodingYoshi Artificial Intelligence is no match for Human Stupidity.
  • 0 Votes
    9 Posts
    0 Views
    S
    Thank You very much Yoshi for your useful information. I highly appreciate it.
  • Creating interface that can read network traffic

    tutorial database sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    T
    trying to use System.Net.NetworkInformation in the .netframe work to read network traffic
  • Is this an existing pattern

    question csharp design regex architecture
    3
    0 Votes
    3 Posts
    0 Views
    S
    I'm mostly curious. I'm wondering if such a pattern, or something similar (or better or more fully thought out) has emerged already in the community. I know this code doesn't match a GOF pattern, and that it looks like a not-very-good singleton. You might call it a singleton for the calling scope of Bar.GetAGetter(). There's nothing to prevent two scopes from getting separate values though. Indeed, a single scope can get two separate values simply by calling Bar.GetAGetter() twice - each call returns a method that returns a distinct value. This is by design - it's not supposed to be a singleton. Like I said, I think the value of Bar is that it encapsulates lazy instanciation. Since lazy instanciation is very common, and it takes 3-5 lines of code every time, and this replaces it with 1 line of code, encapsulating it seems like a good idea for all the usual code reuse reasons.
  • DTO design supporting multiple tables

    csharp database wcf design beta-testing
    8
    0 Votes
    8 Posts
    0 Views
    C
    A Customer should have a collection of Orders, and Orders should have a collection of LineItems. As soon as you create a customer, you know you need orders, therefore, instantiate a collection of orders. Do not leave it null but leave it empty and then orders can be added. If orders are not allowed to be added then throw exception or handle it some other way. Leftyfarrell wrote: you simply have a Collection that is null. Like I said above this should be empty but not null--at least this is how I will design it. When a customer enters a store, he/she grabs a shopping cart but it is empty and then if he/she needs something she adds it. If he/she does not grab a shopping cart then what? Someone else has to grab it--I don't know about this. CodingYoshi Artificial Intelligence is no match for Human Stupidity.
  • OODB or RDB for checkbook/budget program?

    help c++ database design oop
    14
    0 Votes
    14 Posts
    0 Views
    C
    Thanks for all the help David!
  • Seating Selection System Database Design

    design database help tutorial
    8
    0 Votes
    8 Posts
    0 Views
    L
    No problem, good luck :) What sig?
  • Stored Procedures

    database csharp business tutorial question
    6
    0 Votes
    6 Posts
    0 Views
    C
    Thanks for the answers, it really has helped! After some research I have gathered the following: I think if the logic is not too complicated, the developer is comfortable with sql scripting, and has access to work on the db side then sometimes it is better to put the logic in the stored proc. This, just as David has pointed out, saves us the cost of transferring huge amount of data across. However, if the data is not simply for reporting purposes but it also might be updated, deleted etc. then it is not a good idea. Furthermore, we always have to be aware that if the app is to be installed on mobile device then we can not use the code because some compact database providers do not support sql stored procedures, for example, SQL CE. The other disadvantage is if we want to know why an employee did not qualify (did not work on Tuesday etc.) then things become a little messy. I mean there are still ways to get around it but they are not the best. CodingYoshi Artificial Intelligence is no match for Human Stupidity.
  • I have a couple of design issues

    database design data-structures oop help
    5
    0 Votes
    5 Posts
    0 Views
    M
    CodingYoshi wrote: I would take one of the collection classes Now that makes sense, I have no collection classes in my design, all the lists (I usually use datatables) come from the single class, this is b/c of my reliance on datatables (and recordsets of course) in the past. Never underestimate the power of human stupidity RAH
  • God object problem

    help tutorial question
    5
    0 Votes
    5 Posts
    0 Views
    C
    Quake2Player, Read my reply to MyCroft Holmes question above and it should/might help you. CodingYoshi Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
  • creating a polling system

    tutorial sysadmin help question announcement
    3
    0 Votes
    3 Posts
    0 Views
    P
    You have issues to resolve; 1- How to get latest file from FTP? 2- How to add it in playlist and keep thecount up to 20? Ans 1- You can use a windows service to keep on checking the FTP location for any new file avaialble. If you get any updates using some FTP client you can download it. Ans 2- a) Adding newly downloaded file in the playlist depends mostly on the player that you are using. There should external functions avaialble to call. b) This has some trick. Its like a queue where you can not hold more than 20 items. Use simple arraylist for the files to hold and when the count goes up, remove the top 1. You can start with this.
  • Best scenario

    database question csharp sysadmin tutorial
    2
    0 Votes
    2 Posts
    0 Views
    L
    1. The tiers are a conceptual separation, not a separation over servers. May I suggest that you keep both the DAL and the BL on the DB-server? That would save you from writing (secure) communication-code between those layers. 2. Yes. By putting the connectionstring in a configuration file. I are troll :)
  • MVC Pattern question

    question asp-net regex architecture
    11
    0 Votes
    11 Posts
    0 Views
    Q
    Nice! Didnt thought on that solution.. Instead of having large methods with a lot of parameters... Thank you
  • ORM tools in domain driven design?

    question php tutorial java asp-net
    2
    0 Votes
    2 Posts
    0 Views
    L
    That's a long story, and I'm no academic. I'll try to formulate an answer, and (I hope) others will correct me where I go wrong :) midix wrote: where they use some base classes and interfaces to implement common functionality in the domain model. But still the model entities contain some persistence awareness because of that inheritance. You can define a three-tier architecture where you keep all your persistence-related stuff in the DAL. The BL, although it inherits from the base-class, can be separate from the DAL - even physically on another machine if needs be. Yes, there will still be a relation between those two. The things are loosely coupled, instead of intermixed throughout the entire codebase. Loose coupling has the advantage that you can replace it quickly, simply by writing new derived classes (or new base-classes). You cannot avoid the coupling completely; there's some part in your application that needs to know where to persist, and how. midix wrote: And if we forget for a moment about that ServiceLyer but stick to the classical MVC - then where is the right place for CRUD operations when using ORM? Is it Controller or Model? I'd say neither. Your controller could populate the model with information from the BL-classes, which could be derived from the DAL-classes. Even if you don't follow the three-tier architecture; the controller isn't forced to do SQL - but it sure is convenient if you can LINQ there :) I are troll :)
  • Client Server Protocol Definition - Best Practices

    sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    L
    Member 4047183 wrote: Can anyone let me know the best way of defining the message protocol between client - server. Requirements