Jul
20

From PHP to Rails, First Impression

After several years of designing dynamic websites in purely PHP (from scratch), I truly believed that everything in web programming needed to be complicated to work.

Then I tried rails.

My first impressions were mixed; and confused.  Why on earth did RoR think it could correctly generate all of my code for me?  The answer is simple; to promote consistency.

The brilliant developers of Rails must have gotten annoyed from rewriting the same code for different projects over and over again.  Each new project implementation wreaked havoc on previously working code.

Instead of reinventing the wheel for every new project, the rails philosophy is based on Convention over Configuration and the DRY (Don’t Repeat Yourself) principles.  RoR lays the framework for your website based on the popular Model View Controller architecture.

If you, like me, have been using custom boiler-plate implementations of these technologies, but you haven’t tried rails; it’s time to take a look.

Apr
29

Engineering Entrepreneurship

Today, I had a revelation.  Two of my supporting courses fell into the category of Engineering Entrepreneurship, along with many courses I would kill for an excuse to take.  The course curriculum will help me become better at what I’ve always wanted to do.. isn’t that what education is all about anyways?

With my two Computer Science supporting courses, New Venture Creation and Technology Entrepreneurship, I can complete the minor and still graduate in Fall of 2011.  Now I will just need to seek approval from my adviser and the director of the minor, who I’ve met briefly through the Lion Launchpad program.

Mar
10

Making the Smart(y) Decision

With the rapid growth and development of SpeedCountry, every change becomes increasingly complex.  Common design practice using external style sheets only offers limited relief for synchronized template changes.

If we were to bring a new front-end developer on board several months ago, they would have needed to sift through hundreds of lines of PHP to figure out what goes where.

The Solution?  Smarty.

Transitioning each and every page is a large, yet well-calculated setback to the development timeline of SpeedCountry.  So first off the obvious question might be, what exactly is Smarty?  Secondly, why would we dedicate so much effort to making the transition possible?

The primary application of Smarty is a templating engine.  Collectively, each new page may rely on a single cacheable template for site-wide consistency and maximal code reuse.  So what does this all mean for our theoretical new developer?  Each page now contains highly-readable psuedo code instead of technical php jargon, and less routine templating markup.

This allows our site to closely follow the Model View Controller pattern, separating business logic from design logic as much as possible.  A new front-end developer would only need to be familiar with the front-end, and nothing else.  If a logical bug is discovered, the script gurus would only need to sift through PHP code and ignore the template it happens on entirely.

Additionally, this architecture buys us massive amounts of flexibility.  I have written websites using php includes to reuse the sections of code that we thought we “might need to change”.. but this is brittle and a guess at best.  Smarty allows us to completely separate the body of the site from the content of each page.  Do we need to change to a brand new template site-wide?  No problem.