multi-tier

Keep settings in sync between forms application and windows service (or any n-tier, really)

ぐ巨炮叔叔 提交于 2019-12-18 17:05:16
问题 I have a Windows Service that performs a number of periodic activities, and I want to change the settings of this service from a Windows Forms app. I'm not sure, though, about the best way to make sure the service has the most updated user preferences in it (how often to run, what folders to use for things, whatever else the user can specify). The user can change settings any time, at will, and I'd like the service know about it almost immediately. Here are the options I'm weighing: The form

How to implement Factory pattern?

孤人 提交于 2019-12-12 02:47:14
问题 I am trying to implement factory class and interface. But i am getting the below error message. I have created a factory class which decides which class to return NormalTaxManager or ImportedTaxManager. I have provided the abstraction using interface. #include<iostream> #include<vector> using namespace std; class TaxInterface { public: virtual int calculate_tax(int price,int quantity)=0; }; class TaxFactory { public: // Factory Method static TaxInterface *callManager(int imported) { if

Multi-tier vs Distibuted?

强颜欢笑 提交于 2019-12-10 11:02:29
问题 Multi-tier and/or ditstributed apps, do they have the same meaning ? When we talk about layers in these apps, is it physical layers (database, browser, web server,...) or logical layers (data access layer, business layer,...) ? 回答1: Maybe these two sentences do convey intuitively the distinction between distributed and multi-tier : Distributed : You replicate the processing amongst nodes Multi-tier : You split the processing amongst tiers In one case, the same processing is replicated over

Multi-tier vs Distibuted?

China☆狼群 提交于 2019-12-06 12:19:53
Multi-tier and/or ditstributed apps, do they have the same meaning ? When we talk about layers in these apps, is it physical layers (database, browser, web server,...) or logical layers (data access layer, business layer,...) ? Maybe these two sentences do convey intuitively the distinction between distributed and multi-tier : Distributed : You replicate the processing amongst nodes Multi-tier : You split the processing amongst tiers In one case, the same processing is replicated over several nodes. In the other case, each tier has a distinct responsibility and the processing running on each

Best Practice - Multi Layer Architecture and DTOs [closed]

跟風遠走 提交于 2019-12-03 05:07:00
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . After reading some of the Q/As here on stackoverflow, I am still confused about the correct implementation of DTOs in my web application. My current implementation is a (Java EE based) multi-tier architecture (with persistence, service and presentation layer) but with a

Best Practice - Multi Layer Architecture and DTOs [closed]

白昼怎懂夜的黑 提交于 2019-12-02 18:22:39
After reading some of the Q/As here on stackoverflow, I am still confused about the correct implementation of DTOs in my web application. My current implementation is a (Java EE based) multi-tier architecture (with persistence, service and presentation layer) but with a "common" package used by all layers, containing (amongst others) domain objecs. In this case the layers can not really be considered as independent. I am planning to remove the common package step by step, but I encounter various challenges/questions: Assume the persistence layer would use a class myproject.persistence.domain

Keep settings in sync between forms application and windows service (or any n-tier, really)

浪尽此生 提交于 2019-11-30 14:42:29
I have a Windows Service that performs a number of periodic activities, and I want to change the settings of this service from a Windows Forms app. I'm not sure, though, about the best way to make sure the service has the most updated user preferences in it (how often to run, what folders to use for things, whatever else the user can specify). The user can change settings any time, at will, and I'd like the service know about it almost immediately. Here are the options I'm weighing: The form and service share use the same "Settings" object from a third, shared project, and the form uses a WCF

How can I simulate TCP/IP errors?

蹲街弑〆低调 提交于 2019-11-30 06:45:13
On a multi-tier application, I need to simulate various TCP/IP errors to test some reconnection code. Does anyone know of any tools (Windows based) I can use for this purpose? Thanks. Try netwox (formerly lcrzoex.) If it won't do it, it can't be done. It contains >200 tools. Scapy allows you to control every aspect of the packets, and randomly modify ("fuzz") the ones you don't want to control. If you're a command-line kind of guy, it's a great tool. Clumsy is a good tool for TCP error simulation on Windows. It can simulate (copy-pasted from link above): Lag, hold the packets for a short

How can I simulate TCP/IP errors?

ⅰ亾dé卋堺 提交于 2019-11-29 07:50:51
问题 On a multi-tier application, I need to simulate various TCP/IP errors to test some reconnection code. Does anyone know of any tools (Windows based) I can use for this purpose? Thanks. 回答1: Try netwox (formerly lcrzoex.) If it won't do it, it can't be done. It contains >200 tools. 回答2: Scapy allows you to control every aspect of the packets, and randomly modify ("fuzz") the ones you don't want to control. If you're a command-line kind of guy, it's a great tool. 回答3: Clumsy is a good tool for

Three-tier architecture and exceptions

浪尽此生 提交于 2019-11-28 07:41:35
It's considered good practice to have an exception for each layer of application (i.e. PresentationException , ServiceException , PersistenceException etc). But what if my service-layer directly calls DAO methods (methods of persistence layer) without additional operations. Like this: public class MyService { private IPersonDAO dao = new PersonDAO(); public void deletePerson(int id) { dao.deletePerson(id); } } Should I wrap this DAO method invocation with a try-catch block and rethrow possible exceptions as ServiceException ? Should each DAO method throw only PersistenceException ? Well your