Blog Post Design Troubles – I can’t decide and need some help!

To preface I am working on a personal site with a database backend. The images are stored in a file system and are referenced by the database. I am rather novice when it comes to webdev.

First of all, I can't find any good examples of a database driven blog site anywhere. I'm not sure if my Google-fu is terrible or not, but everything is very basic and doesn't include images or is WordPress based. I am working in PHP.

My first option is:

Blog posts images, and thumbnails are directly linked to the blogPostID in the blog_post table. This makes querying and such simpler, but does not leave room for different size thumbnails in the case of mobile vs. desktop or some other scenario I can't think of right now. I'm not quite sure how to get around that in a way?

My second option is:

Blog post images have image types. Based on the image type I serve up a certain image. I have some sort of check constraint that does not allow for more than one header image or something to match to the blog_post, that way there isn't some sort of conflict with the reference.

I'm kind of stuck on the design side of this? I have it working one way, but I want to refactor this to be a bit more scalable and industry standard. On top of that I want to use the image table across the website and reference it with different project pages as well. Any insight would be helpful.

submitted by /u/embrex104
[link] [comments]

from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/tqroO86

Leave a comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close