Archive for December 2006
Quick
I had to choose the host that doesn’t allow symlinks to PHP scripts. I just had to, didn’t I? Man, now I’m kicking myself.
Granted, at the time, I had no idea what a symlink was nor why I would ever want to use one. Now, however, I am very much conscious of symlinks and Bluehost’s refusal to allow symlinking to PHP files is making me very angry. Too bad I still have 585 days of paid hosting left with them and I can’t get a refund.
Hopefully, I can find another way.
Math, check; and, Symfony
Math final today. Overall, I’ll say that it wasn’t as bad as I had expected. I was expecting a much more difficult maximization problem; the one we were given, however, essentially removed the hard part by allowing us to assume that the maximum existed. The only part of the test that I’m not entirely sure about is one question regarding directional rates of change. But, it’s all behind me now and I’m not going to think about it much more. I figure it can’t make my grade plummet as I think I did well on the test and there wasn’t anything that was totally left-field for me.
The chem final is on Friday. I’m going to have to start studying for that. There is a ton of stuff to memorize and I am not looking forward to memorizing. But, that’s chem and there’s nothing I can do about it. I’m hoping the test won’t be horrendous. I don’t think it will be, as the material I find isn’t terribly confusing. Most of it is just remembering facts and whatnot, so I think I’ll be OK.
In other non-school news, I decided to pick up Symfony after getting fed up with Zend’s incompleteness. And, how would’ve guessed, Symfony is actually pretty good. It’s sort of like Cake and Zend combined, if I had to make an analogy. Symfony has the ease of database interaction that Cake has, and the flexibility and extensive list of functionalities that Zend has. The only thing that I found difficult in getting it set up on XAMPP was installation of the required modules with PEAR. I’ve never used PEAR before, so I was sort of learning two things at once with the installation. Once I got it rolling though everything was easy.
Some of my favorite features so far: built-in pagination of result lists; built-in mail class; built-in Ajax.
So what I’m doing now is trying to figure out what my new site design is going to look like. I’m searching around and pulling my favorite elements from various sites I see and trying to cobble them together into something that I like. I’ve come up with a few designs, but nothing I really like a lot. We’ll see how it all goes. Maybe I’ll be ready for the May reboot?
Hello, death week
Two reasons as to why I haven’t been blogging of late: first, it’s getting on to finals week and I am feeling the pressure; second, I’ve been studying two PHP MVC frameworks and evaluating their effectiveness and overall merits. I’m planning on implementing a complete rebuild of this site using one of the frameworks as the base.
The two frameworks I’m talking about, of course, are CakePHP and the Zend Framework. Both are MVC frameworks, like Ruby on Rails, although Cake is a little more strict with framing the entire site in MVC, while Zend allows some actions and controllers to not be associated with a model. Both are very much still in beta, although Cake has technically passed the 1.0 milestone. Zend, on the other hand, is still in v.0.6.
CakePHP has the benefit of being very easy to learn. You essentially fill in the database config file and then load the files and the thing works, right off the bat. Making models and controllers and views is easy as pie and the basics of everything are very easy to understand. Cake gets most of that ease-of-use through relying on naming conventions for a lot of the M-V-C interaction, which means that the user need not worry about transferring data properly across components, as it is all done automatically.
This reliance on convention, in my eyes, is simultaneously Cake’s best feature and worst flaw. If you’re satisfied with the default behavior of the interactions, then the convention makes things a lot easier. However, if you ever want to change the way something behaves, you’re beset with trying to figure out a way to work the data you want transferred into the conventions, which is sometimes rather sticky as the conventions aren’t entirely well-documented.
Cake also suffers from the strict MVC implementation it utilizes. Every part of a Cake site is bound to the MVC architecture, meaning that every part of the site is somehow tied to a database, even if there’s no pertinent data in the database for that page to use. I found myself stuck co-opting a “default” model with some general actions that didn’t have anything to do with the model, but were just general site actions (like a contact form). That’s sort of counterintuitive, to me at least.
Zend is similar to Cake in a lot of ways, but seems a little more flexible in its MVC implementation. The core of Zend is the Controller, which has actions that can be performed. A Controller doesn’t necessarily have a Model, as in Cake, which means that you can have an IndexController, which would handle such generic, non-database related actions like the contact form.
Zend’s weakness is also this flexibility. The flexibility means that a lot of things aren’t implied, as in Cake, mainly class and related object inclusion. You need to manually instruct the program to dispatch to the controllers and also tell the controller explicitly to render a certain view. Database interaction is also less advanced, lacking the ability to define relations between tables and have related rows queried automatically when querying a particular row.
I have a lot of interest in both of these frameworks. There’s still one more framework that I’m itching to try out. That’s Symfony. Symfony is discouraging to me, though, because it makes extensive use of YAML configuration files and has a lot of nitty-gritty stuff that needs to be done to make the application work. Although, Symfony is touted as the most extensive and well-developed of the PHP MVC frameworks, so I guess that’s the consequence of being really powerful.
I have a lot of faith in Zend, however, as it’s sponsored by the people who make PHP, and so should have a good developer base. Hopefully by the time Zend breaks the 1.0 milestone, it’s database interaction will be more advanced and offer helpers for more things, namely querying of related rows. I’d also like to see a little more documentation on how the different elements of the MVC architecture actually interact with each other in Zend, as I’m not sure when certain classes and objects are created in the dispatch flow. I think I’m coming to understand it, though, so all should be good.
In other news, finals are coming fast. Math is not looking good. We’ve been doing extremization of multi-variable functions. There are two methods that we’ve learned. One involves gradients, the other doesn’t. The former I understand pretty well; the latter, not so much. It doesn’t help that I haven’t been able to stay awake in Schul’s class lately, and so have probably missed a good deal of important stuff. I’m hoping that I’ll be able to understand the no-gradients method by the time the final rolls around. I don’t really like analytic methods in calculus that don’t involve derivatives or integrals. The methods get so sticky and yucky all the time and involve so much guesswork. It’s very annoying.
Other other news: Adam roped me into watching a new NBC show called Heroes. It’s pretty cool. The story centers around a bunch of super-powered people who are trying to save New York from a nuclear explosion. It sounds really cheesy in summary, but the show itself is pretty good. I’m looking forward to the continuation of the season in January.
It’s really hard to believe that the quarter is almost over. I did end up getting into Chem 20BH, with Shilpa and Stephanie. So all’s well in the world. I’ll be taking three courses next semester: LS 2, Chem 20BH, and GE Cluster 80B. That adds up to 14 units, which is just enough to be full-time and not kill myself. I’m hoping I can pull off the grade I need to get into Chem 20BH. Things are looking kind of grim.
So my week is looking to be pretty much death. I’m planning on continuing to learn Zend and Cake, and maybe start learning Symfony. Oh, and studying for finals. That too.