Featured post
python - Storing Templates and Object-Oriented vs Relational Databases -
i'm designing custom blog software, , have run conundrum regarding database design. software requires there multiple content types, each of require different entry forms , presentation templates.
my initial instinct create these content types objects, serialize them , store them in database json or yaml, entry forms , templates simple strings attached "contenttypes" table. seems cumbersome, however. there established best practices dealing design? use case should consider object database?
if should using object database, should consider? working in python , prefer capable python library, can move java if need be.
please not store templates (that might altered user) in database. there's no sane way migrate staging environment production if have deal doffs of database dumps. dumping software right 1 reason.
apart i'd store source (user editable part) in database plus "precompiled version" either directly in database (for faster retrieval) or in cache system.
i'd go set theory approach.
- store each set of content type precompiled , recompile when edited fast serving in separate place (table, collection, directory, whatever)
- store sources in common place make easy rebuild different content types (the source format special case content type)
- keep templates in place migration between systems (dev, staging, prod) makes migration easy
- Get link
- X
- Other Apps
Comments
Post a Comment