Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm working on a project where the everything is driven from the a .dll on the server. The UI and the business rules are all on this .dll

This makes it pretty difficult to debug. My question is, I would like to present alternatives to allowing the users to the ability to still create customized screens without the UI and the rules being so tightly intertwined.

Can anyone offer suggestions or references to ways of splitting out the UI but still allowing ultimate customization abilities?

Let me know if I need to add further information.

share|improve this question
    
Why is it difficult to debug? Just being a dll doesn't make it difficult. What language/framework? –  P.Brian.Mackey Apr 21 '11 at 13:07
    
I'm used to the separation of layers. –  aComputerDrone Apr 21 '11 at 13:16
1  
"ultimate customization abilities"....sounds like the first steps down the road to dailyWTF material. –  whatsisname Apr 21 '11 at 16:01

2 Answers 2

up vote 1 down vote accepted

The most obvious answer is Model-View-Controller, one of the best known approaches to isolate domain (business) knowledge from the user interface.

Essentially this pulls apart three main parts of a typical application:

  • The Model, which represents the domain/business.
  • The View, which represents the user interface.
  • The Controller, which represents the logic required for the above two to interact.

This essentially means that you can put the model and the view in separate components (DLLs if you will) and have multiple versions of each. Some variations will also require implementing or modifying the controller however.

The actual details of the pattern can be fairly complex, but the general approach is used in an incredible amount of applications (up to the point where entire frameworks are based around it, and so all applications using those frameworks are based on MVC).

share|improve this answer
1  
Is this web only? –  aComputerDrone Apr 21 '11 at 13:18
2  
@aComputerDrone No, MVC is used in desktop, server, web, etc. applications all around. I think it actually originated in desktop applications. –  Deckard Apr 21 '11 at 13:20
1  
Are there any good books that you recommend for reading and research purposes? We would be using Microsoft Technologies. –  aComputerDrone Apr 21 '11 at 13:22
1  
A good 6-page introduction can be found here (PDF). For further reading I would recommend the Wikipedia page I linked in my answer along with the related pages linked at the bottom (and the articles related to it). Actual books tend to focus on technology: they exist for ASP.NET MVC, Spring MVC, etc. but if you're using older stuff (like MFC), then the general stuff is all there is. –  Deckard Apr 21 '11 at 13:29

A universal solution is the MVC (Model - View - Controller) Pattern :

Model–view–controller (MVC) is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" (the application logic for the user) from the user interface (input and presentation), permitting independent development, testing and maintenance of each (separation of concerns).

Depending on the technology you are using there may be alternatives (MVVM, MVP, etc.), but most of them originates from MVC.

share|improve this answer
    
@Mattieu - I'll as the same question I asked @Deckard. Is this web only? –  aComputerDrone Apr 21 '11 at 13:19
3  
@aComputerDrone : No it's not. It's used for desktop application as well (MVVM for WPF applications for example). It just became really popular for web applications, as it eased the organization of code. –  Matthieu Apr 21 '11 at 13:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.