architecture

DAO and Service layers (JPA/Hibernate + Spring)

I'm designing a new app based on JPA/Hibernate, Spring and Wicket. The distinction between the DAO and Service layers isn't that clear to me though. According to Wikipedia, DAO is an object that provides an abstract interface to some type of database or persistence mechanism, providing some specific operations without exposing...

Interface, Abstract or Inheritance? C# Design Question

Hi, I have a table which houses two entities, StaticProgram and DynamicProgram. There is one column in that table called ProgramType which determines if a program is of type "Static" or "Dynamic". Though these two entities are stored in one table (I am guessing because the primitive fields for Static and Dynamic programs are exactly the...

Single technology stack vs. multiple technologies for high scale site

Hello, I have recently been come to for advise on an idea of rewriting an existing site due to massive maintenance problems in their old design. Basically, the company is considering a complete rewrite of aprox. 90% of their site which is currently written in PHP using an in-house framework. The company would like to rebuild the backen...

Service layer and controller: who takes care of what?

In class we're now learning how to build up a Spring application, even though spring isn't directly involved, we learned how to make the interfaces for DAO and service layer objects. Please correct me if I'm wrong: DAO layer is pretty abstract: it just contains the CRUD operations and is further used to read data.(ie: get all objects, ...

WCF / WCF Data Services / WCF RIA Services

Not to add another SO post regarding the different WCF stacks, but I want to make sure I'm heading in the right direction before I waste more development time... My scenario - Our company has a number of web apps that all access the same series of databases. All the apps were basically developed independently, so there's a ton of busine...

Developing for both 64-bit and 32-bit

I've read a lot on the subject of converting 32-bit to 64-bit. I use a lot of vendor hardware, and have finally obtained both 64-bit and 32-bit drivers for each. Moving from 32 to 64 seems like it will be an easy transition. The problem, however, is that we do not wish to "transition". We want to maintain both, side by side, without hav...

Is there a good pattern for exposing a generic collection as readonly?

So I've got these classes that expose a collection of child objects. I don't want other classes adding or removing objects from collections because I need to wire into events in the child objects, so as they get added or removed I want to be able to do additional processing. But I really love the ease of manipulating generics internally...

Why is twitter so buggy?

If you ever used twitter for at least a couple of weeks, big chances are you've seen the twitter whale. I am now following the twitter api account and most of their tweets are about some broken feature or not available at the moment. The last one I just saw is about missing tweets in my time line, which happens pretty often I must say. ...

How do I add 'Tags' to my simple BlogPost class library & repository?

Hi folks, Update Checking StackOverflow OData service it's exactly like Posts / PostTags / Tags ... How can I replicate that, please? So I've got a simple class called BlogPost - nothing special. Just a blog post. Now, I wish to add tagging for this class. Exactly like the tags for a StackOverflow question - 5 strings, space delimit...

Recommended database design for relationship between business hour and it's staff and their hours

Been going back and forth on how to architect this. I'm using rails,and started with Single-Table-Inheritance, then changed my mind, now I'm not sure. BusinessHours business_id, day_of_week, start_time, stop_time StaffHours staff_id, day_of_week, start_time, stop_time Obviously a staff member belongs to a business, however the tables ...

Class Construction Techniques

I'd like to get some feedback on what people think of the following class construction techniques. If I'm in a situation where I have the choice of using either of the following: Initialise an object completely in the constructor, Initialise an object by way of it's public properties after the instance has been created. [removed blog...

Modular system architecture

I'm trying to implement modularity in my POS system to allow 3rd parties to do some kind of modules/plugins/add ons. I have started implementing a SPI and an API, my question is: the access to the data on database has to be by this way or I need to provide a Service? At this point you may have noticed that I have few experience in this,...

Is this a good reason to use a service bus, alternatives please

I'm in the planning phase of our new site - it's an extension of some mobile apps we've built. We want to provide our users with a central point for communication and also provide features for users who don't want to/can't use the mobile apps. One of the features we're looking at adding is a reputation system similar in nature to the SO ...

Strategy for transferring Large amount of data

Hi, I am writing my master thesis and is in contact with a digital signage company where im writing about the distribution of large amount of data. I need some ideas or some documented experiences with transfering large amount of data (this is images and video, ~100Mb - ~1Gb - but any data would do, large datasets would give some of the ...

Complex DAL -> BL mappings using AutoMapper

I'm considering to use AutoMapper in the upcoming project and trying to find possible "bottlenecks". At the moment the most complex case i can imagine is the following: A domain class which is represented by 3 (for example) tables in the database (my data access layer is LINQ to SQL). To build an instance of the class i need to perform 3...

Selecting Instances of an Interface Based On Specific Value

I'll start here with a little bit of background. We have an ASP.Net MVC web application that sits upon a structure roughly based upon the Onion Architecture concept. Therefore, we have the following (simplified) vertical structure: ASP.Net MVC controller layer Application service layer Business Service layer NOTE: The above is simpli...

Billing system best practices

Dear Gurus, I'm currently developing a web application for one of my clients. This client requested a small billing module. The client istelf is small SIP provider. There are several pricing items, plans, etc. All they different types of payment like onetime, monthly, annual. Are there any best practices, good books, articles on blling...

Inheritance in Enterprise Architect

I have a class within a package. And I have another class in another package. I would like to link this second class to first. Since the first is a legacy of the second. I'm not able to make this relationship. We tried, but in neither case are the methods of the second brought the first. Any help is welcome. Thanks Class A Class B ...

ASP.NET MVC Three Tier - what's everyone else doing?

When I start work on a new web application I tend to reach for the same tried & tested architecture of ASP.NET MVC, BLL (consisting of a set of services that contain all business logic) and a DAL (consisting of a set of repositories that facilitate the unit of work pattern over something like EF/*Linq to SQL*). The controllers talk only...

ASP.NET MVC - Exception throw?

Hello there, I got a generic repository - should the repository be able to throw exceptions or should I keep it dumb? If I chose to throw exceptions from it, should the service layer then catch it and throw an exception with a more friendly message before it goes to the Controller? Pos1: Repository (Throw) => Service(Catch, Throw new) ...