Tag Info

Hot answers tagged

8

Of course it can be too big - virtually everything about coding is a trade-off between different principles, and not wasting memory is one of them. However, if you need the data in the exception to get the job done, then by definition it's not too big. It would be too big only if there was another mechanism that achieves the same, leads to maintainable code ...


5

You have two options: Every agent knows about every other agent, and queries those agents as needed. Every agent publishes its state changes, and other agents listen to the changes they care about. The second approach has several benefits over the first, most important being that changes only happen when necessary. For example, if only 2 farmers trade ...


1

What is the actual issue you want to solve? What is your application doing? On which operating system? If it is a matter of internationalization, e.g. adapting your software to give messages in various human languages, most operating systems provide a framework for that. On Linux and Posix systems, you can use the locale(7) infrastructure. If you goal is ...


1

Your first option sounds like the most sane. You have a UI component that displays records from a table, and you now need to display boolean values associated with each record and you need to persist the values that the user sets. Saving these three new values with the record makes the most sense, logically, but I don't know enough about your system to know ...


1

Does anyone have any experience using interfaces in a domain model in a real project? We have lots of interfaces and there's a big problem with several of them; and that is temporal coupling - and unknowable coupling at that.... Should have been a templated abstract class The interface method sequencing and code structure in the actual implementation ...


1

I would put it into the Service layer. It doesn't make sense for you to do it in a NEW Controller. You can even do the remote call directly in your controller if you are sure that other controllers don't need to do a similar thing.


1

As pointed out in the other answers, it depends on your unique circumstances (needed to run the simulations) whether to use a real database, or a real geographic information system (GIS). Regardless of you choice of tooling, one thing is certain: your simulations will involve application logic that is superficially similar to what is done by databases and ...


1

Get the data design done first. Understanding what data you need for each entity, and how the entities relate should simplify your design. You may find you have many entities which can be modeled as sub-types. Different sub-types may have different behavior, but should contain the same state (data). Understanding the common and specific behaviors of ...


1

Java has a standard mechanism precisely for this, the java service providers, thinks in the way you use a JDBC plugin, you put the JDBC driver in your classpath and your application now can connect to this concrete database provider (oracle, mysql). In fact this is used in a lot of java standards that define an interface an allow different implementations. ...


1

Well, the client-side is still served from the application server, isn't it? So basically what you need is ability to provide some parameters to it. Obviously you'll need to substitute the server URL. Most look can be modified just by loading appropriate style sheets (CSS), which is just another replaced URL. And one more replaced URL can give you ...



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