Are Persistence-Ignorant objects able to implement lazy loading?
Persistence Ignorance is an application of single responsibility principle, which in practice means that Domain Objects (DO) shouldn’t contain code related to persistence, instead they should only contain domain logic.
Clojure state and persistence
I’m learning Clojure to see if it’s something I can leverage at my current job, and more importantly, how I can convince my bosses that Clojure has a ‘killer feature’ over java that makes it worth the investment1.
Caching factory design
I have a factory class XFactory
that creates objects of class X
. Instances of X
are very large, so the main purpose of the factory is to cache them, as transparently to the client code as possible. Objects of class X
are immutable, so the following code seems reasonable:
Separating validation from persistence in models?
Models in an MVC application gets kind of hard to test when validation of data and persistence of data is baked together in the model. I would like to test those separately to prevent doing integration testing instead of actual unit testing.
Sample domain model for online store
We are a group of 4 software development students currently studying at the Cape Peninsula University of Technology. Currently, we are tasked with developing a web application that functions as a online store. We decided to do the back-end in Java while making use of Google Guice for persistence(which is mostly irrelevant for my question). The general idea so far to use PHP to create the website.
Persisting natural language processing parsed data
I’ve recently started experimenting with natural language processing (NLP) using Stanford’s CoreNLP, and I’m wondering what are some of the standard ways to store NLP parsed data for something like a text mining application?
Patterns for a tree of persistent data with multiple storage options?
I have a real-world problem which I’ll try to abstract into an illustrative example.
How do I design a DAL when I have to deal with relationships?
Say I’m developing a bug tracker, where a ticket belongs to at most one milestone, and a milestone can have many tickets. When a milestone is deleted (from the database), all tickets associated with that milestone must have their relationship unset (i.e. set to null
). This is a simple relationship.
In agile development, should I try persistence in flat file before database?
Somebody explained to me that since in agile development, policy and the application logic should be more important than details such as persistence method, persistence decision should be taken at the end. So it might be a good idea to start with simpler persistence such as flat files, until we reach the point the weakness of this method become apparent, and only then we change the persistence, e.g. by using relational database.
Senior team members want to move query-relevant persistent data from DB to cache. Does this make sense?
I am a young engineer recently employed at a small company that sells products to the general public. We use Ruby On Rails and MySQL. Our database has a lot of customer data, but a great deal more of “static” persistent data. This data is so rarely changed that some of the more senior engineers have begun to talk about moving it to a cache data store. One of the touted benefits of this plan is that it would make deployments easier, since we would no longer have to bootstrap the database; instead, a lot of data would have permanent IDs, and we could just backup the cache and deploy the backup.