design

LINQ2SQL or Entity Framework or Enterprise Library??

with LINQ2SQL, Entity Framework in the market, does it make sense to use Enterprise Library data access application block to design Data Access Layer(DAL)? thanks. ...

How can return reference to Dictionary from a method as readonly?

I want to let users iterate through my dictionary without modifying it. I considertwo solutions: 1.ReadOnlyDictionary -- is there an implementation of that available? 2.Copy the entire dictionary -- what is the most efficient way to copy it ? Thanks ...

Lazy Loading on a Collection of Objects

i have a sql query that can bring back a large number of rows via a DataReader. Just now I query the DB transform the result set into a List(of ) and data bind the Grid to the List. This can result occasionally in a timeout due to the size of Dataset. I currently have a three teir setup where by the UI is acting on the List of object...

Where should I create ListViewItem list when using the MVP pattern?

Hi all, I have a small application that I have written that uses the MVP pattern as follows: I created an interface called IView I implemented this interface in the Form Passed in an instance of the form as type IView into the constructor of the presenter The form contains a ListView component. The items that populates the ListView ...

"Widget" or "Gadget"?

This question is about semantics. I have a client who says that the term "widget" should only be used when referring to a dynamic object that syndicates your own content on to a third party site. I believe widget can be used to refer to any self-contained dynamic object on a site (your own or a third party). However, my client says tha...

C++ concept check vs inheritance

What is the relationship between using virtual functions and C++ inheritance mechanisms versus using templates and something like boost concepts? It seems like there is quite an overlap of what is possible. Namely, it appears to be possible to achieve polymorphic behavior with either approach. So, when does it make sense to favor one ov...

System.Data.DbType Vs System.Data.SqlType

Am using enterprise library data access application block... is there any performance impact of using System.Data.DbType Vs System.Data.SqlType? And also, would like to know performance impact for the statement: DatabaseFactory.CreateDatabase("MyDB") Vs new SqlDatabase(myConnectionString); Thanks. ...

High Level Design for Installation and Upgrade Application

I need to write a very simple WinForms application, but I often get stuck in over analytical mode with these. I get stuck on Yes, No, Retry loops, and with very little thinking to do about the actions of the application, I start thinking about the 'workflow' of the application. Should I just have a method for each task, and call each one...

.Net Remoting Vs WCF

Am working on a .Net website which is going to have 1000s of concurrent users. Am thinking of keeping the business components on the app server and UI components on the web server.Database ( sql server 2005) will be hosted on another server.Am also planning to use load balancing. Given this, whats the best way of communication from web s...

Is there a way in C# to catch all exceptions from a Control/Form?

I'd like to have something like a "catch-all" for exceptions thrown from a inside a Control or a Form that reside within the current thread, but without resorting to using the Application.ThreadException of the entire thread. Why? Because I'd like to keep the exception handling modular. All the code that can cause the problems is being...

Business objects vs. entities

Is there a difference between a business object and an entity? If I were to define a POCO type of class, say a Product class, would that be a business object or an entity? public class Product { public int ID { get; set; } public string Name { get; set; } public double Price { get; set; } public string Sku { get; set; }...

Browsing for a directory and Cancel, Retry.

I've gotten my brain in a knot over the simple task of getting an application directory from the user. I have an AppFolderDialog form, which I use as a dialogue, on which there are OK and Cancel buttons, a read only textbox, and a Browse button. The browse button opens up a FolderBrowserDialog. Now when the user clicks OK, I need a lo...

Multi-touch design and interaction pattern, do you have any link ?

Hi, I develop a collaborative business application on a multi-touch device like Microsoft Surface. However to my mind every collaborative application on a multi-touch device was made to share photos, to draw, to play, or for one person at time. So, I have no reference and I'm having a hard time to imagine how multiple users can work on ...

Customization hooks: virtual functions or events?

Performance and Design wise what would be the pros and cons Using a sealed class and events or using a abstract class with a virtual function? there will only be one listener to the events... ...

How can i design a site for mobile phones

How can i start the development of a site that can be browse from mobile phones? For example, if you browse Gmail site from an iPhone the site looks different from the normal site. You have to design two differents sites to do this? How can I know if the site is accessed by a mobile browser? ...

Is there any good reference for object oriented|good design in vb6?

hi guys, i'm currently in the process of modifying a legacy editor application and i need to add in a few data structures which i have made into a class of it's own which i later add to a collection object. but thus far i'm little bit blurry on where to put all of my functions which is related to that object. i'm thinking maybe OO like d...

TDD for a medium complexity method

I've been out of touch with TDD for some time, and am very rusty. I'd appreciate some suggestions on how to TDD the method described below. The method must find a web.config file in a user supplied application directory. It must then extract and return a connection string from that config file. It returns null if for any reason t...

What should I consider when building a Content Management System (CMS)?

I'm going to create a web-based content management system for work. Before I start, what should I consider when designing and implementing my own CMS website? ...

YUI custom events and simutaneous actions

I'm working on a JavaScript application that has to perform two separate checks via AJAX. Depending on the result of each check, behavior differs. The case I'm interested in here is when both checks are successful. I've identified a few ways to do this, and I want to get some feedback from SO about what they think the best approach is...

What is a better design?

I have a scenario at hand which has some design discussion going on. To break it down in simple words, think about a hierarchy as such Company -----> Customer ------> Orders (ignore the details of how the orders have products etc) if I was to expose an API to work with this, what would be a better design. a) Dim comp As New Company co...