Archive for 'News'

Module Support Added to Fever Framework

Posted on 22. Feb, 2010 by Will Fitch.

0

I’m excited to announce that modules will be supported in time for the public preview on Friday! This is just one of the many steps taken to make Fever as flexible as possible.

Modules Overview

Modules are kind of mini-applications within a larger web application. They maximize component reuse by developing the controllers, models, libraries and views based solely on that module. When that module is needed, you simply add the path to that module in your configuration and you’re done!

An example would be a CMS that has the following components: blog, forms-builder and page generator. All three of those are components that make up the CMS (being the “larger” web application). The modules can be developed so that the views only contain the necessary HTML to present that functionality. The CMS can then use a layout (also included in Fever) to surround the view contents of the module. The layout will contain the primary HTML (usually CSS, JS, navigation, etc), and the blog module will supply the supplemental HTML to fill the rest.

How do you maximize component reuse? If you develop the HTML completely CSS-based (no inline CSS, please ;p), each application using that component can customize their own CSS file, include it in the layout and the component will look unique to each application using it.

Telling Fever You’re Using Modules

You can tell Fever that you’re using modules in your application two ways: configuration or through the FrontController API.

Text
  1. fever.app.useModules = true

or

PHP
  1. <?php
  2. $front = Fever\Controller\FrontController::getInstance();
  3. $front->setUseModules(true);

At this point, your entire application must use modules. You will no longer be able to use simple controller-based functionality. That said, Fever implements modules a little different, and there’s some important information you need to know when using them:

What Makes Modules Different in Fever?

There may be cases where you need to customize a module’s functionality, or the module may require key information specific to each application. We recognized this, and added shared models and libraries. This means every module has access to each application’s models and libraries, and vice-versa.

Each module also has it’s own bootstrap to customize its MVC needs. While this is handy, module-based bootstraps do not have the same flexibility as application bootstraps. This is due to the way the request is handled.

An application’s bootstrap is called before the request/response objects are initialized and the FrontController actually does any work. This makes a difference in the module bootstraps as the request object has been initialized and the module has been identified. Beyond this, nothing is different.

Continue Reading

Fever Framework Update

Posted on 11. Feb, 2010 by Will Fitch.

0

I just want to update everyone on the status of the framework. It is still on schedule for the February 26th release!

As we countdown to the public beta release, I want to keep you informed of some exciting functionality that’s being added.

Functionality

Along with the JSON controller, a new XML controller has been added. This allows you to return nearly anything from an action and it will automatically convert it to XML, send the proper content-type header and provide the data to the client. Here is an example of how it would work:

PHP
  1. <?php
  2.  
  3. class MyController extends \Fever\Controller\Action\AbstractXml
  4. {
  5.     public function getTestData()
  6.     {
  7.         return array
  8.             (
  9.             ‘name’ => ‘Will Fitch’,
  10.             ‘attributes’ =>
  11.                 array(
  12.                 ‘height’ => 76,
  13.                 ‘hair’ => ‘brown’,
  14.                 ‘eyes’ => ‘brown’
  15.                 )
  16.             );
  17.     }
  18. }

This will, in turn, produce the following XML document to the client:

XML
  1. <results>
  2.     <name>Will Fitch</name>
  3.     <attributes>
  4.         <height>76</height>
  5.         <hair>brown</hair>
  6.         <eyes>brown</eyes>
  7.     </attributes>
  8. </results>

Now I’m sure there are those out there that are screaming, “But I want to customize the name of the elements!!!”. No problem! There is a method withing the AbstractXml controller called “setXmlElement” which accepts an instance of SimpleXMLElement. This will be used when converting data provided into XML.

This is all thanks to a new component called “XmlConverter” which lives in the \Fever\IO\Xml namespace. It follows the chain-of-command pattern and iterates until it finds the correct data type provided. Here are a list of converters available for iteration:

  • ArrayToXml
  • BooleanToXml
  • NullToXml
  • NumberToXml
  • ObjectToXml
  • StringToXml

All of these are separate entities, so they can be used independently.

I’ll continue to update throughout the upcoming days before the public beta!

Continue Reading

Nashville PHPUG Symfony Speakers Announced

Posted on 02. Apr, 2009 by Will Fitch.

0

On April 24th, Travis Black and Brent Shaffer of Centre{source} will be presenting the Symfony PHP framework. This is our second demonstration after having Shawn McCool present CodeIgniter last month. We are excited to have Centre{source} and look forward to their demonstration.

Presenter Bios

Travis Black, Developer, Centre{source}
Travis Black Travis Black is a software developer currently employed centre{source} interactive strategies. He has been developing web applications in php since 2004. After some experience developing in Ruby, using both the Rails and Merb frameworks, he spent a good deal of time attempting to find a php alternative. In the end, he found symfony, and fell in love. Travis and symfony were married last year and have lived together happily ever since.

Brent Shaffer, Developer, Centre{source}
Brent Shaffer Brent Shaffer is a symfony developer and architect at centre{source} interactive strategies. He graduated from Belmont University in 2008 with a degree in Commercial Music Technology and a minor in Computer Science. He has experience with the .NET framework, but has seen the light, and has been a symfony zealot ever since. He has also done some other cool stuff.




The meeting location will be announced next week once I work out the sponsorship details.

Continue Reading

Zip Code Web Service Updates

Posted on 12. Jan, 2009 by Will Fitch.

0

I have updated the zip code web service to fix some issues with the data returned from getLocalTime. Prior to this fix, only the 12 hour format was displayed without the proper meridiem (AM or PM). The time was also off by one hour.

This fix adds two additional children:

  1. currentMilitaryTime – The 24 hour time format
  2. currentMeridiemTime – The 12 hour time format with AM or PM

I have left the currentTime element for backwards compatibility. I do plan on removing it when I release the new zip code web service some time this month.

Continue Reading

PHP Namespace Update

Posted on 09. Nov, 2008 by Will Fitch.

4

Since the writing of my namespace post things have changed. The voting is in (so it’s said) and the new namespace separator is the backslash “\” character. That’s right, the escape sequence character.

This is caused an uproar in the community and I’m personally not a fan of it. At the same time (and after many weeks of debating), I have decided to support this effort. While I’m not a fan of its implementation, I’m still pleased that namespace functionality is being implemented into PHP.

Your thoughts?

Continue Reading

PHP 5.3 alpha1 Released

Posted on 21. Aug, 2008 by Will Fitch.

1

PHP 5.3 alpha1 has been released and is ready for those who wish to participate in learning new functionality as well as testing the code and documentation. This is a big milestone for PHP as it includes the much requested namespace functionality.

In conjunction with namespaces, this release includes some new features including NOWDOCS – The single quote equivalent of HEREDOCS, Lambda functions and closures, optional cyclic garbage collection, limited GOTO (uh oh) statements and more.

It is important to note that this is an alpha release, so production use is discouraged.

I plan on downloading and playing with this new release, and I will show my results later.

For more information on this list, check out http://www.php.net/archive/2008.php#id2008-08-01-1

Continue Reading

Call for Zip Code Web Service Methods

Posted on 15. Aug, 2008 by Will Fitch.

0

I have developed a new version of the zip code web service. This new service offers much more functionality than the previous, including 100% document-literal WS-I/WSDL 1.1 compliancy and SOAP 1.1 and 1.2 capabilities.

Along with this, a Java, PHP, .NET and Ruby SDK will be developed so that you only have to worry about making class calls rather than interfacing with SOAP and the network. I will also be increasing the number of elements returned from 300 to 500.

This new service will require that you register your application (domain only, no login) so that I can get an idea of the usage of this service. Your data will not be shared/sold to anyone, I just want some statistics.

(more…)

Continue Reading

Brand New Servers!!!

Posted on 27. Mar, 2008 by Will Fitch.

2

I have finally got my new servers! I am still in the process of configuration, but this is the basic setup:

  1. Web / Mail Server

    • Dual-core Xeon 2 GHz
    • 8GB of RAM
    • RHEL 5 64-bit
  2. Database Server

    • Dual-core Xeon 2 GHz
    • 2GB of RAM (I know, it will eventually get upgraded)
    • RHEL 5 64-bit

This is especially important to me so I can increase my web services. Free data is always better than free software!

Continue Reading