« back to discussion

Why discourse.org uses ember

http://eviltrout.com/2013/02/10/why-discourse-uses-emberjs.html

This is pretty good stuff. I'm still up in the air between all these frameworks.

I suppose the main thing that bothers me is SEO, which is quite important to a lot of projects I do.

almost 4 years ago, by pineapple

3 Replies

SkinnyGeek1010

Cool article! I have yet to try Ember out but an engineer from square was raving about how they liked the ember conventions and the helpers that prevents memory leaks for long running apps. I think Ember has a pretty decent integration with rails as well.

I suppose the main thing that bothers me is SEO, which is quite important to a lot of projects I do.

Yea it's really the wild west with client side JavaScript.... or really JavaScript in general. As far as I know, there isn't a turn key solution with SEO and Backbone or Ember, mostly because they only play into a portion of the whole stack. A lot of people are using PhantomJS to essentially build what google wants and send back pure HTML back to the crawler (from what I understand). This would be integrated to your CI machine and would be updated on every push.

However, if you go with a full stack framework like Derby or Meteor, they provide all of this in the background. The more and more I get comfy with node and express (like Sinatra), the more and more i'm liking Derby. Meteor is more monolithic and more of a take everything or nothing approach, even more so than Rails. Derby on the other hand is much more modular and bits and pieces can easily be swapped out and customized to suit the company/project.

My prediction is once there is enough maturization (is that a word?) with single page apps that it gets to the point were it's just as easy as building a rails app, then it will become standard. With society increasingly turning into a 'I want it now' mentality, it's only a matter of time before 700ms 2nd page loads are unacceptable and < 200ms perceived pages loads are the norm.

SkinnyGeek1010, almost 4 years ago

pineapple
posted by SkinnyGeek1010 on Wed, Feb 13 at 11:55AM

Cool article! I have yet to try Ember out but an engineer from square was raving about how they liked the ember conventions and the helpers that prevents memory leaks for long running apps. I think Ember has a pretty decent integration with rails as well.

I suppose the main thing that bothers me is SEO, which is quite important to a lot of projects I do.

Yea it's really the wild west with client side JavaScript.... or really JavaScript in general. As far as I know, there isn't a turn key solution with SEO and Backbone or Ember, mostly because they only play into a portion of the whole stack. A lot of people are using PhantomJS to essentially build what google wants and send back pure HTML back to the crawler (from what I understand). This would be integrated to your CI machine and would be updated on every push.

However, if you go with a full stack framework like Derby or Meteor, they provide all of this in the background. The more and more I get comfy with node and express (like Sinatra), the more and more i'm liking Derby. Meteor is more monolithic and more of a take everything or nothing approach, even more so than Rails. Derby on the other hand is much more modular and bits and pieces can easily be swapped out and customized to suit the company/project.

My prediction is once there is enough maturization (is that a word?) with single page apps that it gets to the point were it's just as easy as building a rails app, then it will become standard. With society increasingly turning into a 'I want it now' mentality, it's only a matter of time before 700ms 2nd page loads are unacceptable and < 200ms perceived pages loads are the norm.

Makes a lot of sense.

Skinnygeek, do you have a recommendation for a javascript framework thats good for "sites" (like pineapple) rather than single page apps? I'm not looking to use a fullstack framework like meteor or derby, I just have been on the lookout for just a javascript framework that could be easily malleable and not overkill.

I've looked at all of the main ones, and I do see them as insanely cool but can't quite picture them being really 100% relevant on this site. Or any similar site for that matter. I really like that the frameworks automatically update the views, but I'm not as much a fan of loading everything with json. Not sure if there is a framework out there better suited for a more multi-page, less dynamic/ajaxy web app.

pineapple, almost 4 years ago

SkinnyGeek1010

Skinnygeek, do you have a recommendation for a javascript framework thats good for "sites" (like pineapple) rather than single page apps?

If you're going to be implementing it with Rails... hands down Backbone, as it's just a light library unlike Ember or others which are heavier and more less an entire framework. This makes it very easy to implement into any current setup. Although, I wouldn't use it the way that the vast majority of tutorials use it (SPA's, single page apps).

Also one thing to note, a lot of people think of Backbone as an entire solution. It’s actually more a small piece of the puzzle like some clever helpers for anything that would be a dynamic model or UI (view).

For something like Pineapple it would makes sense use it in a very modular fashion, basically just using it on just widgets/content that is dynamic. The main advantage is that it makes JS maintenance and organization much easier.

Basically you could just include backbone into the page and then start abstracting certain widgets to backbone. For example, if you’re on the comments page, clicking ‘your comments’ would dump the current ‘all comments’ and make a call to fill the div with ‘your comments’ data. Then you could extend it a little further by dynamically loading page 2 comments. The first comments page load could have all of the page 1 ‘comments‘ stored into a variable so that rendering is a few ms. with 0 ajax requests. The second comments page load would be quick <200ms ish and you could also lazyload the 2nd page data so the 2nd page click would be instant.

You could then go about replacing lowest hanging fruit with backbone until you’re done. It’s also good practice to make each component independent so backbone can help out with that using built in pub/sub. It basically just says, hey whoever cares I have page 2 data ready, which helps decouple.

I'm working on a backbone methodology/organization method that's borrowed from Rdio and Zaka's JS architecture (only lighter!). Hopefully I’ll have that finished in a few weeks. Basically everything is grouped into component folders and uses requiresJS to load components on page, and it uses a lighter version of the ‘sandbox’ with backbones pubsub.

Anyhow, sorry for rambling... I would choose Backbone for Pineapple-like sites :)

SkinnyGeek1010, almost 4 years ago


Login or to comment.

« back to discussion

Tutorials are any resources you learn from.

Examples: an intro to html5 screencast, a pdf about git, photoshop effects tutorials, meta-programming in ruby, lambda calculus, higher-order fixed-point combinators.

Tools are websites, apps or services used -on- your project (indirectly), to aid the process.

Examples: A color scheme generator, email marketing software, usability heat maps, css3 code generators, a downloadable png compressor.

Assets are downloadable files used -in- your projects, usually as code, textures, or images.

Examples: a jquery sticky menu, photoshop brushes, background textures, mvc frameworks, twitter bootstrap, 960 grid system.