We've been working hard on a development branch of Zoop code-named Lunar, which is slated to become Zoop Framework 2.0. Lunar maintains most of the concepts and ideals of the current framework, but adds a whole lot more awesome.
The Zoop Framework was the first object-oriented MVC framework for PHP. It's been around since 2001, and was starting to show its age. The 2.0 branch of Zoop targets the latest versions of PHP—Lunar currently requires 5.2+. We have made an effort to maintain API compatibility where possible, so Zoop 1.x applications should run under Zoop 2.0, with a few adjustments.
We are quite stoked about everything that is going on, so I figured I would share a bit with you.
My personal favorite improvement is the ...
Faster Deployment the First Time, Every Time
Whether you're a Zoop newb, or a framework veteran, the new-and-improved skeleton app is worth checking out. The file structure is simplified and more intuitive. Thanks to some changes in Zoop's core dependencies, a barebones app works out of the box. Check out this brand new Zoop Lunar screencast ...
Going from barebones to full-featured is pretty simple too, thanks to Lunar's ...
Crazy Simple Configuration
I'll be honest with you, Zoop configuration could be a bit confusing. The Lunar branch now uses a cleaned up index.php to include components, combined with a super-slick YAML-based config library. Now your app configuration is conveniently located in one place, and it's easier than ever to figure out.
It's all about options. Zoop Lunar has removed a ton of hard-coded configuration, so you can tweak things to you heart's content... But we make sure to ship it with a sane set of defaults so you don't have to.
zoop:
gui:
# optionally, do a css reset and set base styles (thanks yui!)
use_css_reset: 0
use_css_base: 0
# define page regions and default templates
regions: [ header, sidebar, content, footer ]
primary_region: content
# wrap each region in a div with the region name as id?
add_region_divs: 1(This snippet is part of the config for the ...)
New and Improved View
The Gui layer has received a much needed update. It's easier than ever to theme and style Zoop. And despite all these improvements—or in some cases because of them—Lunar's Gui performs faster than any previous version of Zoop!
One of the most noticeable changes is the simplification of app templates. It is no longer necessary to build full templates for every zone, or to link header or sidebar templates in Smarty, thanks to the concept of regions.
Regions in Gui map to primary content areas of your site. Lunar ships with four: header, sidebar, content, and footer. Adding more—or removing them—is a cinch, and it can be done at runtime or app-wide in your config.
$gui->addRegion('right-sidebar'); $gui->removeRegion('content');
Regions are assigned default templates by your application, but these templates can be changed on a per-zone or per-page basis:
$gui->assignHeaderTemplate('shared/header.tpl');
There are even shortcuts for setting content in your regions. I wouldn't use this for the sidebar or main content regions, but you have to admit it is sweet:
$gui->assignFooter('Copyright © 2009 Example.org');
Adding CSS and JavaScript resources is now just as simple. You can do it in a Gui plugin, a zone or page or included library... Gui will make sure your files or Inline JavaScript make it on the page:
$gui->add_css('public/resources/css/style.css'); $gui->add_js('public/resources/js/custom.js'); $gui->add_jquery(); $gui->add_jquery('$("h1").eq(0).addClass("heading");');
And to set this bad boy loose, all you need is this (taken from the skeleton app):
function pageIndex() { global $gui; $gui->generate($this->canonicalizeTemplate('welcome.tpl')); }
Too simple? Wait until you see Lunar's ...
Next Generation Webforms
Zoop's automatic form generation bumps it up a notch in Lunar. The third generation forms component—confusingly named Formz—does more for you than ever before: CSRF protection, form validation, record relation management, and easy customization. And if you combine Formz with a Doctrine model, you pretty much don't have to do anything.
Just a few highlights:
// Create a Formz object based on the Users table of the database. $form = new Formz('users'); // Hide the password on the list view. $form->field('password')->setListshow(false); // Change the display label on this field (on list, read, or update pages) $form->field('username')->setDisplayLabel('User Name'); // Make the password field use the password field confirmation GuiControl $form->field('password')->setDisplayType('BetterPassword'); // Add an aggregate field. This is mostly useful for condensed list views. $form->addAggregateField('full_name', '%last_name%, %first_name%') ->after('username') // before() and after() methods make it easy to order your fields. ->setFormshow(false); // Hide it on form views (so it only shows on lists). // Add a fake field... It'll show up in the form, but won't actually mean anything. $form->addField('fake') ->setDisplayType('text') ->setDisplayLabel('This field does nothing.'); $form->guiAssign();
Then all you have to do is insert the form into a template for display:
{formz form=$users}
And Lunar harnesses the power of Formz to ...
Keep CRUD Real (Simple)
We found we spend quite a bit of time working on four basic content operations: Create, Read, Update and Destroy. So we built a CRUD-specific base controller to make this as seamless as possible. We even added a fifth option: List. Leveraging the power of Formz, CrudZone takes the hassle out of basic CRUD operations. At it's simplest form, CrudZone is almost magical. Check this out:
class zone_foo extends CrudZone { $tableName = 'users'; }
Yep. That's it. That's all it takes to build a user table CRUD controller. Sweet, huh? Of course you're not limited to that. You can customize the form output and configuration to your heart's content. Keep an eye out for a screencast highlighting the CrudZone and some of it's capabilities.
And speaking of upcoming blog posts, Steve says he's going to write one about ...
Zoop's Magical New Controller
Lunar has the makings of an API baked right into the controller. Content can be delivered in a number of formats simply by asking for it. It currently supports html, xml, json, csv, pdf, and xls, to name a few. When combined with CrudZone, this can make your site into a turnkey REST API.
With this powerful new controller, requesting data in an alternate format is as simple as this:
http://example.com/users/index http://example.com/users/index.json http://example.com/users/index.rss http://example.com/users/index.pdf http://example.com/users/index.csv http://example.com/users/index.xls ...
Just because the options are there doesn't mean you need to allow them. You can decide, at the app, zone, or page level, which formats to publish and which to accept as input. It's totally up to you.
To make your life easier, Zoop's controller now supports more flexible zone and page parameters, formatted as key:value pairs:
http://example.com/products/brand:acme/type:slingshot/price:0:3000 http://exmaple.com/images/size:thumbnail/effect:sepia/original.jpg
These parameters are available to controller at the zone or page level. Notice the price range parameter? That's pretty slick.
The controller isn't the only component getting a facelift. There's also Lunar's much-improved ...
Flexible—And Powerful—Authentication
Zoop's authentication back, better than ever. The updated Auth component uses a pluggable driver system to allow several back-end options. It currently supports DB, Doctrine, or YAML backed authentication. It features User, Group and Role authentication, and easy permissions with a group-based ACL. Plus, it's trivial to hook this into Zones and CrudZones for a very powerful app authentication.
And it can be powered by ...
A Powerful ORM, If You Want It
Lunar now uses the Doctrine ORM. Formz, CrudZone and Auth are each optionally backed by the most solid PHP ORM on the market. But only if you need the features.
That's our guiding principle. We make things powerful, magical, and configurable. Plus we try to include ...
A Healthy Serving of the Little Things
It's all the little things that make Zoop great. Core dependencies have been minimized, letting you launch your app with as little hassle as possible.
Things like how the all new FileUtils knows whether it can write that file or create that directory before it tries, allowing it to present a pretty message rather than spewing errors all over the place.
Things like environment checking when you first deploy your app, making sure temp and cache directories are set up.
Things like cleaning up POST and GET for you, and giving you easy ways to filter and validate user input.
Things like giving you a sweet preview version of Lunar to try! For free! All you have to do is click below ...
So Try it Out!
I've rolled a snapshot of Lunar for you to play with. Please note that this is a pre-alpha release. It's not feature complete. It's shouldn't be considered stable. So please don't build any mission critical apps on it yet, k?
Get Lunar. Have fun :)
Wait. "Pre-alpha"?
Yep. We're calling this version of Lunar a "pre-alpha". This means that most of the major features are in place and solid. We feel it's reached a point in its development that people can start building on it, can start using it and loving it. But it's definitely still under active development. We're adding features and tuning performance. In particular, here are a few things we're still working on:
- We're removing PHP 4 compatibility. We're sorry if this comes as a shock, but it's time to move on. Lunar requires PHP 5.2+
- On a related note, we're still cleaning out some stale code from older PHP versions. We'll keep refactoring and cleaning house, but we don't expect to see API changes as a result. Just faster, cleaner, more future-proof code.
- We have basic unit test support via Simpletest, but our test coverage is far from complete. We will continue adding testing between now and launch.
- While the new Gui resources (JavaScript and CSS file inclusion) are amazing, we're not done yet. We're adding aggregation, compression and caching across the board, allowing your pages to load faster than ever.
- The database backend (for Formz, etc) needs a good overhaul. It works, but it's got some dead weight that can be pruned. More testing needs to be done with other databases: We use MySQL and SQLite a lot, but need to do some testing on PostgreSQL, MSSQL, and more.
- There are some really amazing things happening with the controllers. They can now present content in a gazillion different formats (html, json, xml, csv, xls, pdf...), but we're still working on accepting input via all the new formats.
We're going to continue slipping in new features and capabilities in the coming months. Who knows, we might even add your favorite feature. Thanks for taking it out for a spin. Thanks for letting us know where the friction points are, and how it to make our favorite framework better.
SEO
its really a good writeup, would be interested to read such more informative draft from you ahead, can be a wonderful help to the new readers like me, also i want to share one more information with u that now days Facebook becomes good media to get website promotion. If you are corporation is definitely looking for internet marketing and advertising coupled with SEO and Search Engine Marketing, the following Social Media Marketing tool similar to personalized Facebook Fan Page will certainly allows plenty.
Thanks for this post! I’m
Thanks for this post! I’m always on the lookout for new on the stars. Keep posting!!!
Buy soma online
Very informative
This a good development of Zoop Framework 2.0. Complete explanation and instructions has been provided. Discovering new thing about it. I'm really expecting more on this. Actually there is a beginner's guide on this. The simplest words or commands to explain everything.
premature ejaculation treatment
I found the perfect place
I found the perfect place for my needs. Contains wonderful and useful messages. I have read most of them and has a lot of them. To me, he's doing the great work. Metal Ceilings
Affiliate Script
Contains wonderful and useful messages. I have read most of them and has a lot of them. To me, he's doing the great work.
Amazon Affiliate Script | Amazon Affiliate | Amazon Associate
Magnificent! I've been
Magnificent! I've been looking for some decent things on the subject and have had no luck at this point, you just got a big fan again!
Brochure Design
Its one of the good platform
Its one of the good platform for awareness of people. Keep sharing such stuff in the future too.
phlebotomy certification online
good
Your page is so fantastic! You sure do know how to keep your audience entertained. I'm so glad that I took the time to look at this blog, because let me tell you. posicionamiento en google
You say
Nice improvement, some useful features added - that's good. hyip monitor
Unfallversicherung
Unfallversicherung Vergleich
Günstige Unfallversicherung
Unfallversicherung Test
PKV Günstig
PKV Kinder
Point
Actually I agree to this point of view. best hyips High Yield Investment programs hyip investment hyip monitor hyip invest hyip investments hyip programs hyip rating
hyips monitor hyips monitoring hyips monitors hyip websites online investing online hyip paying hyips online investment top hyip
There is lot of articles on
There is lot of articles on the web about this. But I like yours more, although i found one that’s more descriptive. I had a small chunk of land and didn’t know how to make use of it properly. Computerhulp
Nice blog
Thanks for the awesome article here. I am a huge fan of design so it is really interesting for me to read such stuff. I just hope to see more such nice articles.!
bloons tower defense games
breast enlargement Brisbane
Pretty good post. I just bookmarked your blog and wanted to say that I have really enjoyed reading your blog posts. I agree with most of the questions that you have said and I’m waiting for new posts.Thanks for Posting.
http://www.breast-surgery-brisbane.com.au
Austin Home Builder
Two components that were not covered in the "brief overview" are a collection of templates that help build the database and registry pages.Austin Home Builder
virtual world
I believe that is a very good blog site, and I am extra fascinated to read it. I hope you provide additional information which happens to be great for just about all. many thanksvirtual world
VIP wristbands
Promotional products can make events great, gifts remembered, messages heard and an opportunity for your brand to come to life. Reach out to your audience in a less formal way.VIP wristbands
I wonder how you got so
I wonder how you got so good. This is really a fascinating blog, lots of stuff that I can get into. relatiegeschenken
I wanted to thank you for
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.
mayweather vs ortiz and pacquiao vs marquez 3
Good luck getting people
Good luck getting people behind this one. Though you make some VERY fascinating points, you're going to have to do more than bring up a few things that may be different than what we've already heard.
medical air transport
Thanks a lot for the
Thanks a lot for the informative and interesting publication first of all. Actually I was looking Duct Cleaning for this information for a long time and finally have noticed this your entry.
fantastic
When I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service? Thanks!
Singapore Company Set Up
Yes I use Zoop quite
Yes I use Zoop quite frequently.While I feel like I am pretty skilled int his area.It is nice to refer to this beginners guide.I refer to it frequently when I have questions to know.I actually used it the other day when I needed help with building a PHP contact form.
funeral eulogy
Eine einfache
Eine einfache Berufsunfähigkeitsversicherung Stiftung Warentest abschliessen.
Re:
I finally found the information matching my criteria. This will really help me in completing my task easily and on time. Thanks for sharing. power scooters
Good thing that you post
Good thing that you post something that we could learn from.In deed,it is very helpful to us.
Simco Saddles
Can someone give me
Can someone give me information on this??? Where is this being filmed??? I think I'm lost someone help me : )
BestBit
Its one of the good platform
Its one of the good platform for awareness of people. Keep sharing such stuff in the future too.
Seo
great
This blog has definitely changed my perspective on this subject. There's no way I would've thought about it this way if I hadn't come across your blog. All I was doing was cruising the web and I found your blog and all of a sudden my views have changed. Good on you, man!
hyperpigmentation treatment
Hausrat Hausrat Hausrat Hausr
Hausrat
Hausrat
Hausrat
Hausrat
Hausrat
Hausrat
Hausrat
Hausrat
Hausrat
Hausrat
Hausrat
Hausrat
nice
Thanks for writing this. I really feel as though I know so much more about this than I did before. Your blog really brought some things to light that I never would have thought about before reading it. You should continue this, I'm sure most people would agree you've got a gift.
mit was Geld verdienen
good
I have recently started using the blogengine.net and I having some problems here? in your blog you stated that we need to enable write permissions on the App_Data folder...unfortunately I don't understand how to enable it.
tax attorney
I'm surprised at the way in
I'm surprised at the way in which this conversation has been conducted. Professional disagreement is fine, but there is a time and place. Does anyone agree?
Austin Stucco Contractor
For me works just fine. I am
For me works just fine. I am really impressed. It is so easy to do it. online job
Brilliant is what I would
Brilliant is what I would rate this information! It turned out well delivered and well received. It was easy to read and very much valued. Many thanks!
prezzi chitarre
The amount of data that I
The amount of data that I get is truly great. This is an good masterpiece.
Company formation| Web Designing
Cool! I love your site. Very
Cool! I love your site. Very well done. Thanks for organizing everything to where I can find it easier. Keep up the good work! I love it!
Regards,
Epoxy Flooring
thanks
Your thoughts are amazing. Your blog, not so much. I don't want to disrespect you, just hear me out. Add a little something here. What you're saying is so important it'd be a shame if people missed it because they were bored to death.
Singapore Virtual Office
Great info
Hi there,
Really nice job,There are many people searching about that now they will find enough sources by your tips.
Also looking forward for more tips about that
Regards,
www.genericsmed.com
Zoop Framework 2.0
Thank you so much for posting this informative article. The video tutorial is great as it really explains well the steps and using Zoom Framework 2.0 is quite very handy.
Toronto Web Design
perfect
I must say, you've got one of the best blogs I've seen in a long time.
Phoenix divorce attorney | debt relief Mesa
Rente Rente Rente Rente Rente
Rente
Rente
Rente
Rente
Rente
Rente
Rente
Rente
Rente
Rente
Rente
Rente
Zoop Framework 2.0
Thank you so much for posting this informative article. The video tutorial is great as it really explains well the steps and using Zoom Framework 2.0 is quite very handy.
Toronto Web Design
I think you did an awesome
I think you did an awesome job explaining it. Sure beats having to research it on my own. Thanks
ecommerce| web designer
Girokonto-Wechsel
Girokonto-Wechsel machen
Kreditkarten wechseln
Onlinekonto
Girokonto
Kreditkarte kostenlos bekommen.
nice
I've got to say, the layout alone made me come back to this blog again. But now that I've read what you've got to say, I've got to share it with the world!
antenna installation
Always so interesting to
Always so interesting to visit your site.What a great info thank you for sharing this will help me so much in my learning.
Ecommerce| Liposuction
What you write is pretty
What you write is pretty good. They are good for our readers to know. Thanks for posting
hosting| ecommerce
you have excellent writing
you have excellent writing skills... It is easy to follow your advices. mixed wrestling
Hausversicherung Hausversiche
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung
Hausversicherung