[fw-general] FlashMessenger plugin, message type

2012-11-09 Thread Andreas Möller
Hello list,


may I ask why the FlashMessenger plugin does not support specifying the type of 
the message that has been added?


Best regards,

Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] FlashMessenger plugin, message type

2012-11-09 Thread Volkan Altan
Hi,

You can review this code...

http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=blob_plain;f=module/VuFind/src/VuFind/Theme/Root/Helper/Flashmessages.php;hb=HEAD

Volkan Altan
http://volkanaltan.com/
İyi  Çalışmalar.


On Fri, Nov 9, 2012 at 4:14 PM, Andreas Möller a...@softe.is wrote:

 Hello list,


 may I ask why the FlashMessenger plugin does not support specifying the
 type of the message that has been added?


 Best regards,

 Andreas
 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





Re: [fw-general] Executing manually built SQL queries - Is there an easier way?

2012-11-09 Thread Ralph Schindler



The third and forth lines (prepare*()  execute()) seem needlessly verbose.
Can't it be simplified down into a single execute() function on the Select
object?


On the select object, probably not.  The Select object by itself does 
not do SQL abstraction, only when prepared with a Sql object will you 
get SQL abstraction.  The Select by itself will produce 
ANSI-compatible-ish queries, specific to the adapter and the platform.


I think there is a feature request in there though.  Perhaps the Sql 
object could have an execute() which would be similar in nature to 
Zend\Db\Adapter\Adapter::query().  The downside is that you are throwing 
away the statement produced in favor of just the result.  While that may 
seem like what you're really after in most cases, this also means you 
cannot change a parameter in the ParameterContainer and then execute 
(again) and already prepared statement.




Finally, I get back some weird Result object which I need to do yet another
operation on before I can even access the query data in a useful way.
Again, it seems needlessly verbose and not very useful. ZF1 made this
pretty easy from memory.

I personally would love to write code like this:

 $sql= $table-getSql();
 $select = $sql-select()-columns(Array('count' = new
Expr('count(id)')));
 $results = $select-execute();

 \Zend\Debug\Debug::dump($results);


I will see about this.  It would look more like this though (just 
stabbing in the dark):


$select = $table-getSql()-select();
$select-columns(['count' = new Expr('count(id)')]);
$results = $table-getSql()-execute($select);

var_dump($results-toArray());

-ralph

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] FlashMessenger plugin, message type

2012-11-09 Thread Ludwig Ruderstaller
Hi,

i use the namespaces for it
https://gist.github.com/4046645

br
Ludwig


On 11/09/2012 03:14 PM, Andreas Möller wrote:
 Hello list,
 
 
 may I ask why the FlashMessenger plugin does not support specifying the type 
 of the message that has been added?
 
 
 Best regards,
 
 Andreas
 


-- 
CWD - Customized Web Development http://www.cwd.at
Ludwig Ruderstaller  l.ruderstal...@cwd.at
Sickenberggasse 11/17PGP ID. 3284892C
1190 WienTel. 0660 / 11 7 5 3 2 1

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Executing manually built SQL queries - Is there an easier way?

2012-11-09 Thread Stephen Rees-Carter
 I think there is a feature request in there though.  Perhaps the Sql
object could have an execute() which would be similar in nature to
Zend\Db\Adapter\Adapter::query().  The downside is that you are throwing
away the statement produced in favor of just the result.  While that may
seem like what you're really after in most cases, this also means you
cannot change a parameter in the ParameterContainer and then execute
(again) and already prepared statement.

 I will see about this.  It would look more like this though (just
stabbing in the dark):

 $select = $table-getSql()-select();
 $select-columns(['count' = new Expr('count(id)')]);
 $results = $table-getSql()-execute($select);

 var_dump($results-toArray());

Something like that would be perfect. It's nice and simple to understand
and means that if you just want to get the database result you can bypass
the extra steps.

Thanks,
~Stephen


On 10 November 2012 01:48, Ralph Schindler ra...@ralphschindler.com wrote:


  The third and forth lines (prepare*()  execute()) seem needlessly
 verbose.
 Can't it be simplified down into a single execute() function on the
 Select
 object?


 On the select object, probably not.  The Select object by itself does not
 do SQL abstraction, only when prepared with a Sql object will you get SQL
 abstraction.  The Select by itself will produce ANSI-compatible-ish
 queries, specific to the adapter and the platform.

 I think there is a feature request in there though.  Perhaps the Sql
 object could have an execute() which would be similar in nature to
 Zend\Db\Adapter\Adapter::**query().  The downside is that you are
 throwing away the statement produced in favor of just the result.  While
 that may seem like what you're really after in most cases, this also means
 you cannot change a parameter in the ParameterContainer and then execute
 (again) and already prepared statement.


  Finally, I get back some weird Result object which I need to do yet
 another
 operation on before I can even access the query data in a useful way.
 Again, it seems needlessly verbose and not very useful. ZF1 made this
 pretty easy from memory.

 I personally would love to write code like this:

  $sql= $table-getSql();
  $select = $sql-select()-columns(Array(**'count' = new
 Expr('count(id)')));
  $results = $select-execute();

  \Zend\Debug\Debug::dump($**results);


 I will see about this.  It would look more like this though (just stabbing
 in the dark):

 $select = $table-getSql()-select();
 $select-columns(['count' = new Expr('count(id)')]);
 $results = $table-getSql()-execute($**select);

 var_dump($results-toArray());

 -ralph

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/**archiveshttp://framework.zend.com/archives
 Unsubscribe: 
 fw-general-unsubscribe@lists.**zend.comfw-general-unsubscr...@lists.zend.com





-- 
Stephen Rees-Carter ~ Valorin
http://stephen.rees-carter.net/


[fw-general] ZF2 Documentation

2012-11-09 Thread Andreas Möller
Hello,


may I ask: is this

* http://shop.zend.com/en/zend-framework-fundamentals-2.html

the reason why the documentation for ZF2 is of the quality you can find at

* http://framework.zend.com/manual/2.0/en/index.html

. . . ?

In the time and with the money taken for these online classes, I believe a 
documentation could easily be compiled, couldn't it? 


Andreas



Re: [fw-general] ZF2 Documentation

2012-11-09 Thread Robert Basic
On 9 November 2012 22:51, Andreas Möller a...@softe.is wrote:

 Hello,


 may I ask: is this

 * http://shop.zend.com/en/zend-framework-fundamentals-2.html

 the reason why the documentation for ZF2 is of the quality you can find at

 * http://framework.zend.com/manual/2.0/en/index.html

 . . . ?

 In the time and with the money taken for these online classes, I believe a
 documentation could easily be compiled, couldn't it?


 I don't understand what are you getting at?


Re: [fw-general] ZF2 Documentation

2012-11-09 Thread Andreas Möller
Hello Robert,


 I don't understand what are you getting at?

What I am getting at is that I find the quality of the ZF2 documentation quite 
low and wonder whether it is this low in quality because Zend rather wants 
people to spend 1.200€ on a course that covers the basics of building 
applications with ZF2 than allocating resources for the generation of an end 
user documentation that will get people up and running. 

Let's be honest, the documentation is very poor - as is the layout and 
navigation of the website where it can be found at. The documentation of ZF1 
was much, much better and was good enough to build an application from scratch 
just by reading the documentation (even though it wasn't perfect). 

I'm aware that I as - an end user, that is, as someone who wants to use ZF2 to 
build applications with it - would be more knowledgeable if I could have taken 
the time and had become a contributor right from the start, or hang out on IRC 
channels all the time and read every email that has been sent on the mailing 
list, but: it seems impossible with a job and a private life and with the 
desire to read a book and sleep and go out every once in a while and what not 
to keep updated on all these channels and catch up with all the blog posts that 
are being written and I just really wish there was a decent documentation on 
the *why* and *how* of ZF2 components, that would help understand everything 
without giving me a big headache. 

I'm not sure if I'm the only one, but at the moment I feel not tempted very 
much, but pushed even more into buying one of these classes - only because of 
the lack of alternatives (as it seems). 

I really want to get going fast, but I can't take a month or two off work to 
study all the components and their source code. 

I feel lost. 


Best regards,

Andreas



--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF2 Documentation

2012-11-09 Thread Robert Basic
Some of my following words might be interpreted that I'm standing on Zend
The Company's side, but that's not the case.

On 9 November 2012 23:21, Andreas Möller a...@softe.is wrote:

 Hello Robert,


  I don't understand what are you getting at?

 What I am getting at is that I find the quality of the ZF2 documentation
 quite low and wonder whether it is this low in quality because Zend rather
 wants people to spend 1.200€ on a course that covers the basics of building
 applications with ZF2 than allocating resources for the generation of an
 end user documentation that will get people up and running.


Zend The Company is allocating a lot of money as it is. AFAIK, they have 3
people working full-time on ZF (1.x and 2.x!) - Enrico, Matthew and Ralph.
You can't blame Zend for trying to make some money out of it. Well, I
don't. I'm earning my bread with ZF's help for 3-4 years now. Also, they
are not the only ones making money out of it - there's a bunch of books you
can buy to help you learn (maybe for ZF2 not *yet*, but ZF1 had a bunch).
Heck, the most I learned about ZF1 was when I read Keith Pope's (aka
muteor) book.


 Let's be honest, the documentation is very poor - as is the layout and
 navigation of the website where it can be found at. The documentation of
 ZF1 was much, much better and was good enough to build an application from
 scratch just by reading the documentation (even though it wasn't perfect).


I personally read the docs up on readthedocs.org, or compile it on my own.
Much clearer that way. Granted, the ZF website layout is ... Interesting at
times. But hey, I think that's on Github now too, so suggestions are, I
believe, welcome there, too.



 I'm aware that I as - an end user, that is, as someone who wants to use
 ZF2 to build applications with it - would be more knowledgeable if I could
 have taken the time and had become a contributor right from the start, or
 hang out on IRC channels all the time and read every email that has been
 sent on the mailing list, but: it seems impossible with a job and a private
 life and with the desire to read a book and sleep and go out every once in
 a while and what not to keep updated on all these channels and catch up
 with all the blog posts that are being written and I just really wish there
 was a decent documentation on the *why* and *how* of ZF2 components, that
 would help understand everything without giving me a big headache.


No one's expecting from any one to be 100% in the code, on line, knowing
everything (well, maybe apart from Matthew, Ralph and Enrico ;) ). I,
personally, did my best to contribute to the docs when Matthew asked for
help. I hope it was worth it at least a tiny little bit. And after that, I
fell off the face of the Earth once again - life, work and beers got in the
way. Yes, it's difficult to keep up, yes, we'd all love a magic bucket of
knowledge to get poured in our brains, but that's just not how it works.
Damn, even after 4 years with ZF1 I *still* have bits and pieces that are
nothing but pure black magic for me.

As for contributing, sending PRs and fixing bugs and docs is not the *only*
way to contribute. There are easier ways to do it - you read that one
chapter on View Helpers and think Damn, I wish this would explain in a
better way how to write custom view helpers. Just go over to the Github
zf2-documentation repo and open a ticket with what's your issue with it.
Might not be fixed in 5 minutes, but sooner or later, someone *will* fix it.



 I'm not sure if I'm the only one, but at the moment I feel not tempted
 very much, but pushed even more into buying one of these classes - only
 because of the lack of alternatives (as it seems).


I won't recommend to buy it or not to buy it, as I have no idea about it's
contents or quality.



 I really want to get going fast, but I can't take a month or two off work
 to study all the components and their source code.

 I feel lost.


I need to ask you this - do you know ZF 1.x? Why am I asking this? Because
when I started learning ZF1 (1.4 I think it was back then), I felt
completely lost with it. I gave up saying something like Who needs this?
This is just a mess. I felt lost. Around 1.6 I had another stab at it.
Felt lost once again. Slowly, I ploughed through it. 1.7, 1.8... and the
rest is history. :)

Then ZF2 alphas, betas, RCs came out. Then stable. I was lost, once again.
Frustrated with that (and some other things as well), I wanted to quickly
port my ZF1 based blog to ZF2. And then I remembered how I felt when I
learned ZF1 and that eventually I *did* learn it. And I'm confident that
the same will happen with ZF2. I'm a fairly smart guy, I can learn it.
Granted, it will take time, but it's my own time I invest, into my own
knowledge.

The gist of this little trip down memory lane, is that, in my opinion,
don't expect to get the hang of it fast (where fast being days or weeks).
Don't rage quit after a day or two just because some stiff prick called

Re: [fw-general] ZF2 Documentation

2012-11-09 Thread Greg
I haven't tried to follow much recently. Honestly, until such time that I
see decent documentation pertaining to /config/application.config.php, I
won't be happy (and I'm not going to track down those who know to then
write it up). Sorry...

To explain, a couple months ago I tried to figure out how to specify my own
Application class, and naturally thought it can be easily done in global
config file, and trying to make it work drew me to a brick wall (if I
recall it was due to the ServiceListenerFactory), it turned out be a simple
one liner in modules/Application/config/module.config.php, by then I was
struggling to perceive the intentions and goals (reading the code doesn't
always clarify this any better). Either its a bug or needs documentation.

I'd like to see a configuration file with every single option specified
with comments, even if the option is commented out.

I realize that it will (hopefully) come out in the wash. Until then...

Regards,


-- 
Greg


Re: [fw-general] ZF2 Documentation

2012-11-09 Thread Marco Pivetta
@Greg if you want that done, you can start by opening a PR against the
files at
https://github.com/zendframework/ZendSkeletonApplication/blob/master/module/Application/config/module.config.phpand
https://github.com/zendframework/ZendSkeletonApplication/blob/master/config/application.config.phpto
add the required comments (or at least those for the things you think
are not clear enough).

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/



On 10 November 2012 06:29, Greg dev...@gmail.com wrote:

 I haven't tried to follow much recently. Honestly, until such time that I
 see decent documentation pertaining to /config/application.config.php, I
 won't be happy (and I'm not going to track down those who know to then
 write it up). Sorry...

 To explain, a couple months ago I tried to figure out how to specify my own
 Application class, and naturally thought it can be easily done in global
 config file, and trying to make it work drew me to a brick wall (if I
 recall it was due to the ServiceListenerFactory), it turned out be a simple
 one liner in modules/Application/config/module.config.php, by then I was
 struggling to perceive the intentions and goals (reading the code doesn't
 always clarify this any better). Either its a bug or needs documentation.

 I'd like to see a configuration file with every single option specified
 with comments, even if the option is commented out.

 I realize that it will (hopefully) come out in the wash. Until then...

 Regards,


 --
 Greg