<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Dave Dash</title>
 <link href="http://davedash.com/tag/frameworks/atom.xml" rel="self"/>
 <link href="http://davedash.com/tag/frameworks"/>
 <updated>2012-04-07T22:42:44-07:00</updated>
 <id>http://davedash.com/</id>
 <author>
   <name>Dave Dash</name>
   <email>dd+atom1@davedash.com</email>
 </author>

 
 <entry>
   <title>python: it begins</title>
   <link href="http://davedash.com/2008/01/26/python-it-begins/"/>
   <updated>2008-01-26T00:00:00-08:00</updated>
   <id>http://davedash.com/2008/01/26/python-it-begins</id>
   <content type="html">&lt;p&gt;[tags]php, python, symfony, frameworks, programming[/tags]&lt;/p&gt;

&lt;p&gt;The problem I have with python, is I really like what I can do with it, and it makes me hate that I have to use PHP.&lt;/p&gt;

&lt;p&gt;PHP works.  I've used it for over 10 years without problem.  My web development methodology was this: I want to do &lt;code&gt;x&lt;/code&gt;, but I need to first learn &lt;code&gt;y&lt;/code&gt;.  Well one day &lt;code&gt;y&lt;/code&gt; became PHP/FI and then PHP 3 and then PHP 4 and then PHP5.  It was a natural progression.&lt;/p&gt;

&lt;p&gt;I came from a (what was at the time) traditional C/C++/Java background and decided that PHP while amateurish was still a better solution for web development.  A few years later I was proven right by companies like Yahoo! and Facebook.&lt;/p&gt;

&lt;p&gt;I did have my issues, and I worked through them, symfony and other frameworks like it, have made PHP development so much better, but eventually you get let in on little secrets.  Secrets like other scripting languages.&lt;/p&gt;

&lt;p&gt;In the last year I dabbled with ruby, but decided I didn't want to look at rails.  A few people pointed me in the direction of python and Django as an alternative to PHP alternatives.  So I've spent time learning python.&lt;/p&gt;

&lt;p&gt;Yesterday and today I gave myself a real project.  I started hacking away at del.icio.us for a Winter Hack Day at Yahoo!  I would write a few lines of code, and then realize that I can write it a little better a little cleaner using some neat little python constructs.  It's enjoyable in the way that PHP is not.&lt;/p&gt;

&lt;p&gt;It might just be a phase, but I sincerely doubt it.  A lot of people I know who use python love it.  Many have been using it for years (even while I secretly thought, &quot;python? really?&quot;  Well, I'm starting to think they've been onto something.  We'll see where I end up.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>MinneBar</title>
   <link href="http://davedash.com/2007/04/21/minnebar/"/>
   <updated>2007-04-21T00:00:00-07:00</updated>
   <id>http://davedash.com/2007/04/21/minnebar</id>
   <content type="html">&lt;p&gt;[tags]Minnebar, symfony, barcamp, frameworks, php, php5[/tags]&lt;/p&gt;

&lt;p&gt;I gave a quick overview of the symfony framework for PHP5 at &lt;a href=&quot;http://barcamp.org/MinneBar&quot;&gt;MinneBar&lt;/a&gt;.  If you have questions or comments about symfony or my talk, feel free to leave them here.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Not taking frameworks for granted</title>
   <link href="http://davedash.com/2006/11/21/not-taking-frameworks-for-granted/"/>
   <updated>2006-11-21T00:00:00-08:00</updated>
   <id>http://davedash.com/2006/11/21/not-taking-frameworks-for-granted</id>
   <content type="html">&lt;p&gt;One of my clients approached me with a relatively easy project.  She gave me a log file of PHP errors and I was supposed to fix her scripts.  I fixed about 100+ different errors in a few hours.  It was fairly straightforward.&lt;/p&gt;

&lt;p&gt;Throughout the site I could understand the previous developer and the choices he or she made for better or worse.  It did look like a struggle however.&lt;/p&gt;

&lt;!--more--&gt;


&lt;p&gt;Ultimately it felt that there were some fairly simple things that each script needed to do, but each task was a challenge.  Validating forms, storing data across pages, decorating the site, interacting with the database.  Everything seemed very kludged together.&lt;/p&gt;

&lt;p&gt;I realized that this is exactly how I used to write code, sure... my way of course was better and more logical, yada, yada, yada... but ultimately I was there before.&lt;/p&gt;

&lt;p&gt;My client noted that these scripts were made from another contract programmer, and then a light-bulb went on... frameworks (whether it be &lt;a href=&quot;http://symfony-project.com/&quot;&gt;symfony&lt;/a&gt;, &lt;acronym title=&quot;Ruby On Rails&quot;&gt;ROR&lt;/acronym&gt;, Django, CakePHP, etc) help iron out and standardize these tasks.&lt;/p&gt;

&lt;p&gt;Since I know &lt;a href=&quot;http://symfony-project.com/&quot;&gt;symfony&lt;/a&gt; best, I'll cover what I think could have helped in this last project.  I'm sure other major frameworks have their equivalents.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Form validation&lt;/strong&gt;: &lt;a href=&quot;http://symfony-project.com/&quot;&gt;symfony&lt;/a&gt; lets you define form validation in a very simple manner.  The validation logic is also separate from the rest of the code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Storing Data&lt;/strong&gt;: Without a framework, you generally have to rely on the &lt;code&gt;$_SESSION&lt;/code&gt; array in PHP.  While very useful and easy to use, storing parameters and attributes to a user object is done a lot more cleanly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;decorating the site&lt;/strong&gt;: My biggest problem was with each page I had,, I used to have to call headers, sidebars, etc, etc.  &lt;a href=&quot;http://symfony-project.com/&quot;&gt;symfony&lt;/a&gt;'s layout system was a boon.  I had a common layout for all pages (maybe a few alternates) and hooks inside them if they needed to be adjusted.  Then the various actions had their own seperate templates that were injected into the common layout.  It made adding new pages easy, since I didn't need to remember &lt;code&gt;header()&lt;/code&gt; and &lt;code&gt;footer()&lt;/code&gt; functions for each and every page.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interacting with the database&lt;/strong&gt;: &lt;a href=&quot;http://spindrop.us/2006/08/07/how-object-relational-mapping-saves-time-and-makes-your-code-sexy/&quot;&gt;I've covered before the benefits of ORM&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Not only do the bulk of these problems disappear with a framework, a lot of the difficulties of switching developers melt away.  If you tell me, a developer, that I'm walking into a project made with a framework, I can learn about the framework and be able to understand its ins and outs.&lt;/p&gt;

&lt;p&gt;If you just tell me it's written in PHP, chances are I'm going to want to do things my own way.  It's hard to understand the logic that another programmer was using so we fall back to standards whether they are your own or borrowed.&lt;/p&gt;

&lt;p&gt;When we use a framework, we can find some mutually agreed upon standards and usually people who specialize in that framework and are willing to help.  So my advice: stick to frameworks.  The coding style will be no worse than the whims of a programmer, but at best it'll be something that anyone can pick up.  The general case is that even a bad coder can only do so much damage within a framework.  The bullet points I covered above will cut down on development time tremendously.&lt;/p&gt;
</content>
 </entry>
 

</feed>

