Tag Info

New answers tagged

0

If you need to share (read and write) all the data and use transactions, when just use shared access to the database. If you need high availability, consider using master-slave replication. Don't just blindly go with master-master, think carefully about disadvantages: Most multi-master replication systems are only loosely consistent, i.e. lazy and ...


0

The ideal solution would be for your source application to expose a SOA layer to give external applications access to the data. Failing this (or where the query volume is large and or intensive) then database replication is a good solution -- always assuming the technology is in place to do this reliably. Failing the above two solutions I would go for a ...


0

There are some questions to be asked: Does external data have a timestamp PK or an incremental PK that would allow you to know what were the last data items you already processed? Do you need to process only new data or old data that has been modified also? If the external data has a timestamp PK or incremental PK, the state you need would be the last ...


0

Firstly, congratulations on recognising that inheritance is a poor choice in this situation. You are 100% correct. Changing the type of an entity at run-time is definitely code smell! @Doc Brown's answer is getting to the heart of the matter, especially the comment about using Person rather than User, and allowing a 1:many between Person and roles. What is ...


0

One way is that we have an Inheritance Hierarchy of Users which each one has his own data and his own behaviors (for example in one clinic we have doctor, patient and Secretary that all of them are derived of the user.) That's IMHO not a good approach. You have persons (IMHO a better term than "users"), and "doctor", "patient", and "secretary" are ...


1

Why don't you separate the concepts? Have one bounded context to handle the user identity. This BC will have all data related to the person itself. This should answer "Who is that user?" Have another BC to control the roles which each user have. This BC will be responsible for answering "Is this user allowed to do that?" And a 3rd BC for the operations ...


0

I'm in agreement on simplest approach is generally the best and for me JSON manipulation win out hands down in this situation. The important bit of the question is '(removing some fields that are not relevant ) to the mobile client' So from what I understand there is more than one mobile client variant and for each different json fields are selected from ...


0

Its a classic tradeoff Performance + ease of use vs. scalability and flexability. POJOs are highly perfomant and very easy to use in a Java program. BUT they are restricted to a single VM. You cannot pass a POJO to another VM or another server or another process not implemented in Java. To pass the POJO to a Java program in another VM you need to serialize ...


1

I'd go for the simplest and easiest solution which will cover your current requirement. As you mentioned all you need is to remove couple of fields, json manipulation is enough and it's very simple. In future, as you believe if it comes to more complex transformations (which are not easy to do with json manipulation) you can easily add DTOs in middle and ...


0

I think you should store all the data you will need to properly draw UI inside your database and synchronize it with AD. Otherwise very soon you will stumble over performance issues. Sync with AD sounds good for me. And as to when to sync, check this Microsoft article. There are techniques for this inside AD.


0

Well, I'm typically against anything fat in the application unless there is no way to avoid it. So, I say: break it apart. Reading through your comment I can suggest some ideas: I'm talking about methods like "saveOffer", "deleteOffer", "activateOffer" - OfferService definitely. "markAllApplicationsAs" - not so sure about this one. Probably just ...


3

It's usually a good idea to separate the serialization method (JSON) from your business logic so that if in the future you decide to use some other type of serialization, you can do so without affecting the business logic. Jackson is probably the most popular open-source library for JSON serialization/deserialization in Java. In the situation where some ...



Top 50 recent answers are included