architecture

Should I use two threads which can kill each other?

I would like to have a window with a simple form (radio buttons and so on). Users can make there selections and press a "Submit" button. Additionally to that I would like to set some time limits. In more details, user should see how many seconds he/she still have (so, there should be a timer). If the time limit is exceeded, program close...

Should I combine unrelated interfaces into a single library?

Situation is like this: There are independent 5 services. Each service consists of a project for interface, implementation and test. Example: LocalizationService.Interfaces LocalizationService.Implementation LocalizationService.Test There is a WCF service for each of the services: LocalizationService.WcfContract (including DataContr...

Verbose Listing of All Application Layers/Tiers?

I've looked at a few sites now, and I'm still struggling to find a complete listing of all the possible layers/tiers you can have in an application. From back in college (1999) I remember the following: Presentation Layer (Views) Application Layer (Controllers) Business Logic Layer (API/Rules) Persistence Layer (Database/Object Pers...

Thrift,.NET,Cassandra - Is this is right combination?

I've been evaluating technology stack for developing a social network based application. Below are the stack I think could well suitable for this application type of application: GUI -- ASP.NET MVC, Flash (Flex) Business Services -- Thrift based services One of the advantage of using Thrift is to solve scaling problems that will come i...

How to secure authorization of methods

I am building a web site in C# using asp.NET MVC How can I secure that no unauthorized persons can access my methods? What I mean is that I want to make sure that only admins can create articles on my page. If I put this logic in the method actually adding this to the database, wouldn't I have business logic in my data layer? Is it a ...

Project Architecture For Enhancing Legacy project.

I am working on legacy project. Now the situation demands project to be divided into parts. What strategy I should follow to do this task. Description: The legacy project (A) is fully functional web application with almost well defined layers. But now i need to extend the project to a further enhancement. This project usage maven as...

Looking for design/architecture suggestions for a simple HTML game.

Imagine that HTML page is a game surface (see picture). User can have n number of boards (blue divs) on his page. Each board can be moved, re-sized, relabeled, created new and removed. Inside each board there are m number of figures (purple divs). Each of these user can move inside the board or to another board, re-size, change color ...

Which layer should create DataContext?

I have a problem to decide which layer in my system should create DataContext. I have read a book, saying that if do not pass the same DataContext object for all the database updates, it will sometimes get an exception thrown from the DataContext. That's why i initially create new instance of DataContext in business layer, and pass it in...

Book for Anti Design Patterns

I have heard a lot about anti patterns and would like to read a book on this,which book would you suggest for Anti patterns. ...

Arguments of using WCF/OData as access layer instead of EF/L2S/nHibernate directly

We develop mostly low traffic but highly specialized web applications. Normally we use L2S, EF or nHibernate as access layer and then throws Asp.Net MVC to it and in which for normal crud operations we query the ISession/DataContext directly but for more advanced functions/side effects we put it in a some kind of service layer. Now, i ...

Architecture options for java swing application with occasionally disconnected clients

The project is a java / swing client / server application. Clients could number in the hundreds. The specification says that clients should be able to view up to date information from other clients and that clients should continue to work normally when the network is not available. There is no stipulation on the duration or frequency of ...

MVC architectural question - Where should payment processing go?

This question is related to my ASP.NET MVC 2 development, but it could apply to any MVC environment and a question of where the logic should go. So let's say I have a controller that takes an online payment such as a shopping cart application. And I have the method that accepts the customers' credit card information: public class CartC...

Applying Test Driven Development to a tightly coupled architecture

Hi all, I've recently been studying TDD, attended a conference and have dabbled in few tests and already I'm 100% sold, I absolutely love it TDD. As a result I've raised this with my seniors and they are prepared to give it a chance, so they have tasked me with coming up with a way to implement TDD in the development of our enterprise...

Need some help/advice on WCF Per-Call Service and NServiceBus interop.

I have WCF Per-Call service wich provides data for clients and at the same time is integrated with NServiceBus. All statefull objects are stored in UnityContainer wich is integrated into custom service host. NServiceBus is configured in service host and uses same container as service instances. Every client has its own instance context(d...

php, user-uploaded files, version control, and website deployment

I have a website that I regularly update the code to. I keep it in version control. When I want to deploy a new version of the site, I do an export and then symlink the served directory name to the directory of the deployment. There is a place where users can upload files, and I noticed once that, after I had deployed a new version, th...

Pros and Cons on where to place business logic: app level or DB

Hi, I always again encounter discussions about where to place the business logic: inside a business layer in the application code or down in the DB in terms of stored procedures. Personally I'd tend to the 1st approach, but I'd like to hear some opinions from your part first, without influencing you with my personal views. I know there...

WCF Data Services implementation strategies.

Microsoft has done a savvy job of not outlining the actual place for data services in the wonderful world of SOA/Web dev. So my question is are WCF Data Services designed to be used via external clients? Has anyone ever heard of someone using them on the server side (i.e. data base access for web service)? Simple scenario a general ...

Design Patterns: What's the antithesis of Front Controller?

I'm familiar with the Front Controller pattern, in which all events/requests are processed through a single centralized controller. But what would you call it when you wish to keep the various parts of an application separate at the presentation layer as well? My first thought was "Facade" but it turns out that's something entirely diff...

View controller/NIB architecture for non-navigation application with transitions?

I'm tinkering with an iPad app that (like many iPad apps) doesn't use the UINavigation root view control system, so I don't have natural ownership for each app "view". I essentially have two basic views: a document list view, and a document edit view. I'm playing with UIView animation for getting from a selected document to the edit vie...

How to implement temporarily undoable operations in PHP and JavaScript?

I would like to implement operations that is undoable in a short time after the user have done them. I.e. if a user upvotes a photo in a photo-site, he/she can undo the vote within 30 seconds. This is similar to how the voting on StackOverflow is working, you can undo your votes for a short time. How should I implement it? I guess that ...