Published: Saturday, May 3rd, 2008

One of the big things you’ll hear about Ruby on Rails is that it’s hard to scale. In my opinion, that’s not really an issue that one should be addressing on the framework level. Scaling, in my opinion, should be something reserved for backend databases and servers. From what I’ve read, you should be able to slap on a MySQL proxy and an Apache load balancer in front of multiple mongrel servers, but I digress.

With all the Twitter Rails scaling issues, it’s funny to see this headline from TechCrunch. Guys over at Twitter have renounced this claim though.

Will this make me abandon my quest for learning Ruby on Rails? I highly doubt it. Scaling becomes an issue on extremely high traffic sites. And a lot of the issues that come into play with such a high traffic site, can be easily remedied by things like optimizing queries and caching.

Source: Twitter Said To Be Abandoning Ruby on Rails [TechCrunch]

Popularity: 5%

If you're new here, you may want to subscribe to my Full RSS feed. Thanks for visiting!



Published: Wednesday, April 16th, 2008

Somehow I don’t think most people understood what my bias comparison of CakePHP vs Ruby on rails meant. The last few visitors to comments seem to have been Rails fans. One of them seems to think that I shouldn’t touch Ruby on Rails with a ten foot pole and should stick with CakePHP. He doesn’t want someone like me in their community. The other comment, I get the opposite vibe from. He strikes me as a PHP fan, who thinks I’m too lazy for the PHP community.

To all the folks that haven’t seem to understand my whole objective, let me help you guys out. I have general interests in a lot of areas and I also work a 9 to 5 job. So I don’t really have the time and dedication required to poor my heart and sole into everything that comes along. I do a brief overview of something before I spend tons of time delving into it. People are pissed that I’m comparing CakePHP to Ruby on Rails and haven’t even tried it yet. This is where the brief overview comes in; I took a quick look and realized that for what I was doing at the time, Ruby on Rails would have been more trouble that it was worth.



Published: Monday, April 14th, 2008

So it’s been about a weeks since it was out, so I figure, why not? After all I have the Wordpress Automatic Upgrade plugin, so this should be a breeze. Now this plugin makes upgrading Wordpress ridiculously simple. It handles file backups, database backups, deactivating and reactivating all plugins, etc.

So I go through the process and I’m not totally disappointed. There were the normal problems we have with all upgrades and some new ones:

  • Theme Issues: This only happened on one of my blogs. Heck, it’s an old theme, so that’s to be expected. The widgets didn’t quite work right, but it was fixable.
  • Plugin Issues: Of course there will be those. Some plugins haven’t been updated yet, some just required me to update them. And with the new plugin update feature, it was quite easy to fix these problems. Then, there are some plugins I just had to totally disable, but upgrades for these are coming out everyday. I’m down to one old plugin that hasn’t been updated yet.


Published: Wednesday, April 9th, 2008

This is the third installment of my Auth Component Tutorial. This tutorial builds on the first installment, so make sure you grab the download file:

Download: CakePHP Auth 1  CakePHP Auth 1 (4.3 KB, 1,597 hits)

You'll find it on almost every popular web site's login page; a nice lil' checkbox that says "Remember Me". It seems to have become a basic addition to any page with a login form. Generally, when a user logs into a web site, he's logged in until his session expires. Which usually translates to when they close the browser window or when they allow the session to timeout.

With a Remember Me cookie, you hit the lil' checkbox and it stores a lil' cookie on the user's computer. This cookie can contain various information (we'll get to that later) but it essentially enables the user to bypass the login process the next time he comes to the page requiring authentication.

So, the simplest way to proceed is to list changes by file, so strap in your seat belts, here goes.

The Obvious, The Login Form - login.ctp

Now of course you need to add the checkbox and a label for said checkbox. Simple enough:



Published: Sunday, April 6th, 2008

Now I don't have to tell you guys about all the goodies that Wordpress 2.5 brings, but I'll name a few anyways:

  • New fresh Admin theme
  • Nice Dashboard
  • You can modify the link for "Incoming Links". Technorati anyone?
  • Finally included Tag Management
  • Concurrent Post Editing Protection
  • One Click Plugin upgrades. Oh yes. It's about time.
  • Built in Gallery
  • Nice Flash Media Uploader

There's just ONE thing that rubs me the wrong way.

They've gone an given the admin theme a fixed width layout, designed for a 1024px monitor. Why, Wordpress, why? This is really a pain, after I decided to get (not one, but) two 19" Wide Screen LCD monitors. Luckily, there's a plugin that puts things back into perspective.

Popularity: 15%



Published: Monday, January 28th, 2008

Introduction

Before I even start, let me state that I'm a JQuery fan. Ever since I've started with JavaScript frameworks I've weighed the pros and cons, and trust me there are a lot. You'll always find people arguing Prototype, JQuery or MooTools. I went with JQuery because it could do all that I wanted with the least amount of bloat. I'm sorry, Prototype may do a hell of a lot, but I don't think that I could make enough use or that 100 KB to justify it. Plus, Prototype can't even handle basics on its own without having to piggy back off of script.aculo.us and it's effects library.

Speed

Now with every new version of a Framework that comes out, this argument comes up again and again. Finally, we have something to put the arguments to rest.

slickspeed

In my personal testing, I've found that JQuery 1.21 leads the pack, but only in Internet Explorer. In Firefox it comes in dead last. Does this discourage me? Maybe a lil' bit. Am I going to stop using JQuery and switch to Prototype? I think not.



Published: Friday, January 11th, 2008

This is the second installment of my Auth Component Tutorial. I included a link to download a file for during the first installment:

Download: CakePHP Auth 1  CakePHP Auth 1 (4.3 KB, 1,597 hits)

I just think that some of the stuff in there warrants some explanation.

isAuthorized()

This function is needed when $this-Auth->authorize = 'controller'. Theory has it, you can do something similar in app_model if $this-Auth->authorize = 'model', but I haven't looked into this.

The thing that confused me about this is that I thought you were required to perform your own validation. But oh no, this is additional authorization. Sort of like what beforeSave() does, where you can cancel the save after the validation. isAuthorized() is performed after the user has been logged in. If after that, you need some additional stuff, then you can put it in there. I'm not sure why it doesn't default to return true like beforeSave() (if everything goes well), but if it's not present, it errors out.

$this->Auth->user('group_id')

In my User Model I have a field called group_id. So you guessed it, this just returns the group_id of the user that's logged in. Things couldn't be simpler.



Published: Tuesday, January 8th, 2008

First off, I would like to say much thanks to Gwoo for finally helping me to understand this thing.

So I know what you're thinking; I'm probably the last person to finally figure out the CakePHP's Auth Component. For the past few months, I've been using obAuth because that's the only authentication I could get to work with CakePHP. I think that I was just making it more difficult than it should have been.

My main resource for learning the Auth Component has been Chris's tutorial, but even then I still needed help. Also, I'm the type that doesn't really learn much without code.

Note that I'm running off of the CaekPHP 1.2 beta.

Getting Started

Now you can modify this however you like, but I'm starting out with the basics. You're going to need the following:

  • A user database with fields username, password. Of course they don't need to be named that way, but defaults are fun.
  • A User Model with Controller and Views - This can be baked from CakePHP
  • A login view for the user.
  • And a base app_controller.php. That's it.

The Setup - app_controller and users_controller

So here's the minimum in app_controller:



Pages (26): [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Next Entries »