design-decisions

IdbConnection vs. SqlConnection

When I write an app, I use the System.Data interfaces (IDbConnection, IDbCommand, IDataReader, IDbDataParameter, etc...). I do this to reduce vendor dependencies. Unless, I'm doing a simple test app, it just seems like the ethical thing to do when consulting. However, it seems like all the code I see uses the System.Data.SqlClient nam...

EpiServer CMS 5 R2: Custom Page Providers - The right choice?

Hello, I'm using EpiServer CMS 5R2 on a new project. I've been tasked with creating a CustomPageProvider to link to an existing back end store which we don't have control of. However looking at the sample provider (XmlPageProvider) it appears that the provider is responsible for maintaining the meta information that EpiServer needs for ...

Web vs Desktop Development (Online vs. Smart-Client)

Hi Everyone, I work at a company with a large SAP investment, and we also have dozens of large .Net systems (mostly internally for engineering systems), and Java platforms (mostly for external web applications). As such, we have large development shops on ABAP, C#, and JEE. We have decent standards for which platform to use in which do...

Product Development Decision Methodology

What is the best method you have found for deciding whether or not to implement features into your software product? EDIT: Can you recommend some reading material (online or book) for me on this topic? ...

What should I do with an object that should no longer be used in Perl?

I am writing a class that is linked to an external resource. One of the methods is a delete method that destroys the external resource. No further method calls should be made on that object. I was thinking of setting a flag and die'ing inside of all of the methods if the flag is set, but is there a better, easier way? Something invol...

How do I know when to and whether to have a separate controller for a piece of code?

So I am in a situation where I have to decide whether or not to have a separate controller for a particular piece of code. We have a home page that acts like a hub for the rest of the site. The page is accessible to all users (logged in as well as non-logged-in). I was thinking about having home as a separate controller and an action cal...

confusion C# duck typing, implicit conversion and inconsistencies.

Everyone seems to love duck typing, if it looks like duck, acts like a duck, treat it like a duck. C# 4.0 allows duck typing and current supports it in a few situations (see "C# has used duck typing for a long time" in http://www.eioba.com/a75370/how_duck_typing_benefits_c_developers) Now... pretty much everything has a .AnotherType(). ...

What was the design decision for variadic functions needing an array?

I am curious and hopefully someone can shed somelight on this - but why do the C# functions that take 'params' have to be an array? I get that the objects in the parameters list are entered into an array but what if someone wants to create a variadic function that takes in an undefined number of array objects? Take this function for ex...

Primary Keys - Native, Sequence, or GUID keys?

In reading this and this and then reading this (which references the other two ironically) I find myself wondering just how big the discussion of this topic is? I am a SQL Server guy and so I tend to use an Identity that is auto generated in the form of an int. However, when I know that I will need some form of replication between serv...

What should be the expected behavior on this user decision?

Hi, I have this application where the users can change text files and when they forget to save them, a little message pops up reminding them that the changes are not saved and asks them if they want to save the changes or not with two buttons "Yes" and "No". It also has a little checkbox that says "Disable this warning". And as the same...

What are the uses for Joomla?

I've taken over development for a site that was started to be built in Joomla. So far, there is just a few static pages and user registration. The specs state it will basically be a file-sharing website. The admin's (and only admin's) will add files and the user's will be able to download some of those files from the Members Area (bas...

SVN externals and export for framework

I'm currently working on a framework for a client. The framework is based upon Zend Framework. The directory structure is: application : Application specific code application/modules/frontend : Application specific code application/modules/backend : Backend for MyFramework library/MyFramework : The custom...

C# byte[] substring? (design)

I'm downloading some files asynchronously into a large byte array, and I have a callback that fires off periodically whenever some data is added to that array. If I want to give developers the ability to use the last chunk of data that was added to array, then... well how would I do that? In C++ I could give them a pointer to somewhere i...

Is there any reason to use PHP when starting a new SaaS project?

I'm a PHP developer, so when I started working on a new SaaS project I naturally planned from day 1 to do it in PHP. However, I would like to be a bit more pragmatic about this decision since it's one I may have to live with for some time if the project is successful. For that reason, why should I chose PHP as my development language...

Class Diagram with aggregation and generalization

Hi I am working on a university project and i have the following problem i can not figure out. I have a class Called Employee from this i generalize two classes Contractor employee and Permanent Employee. Now i have a team that is made by both types of Employee so i am planning to use aggregation. Do i have to connect the team cla...

C# Battleships Class/Structure

greetings, im am new to programming and at the moment developing a clone of the game battleships. i need to implement a fleet of 5 ships. this is what i have done so far: class Cell holds the status of a table cell: public class Cell { // class for holding cell status information public enum cellState { WATER, ...

Tough inheritance database/model design decision

I have Users which can be either TypeS, TypeC, or TypeA. I have models for each of these types to store additional information. Now, in the Users table, should I have 3 nullable foreign-key fields to designate which type they are 2 fields, 1 with the name of the type and 1 with the foreign key 1 field designating the type with the for...

Should I use Rails 3 for my application

I have been a user of Rails for a while and used version 2.3.4 recently. Rails 3 Beta just came out recently and it seems have significant performance improvement especially with the merge with Merb. I'm planning on building an application that will take 4-6 months. Should I use Rails 3 for it starting with beta? Knowing that it will b...

Credit card system implementation?

My site is going to have a credit system that basically works a lot like a credit card. Each user has an unlimited credit limit, but at the end of each week, they have to pay it off. For example, a user might make several purchases between March 1st and 7th, and then at the end of March 7th, they would be emailed an invoice that lists al...

Why isn't the Type class in the System.Reflection namespace?

Everything about Type is reflective in nature. Is it because Type is used more often than the rest of the classes in System.Reflection? Or because it functions more like a system class than a reflection class? In short, I've always wondered what the motivation behind the location of System.Type was. ...