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

Lithium Framework:
Getting Started
May 20, 2014 @ 16:54:05

On the SitePoint PHP blog there's a recent post walking you through your first steps with Lithium, one of the first frameworks that was targeted specifically at PHP 5.3.

Lithium is a lean but mean PHP framework (machine?) built for PHP 5.3 and up. It is designed to provide a good toolset for starting your web application, but one that is not too confining. Lithium uses the Model-View-Controller(MVC) architecture and this is what we are going to look at in this article. I will show you how it works and how you can define some of your application’s business and presentation logic using this framework.

They provide the example code you'll need to follow along with the tutorial over on GitHub, creating a basic content output system. The tutorial shows you how to create controllers, make views and connect models to the tables in your database. Finally they tie it all together and make a "page" function that fetches the content by ID and displays it out to the user.

tagged: lithium framework introduction php53 tutorial

Link: http://www.sitepoint.com/lithium-framework-getting-started/

Andrew Podner:
Lithium: Building Views Using Layouts
Feb 13, 2013 @ 17:54:04

Andrew Podner has written up a new post for his site today about building views/layouts in Lithium and make the maintenance of your application simpler in the long run.

The last time I wrote about the Lithium framework, the focus was on getting information out of a MySQL database. Once you have that information, in many cases you will want to show it to the user. In this installment, we are going to look at how Lithium implements layouts for your output in an effort to improve reusability of code, which ultimately improves the developer’s ability to quickly get applications up and running and it makes maintenance down the road that much easier.

He talks about the basic structure of an application (on the file system) and where the layouts and views live inside it. He includes a sample layout that defines areas for things like title, scripts, character set and main content. Code is also included showing how to use it in your application. There's also a bit about setting up a default layout in your "_init" method if you'd like to use it across the entire application.

tagged: lithium view layout tutorial framework

Link:

Andrew Podner:
Why Lithium is Worth a Look
Jan 02, 2013 @ 17:51:43

Andrew Podner has a new post to his site today sharing some of the things he discovered when looking into Lithium, a PHP framework that is "the first to break ground into major new technologies, including bridging the gap between relational and non-relational databases through a single, unified API."

Enter my New Year’s Resolution. I promised myself that I would pick up another framework this year and I had been introduced to Lithium at Codeworks in a presentation given by Elizabeth Naramore several months ago. So I downloaded it, and went through the obligatory blog tutorial, all of which seemed pretty straightforward.

He goes through a "checklist" of the things he'd need for his project (including autoloading, namespaces and integration with PHPUnit) and some of the "extras" he wanted hooks for during his development, several he was happy to find were already integrated. He does note a few places where the framework falls a bit short though, like in the quality of the user guide (it "needs some help") that seems incomplete in places.

That said, I still think it is worth the time and the effort to get to know Lithium better. The framework shows a lot of promise, and the architecture of it leaves me with the impression that the devs spent a lot of time thinking through what a developer needs to get the job done quickly.
tagged: lithium framework introduction

Link:

Voices of the ElePHPant Podcast:
Interview with Nate Abele
Nov 14, 2012 @ 15:13:53

The Voices of the ElePHPant podcast has published their latest interview with a PHP community member - this time it's Nate Abele of the Lithium framework project (as recorded in the

Cal's three questions talk mostly about his work on the Lithium framework

  • What started you on the road to building another framework?
  • What makes Lithium special?
  • What is your favorite piece of the framework?

You can listen to this latest episode either through the in-page player, by downloading the mp3 or subscribing to their feed.

tagged: voicesoftheelephpant nateabele community interview lithium framework

Link:

Engine Yard:
Introducing Lithium: The simple, fast and flexible PHP framework
Jul 20, 2012 @ 15:49:48

For those that have heard about the Lithium PHP framework but haven't gotten a chance to get into it, Engine Yard is hosting a webinar just for you. Nate Abele, one of the core developers for the framework, will be presenting an introduction to the framework on July 26th.

Lithium is a framework for PHP 5.3+ that is focused on quality, speed, and flexibility. It's a set of no-nonsense philosophies and tools that enable you to build better applications, in less time, without sacrificing quality or extensibility. Lithium understands distributed storage and caching, queuing systems, micro-dispatch frameworks, with integrated support for document oriented databases like CouchDB and MongoDB, alongside relational databases like MySQL and PostgreSQL. Lithium's architecture allows you to get your application up and running quickly, and still allows you to take control of the framework to support the requirements of your application.

If you're interested, you can sign up for the webcast on the Engine Yard site. The event happens July 26th at 10am PST.

tagged: lithium webcast introduction framework engineyard

Link:

EngineYard.com:
Cloud Out Loud Podcast - "Lithium and Boating"
Jun 15, 2012 @ 18:48:11

Engine Yard has released their latest "Cloud Out Loud" podcast episode - an interview with Garrett Woodworth, a member of the EngineYard development group and a founding member of the recently sponsored Lithium PHP framework.

On the heels of our Lithium sponsorship announcement, Elizabeth Naramore interviews Garrett Woodworth (fondly known as Gwoo) about the roots of Lithium, where it's going, and how he develops it on a boat.

They talk about why he contributes to Open Source, his involvement with the Lithium framework project and how he does most of his development from his boat. You can listen to this latest episode either on the in-page player or by grabbing the mp3 directly.

tagged: lithium podcast garrettwoodworth gwoo interview community lithium framework

Link:

EngineYard.com:
Cloud Out Loud Podcast - "Lithium and Boating"
Jun 15, 2012 @ 18:48:11

Engine Yard has released their latest "Cloud Out Loud" podcast episode - an interview with Garrett Woodworth, a member of the EngineYard development group and a founding member of the recently sponsored Lithium PHP framework.

On the heels of our Lithium sponsorship announcement, Elizabeth Naramore interviews Garrett Woodworth (fondly known as Gwoo) about the roots of Lithium, where it's going, and how he develops it on a boat.

They talk about why he contributes to Open Source, his involvement with the Lithium framework project and how he does most of his development from his boat. You can listen to this latest episode either on the in-page player or by grabbing the mp3 directly.

tagged: lithium podcast garrettwoodworth gwoo interview community lithium framework

Link:

Engine Yard Blog:
Engine Yard Sponsors the Lithium Framework
Jun 14, 2012 @ 18:25:58

According to this new post on the EngineYard blog, they've decided to become the official sponsor behind the Lithium PHP framework, a project that's been going for several years but just hasn't seen the adoption of other frameworks that are PHP 5.3-centric.

We are proud to announce that Engine Yard is now the first official sponsor of the open source project, the Lithium PHP framework. We believe that Lithium holds a great deal of promise and we want to help it reach its full potential. Therefore, not only are we pledging our financial support, we will be working together to promote the framework to our customers and partners and the community at large through conferences, meetups and webcasts.

The post names some of the core development team (including Garrett Woodworth and Nate Abele) and suggests following the Lithium and EngineYard twitter accounts for future details.

tagged: engineyard sponsor framework lithium community

Link:

Michael Nitschinger's Blog:
A primer on PHP exceptions
May 23, 2012 @ 14:17:41

Michael Nitschinger has a new post focusing on one of the more commonly used, but maybe just as commonly misunderstood, part of PHP - exceptions and their handling. His latest post looks at what Exceptions in PHP have to offer and provides some "best practices" in their use.

Exceptions are and should be an integral part of any general purpose programming language. PHP introduced them long ago (with the release of PHP 5 or 5.1), but it still seems that many of the concepts are not fully understood or ignored by the community. This post aims to be a solid introduction to exception architecture, handling and testing. At the end of the post you should be able to know when to raise an exception and how it should look like.

He talks about situations when (and when not) to use exceptions, normalizing them for easier try/catch-ing and includes the exception class hierarchy, including the types pulled from the SPL. He shows examples (based on the Lithium framework's namespacing) how to create "namespaced exceptions" and how to use these in a bit of sample code. He also mentions the use of the custom error handling with the ErrorException as well as a quick look at testing these basic and custom exceptions correctly (PHPUnit-based tests).

tagged: exception custom namespace tutorial primer unittest lithium

Link:

Michael Nitschinger's Blog:
Introducing Relationships in Lithium
Mar 05, 2012 @ 17:21:39

In this new post to his blog Michael Nitschinger introduces relationships in using the Lithium framework - functionality to link your models to each other to create dependencies.

The model relationship support in Lithium is one of the hottest topics on IRC lately, so I thought it would be a good idea to blog about it. Currently, Lithium supports 1:1 and 1:n relationships for relational databases. [...] This post gives you a little background on relationship types and their database representations before we implement a simple example in PHP.

He gives some code (and schema) examples of creating these relationships between tables for the two types - one to one and one to many. He also touches on the zero-to-zero relationships as well, nothing that they can be some of the most tricky to work with. He includes the SQL and the code you'll need to produce a blog example with models for Authors, Posts and Groups. Using the belongsTo/hasMany/hasOne variables he defines the relationships and uses the "with" keyword in the find calls to pull in those relations.

tagged: relationship lithium framework model database introduction

Link:


Trending Topics: