News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Reddit.com:
Any ideas on what "MVC agnostic" PHP code is?
February 06, 2014 @ 10:43:59

On Reddit.com there's a recent post that asks for a bit of clarification about the term "MVC agnostic" as said by a potential employer:

A potential employer wanted to see some of my code before an interview. They originally asked for MVC or OO PHP that I'd written in the last 30 days - fair enough. [...] They've come back to me (via the recruitment agent) asking for some "MVC agnostic code" as no one on staff has worked with codeignitor before. Any ideas what they mean by this as I'm slightly stumped.

Most of the responses to the post suggest something that's becoming more and more of a trend in PHP development lately - framework agnostic development. Basically, this is creating functionality (usually in packages) that can be dropped into any application and used independently.

Other comments suggest other possible definitions like:

  • "This is the first time that I have heard someone mention "MVC agnostic" and on the face of it I would question their own understanding of the phrase."
  • "Yeah, the key bit in your question there was 'via a recruitment agency'. Half of the time, they haven't got a clue about the industry and so jargon gets tossed about something awful."
  • "I think it's more accurate to say that what they want to know is that you actually know PHP, and not merely a set of tools on top of PHP that make you productive in the way you prefer."
0 comments voice your opinion now!
mvc agnostic framework opinion package development example

Link: http://www.reddit.com/r/PHP/comments/1x2xea/any_ideas_on_what_mvc_agnostic_php_code_is/

Paul Jones:
"Page Script" As A Degenerate Controller
February 04, 2014 @ 12:26:52

In his latest post Paul Jones looks at the more legacy structure of "page controllers" (a site based on several pages rather than an MVC style) that was common before the "MVC revolution" in the PHP community years back.

Almost all of the legacy applications I've had to deal with were page-based. In doing the work to modernize them, there comes a time where the page script has been refactored to look very much like a page controller, with some distinct but not critical differences. As such, I have come to consider the typical PHP page script to be a degenerate form of a page controller. With a little imagination, I think it's easy to see why.

He talks about how, in this older situation, the web server becomes a sort of "simplified front controller+router+dispatcher" and the PHP page acts as a "controller". He suggests that, even though this structure isn't as well separated as an MVC application, it can still be organized to make it easier to maintain.

0 comments voice your opinion now!
page controller mvc legacy structure

Link: http://paul-m-jones.com/archives/5907

Zend:
Apigility Progress report zf-mvc-auth, packagist, and PHP's built-in web server
November 01, 2013 @ 15:52:11

In a new post to the Apigility forums today Matthew Weier O'Phinney has announced the release of an authentication/authorization component for the recently announced project from Zend. Apigility is a Zend Framework-based tool for easily constructing and managing an API.

We've been working hard on Apigility since ZendCon, and have released some more code into the wild. zf-mvc-auth exists to provide both authentication and authorization for your APIs; in fact, it's a bit of a general-purpose library for ZF2 MVC apps! Right now, we support HTTP basic and digest authentication out of the box, and will be working next on OAuth support. Authorization is done by default via ZendPermissionsAcl, as we discovered a problem with using RBAC: RBAC is deny-by-default, which does not work when you want an open-by-default schema. You may opt-in to deny-by-default, as well as mark individual services as requiring permission by default. Finally, you have the option of denying/allowing per HTTP method of a service as well.

You can find out more details about this functionality in this quick screencast. The zf-apgility module depends on this new zf-mvc-auth module, so it will be included and available by default in your APIs. In that same post Matthew also talks about the listing of the Apigility packages on Packagist service and a note for those wanting to use the built-in HTTP server to run the tool (a PHP version dependency).

0 comments voice your opinion now!
apigility progress zendframework mvc authentication authorization packagist http server

Link: https://groups.google.com/a/zend.com/forum/#!topic/apigility-users/_mOPkxxmGYI

Ben Youngblood:
MVC Is Not Enough
September 04, 2013 @ 09:12:25

Ben Youngblood has a new post to his site suggesting that MVC is not enough to build good, robust applications (PHP or not) just because a good portion of the frameworks implement it.

With few exceptions, any software engineer worth his/her salt have at least heard of the model-view-controller pattern. It's been around since it was introduced to Smalltalk in the late 1970s and has been a staple pattern in object-oriented languages for as many years. Nearly all the leading PHP frameworks include some form of MVC implementation. With so many frameworks and developers espousing its use, you would think it's the best pattern for building your application. And you would be wrong.

He's not suggesting abandoning MVC altogether for something else. He just wants a reexamination of how it's being used and how to improve the structure of the applications using it. One option is to adhere more to the SOLID principles, avoiding things like domain logic in controllers and "fat" models with too much logic.

Chiefly, MVC is one part of your application, not your application. If you find that you are building your domain logic inside models, views, or controllers, then you are abusing MVC. No substantive application can, or should, be made to fit inside MVC.
0 comments voice your opinion now!
mvc opinion solid principles improvement

Link: http://blog.bjyoungblood.com/2013/08/21/mvc-is-not-enough

PHPMaster.com:
Aura.Web Aura's Page Controller for MVC
June 05, 2013 @ 09:58:42

On PHPMaster.com today Hari K T has spotlighted one of the components from the Aura framework, the Aura.Web component.

MVC is an acronym that means Model-View-Controller. In this tutorial I would like to introduce you to Aura.Web, the controller component of the Aura Library. Here I'll show you how to use it to build your own controller, and also how to use a response transfer object to issue HTTP response headers, and integrate a templating engine like Mustache for rendering views.

He starts off with an overview of how the component is architected and how it is used to create controllers and what dependencies it needs injected. He talks about some of the objects and the methods they provide and includes some sample code for a basic "Index" controller. He shows how to integrate the Mustache templating engine for output and how to work directly with HTTP responses.

0 comments voice your opinion now!
auraweb aura framework page controller mvc tutorial introduction

Link: http://phpmaster.com/aura-web-auras-page-controller-for-mvc

Happy Accidents:
Orno Skinny Series Part 1 Building a RESTful API
March 19, 2013 @ 11:36:54

On the Happy Accidents site there's a new post talking about building a RESTful API (part one of the series) using the Orno dependency injection and MVC components.

have recently been writing a collection of PHP components exploring different design patterns for building applications. With the MVC layer close to completion I decided to write a couple of guides on how these components could be wired together to achieve several different application formats. First in this series will highlight the power of OrnoDi when used to resolve your objects, to do this we will be building a simple RESTful api with the minimal amount of configuration and bootstrap code.

He includes instructions to install the components (via Composer) and configure the DI container with the needed settings. He shows examples of the autoloading setup, how to handle the routing and how to create the sample model and controller to respond to the sample REST requests.

0 comments voice your opinion now!
rest api orno component mvc dependencyinjection tutorial


PHPMaster.com:
The MVC Pattern and PHP, Part 2
March 12, 2013 @ 11:19:03

PHPMaster.com has posted the second part of their MVC series, introducing you to the Model/View/Controller design pattern. If you want to catch up, part one is here.

Welcome to part 2 of this two-part series discussing MVC and PHP, where we'll discuss some of the considerations one must make when using an MVC architecture. If you've come straight to this article without reading part 1 first, I encourage you to head back and have careful read as this one will assume that you've read and understand everything it discussed.

He talks about some of the things more involved in making a MVC framework including routing and URL formats and working with templates. Sample code is included for the route handling, model/controller relationship and view classes for the templates.

0 comments voice your opinion now!
mvc designpattern introduction tutorial model view controller routing view


PHPMaster.com:
The MVC Pattern and PHP, Part 1
March 05, 2013 @ 13:21:32

If you're new to the world of PHP frameworks, there's one acronym that might confuse you if you don't understand the structure - MVC. In this new tutorial on PHPMaster.com today introduces you to the MVC (Model/View/Controller) design pattern and how it's commonly implemented in PHP.

The Model-View-Control (MVC) pattern, originally formulated in the late 1970s, is a software architecture pattern built on the basis of keeping the presentation of data separate from the methods that interact with the data. In theory, a well-developed MVC system should allow a front-end developer and a back-end developer to work on the same system without interfering, sharing, or editing files either party is working on. [...] In this article, I will go the basic principles of MVC, a run through the definition of the pattern and a quick example of MVC in PHP. This is definitely a read for anyone who has never coding with MVC before or those wanting to brush up on previous MVC development skills.

He starts with an introduction of the overall structure of the pattern, how each part talks with the others. He then talks about each piece in a bit more detail and provides some code examples for some very basic MVC classes. There's no routing or anything connected to them like there would be in a framework - it's just the classes taking the others in as parameters.

0 comments voice your opinion now!
mvc designpattern introduction tutorial model view controller


PHPMaster.com:
Create a Poll with PHPixie
February 05, 2013 @ 12:53:44

PHPMaster.com has a new tutorial posted showing you how to create a simple poll using the PHPixie PHP framework, a MySQL backend and a little bit of Javascript.

When choosing a PHP framework you need to make sure that it emphasizes features which are the most important to you. If you are looking for something fast, simple, and easy to learn than PHPixie may be a perfect choice. To illustrate the basics of developing with PHPixie we will create a small polling application. By the end of this tutorial you will have a working poll application and an understanding of how easy it is to code projects using PHPixie.

They provide you with all of the parts you'll need - the database table definition, the code for the modules/views/controllers and the Javascript to handle the addition of new options. You can find the full code on the PHPMaster github account.

0 comments voice your opinion now!
poll phpixie framework mvc tutorial javascript


PHPMaster.com:
PHP and the i, Part 2
January 24, 2013 @ 12:57:03

On PHPMaster.com today they've posted the second part of their "PHP and the i" series (here's part one). In this new article, he looks a bit closer at what kind of knowledge is needed to develop PHP on the IBM i.

In this somewhat risqué episode, we'll look at just what you need to be able to do development work on the i. Many people in the i world will that PHP is native to the i, but I don't think that's really true. To me, native means that it just runs, no problems or questions asked, nothing special needs to be done, it just sort of happens like when you see someone across a crowded room and know she/he is "the one". That's not the way it works with PHP and the i.

He starts off by talking about Zend and its contribution to the IBM i's abilities to run PHP through RPG thanks to a "bridge" they created. There are other options, but as he points out, they're not as well developed (or supported) as Zend's offering (being Zend Server, Zend Studio and Zend Framework).

He then talks about the details of creating and running scripts - where to put them, what kind of RPG knowledge you'll need to implement them, and which parts of the typical MVC stack work best where.

0 comments voice your opinion now!
ibmi systemi as400 development zend rpg mvc



Community Events











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


facebook application install code component package security overview podcast hack introduction opinion framework example symfony2 composer language hhvm unittest release

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