Q&A: Thank You Web App, Express.js and Emails

I recently received a question from Joanne Daudier. She is a up and coming web developer, middle term student at a JS/Node.js bootcamp called RefactorU and a reader of Express.js Guide. This is what she wrote:

Hi Azat:

I skimmed over your book today. I feel like it is a bit advanced for me since I’m just learning Express. I do have a few questions for you though.

I recently received a question from Joanne Daudier. She is an up and coming web developer, middle term student at a JS/Node.js bootcamp called RefactorU and a reader of Express.js Guide. This is what she wrote:

Hi Azat:

I skimmed over your book today. I feel like it is a bit advanced for me since I’m just learning Express. I do have a few questions for you though.

For my final class project, I’m making a thank you web app that will have a link you can send out to your friends and everyone can come to the site and interactively drag and drop characters and add in speech bubbles. Then at the end, you can send that link with everyone’s contribution to the recipient. Basically, it’ll be an interactive thank you e-card.

Do you mind giving me some hints or guidance on how I can accomplish this? Any help you can give me will be greatly appreciated since I’m a noob to web dev.

Specific questions:

How do I send emails using Express? For instance, it would be great if an email go out to a list of people that you invite to create the e-card. And perhaps a final email to the recipient after the card is “done”.

Any ideas on how to drag and drop characters, swap out backgrounds, and add in speech bubbles? jQuery?

And any other suggestions that you may have for me….

Much thanks,

Joanne

Well, first of all, thank you Joanne for buying my book, interest in Node.js and the questions. Let me point out though that if someone is a complete novice to Node.js they might benefit from my first book Rapi Prototyping with JS and then proceed to Express.js Guide.

In my opition, your Thank You app would have a card object/page accessible via MD5 hashed string (kind of a secret link). Then, like in a Google Docs users will be able to edit the card with special elements. To identify users, you’ll probably have to use cookies and sessions. Everything can be implemented in real-time with Socket.io library and Node.js/Express.js app. To store contributors and recipient you can effortlessly use MongoDB and lightweight Mongoskin. As for hosting, Heroku is still a king of painless app hosting for prototypes and small scale apps.

Now, we’re down to specific questions:

  1. Sending emails is not so much of an Express.js thing per se. In other words, you would send emails in Express.js app like in any other Node.js program. I higly recommend SendGrid and its Node.js module. With them sending an email literally is just two lines of code: require sendgrid and send an email. ;-)
  2. Yes, all these interactions are done on the front-end/clien-side, therefore you’ll need to use some combination of JavaScript (with or without jQuery), images, CSS and DOM manipulation. Then, you’ll need to either send data, i.e., speech bubble location, type, text, (most likely in a JSON format) to the server or use websockets (aforementioned Socket.IO) to persist for real-time saving (my favorite!).
  3. The main suggestion is to just start building. Start with something very small, maybe just a form with a name and a text, not even any fancy graphics or animantion. Use GitHub to refactor and re-iterate ’til you have the dream product.

If you have similar questions about Node.js/Express.js, Backbone.js, JavaScript, MongoDB, submit your questions and we’ll try to help you.

Author: Azat

Techies, entrepreneur, 20+ years in tech/IT/software/web development expert: NodeJS, JavaScript, MongoDB, Ruby on Rails, PHP, SQL, HTML, CSS. 500 Startups (batch Fall 2011) alumnus. http://azat.co http://github.com/azat-co

11 thoughts on “Q&A: Thank You Web App, Express.js and Emails”

  1. Hi Joanne,

    I’m not sure what is the issue. Is it to “keep” the monster in the left sidebar after dropping it?
    If so, then it’s possible to create a new element and either put that in place of dragged one or drag a new element while leave an old in the left sidebar.

    PS: nice emoji!

  2. Hi Joanne,

    Because constant connection is not always possible (mobile) or feasible (legacy APIs). Also, there are more libraries (e.g., Backbone) that support AJAX/REST API out of the box. Websockets are cool but there’s too much overhead for using them in some projects. If it’s something for myself (like mongoui) then I go with Socket.io (or DerbyJS in the case of mongoui).

  3. I would give it a try to work with CSS-transformations instead of JS and DOM-manipulation for placing the bubbles.

  4. Thanks Azat! 2 questions:

    1) I’m learning Mongoose right now. Can I use that instead of Mongoskin?
    2) If I wanted the app to have live interactivity where I can see other people editing the e-card at the same time (like Google docs), would Express work, or do I need to switch to Meteor?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.