Powerstack PHP 5 web framework

33 views
Skip to first unread message

chtombleson

unread,
May 7, 2013, 6:57:25 PM5/7/13
to nzp...@googlegroups.com
New PHP 5 web framework Powerstack.

Currently in beta

Website: http://powerstack-php.org/
Github: https://github.com/powerstack/powerstack


Powerstack is a full featured framework that draws on some of the most popular frameworks out there. Powerstack mainly draws ideas from Dancer a perl web framework.

Powerstack includes a very powerful plugin and hooks system, this make it very easy to extend the core functionality or provide your own custom functionality.

The most interesting and cool thing in Powerstack is how you define your routes/urls. It uses a similar system to that in Dancer.
This makes creating Restful web applications easy and straight forward.


lenz

unread,
May 7, 2013, 7:33:38 PM5/7/13
to nzphpug
this looks neat. the only thing that put me off a bit was the XML config file but other than that it looks very close to dancer and mojolicious.

keep working on it, looks like a very nice approach.

cheers
lenz



--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

chtombleson

unread,
May 7, 2013, 9:20:36 PM5/7/13
to nzp...@googlegroups.com
Thanks Lenz

The xml config file wont be around much longer.
I'm currently going to replace it with yaml.

Keri Henare

unread,
May 7, 2013, 9:27:59 PM5/7/13
to nzp...@googlegroups.com
Is there a reason not to just use PHP for configuration? Seems like a good way to keep it light weight.

Kind regards,
Keri Henare
---------------------------------------------------
[e] ke...@henare.co.nz (mailto:ke...@henare.co.nz)
[t] @kerihenare
[w] kerihenare.com (http://kerihenare.com)
[m] (+64) 021 874 552


On Wednesday, 8 May 2013 at 1:20 PM, chtombleson wrote:

> Thanks Lenz
>
> The xml config file wont be around much longer.
> I'm currently going to replace it with yaml.
>
> On Wednesday, 8 May 2013 11:33:38 UTC+12, nor...@googlemail.com (http://googlemail.com) wrote:
> > this looks neat. the only thing that put me off a bit was the XML config file but other than that it looks very close to dancer and mojolicious.
> >
> > keep working on it, looks like a very nice approach.
> >
> > cheers
> > lenz
> >
> >
> >
> > On Wed, May 8, 2013 at 10:57 AM, chtombleson <chtom...@gmail.com (javascript:)> wrote:
> > > New PHP 5 web framework Powerstack.
> > >
> > > Currently in beta
> > >
> > > Website: http://powerstack-php.org/
> > > Github: https://github.com/powerstack/powerstack
> > >
> > >
> > > Powerstack is a full featured framework that draws on some of the most popular frameworks out there. Powerstack mainly draws ideas from Dancer (http://perldancer.org) a perl web framework.
> > > Powerstack includes a very powerful plugin and hooks system, this make it very easy to extend the core functionality or provide your own custom functionality.
> > > The most interesting and cool thing in Powerstack is how you define your routes/urls. It uses a similar system to that in Dancer (http://perldancer.org).
> > > This makes creating Restful web applications easy and straight forward.
> > > --
> > > --
> > > NZ PHP Users Group: http://groups.google.com/group/nzphpug
> > > To post, send email to nzp...@googlegroups.com (javascript:)
> > > To unsubscribe, send email to
> > > nzphpug+u...@googlegroups.com (javascript:)
> > > ---
> > > You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com (javascript:).
> > > For more options, visit https://groups.google.com/groups/opt_out.
> > >
> > >
> >
>
> --
> --
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to nzp...@googlegroups.com (mailto:nzp...@googlegroups.com)
> To unsubscribe, send email to
> nzphpug+u...@googlegroups.com (mailto:nzphpug+u...@googlegroups.com)
> ---
> You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com (mailto:nzphpug+u...@googlegroups.com).

chtombleson

unread,
May 7, 2013, 9:41:35 PM5/7/13
to nzp...@googlegroups.com
Good point.

I wanted get away from PHP based config files as they can become messy and hard to work with.

Ivan Kurnosov

unread,
May 8, 2013, 5:39:50 AM5/8/13
to nzp...@googlegroups.com
Why don't you like unit tests? ;-)

Ivan Kurnosov

unread,
May 8, 2013, 5:43:47 AM5/8/13
to nzp...@googlegroups.com
https://github.com/powerstack/powerstack/blob/master/lib/powerstack/core/filesystem.php#L106 -- hehe, this is really nice :-)


On Wednesday, May 8, 2013 10:57:25 AM UTC+12, chtombleson wrote:

Ivan Kurnosov

unread,
May 8, 2013, 5:52:19 AM5/8/13
to nzp...@googlegroups.com
And a resume from me (if anyone is interested): even though it's a good thing to write a custom framework from the scratch, but the most drawback for the community is that they are going to depend on a single person who won't have enough time to write documentation and fix bugs.

Sad but true - for newbies it's better to take a mature framework (they have better communities, more stable code and some "guarantee" to exist some more time);
for advanced developers it's better to take a mature framework as well (we all need stability, we're already done with experiments)

:-)

May be I'm very wrong, but if I needed something to build a small RESTful API app - I'd take silexphp or kohana; or ZF1/ZF2/Symfony2 otherwise


On Wednesday, May 8, 2013 10:57:25 AM UTC+12, chtombleson wrote:

Bruce Clement

unread,
May 8, 2013, 5:53:05 AM5/8/13
to nzp...@googlegroups.com



On Wed, May 8, 2013 at 9:43 PM, Ivan Kurnosov <zer...@gmail.com> wrote:
https://github.com/powerstack/powerstack/blob/master/lib/powerstack/core/filesystem.php#L106 -- hehe, this is really nice :-)


... but file_get_contents wasn't added until PHP 4.3.0

It's nice to know that users of php 4.2.0 will be fully supported if they work out how to get the namespaces and __construct()s accepted.

Also it's heartwarming to see how some thought has gone into return values

            if ($content === false) {
                return false;
            }

            return $content;

This way if $content is false, false will be returned instead of the value of $content.

--
Bruce Clement

Home:    http://www.clement.co.nz/
Twitter:    http://twitter.com/Bruce_Clement

"Before attempting to create something new, it is vital to have a good
appreciation of everything that already exists in this field." Mikhail
Kalashnikov

Ivan Kurnosov

unread,
May 8, 2013, 5:55:21 AM5/8/13
to nzp...@googlegroups.com, subsc...@gnuzealand.com
It's just an another incarnation of a classy

return $foo == $bar ? true : false;

Bruce Clement

unread,
May 8, 2013, 6:18:02 AM5/8/13
to nzp...@googlegroups.com

Perhaps. To me the main questions are "does the framework do what I need it to do in an efficient way where efficiency is measured both in developer effort and machine utilisation?" and "If this gets orphanned am I in a position to fork and maintain it myself?" the second one involves reading through the code a bit to decide if I can work with it.

If the framework isn't reasonably complete, knowing that there is a developer community behind it helps with the belief that the missing bits will be filled in but it also tends to lead to feature bloat. Having a single visionary person can lead to a leaner more efficient (developer/machine) framework.

Just my $2 worth.

Bruce

--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Simon Holywell

unread,
May 8, 2013, 6:23:34 AM5/8/13
to nzp...@googlegroups.com
This routing seems reminiscent of Slim (http://docs.slimframework.com/#Routing-Overview) and BulletPHP (http://bulletphp.com/docs/path-callbacks-handlers/). Or have I missed something?


--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

lenz

unread,
May 8, 2013, 6:32:54 AM5/8/13
to nzphpug
maybe interesting in this context: http://www.techempower.com/blog/2013/05/02/frameworks-round-4/

i especially like the symfony2 stats - sort of points out that a big community does not mean a speedy framework :-)

cheers
lenz

chtombleson

unread,
May 8, 2013, 4:55:07 PM5/8/13
to nzp...@googlegroups.com
Unit tests are coming. I have already written a few, I just need to tidy them up before commiting them.

Ivan Kurnosov

unread,
May 8, 2013, 5:05:31 PM5/8/13
to nzp...@googlegroups.com
https://github.com/powerstack/powerstack/blob/master/lib/powerstack/core/sessionsimple.php#L79 - oh :-S

why not `session_write_close()` when it's really necessary instead?

And `@` :-S


On Wednesday, May 8, 2013 10:57:25 AM UTC+12, chtombleson wrote:

chtombleson

unread,
May 8, 2013, 5:05:47 PM5/8/13
to nzp...@googlegroups.com
I have worked with a few PHP frameworks like Yii, Zend, Symfony 2, Codeigniter and Cake PHP.
They are all good frameworks and have their place but they can also be large and bloated.

The routing system is much like Slim. I don't believe Slim has an any routing function.

The reason for checking if file_get_contents function exists is because some shared hoting providers disable this function. I don't know why they do but some do from my experience.

The idea for the framework is to provide something light and easy to use and extend.
Currently I think it is those things. However I might be wrong and any feedback is good feedback.

Ivan Kurnosov

unread,
May 8, 2013, 5:09:49 PM5/8/13
to nzp...@googlegroups.com
And just a general thought:

in a framework it might be a good idea to convert all php native errors into exceptions, so that you didn't pretend everything is fine while it is not, like here:


If it was an exception you could handle it differently depending on if it was a race condition and directory already exists (it's fine), or there is no wright permissions and in that case further `file_put_contents()` will fail as well


On Wednesday, May 8, 2013 10:57:25 AM UTC+12, chtombleson wrote:

Ivan Kurnosov

unread,
May 8, 2013, 5:17:00 PM5/8/13
to nzp...@googlegroups.com
Hehe.

>> They are all good frameworks and have their place but they can also be large and bloated.

There is a valid reason for that - they are general purpose frameworks.

>> The idea for the framework is to provide something light and easy to use and extend.

Every framework initially was started as another-most-lightweight-ever, but the severe reality is - the more real projects the FW is used in - the more bloated it becomes. Just to be able to cover wide range of projects requirements.

>> The reason for checking if file_get_contents function exists is because some shared hoting providers disable this function. I don't know why they do but some do from my experience. 

Oh wow, that's stupid

Ivan Kurnosov

unread,
May 8, 2013, 5:31:46 PM5/8/13
to nzp...@googlegroups.com
Btw, this topic reminded me in old days when I was just started learning how to program properly (it was 2006). It was after I've read a bunch of books about proper OOAD, TDD and other weird acronyms.

https://github.com/iLobster/mzz - this is a another-originally-intended-to-be-super-light-and-flexible-framework, and I led it from 2006 to 2009 ;-)

https://github.com/iLobster/mzz/tree/master/src/tests/cases - there are even tests for it and the site is still alive http://mzz.ru/ (not sure who maintains it nowadays though)


On Wednesday, May 8, 2013 10:57:25 AM UTC+12, chtombleson wrote:
Reply all
Reply to author
Forward
0 new messages