architecture

Two 'self-updating' properties in WPF MVVM

Considering you have an MVVM Architecture in WPF like Josh Smith's examples How would you implement two properties 'synced' that update eachother? I have a Price property, and a PriceVatInclusive property in my model. -When the Price changes, I want to see the Vat inclusive price to automatically be 'Price * 1.21'. -Vice versa, when...

Proper way to get a Winforms UI to block with a dialog until some non-user driven event conditioin?

I was asking about specifics with this approach earlier today here but the confused responses has me wondering if I'm going about this all wrong. So here's the problem. I need to architect a WinForms application that periodically checks a value from some external service. If it is in a certain state the application is supposed to pop ...

What architectural perspectives do you consider as part of your overall software design?

When someone uses the term XXX architecture I tend to cringe. It often indicates that there's another architectural discipline or perspective that I'm probably not considering. What perspectives of architecture are you considering and do you have any good resources for information on them? I hope this helps others who are working thei...

Best Practices - Design before coding.

I'm curious How do you people think ? (I mean a way of thinking) about design architecture of your Libraries, Systems, Frameworks, etc. before start coding it. I recently find my self feeling pain in what I've done, and practically every time I want to start everything from scratch.. I do design before, painting some schemes on the pap...

How to return XML in ASP.NET

This is a very basic question. I'm just on my mission to learn ASP.NET (C#). I've done classic ASP and PHP before. For this project I have ASP.NET 2.0 at my hands. I have a Web Form that has a jqGrid Datagrid that I want to feed XML data via AJAX. jqGrid is not the problem here, though. The "problem" is the approach that I should take ...

How do I create a new windows form, and associate it with an already existing thread?

I'm trying to write a chat client in C# and have run into a problem. How it works is that the client polls the server every 1 second to see if there are any new actions to take (for example display a message in a channel, or whatever). The polling is done in a thread of its own. Now, I want the polling thread to open a new MDI form whe...

What is the best way for the domain layer to "call out" to the UI

When your domain layer or business layer (whatever you want to call it) is completely separate from your UI, how does it gather the information it needs to complete a request? For example, suppose the UI issues a request to add a line to a purchase order, and the business rules determine that you need an authorization code for some reas...

API Design: Expose XML or Objects #2

I recently asked this question: Expose XML or Objects - thanks all for the responses. One point to clarify. The API will always be accessed remotely (i.e. as a service), most probably via webservices or WCF. I agree that in theory a strongly typed API exposing objects as the inputs/outputs is the right way to go. However, I feel th...

Is there a best practice for accessing business logic services in a web app?

Is there a best practice for instantiating / calling business logic layer service in a web app? I've got a large number services that I keep instantiating and then disposing for just one method call. Should these be implemented as providers? Or maybe accessed from a singleton? Example code: void ShipProduct(){ ProductService serv...

Windows Mobile Development - Where to begin?

Okay, I will shortly be starting down the path of windows mobile development. I know nothing about the subject really and I am looking for people with experience to let me know of any gottchas you may know of. Right now I dont even have a breif of what is requied but the assumption is that the application will be very little more than ...

Advice on seperating projects in .NET

Hi All I’m looking for some advice on separating projects in .NET. I’m building a large windows form app (80 tables) and I’ve only got a couple of projects. They’re becoming quite big. I noticed the problem when I saw the list of references the other day. This is the first time I’ve create an application this big, so the naming of proje...

Architecture Critique: SQL Server FOR XML into XSLT for Rich HTML Interface

Can I get some constructive feedback about the following architecture? Simplified Architecture Summary: Return XML from your SQL Server (using FOR XML) and pass it straight into a XSL transform to produce a rich HTML web site. What are the pro’s and con’s of such a system when compared with a conventional 3-tier ASP.NET architecture?...

High level architecture

Even if you are using Agile, you would need a high level architecture before you can start implementing the project. By high level architecture, I mean dividing project into small parts, infrastructure stuff, distributed/web-based/thick client etc... Are there any books/articles on this topic?? ...

What are your 3 most important programming patterns, and why?

We all know that programming patterns are excellent ways to provide a repeatable design amongst each other. While most people only use a few, choosing the right pattern for the right scenario is of utmost importance. What are the three most vital patterns you believe any programmer should know and understand in their journey, and why do...

Database Abstraction in a Reporting Application

In a reporting application, Is it possible to abstract reporting logic and the database schema details? I have a Reporting Services application with a reasonably complex reporting logic, I am trying to migrate the application to some other databases. (Databases that are built for the same purpose but developed by different software-hou...

If exception handling should be centralised is the design of WinForm components flawed?

Or any other design that has the gui widgets as being the first port of call where an unhandled exception will kill the app? We all want one main: "catch all" for face saving purposes (although in most cases this shouldn't have a "continue" feature) but it is impossible to easily implement one with gui widgets that are the first port of...

Changing our BL design - which pattern(s) would be most useful?

Hi, I am in the process of refactoring our BI layers to make our code more "loosely coupled" and I was interested to hear what you guys thought might be interesting improvements to make? At present, our API is something like the following:- // Fetch a collection of objects ProductCollection prods = Product.GetProducts(); // Load an i...

Ideal .NET Architecture?

I'm writing this question from the standpoint of an ASP.NET application. However I realize it may be suited to other contexts as well. There are so many approaches to developing the common elements of an ASP.NET website. Here are a few I have come across: LLBLGen SubSonic LINQ to SQL Entity Framework CodeSmith + .netTiers NHibernate ...

WCF Pub/Sub with subscriber caching

Problem: how to provide a distributed, scalable and disaster resistant pub/sub service with WCF. Details: Note that this approach is being considered in addition to messaging/middleware solutions such as Tibco EMS. I've been looking into WCF, particularly how it may be used to offer pub/sub. On this subject this article is very good:...

Strategies to Avoid Transaction Escalation in System.Transactions

So, based on the answer to my previous question, transactions do get elevated from the LTM to the DTC if multiple connections are opened during a transaction, even if the connections all have the same connection string. So, my next question is, what strategies could one employ to avoid this "feature?" It seems to me that, based on resou...