jquery vs mootools: my initial thoughts

mootools_logoI’ve been using jQuery regularly for my new job now for about 3 weeks or so. I’ve used the selectors, event handling, short cuts/handlers, animations, plugins etc. Nothing too fancy, but in general, a descent exposure. I’d like to compare it with Mootools. And while I do rock a Mootools skin on my phone, I’m going to try and remain as objective as subjectively possible. I’m going to try and stay positive about the differences and give use-cases for using either.

grabbing an attribute in mootools: .[name] or .get or .retrieve or .getProperty?

mootools_logoSomething I ran into just now was returning an anchor’s attribute consistently across browsers. So I have an anchor with an address like ‘/users/delete/5/’ which does what you’d think it does. But I ran into an inconsistent return response in (you guessed it) ie6. In all fairness, it might not be IE6’s fault, but it speaks more to a problem with mootools. While it is a nearly perfect library/framework, this does bug me.

IE6 and input type changes: short answer, ie6 sucks, long answer:

Family_Guy_Stewie_You_Suck_Black_ShirtThe Problem
I ran into another problem the other day native to ie6 (well ie7 and ie8 too, to be fair) where by I was trying to dynamically change a text input field from type=”text” to type=”password”. Safari, chrome and firefox had no issues. It was a simple as node.type = ‘password’, or since I was using mootools, node.set(’type’,'password’). Resolved. But wait…

PHP: Abstract classes vs static classes; whats what?

tv_static_2In the past I’ve spent a great deal of time trying to understand the different between PHP5 abstract and static classes/methods. I find out, use the differences on whatever I’m doing, and the forget. No more. I will document my understanding here to help myself, and some day others, out.

Methods (not classes) can be defined as static (eg. not static class Oliver{} but rather static function talk()) in order to call them without going through an instantiated object. From my perspective, it makes code cleaner and less messy by wrapping related functions in a class wrapper instead of defining them globally. It should be noted though, that classes with static methods CAN be instantiated, and those methods can be called either statically (via the :: double colon notation, or via the -> right arrow notation on the instantiated object).

Weird discovery: firefox converts $_SERVER, SF doesn’t?

300px-Religious_syms.svg This is definitely up there for me; a very weird discovery about how firefox and safari differ in the way the _SERVER array is returned.

print_r($_SERVER);
exit();

Run that code in a php script; then check the source in both safari and in firefox. For the path, try something like index.php?name=what’sup

Flexibility: Server side vs Client side

flexibilityI’ve been told by many people, veterans in their respective industries such as family friends, family members, etc., that when you’re in a technical field, the best type of job security is to specialize. I imagine this would extend to a lot of different areas (entertainment, finance, management, etc.) but especially in the technical/programming arena, I find it’s very true and productive.

Jumping the gun: html5/css3 is not here yet!

Picture 1On Twitter, I follow a bunch of people in the development arena. JavaScript framework core developers, designers, mysql/php architects, etc. etc. I’d say about 50% of the people I follow are in that arena (the other 50% probably being aggregators or tech news sites/blogs).

A consistent theme I’m finding in the past few months has been css3/html5 posts. They talk about new effects, rules, possibilities, etc. etc. Now I try to be optimistic about web development; I try to practice valid w3c content, semantic markup, everywhere I can. But the age of css3/html5, at least for me, is still so far off. 25% (at the least) of internet users are still using ie6, another 40% are using ie7; that takes us to about 65% of internet users using subpar browsers (ie7 is a step up, but still very much sub-par) that don’t support anything close to css3 and html5.

Web/application development is like a restaurant; especially the paying part

200133347-001Web design/development has always been seen as a service, obviously due to the way it’s delivered. It takes units of time to deliver a set of qualifications that should be met, rather than producing a physical product that is then delivered. The way it normally works is you talk with a client, they have a set of goals/requirements they need met (whether it’s a database being built, a design, or a widget), and you try to deliver them.

php.ini error_log directive: finally fixed my code to make it work

phpI always ran into an issue whereby if i set the error_log location for an application/server using ini_set(’error_log’,'PATH’) it wouldn’t log it there. It would log it to whatever path was set in my httpd.conf file, whether it was the global error_log path, or one for a specific virtual host.

Client side framework’s should be called client side libraries; here’s why:

library-booksThis isn’t a really important post, it’s just something I think need’s to be expressed and accepted; it must be accepted. Mootools, YUI, jQuery, Dojo etc. are great. They help a person with very tedious javascript techniques, speed up your applications, and make the UX much richer.

But they are not frameworks. I know this probably just seems like a semantics issue, but I want to make it clear that they are not frameworks, they are libraries. From http://dictionary.reference.com/browse/framework

Next Page »