New to Ember (et. al), looking for resources to accomplish some specific things


#1

Firstly, I’m not sure what category this should go in. My first instinct was “Design” but since I have questions about Ember-Data as well, I’ll leave it as uncategorized.

I really like Ember. I spent the last few days experimenting with it, and I’m putting myself through “Code College” today. Basically, any time I need to learn something new (or a group of new things), I’ll set aside a day to do nothing but watch tutorials or read articles (possibly do some demos as well).

The project I’m building right now (just for myself), is essentially a reference engine. Data is put in through a form, saved to a database, and searchable. There are a million ways to do that, but I wanted to use Ember and some other newer/unfamiliar things to teach myself.

What I want / think I want to use:
EmberJS, for building the app.
Handlebars for templating (different kinds of data = different template).
Foundation for layout/grids.
Showdown to convert Markdown data entry to HTML.
Moment for dates.
MongoDB as a database.
NodeJS / Express to run the server / query+retrieve from the DB.

Where I’m having trouble is figuring out how Express, Ember, and Node fit in together, or if I’m using three things where I only need to use one. (I mainly like Express for it’s express-generate stuff). Needless to say, I have very little experience with running server side javascript. I’ve found various different resources (I’m working my way through a bunch of Tuts+ courses on Ember, Express, Node, and Mongo right now), but I was wondering if anyone had some commentary on what I’m trying to do. It seems like using Ember+Express+Node to query/read/write to a DB would be massive overkill.

I’ve also read some things about Ember-Data, but I don’t really understand what it is. Perhaps it’s exactly what I need.

So…

Does anyone have any resources on using these tools together, or suggestions on how to get what I’m trying to do done? This is all a learning project, so it’s nothing too serious.

Thanks!


#2

I am a beginner too. I think you are better of if you start with http://www.ember-cli.com/ My working example that uses moment, marked (it supports tables in markdown better than Showdown) can be downloaded here: https://github.com/broerse/ember-cli-blog


#3

I can’t help you with the specific questions, because I’ve not used MongoDB together with Ember, nor have I used Express. But I can offer another suggestion:

We’re using ember-cli + ember-data + Firebase, where Firebase provides the NoSQL backend and also the hosting. Some queries are currently difficult to achieve in Firebase, but using these tools together properly still make for a very easy ecosystem to get started with. Firebase integrates well with ember-data (you can also use it without, though you’ll have an easier time not trying to bypass ember-data). Firebase uses websockets behind the scenes, and provides real-time two way communication so your updates propagate to others right away, which is extremely cool.


#4

I’m looking to avoid Firebase, since using it would sort of be a “cheat” - part of the project is trying to learn how Mongo, Express, and Ember all interact. This isn’t for production, just to learn.

As a general update, I’m a lot farther along now than I was this morning. I understand how Express deals with things, but Express itself comes with a lot of front-end stuff that I don’t want.

For instance, I basically only want Express to connect to the DB and grab the info, then hand it off to Ember.

I want to use Ember and Handlebars to build the actual app (routes, templating), and I need it to take the info from Express and be able to both read it, and manipulate it.

It’s that bridge that’s giving me trouble. I’m having some trouble understanding how Ember and Express co-exist, and how they interact. I think once I get that, I’ll be okay. Anyone have advice on that?


#5

If you only what to grab data from MongoDB you can use http://fortunejs.com/ , It has CORS enabled. A server looks like this:

var fortune = require('fortune')
  , app = fortune({
    db: 'myapp'
  })
  .resource('post', {
    title: String,
    author: String,
    date: Date,
    excerpt: String,
    body: String
  })
  .listen(1337); 

You can swap out the default nedb with MongoDB and you will have to use https://github.com/kurko/ember-json-api to talk to fortune.


#6

I guess the question remains open. I feel pretty comfortable with Express and Mongo, and I would love to see a source on integrating those two with ember. I’m starting out with ember - and I don’t see any tuts, videos or anything on how to make it work together.


#7

Perhaps use: https://github.com/ethanresnick/json-api and https://github.com/kurko/ember-json-api


#8

Apparently I’m not as comfortable as I thought I am.