Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

bertomartin's Profile

GitHub User: bertomartin

Comments by

Avatar

I'm interested in #3, model caching + fragment caching. Why would you need to use both? I just saw the model caching video, and it looks like it solves almost all the caching problems to me, tradeoff being more memory for memcache. Can you give me an example of how you're using both model/fragment caching?

Avatar

ugh? this also generates a key for the models nuh?

Avatar

What do you suggest he builds? I think the point is to just show the basics of working with the technology. I'm happy with samey.

Avatar

You only need to do the secure cookie thing if you don't want to process all request over https

Avatar

What I'd like to see is mixing ember with some server side rendering...just to see how I could incorporate this into an existing application.

Avatar

I don't think the number of screencast matter in this case. I think ember was very clearly presented in this one. Can't wait to see persistence in the next.

Avatar

Do you mind elaborating on which task you find Angular is better at than JQuery? I'm trying to figure out whether to use Angular or even Ember for some stuff, but I'm not sure how to integrate these into an app that's already built on rails. I find it much easier to use JQuery along with Handlebars for templating in such cases.

Avatar

Yep, using activerecord/sql-db will definitely be an issue. I wonder whether Ryan is planning on doing a "from scratch" implementation using redis. I will check out your gem.

Avatar

Nice episode! Will definitely check out Angular. I was focused on getting up to speed with ember, but this looks great too.

I would probably still hesitate to use any of these javascript frameworks in a consumer facing app though, at least one where I need SEO. But looks like they could be used very effectively for "dashboardy" stuff. Also, the clients have to download all the js before anything can start, and this might slow down the initial startup of your app.

Avatar

+1. I always do auth from scratch. It's just too personal to your app to 'outsource'.

Avatar

Remember that you're sending back a "js.erb" view template. This just renders out the _task or form. So if you already had error message handling, it will just work. Try it!

Avatar

+1 Very efficient. I hope Ryan can update the log to include this. This comment is very useful, and prolly missed by a lot of people.

Avatar

Nice. I recently did something like this, but I used the friendly_id gem instead for the friendly url stuff. Nice info nonetheless.

Avatar

+1. nice alternative. Still prefer the endless scrolling feature for image heavy sites. So much easier to handle.

Avatar

Static footers...if you really want it.

Avatar

Some people use pop-ups rather than going to another page. That seems to work fine. But if you really need to go to another page, then I'm not sure. I'll try this tonight.

Avatar

Thanks for that! I was wondering why they weren't update more often.

Avatar

Hey, thanks for the comment. I've been playing around with chef using the hosted version. I realized that some of the opscode cookbooks are a bit outdated, so I've turned to github to find cookbooks. My problem now is how to mix these cookbooks with the ones I've already downloaded using knife cookbook install site install... I think Librarian should help, but I'm lost after you mentioned bundler. What does bundler have to do with chef?

Avatar

How'd you do that if you're using something like Vagrant (a virtual machine for development).

Avatar

Thanks for this information. Will be taking a closer look at this.

Avatar

Awesome Ryan! Great job. I have one question. Let's say your client app is a mobile app (such as an android app), would you have to redirect to a browser (out of the app) when trying to login? The json part is ok as both android and ios have libraries for those.

+100 on this episode.

Avatar

Have anyone tried using grape? It's built directly on top of Rack, which would seem to make it quite efficient. I think it also has an interface for oauth authentication.

Avatar

Make a generic api controller and inherit from that. Then override whatever you need to in the subclasses.

Avatar

Interesting. However, the date part of the hash will probably leave you open for re-play attacks.

Avatar

Good one. Under what circumstances would you recommend this over elastic search? The obvious benefit is that you don't need to install and keep up another piece of software just for indexing your content, but I'm concerned about the speed. Have anyone done a speed test between these two search systems? For example, could this handle searching data for a site like pinterest? To think of it, one could start using this and add elastic search later...but any suggestions? Thanks-

Avatar

Figured out a way from your recent post on Capistrano using Multistage-extension. thnx for that one.

Avatar

Great job Ryan. Question: what if you're deploying to a test server first, then up to production? like so: Dev --> Test <--> Prod. The arrow goes both ways between test and prod because the prod database is sent to testing db and the testing code sent to prod server for releases.

Pushing from dev -> test is fine. But how about copying the code from test to prod? I don't want to ever push code from dev --> prod because multiple developers are working on the project and they're all at different points in the code.

I could simply scp the code over, but is there a more efficient way? Thanks all.

Avatar

How can I add my own icon sprite? I see we're setting the variable here:
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');

However, where in my project would I put my "icon-sprite.png" file. There's no twitter/bootstrap folder anywhere.

Thank you.

Avatar

How can I add my own icon sprite? I see we're setting the variable here:
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');

However, where in my project would I put my "icon-sprite.png" file. There's no twitter/bootstrap folder anywhere.

Thank you.

Avatar

Javascript works fine without semi-colon, they're not necessary. It's not like you're gonna be modifying their javascript files. You can still use them in your javascript functions.

Avatar

Thanks for the reply. I was thinking more to override things I didn't like by looking at the source. I code in plain css.

Avatar

I didn't really understand why I shouldn't just download the .zip package and add everything myself (to the css and js directories and application.css/js). Why is that such a bad thing?

Avatar

I've used Foundation and I'm planning to switch to bootstrap.I'm new to Bootstrap, but I can see that it is more feature rich (for example, the dropdown menu on small screens, more buttons styles, nicer popup style). As well, bootstrap seems more integrated. I'm switching mainly because of the fluid layout options. Foundation is good, but I think the responsive menu that bootstrap gives you out of the box is a great feature. I'm still planning to keep some styles from zurb's foundation though. No problem in mixing styles.

Avatar

Thanks for that information regarding devise. I was also wondering why would I want to use it. Though, I'm sure that password resets and account verification wouldn't be that hard to accomplish with this episode as a starting point.

Avatar

Excellent. Very clear. Does one really get a great performance gain by just using rack with a bunch of middleware for a simple app? Also, I'm thinking this is just instructive, as sinatra seems to cover most everything with minimal overhead already. Thanks again.

Avatar

This definitely clarified some questions I have about the differences between activemerchant, spree and some other systems. It seems that with active merchant you'll need to build out your order<->line item<-->products model. I think this is more suited for adding a /shop section on a blog or site that doesn't have ecommerce as a priority. Of course, this could be used to build fully fledge e-commerce solution, but why would one use this over spree?

Avatar

I'm thinking about using this technique to create a pop up for login. But not too sure how to procede (haven't tried yet, just thinking). I do know I need to send json from session#new function and use js to consume that and add it to the hidden lightbox. That's how I'm thinking about it, can anyone let me know if this sounds right...I'd like to use gon and possibly rabl too. Help appreciated.