<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HEAVYWORKS &#187; Announcements</title>
	<atom:link href="http://www.heavyworks.net/blog/category/announcements/feed" rel="self" type="application/rss+xml" />
	<link>http://www.heavyworks.net</link>
	<description>Extreme Software Engineering</description>
	<lastBuildDate>Fri, 27 Aug 2010 01:55:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Updates and birth of a new MVC Framework</title>
		<link>http://www.heavyworks.net/blog/posts/updates-and-birth-of-a-new-mvc-framework</link>
		<comments>http://www.heavyworks.net/blog/posts/updates-and-birth-of-a-new-mvc-framework#comments</comments>
		<pubDate>Fri, 23 Jan 2009 18:19:10 +0000</pubDate>
		<dc:creator>Jan Seidl</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[smarty]]></category>
		<category><![CDATA[webtodo]]></category>

		<guid isPermaLink="false">http://www.heavyworks.net/?p=140</guid>
		<description><![CDATA[Hello friends. Sorry for the lack of posting these days. I&#8217;ve been working hard on the finishings of the WebTodo project (in Brazillian Portuguese). This project was a kickstart for my own MVC Framework. As cited in previous article, I was not confortable with the idea of using one of the existing MVC Frameworks because [...]


Related posts:<ol><li><a href='http://www.heavyworks.net/blog/posts/5-best-practices-on-developing-wordpress-plugins' rel='bookmark' title='Permanent Link: 5 best practices on developing WordPress plugins'>5 best practices on developing WordPress plugins</a></li>
<li><a href='http://www.heavyworks.net/blog/posts/smartly-resolving-your-wordpress-pages-and-posts-javascript-and-css-dependences' rel='bookmark' title='Permanent Link: Smartly resolving your WordPress pages and posts JavaScript and CSS dependences'>Smartly resolving your WordPress pages and posts JavaScript and CSS dependences</a></li>
<li><a href='http://www.heavyworks.net/blog/posts/alternative-syntax-for-php-control-structures' rel='bookmark' title='Permanent Link: Alternative syntax for PHP control structures'>Alternative syntax for PHP control structures</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Hello friends.</p>
<p>Sorry for the lack of posting these days. I&#8217;ve been working hard on the finishings of the <a href="http://www.webtodo.com.br" title="WebTodo - Tudo na web">WebTodo</a> project (in Brazillian Portuguese).</p>
<p>This project was a kickstart for my own <acronym title="Model-View-Controller">MVC</acronym> Framework. As <a title="Understanding the MVC Pattern" href="http://www.heavyworks.net/posts/understanding-the-mvc-pattern/">cited in previous article</a>, I was not confortable with the idea of using one of the existing <acronym title="Model-View-Controller">MVC</acronym> Frameworks because I&#8217;m a little paranoid of not having exact (and full) control of my code. The only way to assure quality was from coding every piece.<br />
<span id="more-140"></span><br />
I&#8217;ve started planning which caracteristics it&#8217;ll have and which existing solutions I would use (as <a href="http://www.catonmat.net/">Peteris</a> says &#8220;good coders code, great coders reuse&#8221;). I&#8217;ve picked up so <a href="http://www.smarty.net">Smarty Template Engine</a> because I&#8217;ve had plenty of previous experiences working with it (and all of them gave me loads of pleasure) and <a href="http://www.doctrine-project.org/"><acronym title="PHP: Hypertext Preprocessor">PHP</acronym> Doctrine <acronym title="Object-Relational Mapping">ORM</acronym></a> after a big study of the major existing ORMs.</p>
<p><strong>Doctrine</strong><br />
As far as I can say working untill now with Doctrine is: the documentation could be way much better &#8211; had to use logic and code flow inspection to find how to do some stuff &#8211; but its not that bad after all, I&#8217;ve had to fix some code in the Searchable behaviour (I&#8217;m working with John Wage from Doctrine via the <a href="http://trac.doctrine-project.org/">trac</a> on this) and had some minor code issues in model generation from <acronym title="Yet Another Markup Language"><a href="http://www.yaml.org/">YAML</a></acronym> files that we are already working on.</p>
<p>Performance is good after all but I still don&#8217;t have so many data load to ensure. Doctrine has a native Profiling (Benchmarking) tool that is just great. The behaviours that comes within the package are one great set of the most useful that you may need: Searchable (Auto-generates an <a title="The Bomb vs The Rifle: Effective data searching" href="http://www.heavyworks.net/posts/the-bomb-vs-the-rifle-effective-data-searching/">indexing table</a>), Timestampable (timestamps inserts and updates within the registries automatically), Sluggable (creates a web-save name for <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"><acronym title="Representational State Transfer">REST</acronym>ful</a> use) and you can even create your own (haven&#8217;t tested yet).</p>
<p>The gold of Doctrine in my opinion is the ease of database modeling over the YAML files. This is where Propel lost for me: Huge and complex (ok I&#8217;m being a little dramatic) <acronym title="eXtensible Markup Language">XML</acronym> files just scared me away. With the YAML files you can set the fields, validation type (email, not blank, not null, min_lenght etc) &#8211; that Doctrine validates automatically and <code>throw{}</code>s the error exceptions so you can parse at your will -, the behaviours and relations. Just beautiful.</p>
<p>Here&#8217;s one of my tables that illustrates the most:</p>

<div class="wp_syntax"><div class="code"><pre class="yaml" style="font-family:monospace;">---
Keyword:
  actAs:
    SoftDelete:
    Timestampable:
      created:
        name: ts
        type: timestamp
        format: Y-m-d H:i:s
      updated:
        name: ts_up
        type: timestamp
        format: Y-m-d H:i:s
    Sluggable:
      fields: [keyword]
      name: slug
      type: string
      length: 255 
    Searchable:
      fields: [keyword]
  columns:
    id_keyword:
      type: integer(20)
      notnull: true
      primary: true
      autoincrement: true
    terms:
      type: integer(20)
      notnull: true
    id_parent:
        type: integer(20)
        notnull: false
    id_category:
        type: integer(20)
        notnull: false
    keyword:
      type: string(255)
      notnull: true
      notblank: true
      unique: true
    initial:
      type: string(1)
      notnull: true
      notblank: true
    search_count:
        type: integer(20)
        notnull: false
        default: 0
  relations:
    Category:
      class: Category
      local: id_category
      foreign: id_category
      foreignType: one 
    Parent:
      class: Keyword
      local: id_parent
      foreign: id_keyword
      foreignType: one 
  options:
    collate: utf8_unicode_ci
    charset: utf8</pre></div></div>

<p><strong>Smarty</strong><br />
Smarty is the only templating system that made me assing variables, perform simple conditional and iterational actions in a easy manner. It even allows you to write your own plugins and string modifiers that aided me on the integration of my form inputs with Doctrine&#8217;s validation over the whole framework.</p>
<p>Three good plugins born from there:</p>
<p>The <code>atoz</code> plugin that easely creates for me &#8220;A to Z&#8221; link lists of anything.<br />
The <code>pager</code> that creates the pages links with first, next, previous, last buttons; custom class for the current page; custom link title option and you can choose to show or not the &#8220;All&#8221; link.<br />
The <code>input</code>. The most complex one that generates my inputs without locking up the default input attributes described at the <acronym title="World Wide Web Consortium">W3C</acronym> Input Specification. It handles automatically the errors &#8211; refill fields with the posted data, change the classes, show error information <code>div</code> etc &#8211; for <code>input</code>, <code>select</code> and <code>textarea</code>.</p>
<p><em>NOTE: All the plugins generates <acronym title="eXtensible HyperText Markup Language">XHTML</acronym> code based on SEO practices and web standards.</em></p>
<p>I&#8217;ll be posting them until the end of this week. It&#8217;s a little focused on the patterns established by my framework but I&#8217;ve efforted to make it very flexible.</p>
<p><strong>The Framework</strong><br />
I&#8217;ve used some of the best-practices I&#8217;ve watched over the last year (and over my whole coder life) and carefully chosen the ingredients for the &#8220;evil-potion&#8221;.</p>
<p>Most of them &#8211; as expected &#8211; came from Rails. The <acronym title="Model-View-Controller">MVC</acronym> pattern was implemented over &#8211; as expected too &#8211; my <a href="http://www.heavyworks.net/posts/understanding-the-mvc-pattern/" title="Understanding the MVC pattern">vision</a> <a href="http://www.heavyworks.net/posts/models-and-controllers-who-are-you-calling-fat/" title="Models and Controllers: Who are you calling fat?">of</a> <acronym title="Model-View-Controller">MVC</acronym>.</p>
<p>Some good pieces of code I took from <a href="http://akelos.org/" title="Akelos PHP Framework">Akelos <acronym title="PHP: Hypertext Preprocessor">PHP</acronym> Framework</a> (obviously the author comments were left): <a href="http://wiki.akelos.org/routes">The Router</a> (that is a really good piece indeed), parts of the Inflector (string manipulation) &#8211; the underscorer and the camel case, the Dispatcher idea and some other minor good practices. Akelos is one of the frameworks that I&#8217;ve sympathized with. Worth a check!</p>
<p>I&#8217;ve used lot of things that I liked in other frameworks like preFilter/postFilter (that runs before and after each action) that helped A LOT under the admin handling. The <a title="The Layout Concept" href="http://www.heavyworks.net/posts/the-layout-concept/">layout concept</a>, REST, modularization and other stuff were used too.</p>
<p>Wow, that was an extensive month of work! I&#8217;ll have to spend good time now writing about the practices and codes that the framework made me feel on my skin.</p>
<p>Regards!</p>

<p>Related posts:<ol><li><a href='http://www.heavyworks.net/blog/posts/5-best-practices-on-developing-wordpress-plugins' rel='bookmark' title='Permanent Link: 5 best practices on developing WordPress plugins'>5 best practices on developing WordPress plugins</a></li>
<li><a href='http://www.heavyworks.net/blog/posts/smartly-resolving-your-wordpress-pages-and-posts-javascript-and-css-dependences' rel='bookmark' title='Permanent Link: Smartly resolving your WordPress pages and posts JavaScript and CSS dependences'>Smartly resolving your WordPress pages and posts JavaScript and CSS dependences</a></li>
<li><a href='http://www.heavyworks.net/blog/posts/alternative-syntax-for-php-control-structures' rel='bookmark' title='Permanent Link: Alternative syntax for PHP control structures'>Alternative syntax for PHP control structures</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.heavyworks.net/blog/posts/updates-and-birth-of-a-new-mvc-framework/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://www.heavyworks.net/blog/posts/hello-world</link>
		<comments>http://www.heavyworks.net/blog/posts/hello-world#comments</comments>
		<pubDate>Wed, 03 Dec 2008 20:13:27 +0000</pubDate>
		<dc:creator>Jan Seidl</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[disclaimer]]></category>
		<category><![CDATA[hello world]]></category>
		<category><![CDATA[nothingbettertopost]]></category>

		<guid isPermaLink="false">http://www.heavyworks.net/wordpress/?p=1</guid>
		<description><![CDATA[Just my plain "hello to all".


Related posts:<ol><li><a href='http://www.heavyworks.net/blog/posts/5-best-practices-on-developing-wordpress-plugins' rel='bookmark' title='Permanent Link: 5 best practices on developing WordPress plugins'>5 best practices on developing WordPress plugins</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Ok, as wordpress gave my first post, I&#8217;ll write something.</p>
<p>Hello All!</p>
<p>This is it. My Blog (yay!). Ok, not that exciting.</p>
<p>Well, here at Heavyworks I&#8217;ll write about code, coding, software development, bit crafting and more code. Yeah, it&#8217;s basically about coding and all that coding has and represents (anyone understood what I&#8217;ve just wrote?).</p>
<p>I have already some code snippets and util functions that I&#8217;ll post here too so it maybe useful for someone.</p>
<p>Feel free to discuss, complain and contribute!</p>
<p>I&#8217;m still working on a nicer template (even not being a designer [thank god]) so keep on watching. I&#8217;m planning to release the new layout and start blogging this weekend!</p>
<p>Cheers!<br />
Jan, the bitwelder!</p>

<p>Related posts:<ol><li><a href='http://www.heavyworks.net/blog/posts/5-best-practices-on-developing-wordpress-plugins' rel='bookmark' title='Permanent Link: 5 best practices on developing WordPress plugins'>5 best practices on developing WordPress plugins</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.heavyworks.net/blog/posts/hello-world/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
