Tuesday, June 17, 2008

CakePHP 1.2

CakePHP is a free and open source rapid development framework for PHP that greatly reduces the time required to create and maintain small to large websites. I've only been using it for roughly a month, however, it has proven to be a valuable tool thus far.
For those new to CakePHP and who'd like to take a look at what it's all about, please see the main site at http://cakephp.org/ From the main site, you can download it (the newest stable release as of this post is version 1.2.0.7125) as well as learn the ins and outs of this tasty cake!

But why should you use CakePHP? How does it help?
Well, CakePHP organizes all the files for your web application into 3 different categories - Models, Views, and Controllers (MVC design pattern). Models are much like gateways to your database, Views are the HTML/PHP pages that displays the data, images, or information. The Controllers are where the main functions of your web applications reside.

Let's look at an oversimplified example of the MVC design pattern:
A user wants to post a comment on your blog. She types in her message and clicks on the "Post!" link to post her comment. The data is sent to the Controller, the Controller then sends it to the Model which inserts it into the database. After being inserted, data is sent to the View and you see your "The Post was Saved Successfully!" message.

Why would you want your code separated like this? Because it's a lot easier to maintain. Furthermore, if you have an error you need to fix, you know almost exactly where to look for it. Is it a database error? Check your Model or your database. Is it a template issue? Check your view.

CakePHP also has many built in functions and helpers that help you quickly, easily and (usually) painlessly find information from your database, manage user permissions, use AJAX and even display forms (to name a few).

I would highly recommend viewing the CakePHP manual (aka "The Cookbook") for more information and for a much better explanation of how things work, what you can do, and what you can't. You should also take a look at the Blog tutorial located in the Cookbook for a walk through of many useful functions to easily create a Blog. The cookbook can be found at http://book.cakephp.org/view/7/introduction-to-cakephp.

As I learn more about CakePHP, I'll be posting more blogs about it, what problems I've had with it, and how to get around those problems.

Until then,
Happy Baking!

Saturday, May 24, 2008

Summer's approach

It's been awhile since I've posted...again. Summer is approaching quickly and school is almost over. In about 3 weeks I'll be graduating and I have a great job working as a Web Developer. I was planning on going to college (Centre for Arts and Technology has already accepted me) but I've been offered a full time position as a Web Developer which I'm leaning towards.
This new job has been great to teach me more about scripting/programming which in turn teaches me more about security and flaws...not to mention the pay is quite decent for a yet-to-be HS grad. At the moment, I'm using the money to build a beautiful gaming computer that will blow all my other crappy computers away. Later on I'll be putting up a server on one of my older computers for pen testing.

This summer I'll be working full time and traveling to B-C to visit some old friends before we all leave on our separate paths. In the future I'll be adding some blogs about CakePHP (the framework I've been using for work that speeds up the design and programming of web applications).

It's 4am at the moment, and I have no clue what else to write, so, with that I leave you.

good night!

Tuesday, March 11, 2008

Cuba Get-Away

For Spring Break I took a trip down to Cuba to relax on a nice warm beach for a week. I stayed at an all-inclusive resort (named Melia Cayo Santa Maria -> Melia means a Firm, Cayo means Island), which included unlimited food at the buffet and snack bars, 3 a la carte meals for my week stay, unlimited alcohol at any of the bars, daily and nightly entertainment, use of equipment (such as catamarans, wind surfing, kayaks, etc.), etc.

That vacation has, so far, been the best vacation I've had. I paid for 2 excursions: one to the city of Santa Clara, and one for a day long sail trip on a giant catamaran (I didn't know Catamarans could get big enough to hold 4 bathrooms...).

Cuba is actually a really interesting place, full of culture and history. The houses are extremely small and in very bad condition. The roads are also very narrow and I would never want to drive there; each car has to pass about 3 feet beside the next car.

Apart from the lack of technology, narrow roads and poor housing, Cuba is definitely one of my favorite countries. The climate is perfect (imo), the people were kind and if it weren't for a lack of internet, I wouldn't mind staying there for quite some time.

One interesting fact: There's one phone company for the whole country. There is only dial-up and computers are not an everyday thing for the people who live there. From a quick examination of their pay phones, phreaking might actually still be practical in Cuba.

Unfortunately, now I'm off the beach and back into my home which means back to the freezing cold, school and work.

Thursday, February 28, 2008

DSL - My long lost partner

When I left British-Columbia, I had to leave my precious highspeed behind...it's been 3 long, arduous years on Dial-Up since then, however, at last I finally have Highspeed again!

My connection isn't THAT great, but it is certainly an improvement to my old 24Kbps Dial-Up connection I just got rid of...Highspeed I <3 you

After not being able to receive highspeed for years, my phone company has finally sent me a DSL modem to test a DSL connection in my area. Within 3 days (just bought the Router today) of connecting my modem, I already have a Wireless network setup (2 Wired desktops and my Wireless laptop) and plan on (eventually) setting up one of my older computers as a (probably Linux) Pen-Test server, hooray!

On top of that, a recent job opportunity has presented itself. Someone I know has a client that needs programming/scripting work done and wanted to know if I would be interested. Basically, I'd be creating Web Crawlers to gather specific information off of Government sites and store it to a database. I've already created a sample script for the job and will be going from there. This will definitely be a great opportunity for me to get some extra cash to pay for college, computer parts, and it will look great on a resume ^_^