php-general Digest 23 Jul 2011 15:49:55 -0000 Issue 7412

Topics (messages 314168 through 314169):

Re: dependency check
        314168 by: Alex Nikitin

Re: PHP frameworks
        314169 by: mrfroasty

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 ---
On Fri, Jul 22, 2011 at 3:09 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk>wrote:

> **
> On Fri, 2011-07-22 at 09:51 -0400, Alex Nikitin wrote:
>
> It would still be quicker with shell tools, imho, granted that some command
> line elitistry would be required... Also if you are going to be doing string
> parsing and manipulation, and string parsing here is all that you are doing,
> there would be no better language than perl to do it with, granted i dont
> like perl and prefer python or php or ruby to it, but when you have a lot of
> string manipulation, perl has no rival i have used yet, though i guess if
> awk were combined with sed, there would be some potential...
>
> --
> The trouble with programmers is that you can never tell what a programmer is
> doing until it’s too late.  ~Seymour Cray
>
>
>
> On Fri, Jul 22, 2011 at 9:33 AM, Nilesh Govindarajan
> <cont...@nileshgr.com>wrote:
>
> > On 07/22/2011 06:56 PM, Alex Nikitin wrote:
> > >
> > >
> > > Or you could just grep the directory, not saying you have to do this,
> > > but this was kind of fun to write anyways, if i spent more time on it, i
> > > could perfect it, but i dont have that kind of time, so this will still
> > > give you a few doubles, but it shouldn't give you false-positives as
> > > long as you have all the extensions in that grep regex (and you cant
> > > make it more generic without introducing false-positives)...
> > >
> > > grep -oiPR "[a-zA-Z0-9]+\.(php|js|png|
> > > jpg|css|htm|html)" directory | awk 'function getfiles(input, files, i,
> > > n, file) {result = ""; n=split(input, files, ":"); for(i=0; i<=n; i++) {
> > > if(files[i] !~ /^\s*$/) print files[i];}} {getfiles($0)}' | sort -biu
> > >
> > > This should give you all the files that reference files and the files
> > > they reference.
> > >
> > > --
> > > The trouble with programmers is that you can never tell what a
> > > programmer is doing until it’s too late.  ~Seymour Cray
> > >
> >
> > It is possible to use the shell tools, but it is a big trouble to handle
> > spaces and special characters in shell scripting if your filenames have
> > them, quite rare with self created applications, but you can't say, and
> > hence I suggested python/php script method.
> >
> > --
> > Regards,
> > Nilesh Govindarajan
> > @nileshgr on twitter/identica
> >
>
>
>
> The only problem you may run into is an include that's part of a logic
> branch in your code that never gets called under any circumstance (maybe the
> logic changed and you no longer require a certain set of functions for
> example)
>
> It's also possible that your bigger problem isn't rogue files that aren't
> being used but files with lots of unused functions, unused class methods,
> etc. Sometimes the only way to find those is by tracing back all the way
> from each function/method in turn.
>
>   --
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
You could actually automate that as well, all your functions are defined
with a function definition, you would build a table of functions and then
traverse the code searching for these functions. Chances are you would have
the majority of functions traced. This leaves out dynamic functions, eval
and some magic methods, dynamic functions and eval are not the best of ideas
to begin with, though i admit, i have had to use them before. But it's not
to say that this would be impossible to solve. There are other ways to do
this too which would be a bit more involved...


--
The trouble with programmers is that you can never tell what a programmer is
doing until it’s too late.  ~Seymour Cray

--- End Message ---
--- Begin Message ---
Investing your time on Zend Framework is worth it.I do mostly php
development under Magento Platform, and Zend Framework becomes one of
the vital skills I need.Apart from that, ZF is also a well thought
Library that is a joy to work with.As one mentioned, the best part of it
it gives the option to just use what you need and leave the rest stay put.

I always think, only if those devs of Wordpress,Joomla etc have invested
time in ZF we would have a much matured CMS systems today.I am not
saying WordPress is not good, but its known to have lots of security
issues due to poor framework behind it.

Wasalaam,
Muhsin

On 07/22/2011 11:56 AM, Richard Quadling wrote:
> On 21 July 2011 23:56, Shawn McKenzie <nos...@mckenzies.net> wrote:
>> On 07/21/2011 03:59 PM, Chris Stinemetz wrote:
>>> Hello all,
>>>
>>> I am thinking about venturing into PHP frameworks, but I would like to
>>> get advice on what the correct selection would be for someone that is
>>> about intermediate in PHP knowledge.
>>>
>>> Thank you,
>> So, with your post you will probably get one or more replies suggesting
>> every one of the popular frameworks and then several that suggest some
>> lesser known ones.
>>
>> I think Zend looks great, but for many people (including me) it is
>> overly complex and cumbersome. Â It is a very professional and
>> standardised class library, but has no "glue" to put it all together for
>> you. Also, it takes OOP to the extreme (for PHP anyway). Â Everything has
>> abstract classes, interfaces and the like.
>>
>> CI is good from a lightweight, gives you something to build on perspective.
>>
>> I however prefer CakePHP. Â Its been around for a while, it can
>> automatically build an app from just a well designed database and
>> doesn't require configuration files in XML, YAML or what have you. Â The
>> documentation is OK and could be much better.
>>
>> It really depends on what you want out of the framework. Â I would
>> suggest going through the CakePHP and CI tutorials and seeing which one
>> seems like a good fit for you.
>
> I use a combination of Zend Framework (Soap and Config), PEAR (for
> Console_CommandLine) and my own code developed along the lines of Zend
> Framework.
>
> I think the "What framework is best" question can be partially
> answered by asking which framework allow you the greatest degree of
> flexibility.
>
> I don't have to use any part of Zend that I don't want. Same with PEAR.
>
> Having said that, none of these frameworks will write your app for
> you. Others may, based upon various rules or file structures.
>
>
>


-- 
Extra details:
OSS:Gentoo Linux
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,PHP,SQL,HTML
Typo:40WPM
url:http://www.mzalendo.net
url:http://www.zanbytes.com




--- End Message ---

Reply via email to