News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Chris Hartjes' Blog:
Converting Legacy Apps to CakePHP, Part 3
December 31, 2008 @ 12:58:33

Chris Hartjes continues his series looking at converting over legacy applications into a CakePHP environment with this third part, a focus on what can be one of the hardest parts - separating out business logic and presentation logic.

Anyway, onto other matters. As you saw in parts 1 and 2, a bug part in having a successful transition from legacy app to CakePHP is having an environment that is well suited to the use of a framework. Having laid out the groundwork for that switchover, it's time to talk about the part of a refactoring or porting that is most difficult: separating your business logic from your display logic.

He talks about fat models, skinny controllers and flexible views with some code to illustrate each. This method makes the models do most of the work while the controllers are more of a go-between for them and the views. The views, then, are pliable enough to work with whatever data might be thrown at them.

0 comments voice your opinion now!
legacy application cakephp series fat model skinny controller view flexible



DevShed:
Using Code Igniter to Enable Comments in a Blog Application
December 31, 2008 @ 07:50:56

DevShed continues their series on using CodeIgniter to make a simple blogging application with this new article. It focuses on the next step in the blog's evolution - making it able to accept user comments.

A decent blog application, however, must provide users with a mechanism that lets them post their comments easily, and the simplest way to do this is via an HTML form. Therefore, in the next few lines, I'll be explaining how to modify the controller class and the comments view file created in the preceding article to incorporate a basic web form that permits users to post comments on a particular blog entry.

They start by reviewing the code and application so far, ensuring we're all on the same page. From there, they add code into the controller to handle the form input and make a view to create the form itself.

0 comments voice your opinion now!
codeigniter framework tutorial blog application comment form view controller


DevShed:
Displaying User Comments in a Code Igniter Blog Application
December 23, 2008 @ 11:42:01

DevShed continues their series creating a simple blogging application with the CodeIgniter framework with this part of the series - adding in a display for user comments.

In this specific case, the first of these files was defined as a basic controller, and was provided with the ability to paginate the aforementioned blog entries via the corresponding pagination class included with CodeIgniter. However, in its current incarnation, the blog application is pretty limited. It doesn't let users post comments on each blog entry. Thus, in the next few lines I'll be improving the signature of the controller class to address this important issue.

The review the code from before (showing the pagination of the blog entries) and add onto it a new comments method and how to create a new view to show the messages visitors to the site have submitted.

0 comments voice your opinion now!
blog application tutorial codeigniter user comment display view action


Jani Hartikainen's Blog:
Food for thought utilizing models in MVC
December 08, 2008 @ 10:26:15

Jani Hartikainen has posted some food for thought to his blog today concerning models in a typical Model-View-Controller (MVC) setup.

"What is a model" and "Is Zend_Db_Table a model" seem to be asked once in a while on #zftalk. Frameworks say they have a full model available, thus they are MVC frameworks ORM libraries say they generate models. It seems the ActiveRecord pattern has become somewhat synonymous with model.

He points to a post from Padraic Brady on the subject and talks about how one might put it into practice. He admits to making a controller action just to get data from the database into a view, but offers a "more correct" alternative - a view helpers that creates a model instance your view scripts can use directly without the controller in between.

0 comments voice your opinion now!
mvc modelviewcontroller database access view helper instance


Robert Basic's Blog:
MyUrl view helper for Zend Framework
December 02, 2008 @ 12:54:32

Robert Basic has posted a view helper for the Zend Framework he's developed - one to more correctly handle URLs without dropping the query string information.

Zend Framework's built in URL view helper - Zend_View_Helper_Url - is discarding the query string of the URL, thus breaking some links.

The included helper for URL building formats the output in a slightly unexpected way, so his helper uses this format and, with the help of a few loops and some string appending, spits a "more correct" version out the other side. Complete code and a usage example are included.

0 comments voice your opinion now!
url helper zendframework myurl zendviewhelperurl view


NETTUTS.com:
Create a PHP5 Framework - Part 3
November 25, 2008 @ 08:47:01

NETTUTS.com has posted the third part of their series on creating a simple PHP5 framework today:

Now that we've got a basic framework (see part 1 and part 2 of this series), we can start thinking about integrating designs with our PHP framework. For now, we'll concentrate on the front-end design, including how we can make it easy to 'skin' our new framework.

This part looks mostly at the HTML and CSS for the presentation layer (the views) to make a simple two-column layout with some basic image and text content.

0 comments voice your opinion now!
tutorial series php5 framework view layer html css output


NETTUTS.com:
Getting Started With Cake PHP Part 2
November 03, 2008 @ 10:28:34

NETTUTS has posted the second part of their series looking at the basics of CakePHP and how you can get started developing.

In our last CakePHP tutorial we looked at setting up the CakePHP framework and introduced some of the framework's basic concepts and terminology [...] In the next set of tutorials we will build the blog application incrementally so that the basic CakePHP development process is laid out clearly instead of briefly mentioned as in other similar tutorials. In this tutorial we start with a basic authoring authentication component for the example blog application.

He's broken it down into a few steps - defining the goal of the application, creating the models to interface with the database, making the views to output the results and making the controllers to bind it all together.

0 comments voice your opinion now!
cakephp framework series tutorial blog application view controller model


AskAboutPHP.com:
CodeIgniter Organizing views simply
October 29, 2008 @ 15:35:08

New on the AskAboutPHP.com blog, this tutorial concerning CodeIgniter view organization has been posted:

Trying my hands at using CodeIgniter, one of the first obstacles I had was how to organize my 'blocks' on a page. Without knowing any better, I thought I had to reiterate the same view calls in every function within the controller, making the controller codes very messy. It turns out that CodeIgniter allows us to nest views within views, and that has made things a lot simpler for me.

Instead of loading and calling the view() method over and other in his actions, he chooses to make a "template" view with each of the other calls to view() contained inside. Then you just pass in the data you want the view to render and call that template view. This also allows you to easily create a site-wide template.

0 comments voice your opinion now!
codeigniter framework organize view template container


Robert Basic's Blog:
Starting with Zend Framework - part 2
October 20, 2008 @ 13:54:25

Robert Basic has posted the second part of his introduction to the Zend Framework series (here's part one).

This post is the second part of my introductory text on Zend Framework, Starting with Zend Framework. This time I cover the basics about controllers, actions, view scripts and view helpers. On request routing and the Front Controller I will write one (or more) big post(s), so this part won't be explained now. I will also skip explaining the models; they deserve their own post.

He goes a step further and looks at Controllers - what they are and some intro steps to you making one of your own - and the parts around them, the views, actions and view helpers.

0 comments voice your opinion now!
zendframework tutorial series controller view viewhelper action


WebReference.com:
Controllers Programming Application Logic
September 29, 2008 @ 08:43:39

In this new tutorial from WebReference.com Ahsanul Bari walks you through one of the core parts of any application made in the CakePHP framework - the controllers.

Controller, the name suggests its job'"it controls, supervises, and manages. In CakePHP, controllers are the classes that handle browser requests and facilitate communication between models and views. It is the central hub where application logics are defined to control program flows of browser requests.

He talks about actions, working with models and interacting with views to pass the requested information out to the user. He also shows how to pass in parameters to the controller to give your application a bit more customization.

0 comments voice your opinion now!
controller cakephp framework model view application tutorial



Community Events









Don't see your event here?
Let us know!


developer zendframework framework example ajax mysql database book conference zend release application security PEAR code PHP5 releases job cakephp package

All content copyright, 2009 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework