Hi,
I'm (at most) a hobbyist-level PHP coder, I've read some of the
introductory documentation on Agavi and would like to ask a few
questions about it.
If you don't want to read my whole rant below you can just skip to the
questions at the bottom.
I'm interested in pursuing some principles that even a person with no
formal education like me can easily find of the uttermost importance.
For example I'd like to be able to design my applications following a
set of strict architectural principles that enforce modularity, loose
coupling and separation of concerns.
I understand that strictly following a set of valid principles won't
result in locking me (and my application) down but will have the
opposite effect. That is I'll be able to achieve higher versatility
with minimal work needed to face changing conditions. For example
changes in the data storage backend, in the presentation layer or even
on how the users interact with my application.
I have no real experience with any of the existing frameworks and
after looking into a few of them I came up with the "great" idea of
writing one myself. Obviously this is a mistake most beginners like me
do, they try to reinvent the wheel only to find out they made it
square :)
Honestly I'm not too worried about having to dump all my code every
once in a while.
I'm just a hobbyist and this would surely be a good (yet frustrating)
learning experience.
When I found out about Agavi I surely liked many of it's fundamental
points as I understood them:
- Versatility to have the application running in various environments.
- Strict guidelines to follow, avoiding huge mistakes should be easy.
- No built-in JS library, HTML templating system or ORM.
So I'm very tempted to look into Agavi.
Before starting though I'd like to ask you guys a few questions, they
are not particularly interesting but I would love to hear if I can do
what I want with Agavi without having to hack the sources.
I have no problem in changing some of my application code to make it
compatible with a new Agavi release. I understand that the project is
being developed continuously. I just want to make sure that I can
address a few requirements by only modifying my code without changing
Agavi's sources. I just don't have the time for this and I think that
doing so would be like defeating the purpose of relying on an
external product instead of writing your own.
So here we go:
- Suppose that I would like to have the ability to have a notice
thrown out to syslog whenever I place something like
Syslog::logMessage('Hi there!') in my code. Be it the model, view or
controller. How would be the sane way to obtain the same effect in
Agavi?
- If I'm not mistaken Agavi uses regexes for routing. Would it be easy
to simply use an array of values, say, for performance reasons?
- Is it hard to make sure that I get a "page" to show only on a single
URL, let's say for SEO sake? If I'm not mistaken in Zend Framework the
same default view is shown with /, /index/ and /index/index/. I would
like to avoid things like that.
- I use the following conventions for my PHP coding, what will I have
to change to work with Agavi?
mixedCamelCase for variables and methods
CamelCase for classes
lower_case_with_underscores for array keys
For filenames I use something like ClassName.class.php,
ClassName.config.php, InterfaceName.interface.php,
TemplateName.template.php and similar patterns.
- I have no experience at all with unit testing or PHPUnit which is
what Agavi supports and I think is the standard. If I write my code
following Agavi's guidelines can I be sure that it will be easy to
write tests for my code later on?
These are just a few quick questions that came up on my mind.
Having these requirements met in my own "framework" would be trivial
but then again I'm afraid to commit huge mistakes being an amateur
without getting the whole picture.
Basically I'm asking you guys to sell me on Agavi :)
BTW, how would you summarize how Agavi relates to contributors?
Is it easy to get contributions accepted into the code base? Assuming
that all the necessary standards you have defined are being respected,
that is.
Thanks for your time!
Mark
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users