Tag Info

Hot answers tagged

41

I did this, and I recommend that you don't. What I did was write all the business logic in Lua, and stored that Lua script in a database. When my application started up it would load and execute the script. That way I could update the business logic of my application without distributing a new binary. I invariably found that I always needed to update the ...


32

Piping dynamic data into an interpreter of your implementation language is usually a bad idea, since it escalates the potential for data corruption into a potential for malicious application takeover. In other words, you are going out of your way to create a code injection vulnerability. Your problem can be better solved by a rules engine or maybe a ...


6

You could use either to perform either task. The difference is what each is meant for. You can draw pictures or diagrams in Excel if you want to, but you can also draw a picture in something built for that purpose. JSON and XML libraries are designed around general purpose loading of documents, pulling parts out of them, or transforming their structures ...


4

I still do because I do not know whether they'll change it in a future implementation (and because the editor does it for me). A superclass that does this is a bad superclass. The superclass needs to tell you exactly what its implementation (if any) of the non-final method does, under which circumstances it'll be called by other superclass methods, and ...


3

Containers (lists, etc.) that are defined to hold objects of a certain base class can hold any object extended from that base class. There are many situations in software design where this functionality is useful. The base class may specify that certain behaviors are going to be required, but we may not know exactly how they should be implemented because it ...


2

It's not true. The name of a class is part of its public interface. The user of a public interface doesn't care how functionality is implemented, only that it is available. (Indeed, allowing the user to not care about the implementation is the entire point of writing a class.) Therefore, as long as the class offers the kind of operation commonly present ...


2

I would not have the database contain code. But you can do something similar by having the database contain function names and then using reflection to call them. When you add a new condition, you have to add it to your code and your database, but you can combine conditions and parameters that get passed to them to create quite complex evaluations. In ...


1

When it comes to design, it is usually a good idea to have an idea of design patterns. This will help you better visualize the best way to structure your application. It is worth noting though, that you should choose the design patterns depending on what you need to do, and not try to force your design to conform to a specific design pattern. At the very ...


1

If your input is serialized as XML or JSON, then you should prefer an existing XML or JSON parser. This makes it ultimately more likely that your parser will be correct, and that aids compatibility and interoperability with other systems. Note that XML is not really a language, but a system for defining new languages sharing common syntax. Writing a correct ...


1

Could you clarify what you mean by integrate with the IDE? Do you want to see it in your IDE? If so, you could build it as help files--look for a help file compiler that fits your IDE, most will have something available. Word used to be pretty bad for large documents and I'm guessing from your post it hasn't changed much. Way back in the day we used ...



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