php-general Digest 12 Feb 2012 12:07:17 -0000 Issue 7685

Topics (messages 316571 through 316572):

Swiftlet is quite possibly the smallest MVC framework you'll ever use.
        316571 by: Elbert F
        316572 by: Simon Schick

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
I'm looking for constructive feedback on Swiftlet, a tiny MVC framework
that leverages the OO capabilities of PHP 5.3. It's intentionally
featureless and should familiar to those experienced with MVC. Any comments
on architecture, code and documentation quality are very welcome.

Source code and documentation: http://swiftlet.org

--- End Message ---
--- Begin Message ---
Hi, Elbert

I've looked through the code and found it quite tiny. I like that.

Until now I found some things that I'd like to discuss with you:

In the class App you're doing all the stuff (routing, calling the
constructor aso) in the constructor. Would it not be better to have
separate functions for that? I like the way I learned from using Java: The
constructor is only for initializing the variables you need to execute the
other functions of this class.
Of course you can have a function that then calls all those small functions
and maybe directly return the output.

I dislike the way you treat with the model .. currently it gets the
controller, the view and the app itself. If you ask me the model only needs
some configuration. I cannot come up with an idea where you'd need more
than a connection-string and some additional settings. The model has
several methods to gather the data that has been requested and gives it
back. If you'd ask me, there's no need for interaction with the app,
controller or view.

I'd like to see an option for the router like the one I've seen in symfony2
... that was quite nice .. There you can define a regexp that should match
the called url, some variables that should be extracted from that and some
default-variables. It's quite hard to explain in the short term, but take a
look at their documentation:
http://symfony.com/doc/current/book/routing.html

I'd like you to create a small workflow what your framework is doing in
which order. Your framework to me looks like this image:
http://imageshack.us/f/52/mvcoriginal.png/ But I'd rethink if this
structure would give you more flexibility:
http://betterexplained.com/wp-content/uploads/rails/mvc-rails.png

I hope you got some input here you can work with. I'd like to hear your
feedback.

Bye
Simon


2012/2/12 Elbert F <i...@elbertf.com>

> I'm looking for constructive feedback on Swiftlet, a tiny MVC framework
> that leverages the OO capabilities of PHP 5.3. It's intentionally
> featureless and should familiar to those experienced with MVC. Any comments
> on architecture, code and documentation quality are very welcome.
>
> Source code and documentation: http://swiftlet.org
>

--- End Message ---

Reply via email to