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
  • Class Design Help

    database design regex architecture help
    3
    0 Votes
    3 Posts
    2 Views
    M
    Many Thanks for your reply :) I think you understand my problem! using lazy-load properties would be ok, but.. I will have a screen showing client information (ie, linked to an instnace of a client class), on this screen i need to show basic information about each delegate at that client (say in a datagridview, and when they click on a delegate it opens a delegate screen), so i would end up loading each delegate anyway. The only way i can think of doing this is to have a cut down delegate class that is used for displaying on the client screen and then if that client is selected to be loaded, create a full delegate instance. I just worry that this could result in loads of different types of cut down delegate classes, if a delegate summary needs to be shown on any other forms
  • Object level isolation than locking

    csharp announcement database visual-studio tools
    6
    0 Votes
    6 Posts
    2 Views
    S
    It sounds like you are asking how to implement pessimistic locking. There are very simple ways of doing that, although most people agree that it is quite a user-unfriendly thing to do (but sometimes you have no choice). Basically, create a mutex on the server for the particular rule being edited, and deny edit access to that rule for other users until the mutex is released. The mutex can be anything - for example MS Office products create a file when you open a document for editing, and delete it when you are done. my blog
  • Client / Server Design

    sysadmin csharp database design beta-testing
    5
    0 Votes
    5 Posts
    3 Views
    S
    You are suggesting a forms application with 3 physical tiers (client, server, database)? That is appropriate if you want to scale to large amounts of clients, or if you have specific security concerns. Otherwise, you should be aware that it is more expensive to build than a simpler 2-tier arrangement. (You should still logically split the application into layers). my blog
  • Genral architecture question.

    architecture help question
    3
    0 Votes
    3 Posts
    4 Views
    P
    joysnlove wrote: So what and where and how will be the best way to specify the format required. so that any module , service The key thing here is service. If you look at exposing your method so that it can be used in an SOA scenario then you shouldn't use a DataTable or a DataSet. These are cumbersome objects that aren't natively recognised by other technologies (such as Java). You've already found typing issues with the dataset, so now you need to consider whether or not this really is the way forward. Deja View - the feeling that you've seen this post before. My blog | My articles
  • XML Model Structure

    csharp linq xml performance question
    22
    0 Votes
    22 Posts
    15 Views
    P
    led mike wrote: Geez, apparently I have been implementing the IAmAnIdiot interface No fair. I copyrighted that one. ;) Deja View - the feeling that you've seen this post before. My blog | My articles
  • Managing Application ImageLists

    question docker discussion workspace
    4
    0 Votes
    4 Posts
    3 Views
    P
    I mean both, but the principle should be the same for you. Deja View - the feeling that you've seen this post before. My blog | My articles
  • Unrelated data layer question.

    question css database business help
    7
    0 Votes
    7 Posts
    2 Views
    D
    The problem with a completely object-oriented approach is that it doesn't work so well for a server scenario. Getting a bunch of data and instantiating a huge collection of instances is sort of useless if all you'll do with those instances is to serialize them and send off the data as, say, XML to a client somewhere, then discard all the objects. Likewise, deserializing a stream of (updated) data to a collection of objects and then use reflection or some other run-time schema mapping is rather useless. In a desktop scenario it sure is nice. Bind the grid to your objects and when the user changes something, modify the instances you've already loaded. When he saves, call Save(). It's great. But it doesn't work like that on a server, because you can't keep all those objects alive between the user reading the data and wanting to save. Which is why there is so much talk about "service" orientation. They say its "stateless objects" but without state it isn't really an object at all! Object-orientation is all about encapsulation. Service-orientation sacrifices that, because there's hardly any point protecting the state of an object that is used as little more than a serialization/deserializtion mechanism for SQL Server data...
  • uml diagrams

    sysadmin
    10
    0 Votes
    10 Posts
    2 Views
    P
    Mark Churchill wrote: How to sticky thread in XML and Web2.0 using AI? Plz send codes as soon as possible? URGENT!!!! :laugh: Deja View - the feeling that you've seen this post before. My blog | My articles
  • Free tool for UML

    question
    3
    0 Votes
    3 Posts
    4 Views
    T
    I discovered StarUML, and have found it very powerful. http://www.staruml.com/[^] Regards Tris ------------------------------- Carrier Bags - 21st Century Tumbleweed.
  • Captures screen updates from desktop screen

    question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • DAL Design Question

    database tutorial html css sharepoint
    8
    0 Votes
    8 Posts
    7 Views
    W
    Mark Churchill wrote: I wrote: You can send multiple queries and get multiple responses in one round trip. This was in reference to "...which I'm highly considering but a little concerned about how to execute multiple SQL statements..." - this isn't anything to worry about. A query isn't restricted to multiple statements - so you can send "select foo; select baz" in one ExecuteDataSet() and get back a DataSet containing multiple DataTables. Well, I'm sorry, I probably should've explained it more clearly, actually what I meant here is that when you use stored procedures you can easily use many sql statements in the same procedure for example: begin transaction insert into foo update foo2 set .. .. etc This is very easy with stored procedures but I guess not so easy with ad-hoc sql statements, this is what I meant to say Mark Churchill wrote: A thread is basically a post that also has some extra information, like a title, a group it belongs in, etc. Say your database structure has a table, Product (Id, Description) and ServiceProduct(Id, CostPerHour) with ServiceProduct.Id being a foreign key to Product.Id. This defines that for every set of ServiceProduct data there is Product data, meaning ServiceProduct inherits Product, which is pretty analogous to how inheritance relationships work in code. This can be handy. Using a ParentPostId field makes it difficult to pull a whole thread out the database. Given a parent post I would have to do an index scan to get the 2nd post, then again to get the 3rd, etc. Say you have this setup: Post (Id, Author, BodyText, TimePosted, ParentThreadId) and Thread (Id, Title, GroupId) Thread.Id is a fk to Post.Id (inheritance) Post.ParentThreadId is a fk to Thread.Id (reference) This means that I can easily select threads in a group (Thread by GroupId), Posts in a Thread (Post by ParentThread). If you are feeling uncomfortable with the inheritance relationship, then you could just have a Thread table that acts as a bit of a stub to group posts. It might be worth having a look at how forums like phpbb handle their database structure (considering I'm coming up with this on the fly). I like your idea about having a separate table for threads, I think this can speed things up as we can have less indexes on the same table, it might just be harder to maintain though as you have the data in two tables but I still like the idea
  • 0 Votes
    4 Posts
    3 Views
    J
    Mark Churchill wrote: Having multiple source control systems is just going to lead to disaster. This I agree with. I was surprised to see it like that. I think you are correct that we should only have one project, with not many branches or anything. We don't have multiple versions of the project... it is all one big thing, with constant updating going on - a typical web site for a large company. The result is a fairly nice site... but from the code... you wouldn't think so. It is a heterogeneous environment, with SQL Server and Oracle, several 3rd party applications, and a mixture of Cold Fusion and ASP.Net stuff... Here is the result: http://www.awwa.org/[^] This organization does a lot of good for the world, so I'm not afraid to do a little promotion. There isn't much there for the average Joe, but it's interesting to me anyway... "Quality Software since 1983!" http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and articles.
  • An MVP Variant?

    html com regex architecture tutorial
    5
    0 Votes
    5 Posts
    2 Views
    P
    It would certainly make it easier to test. It would be very powerful when mocking. Deja View - the feeling that you've seen this post before. My blog | My articles
  • Good UML tool

    database question
    3
    0 Votes
    3 Posts
    2 Views
    T
    Do you now StarUML... (http://staruml.sourceforge.net/en/[^]). May be good for sketchs! -aah
  • Help! NHibernate data saving problem.

    help c++ java database sysadmin
    3
    0 Votes
    3 Posts
    2 Views
    H
    Thank you for your reply. I know I did something terrible, just because was not for sure which catalogue this question should be in. I will never do that again. Thanks again. Please forgive me.
  • shape locations

    question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Visual Studio 2005 collaboration

    help csharp visual-studio sysadmin debugging
    11
    0 Votes
    11 Posts
    2 Views
    M
    We finally tracked down the problem. It didn't really have anything to do with the filepath message. That is apparently just a smokescreen -- VB couldn't figure out the problem and popped up that message. The problem was a database one and once we fixed the database, the module works corectly. I did, also, find the coded reference to the local filepath in Germany. I need to discuss this with my German colleague to determine whether it is necessary or not to be hard-coded. Thanks for taking the time to look at this.
  • Scheduling Design

    question csharp database design performance
    4
    0 Votes
    4 Posts
    3 Views
    P
    Very cool looking article. Thanks for the link :-D "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
  • Handling text data retrieved from file

    help question csharp tutorial learning
    2
    0 Votes
    2 Posts
    2 Views
    P
    Have you come up with any good ideas? "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
  • Promotion Table Schema Design

    database design xml
    2
    0 Votes
    2 Posts
    4 Views
    P
    Have you come up with any good ideas? "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon