architecture

Best way of having Service communicate errors to Controller

When the Service layer is only executing a task (checking if Id exists, sending an email, etc.), what is the best way for it to let the controller know if there were any errors? Two solutions I can think of: Always passing in an extra "broken rules" parameter by reference to the methods in the Service layer which it would update if th...

Definition of coarsely grained/finely grained in architecture

Hi, When talking about APIs, the terms "coarsely grained" or "finely grained" are used a lot. What do these mean/are there any examples? Thanks ...

Parsing mathematical functions of custom types

I'm about to start developing a sub-component of an application to evaluate math functions with operands of C++ objects. This will be accessed via a user interface to provide drag and drop, feedback of appropriate types followed by an execute button. I'm quite interested in using flex and bison for this having looked at equation parsing...

Where do interfaces belong in a multitier application

So say you have a three tier application with the tiers UI, Services, and Repository for a simple application, let's say saving addresses. If AddressService has an interface IAddressService, where does that interface belong? I know that "in the address service" may seem like an obvious answer, but if it's in the address service it woul...

Plugin Architecture in PHP

Hi! I am planning on doing a research on how to implement a plug-in architecture in PHP. I have tried searching the web for possible references, but I thought that maybe my search for a good reference would be faster and more relevant if I asked here. Has anyone here tried using plug-in architecture for web projects? Thanks, Erwin ...

Any memory usage paradigm besides Stack and Heap?

As I have learned data structure, I know there are plenty of other data stuctures besides Stack and Heap, why the processes nowadays only contain these 2 paradigm as the "standard equipment" in their address space? Could there be any brand new paradigm for memory usage? Thanks for your replies. Yes, I realized that something is wrong wi...

Chat server with a lot of clients

Hello everyone, I read some C# chat source code & I see that: on chat server with a lot of connected clients, server listener will run in a separated thread & each connected client will also run in a separated thread. Code examples: Start server & begin listening in a separated thread: public void StartListening() { ...

How to architect my service/repository code with Linq2Sql!

Hi, I have a problem in architecting my application. I have the following structure with only important aspects shown. namespace Domain { public class Invoice { //properties } public class InvoiceRepository { public Linq2SqlContext context = new Linq2SqlContext(); public IQueryable<Invoice> GetInvoices() { ...

.NET data-based application architecture suggestions, opinions, good practices

Hello, I'd like ask a question about building applications in .NET that use data from a database. There are many technologies and patterns and I'm trying to connect it all. I'm building a desktop application with local database, so I choose SQLServer CE + WinForms, but I'd like to keep this as general as possible. I'm not into other tec...

Possible architecture pitfalls

I am currently building a fairly complex CRM / POS system which has the following requirements: System needs to be able to be installed on a single machine (PC) System needs to be able to be installed on 1 machine that can act as a server, and be accessed by several client machines (local network, wired and wireless) System needs to be...

How do I layout my C++ program? (where should I put the .h and .cpp files?)

Currently, I program in Java and use Maven quite a bit. As so I've become accustom to the naming schemes and folder structures that I've used over the past 4 or 5 years. As I have recently started to learn C++, I'm realizing that I have no idea where to put all my files. Should I keep everything broken down by namespace, or by what ...

Module "duck typing" pitfalls?

I just started experimenting with a new technique I name (for the moment at least) "module duck typing". Example: Main Module import somepackage.req ## module required by all others import abc import Xyz Module abc __all__=[] def getBus(): """ Locates the `req` for this application """ for mod_name in sys.modules: ...

Where to put methods that do simple date formatting

I have two models, BusinessHour and StaffHour that both inherit from Hour. In the BusinessHour and StaffHour models I do a 'find' to retrieve requested hours. After that I need to format each time to a specific format, which I have a method for. I'm trying to figure out where to put that method. It sort of seems like it would go in a H...

Help me a solution for a .NET real-time application

Hello everyone, I am developing a system which include a server app & a client app, note: the number of clients can be to million. These are my requirements: Client must authenticate (username & password) to server to be accepted connection. And client will listen to server, and receive any data which sent from server. When server has ...

Why do we need design patterns

Why do we need design patterns like Factory, Abstract Factory and Singleton? ...

Modeling loosely coupled domain model

Hello, The question doesn't really concerne DDD but would like to know if there is any way to model a loosely coupled domain model. What I mean by that ? I work for a software HR editor and we're planning to start a new application from scratch. We did an audit of all projects we did for our 150 customers and the fact is that we can't s...

What is the best practice for accessing Model using MVVM pattern

I have a database that communicates with webservices with my Model (own thread) and exposes Data Objects. My UI application consists of different Views and ViewModels and Custom Controls. I'm using ServiceProvider (IServiceProvider) to access the Model and route the events to the UI thread. Communication between the ViewModels is handel...

Software development training in NYC

Hello, Could someone recommend me a company on the north-east cost of USA, where I could do a software development training similar to those offered at http://www.construx.com? Basically, I'm newly appointed development team leader, and my company is willing to send me for a few-day training to the east coast of USA. My new job respons...

How To (or Even Should I) Get Started With EJB?

A little bit of background first: Last year I started working at a medium-sized auto insurance company -- we're in several states, but we're not as big as GEICO or Progressive or anything like that (yet). Our primary software system is old (written in RPG) but reasonably stable. We're wanting to make our in-house applications availabl...

Using SimpleDB (with SimpleSavant) with POCO / existing entities, not attributes on my classes

I'm trying to use Simple Savant within my application, to use SimpleDB I currently have (for example) public class Person { public Guid Id { get; set; } public string Name { get; set; } public string Description { get; set; } public DateTime DateOfBirth { get; set; } } To use this with Simple Savant, i'd have to put a...