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
  • decoupling business and database?

    database business performance tutorial question
    4
    0 Votes
    4 Posts
    11 Views
    C
    Well, your case might not warrant a seperate layer. For one though, if you want your app to scale well, then holding all of the data in memory might not be reasonable. Say this is a website you're starting for a new business. The worst thing that can happen is that it succeeds, and you have 20,000 records to hold in memory. The main purpose of seperating out the data layer is if you're building an app that needs to target multiple data sources. If you will only ever need just the one source, then you might not need to worry about it. I would recommend though, that you put the data access code in a seperate file. So that your business objects can stay slim for serialization purposes. Sounds like your situation doesn't warrant worrying too much about it. But as it grows and if you plan to target more than one database (say its a reservation system you'll sell to mutliple clients) then you might benefit from it. This statement was never false.
  • Structured error handling practises in asp.net

    help csharp asp-net database question
    3
    0 Votes
    3 Posts
    11 Views
    S
    I see... Thanks Shaun If I had all the money I'd spent on drink, I'd spend it on drink.
  • [Message Deleted]

    11
    0 Votes
    11 Posts
    28 Views
    C
    Replied too soon. The Grand Negus wrote: Why not have a small, local company make bottles just for our little community? Just the way we like them? Wouldn't that be better? Not necessarily. In your view it would, but not everyone shares that view. I take it you'd like to remake the world in your image. The Grand Negus wrote: Not like there use to be. We used to have a different, unique, stand-alone restaurant in every small town in America; now we've got a McDonald's and a Burger King. While its true that BK and Micky D's can be found everywhere, there are still unique restaurants in every town I've been in. The bummer with your vision of locals only, is that you end up pigeon holed into that community. I think we grow much more with exposure to other cultures and peoples. Both socially and in business. I think that looking at the world as a single community would have a greater impact. The Grand Negus wrote: The owner doesn't get to decide what to buy and how to cook it and how to market it and what the place should look like, etc; the creative aspect of restaurant ownership is gone. That just isn't true. If the guy decides to buy a franchise then yes. But then, that guy isn't going for creativity. If you want, you can surely start your own restaurant and do all of what you describe. In fact, there was a show last night on Food Network where they were doing a spotlight on a chef in Portland that does just that. 80% of his ingredients come from local farms, ranges, and markets. Now you are just downright skewing this matter. The Grand Negus wrote: And the restaurant franchisee doesn't buy eggs, meat, and vegetables from his neighbors, the local farmers who now cannot survive without becoming chicken factories. The ability to contribute to the local community has been curtailed. These are bad things. That is only the case with franchises. And some franchises are not constrained by this. In and Out Burger is one that I can think of. They tout fresh locally obtained ingredients. The Grand Negus wrote: I'd rather live in a world with a thousand different operating systems - good and bad - than live in this world where everyone has "standardized" on the same few pieces of crap. You are. Linux is a
  • interface desginer software

    design question
    12
    0 Votes
    12 Posts
    37 Views
    C
    http://www.carettasoftware.com/gds/index.html[^] Upcoming events: * Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services... Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
  • Integrate Scripting to Appliacation

    csharp java javascript tutorial question
    4
    0 Votes
    4 Posts
    12 Views
    C
    There's an article somewhere around here that uses C# for scripting. But if you're targeting users, Lua is a nice one. Not sure about support in .NET, its been awhile since I worked with it. This statement was never false.
  • designquestions for my app

    asp-net regex architecture tutorial question
    5
    0 Votes
    5 Posts
    13 Views
    A
    ok, yes that makes sense :)
  • Tabbed environments brings with it clutter?

    com question discussion
    5
    0 Votes
    5 Posts
    17 Views
    F
    Makes perfect sense! Can't believe I didn't think of that. Oh well :) Would still be interesting if anyone else has another approach. There is often more ways then one to skin a cat :doh:
  • Sharepoint 2003

    sharepoint sysadmin question
    3
    0 Votes
    3 Posts
    10 Views
    D
    Thanx for that info. But what I really wanted to know is how does Sharepoint integrate with Microsoft word or excel. If i put a file on Sharepoint and then edit it, it opens in excel witha check in/out option. How does Sharepoint make the file open in excel is not a problem.. I did that first by modifying a xml file (Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\60\Template\Xml\Docicon.xml) and then creating a small activex control that searches for that particular file depending upon its extension and then opening it. The main problem is how do i make the application (take for example Photoshop) have the check in/out option. Do you have any idea how to do this?:confused:
  • Winsock or kernel mode packet capture...

    sysadmin performance
    3
    0 Votes
    3 Posts
    7 Views
    M
    Thanks for the response. What I ended up doing was basically writing an email client to read the email from the server, instead of capturing the email as it goes up the stack to the user's email client. This approach solved alot of issues, including some you mentioned. Ken....
  • A particular bug-bear of mine.

    database help sharepoint business performance
    7
    0 Votes
    7 Posts
    20 Views
    C
    I've worked on projects that supported this approach in the past. I learned (the hard way) that I had to modify the business object to ensure that it had a valid ID. So, I had to track state of the object. When loaded from the database, I set a hidden variable. If the object was created from the database load, then an internal flag would hold that fact. If the object was not instantiated from the database, then the flag would never be set. So maintaining state in the object allowed me to implement this technique. However, it is much easier to have CRUD (Create, Read, Update and Delete) implemented on any single object representing a single record from the database. Which should map to the corresponding (Insert, Select, Update, Delete) procedures. ~ CodeDoctor ~
  • How do I approach a SDI application?

    question sales help tutorial
    2
    0 Votes
    2 Posts
    7 Views
    C
    Bob, Assuming your using VB.NET 2005. There are tons of techniques. Using a MDI approach would be easy also. You could define a single class for controlling which one is currently visible. Another approach, is to use multiple Panels on the same form. Hiding each one but the current one. You can optionally use a Tab control, only showing a single tab at a time. Of course, I'm not clear on how MS Money does it. But there are also docking controls like the split panel control. If you are not using VB.NET 2005, instead you are using VB6. Then you'll have to do a little bit more coding, and some of the controls listed are not available in VB6. In VB6, you can use multiple Panel controls. Set the Left Property of the ones you want to hide to -10000. This moves it completely off the form. You can swap them in and out by setting their corresponding Left property to the setting that makes them visible. Although, I've created some fairly complex applications in VB6. I've been using VB.NET for quite sometime now. Hope this helps! ~ CodeDoctor ~
  • 0 Votes
    5 Posts
    13 Views
    C
    You can architect an application to automatically create new database fields on the fly. This will allow you to extend what you are storing in your application as the application grows. What becomes difficult, is reporting against the fields you've added. Reports are usually a fairly straight forward thing, unless there are undetermined fields you need to report against. Either way, if I understand your question, these approaches have been taken in many products, but require a seperate meta-data database to do a prelimary data build before running queries. If you are looking to accomplish this because there is no design yet defined for your application. I strongly suggest that you put it down on paper before you try and put it together. The reason why I believe that planning and architecting is so important is because if you ask anyone to go into a 40 story building, knowing that the builders didn't use blueprints to build it, instead, they just threw it together, the people you ask to go into that building will tell you NO. Hope this helps! ~ CodeDoctor ~
  • how to design a "setting" module in a software?

    design regex tutorial question
    4
    0 Votes
    4 Posts
    13 Views
    C
    The best way to approach this is simple XML. You can implement your own Settings class by Opening an XML document, defining methods using XPath Queries and setting node values. Or you can use the Settings Class that is already built into .NET. The settings class built into .NET will hold global application settings and individual user settings. These settings are stored in different locations of a Windows operating system, to allow for multiple user computers and roaming profiles. Hope this helps! ~ CodeDoctor ~
  • 0 Votes
    2 Posts
    8 Views
    C
    Maulik, Try looking at TOPAZ. They offer a full programable API and electronic clipboards for a very reasonible price. http://www.topazsystems.com/Clip_Gem/[^] I've used these for years in the medical industry for physician's and nurses, and they're API is easy to learn. Hope this Helps! ~ CodeDoctor ~
  • MVC question

    csharp question asp-net winforms regex
    3
    0 Votes
    3 Posts
    10 Views
    C
    Model View controller is a set of patterns, and has been implemented in many ways. The main idea behind a MVC is you seperate your view (Screens) from the model (Business Objects) through a center controller. Other patterns can be used here to further abstract the connections, but to keep things simple a good way to accomplish this is to first understand that your screens should know nothing of the business objects. A central controller class is usually constructed to support the "awareness" of the eventing on the view (screens). The controller then wires up to the business objects to do the work. Eventing, Interfaces and sometimes other design patterns are used for this "wiring" of abstraction between the view of the model. For instance, I've just completed a project in which that I implemented a MVC. I added an additional layer of abstraction using a Command pattern. This pattern, when implemented on the Controller and the View, gives a very abstract way of defining actions. Within the view, I constructed CommandAdapters that adapted each of my commands to the controller. The controller also used the commands for communication back to the view. There is alot of debate in the industry on the best ways to create n-tier applications. I've learned that if an application is going through alot of changes, and new enhancements are readily being introduced. Then it is worth the extra time architecting a sound MVC approach. However, if the project is simple, doesn't change much, or there isn't enough funding available. Then using agile development techniques is the better bet. Hope this helps! ~ CodeDoctor ~
  • How to use Design Pattern ???

    csharp design regex architecture help
    7
    0 Votes
    7 Posts
    21 Views
    R
    When you learn something, you deeply want to see it in action, in your project and show others that you're using design patterns. 1- Please take some time to read about Gang of Four, Design Patterns Book 2- Read it very very carefully 3- When finished you will see that you can use more than one pattern in a single project! :) 4- When you are equipped with design patterns, take some time and read anti-patterns. Dont give up, just read read read, this is real world, not hollywood's "hacker 9 - movie" One more thing: "There is no spoon" :) -richard ____________________ http://www.swbox.com
  • [Message Deleted]

    3
    0 Votes
    3 Posts
    10 Views
    C
    Design and Architecture. You may choose to associate your food with your waste. But isn't this a gross simplification and a crude attempt to show a fallacy in object orientation? Who would have a base category of "hinged device with hole"? No one. I'm sure you can come up with a better case if you really want to contest object oriented architectures. You do realize that the natural world follows an object oriented paradigm? Biology is a wonderful case for objects inheriting from base classes. Why do all felines look like cats? Why do all mammals have similarites? Why does plant life follow this same pattern of inheritance? And if it works so well for the natural world, why is it so flawed for this virtual one? This statement was never false.
  • Integration Specification Samples

    css wcf help question
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • uml from visual studio 2005

    csharp visual-studio help question
    2
    0 Votes
    2 Posts
    8 Views
    M
    Enterprise Architect from Sparx, supply an add-in for full UML support in VS 2005. Advanced .NET Persistence http://www.morantex.com
  • Architecturing DAL & BLL

    database question csharp architecture tutorial
    2
    0 Votes
    2 Posts
    6 Views
    Q
    Howdy I recently read a 3 part article by Imar Spaanjaars on n-tier (basically 3 tier) architecture in C#. Coming from many years of n-tier architecture in Java I found this article a very good read. It covers the basics real well and explains the important decisions. The article can be found at http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=416[^] Cheers Q