How to send an email with image files and the the images are shown on page instead of being attachments ?

Your email must satisfy the following rules: 1. it’s a multi-part email 2. it has an "html" as one of its parts (content type must be set) 3. every image must have a header like "Content-ID: <some-id>", and of course, content type must be set 4. the <img> tags in your html must use "cid" …

How to send an email with image files and the the images are shown on page instead of being attachments ? Read More »

man.get_things() or Thing.get_things_by_man() when Active Records Pattern is used?

There is requirement for a method to get things of a man.  Where to put it?   man.get_things() or   (static) Thing.get_things_by_man()  ?   From OO’s perspective, the former sounds more natural.   I was planning to adopt this approach until I found a problem:  it may lead to duplicate db access code because not …

man.get_things() or Thing.get_things_by_man() when Active Records Pattern is used? Read More »

Layering in Java Webapps – My Final Version

What a good layering solution should do It must handle the following problems: 1. Dividing a system into layers based on modularization principles, such as single-direction dependency, limited entry of components and so on.  2. Compatible with modern dependency management tools such as Maven  3. Allowing for evolving into a distributed system in the future  …

Layering in Java Webapps – My Final Version Read More »