Tag Info

Hot answers tagged

5

A few tips picked up over the years... The database is the central repository of your data. It should be shared by many applications. Databases are relatively benign when it comes to new projects requiring extension. Adding extra columns or tables should not upset existing products. If fields move, then yes your existing applications are affected, because ...


2

This article is discussing distributed services. A popular example is a peer-to-peer (P2P) file sharing network. Nodes connect to a swarm to share data and may drop out at any time. The article discusses several open-source "registries" which allow clients to connect to the network and announce their presence so they may use the services on the network. ...


2

If I want to add support for Protobuf then I have create new method in processor and copy-paste almost all the business logic NO! An object oriented approach ItemProcessor "has all the business logic". Don't pollute the class, keep it strictly business logic Your data/response structure is universal. JSON, XML, protobuf are just different syntactical ...


2

Logically, it doesn't matter where the service comes from. Conceptually you can think of the web pages being served as simply another service. What does matter is that the service is built in such a way that it can be used independently of other services. In other words, it wouldn't make much sense to have a public API that only works if you must also ...


1

Since your goal actually IS to make it easy to change out the storage mechanism at a later point I think you are on the right track. You might also consider actually making a separate model specific to your database and then map the object model back and forth between your domain object and your database objects. This way you can use annotations and ...


1

I wonder each input parameter is different or not. Anyway you may be able to return result as Object and cast it. Also you may be able to get parameter as Object. You may be looking for that how to generate methods in runtime. http://stackoverflow.com/q/6680674 I recommend you'd better make all methods. I think It may be good for readability.


1

I tend to think that's a bit silly. More formally, it's an example of what I would call "speculative generality". The counterargument would be that the architecture you describe allows for other sorts of clients to be easily plugged into the same system with less effort, and that one never really knows what sort of new direction the project might take. ...



Only top voted, non community-wiki answers of a minimum length are eligible