php-general Digest 23 Mar 2009 02:53:18 -0000 Issue 6027

Topics (messages 290532 through 290554):

Re: Web Development/Application Analysis
        290532 by: George Larson
        290539 by: Bob McConnell

Frameworks Which Have A "Bake" Function?
        290533 by: Nitsan Bin-Nun
        290535 by: Nitsan Bin-Nun
        290538 by: Phpster
        290541 by: Tony Marston
        290542 by: Tony Marston

MYSQL TABLES (One To Many Relationship)
        290534 by: abdulazeez alugo
        290540 by: tedd

quick question - need a site i can more or less copy from
        290536 by: bruce

webmin mods..
        290537 by: bruce
        290543 by: Michael A. Peters

Re: Having trouble with a form to mail script.
        290544 by: Linda Stark
        290551 by: dg

[SOLVED] How do you use php-gettext?
        290545 by: Michelle Konzack
        290553 by: Michelle Konzack

Frameworks / obstinate?
        290546 by: Daniel Kolbo
        290547 by: Robert Cummings
        290550 by: Shawn McKenzie
        290552 by: Marc Christopher Hall
        290554 by: Daniel Kolbo

Re: how to make multiple sql run faster
        290548 by: Chris

Re: DOMElement - attributes and namespace
        290549 by: Michael A. Peters

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
2009/3/22 OOzy Pal <[email protected]>

> On Sat, Mar 21, 2009 at 6:33 PM, tedd <[email protected]> wrote:
> > At 6:15 PM +0300 3/21/09, OOzy Pal wrote:
> >>
> >> Tedd,
> >>
> >> You wrote a long story about a client hiring a programmer which not
> >> what I am asking.
> >>
> >> Anyhow, thank you for your post. I learned from it.
> >>
> >> I don't want to take it further. This php mailing list.
> >
> > Really -- is that what this is?
> >
> > I thought it was a place where people could ask:
> >
> > -- quote
> > I have just hired a remote PHP programmer. His main job is web
> > development and applications.
> >
> > I have few concerns, I would be happy if someone can point me to the
> > right direction.
> >
> >   1. How can I provide him the requirements. I mean how can I analyze
> > the site and put everything in writing.
> >   2. How can I estimate manhours.
> > -- unquote
> >
> > For which I provided advice and example, which apparently fell on deaf
> ears.
> >
> > As such, I won't waste my time entertaining any other questions from you.
> >
> > Cheers,
> >
> > tedd
> >
> > --
> > -------
> > http://sperling.com  http://ancientstones.com  http://earthstones.com
> >
>
> Again, I thank you for your post. It was beneficial.
>
> If I may ask you to use the time that you will not use for asnwering
> my questions in reading about relaxation politness.
>
> No matter what type disagreement happend between any two, that does
> not give any one of them the right to insult the other.
>
>
> --
> OOzy
> Ubuntu (8.10)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Oozy,

Lighten up, brother.  I read your original question and I thought "This guy
shoulda started asking these questions before her started hiring people."
Tedd invested time, thought and energy in to giving you a quality response.
I don't have the kind of field experience to give you an answer of that
caliber.  I personally felt that I benefited from reading Tedd's response to
you, so it shouldn't have been too difficult for you to gain from it.

After that, you announced yourself the owner.  It may have escaped your
scrutiny, but the kind people that hang out here trying to assist people
with their PHP challenges are *NOT* here to do your job for you.  That, in
my opinion, is what you asked.  "I've started a business and hired a
programmer.  Now somebody please explain to me how to be his boss, otherwise
it is going to be a difficult week."

Then you deal a really uninventive insult ("my questions in reading about
relaxation politness.") to a guy who has shown vast amounts of patience and
politeness to both, you, and the other's that he has helped -- if you've
been watching.

Then you wrap it up with the decree "No matter what type disagreement
happend between any two, that does not give any one of them the right to
insult the other." which is particularly rubbish following the sentence
where you insulted Tedd.  Also, you will find that people do, in fact, have
the right to insult each other with, or without, disagreement.  This is
something that you'll observe quite readily by hanging out on the PHP list.

So far, imo, everybody has been pretty nice to you.  So why don't you go
spend some times with those books about 'relaxation politness' and stop
pitching what you ain't prepared to catch?

--- End Message ---
--- Begin Message ---
From: Stuart
> 
> Now that's done, it's Mothers Day here in jolly old England, and I
> have a phonecall to make!

Hi Stuart,

Thank her for us while you're on that call. You turned out pretty well,
so I think she done good.

Bob McConnell

--- End Message ---
--- Begin Message ---
Hi Guys,

I have been using cakephp for a while as a development framework.

I'm also thinking for a while to use another framework and leave cakephp
alone (too much babbling.. it takes too much time until you get to the code
itself..), now I have decided to move on and here comes my question.

Do you have any suggestions on frameworks which have something similar to
the cakephp's "bake" function? (you create your database tables structure,
run bake.php from ssh and kaboom! you have model/view/controller for each of
the tables: insert, delete, modify, list data).

I know it is possibile in ROR but never heard of any other framework or
development library or anything like that in php except cakephp that gives
you this functionallity.

Thanks in Advance,
Nitsan

--- End Message ---
--- Begin Message ---
Don't forget to attach the message to the list.

Regarding the frameworks, which of them, for your opinion, will take the
fastest time to learn and get into code?

Thanks

On Sun, Mar 22, 2009 at 5:59 PM, Graham Christensen <
[email protected]> wrote:

> Look into Doctorine &|| Propel, they both will take a db structure ->
> models. Symfony might be worth looking at, you can tell it to create a basic
> view/controller for them as well.
>
> Graham
>
> On Mar 22, 2009, at 11:52 AM, Nitsan Bin-Nun wrote:
>
>  Hi Guys,
>>
>> I have been using cakephp for a while as a development framework.
>>
>> I'm also thinking for a while to use another framework and leave cakephp
>> alone (too much babbling.. it takes too much time until you get to the
>> code
>> itself..), now I have decided to move on and here comes my question.
>>
>> Do you have any suggestions on frameworks which have something similar to
>> the cakephp's "bake" function? (you create your database tables structure,
>> run bake.php from ssh and kaboom! you have model/view/controller for each
>> of
>> the tables: insert, delete, modify, list data).
>>
>> I know it is possibile in ROR but never heard of any other framework or
>> development library or anything like that in php except cakephp that gives
>> you this functionallity.
>>
>> Thanks in Advance,
>> Nitsan
>>
>
>

--- End Message ---
--- Begin Message --- Qcodo and symfony both have an ORM layer that can do that. They will provide/return and basic set of classes that interact with those tables.

Bastien

Sent from my iPod

On Mar 22, 2009, at 11:52, Nitsan Bin-Nun <[email protected]> wrote:

Hi Guys,

I have been using cakephp for a while as a development framework.

I'm also thinking for a while to use another framework and leave cakephp alone (too much babbling.. it takes too much time until you get to the code
itself..), now I have decided to move on and here comes my question.

Do you have any suggestions on frameworks which have something similar to the cakephp's "bake" function? (you create your database tables structure, run bake.php from ssh and kaboom! you have model/view/controller for each of
the tables: insert, delete, modify, list data).

I know it is possibile in ROR but never heard of any other framework or development library or anything like that in php except cakephp that gives
you this functionallity.

Thanks in Advance,
Nitsan

--- End Message ---
--- Begin Message ---
"Nitsan Bin-Nun" <[email protected]> wrote in message 
news:[email protected]...
> Hi Guys,
>
> I have been using cakephp for a while as a development framework.
>
> I'm also thinking for a while to use another framework and leave cakephp
> alone (too much babbling.. it takes too much time until you get to the 
> code
> itself..), now I have decided to move on and here comes my question.
>
> Do you have any suggestions on frameworks which have something similar to
> the cakephp's "bake" function? (you create your database tables structure,
> run bake.php from ssh and kaboom! you have model/view/controller for each 
> of
> the tables: insert, delete, modify, list data).
>
> I know it is possibile in ROR but never heard of any other framework or
> development library or anything like that in php except cakephp that gives
> you this functionallity.
>
> Thanks in Advance,
> Nitsan

All this is possible with the Radicore framework, but it is more 
sophisticated. It requires the following steps:
(1) Import your database table structures into the Data Dictionary (see 
http://www.tonymarston.net/php-mysql/data-dictionary.html and 
http://www.tonymarston.net/php-mysql/menuguide/appendixn.html)
(2) Export each database table to produce the class file for that table.
(3) Generate a task by choosing a database table and a Transaction Pattern 
(see http://www.tonymarston.net/php-mysql/dialog-types.html). The list of 
transaction patterns which are available is more extensive than the basic 
list, search, create, read, update and delete.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org



--- End Message ---
--- Begin Message ---
"Nitsan Bin-Nun" <[email protected]> wrote in message 
news:[email protected]...
> Don't forget to attach the message to the list.
>
> Regarding the frameworks, which of them, for your opinion, will take the
> fastest time to learn and get into code?

Generally speaking if something is fast to learn it is also the first to run 
out of steam. If it doesn't have more features than you can learn in five 
minutes the it doesn't have enough features to do anything useful, or with 
any degree of flexibility.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org


> Thanks
>
> On Sun, Mar 22, 2009 at 5:59 PM, Graham Christensen <
> [email protected]> wrote:
>
>> Look into Doctorine &|| Propel, they both will take a db structure ->
>> models. Symfony might be worth looking at, you can tell it to create a 
>> basic
>> view/controller for them as well.
>>
>> Graham
>>
>> On Mar 22, 2009, at 11:52 AM, Nitsan Bin-Nun wrote:
>>
>>  Hi Guys,
>>>
>>> I have been using cakephp for a while as a development framework.
>>>
>>> I'm also thinking for a while to use another framework and leave cakephp
>>> alone (too much babbling.. it takes too much time until you get to the
>>> code
>>> itself..), now I have decided to move on and here comes my question.
>>>
>>> Do you have any suggestions on frameworks which have something similar 
>>> to
>>> the cakephp's "bake" function? (you create your database tables 
>>> structure,
>>> run bake.php from ssh and kaboom! you have model/view/controller for 
>>> each
>>> of
>>> the tables: insert, delete, modify, list data).
>>>
>>> I know it is possibile in ROR but never heard of any other framework or
>>> development library or anything like that in php except cakephp that 
>>> gives
>>> you this functionallity.
>>>
>>> Thanks in Advance,
>>> Nitsan
>>>
>>
>>
> 



--- End Message ---
--- Begin Message ---
Hi guys,

 

I need help on something I'm working on and its really eating me up so I'll 
appreciate any help I can get on it.

I'm writing code for a site that posts a topic for discussion and accepts 
comments (Just like a parliament).

There are different discussions for every day and the comments should be 
displayed along with the corresponding topics per day.

Now I wrote the code below but dont know if I'm right. (I created two tables in 
my database and to create a relationship between the tables, I put the id field 
for the topics into the comments table):

 

<?php

function getpost_comments()

{

global $conn; //This gets the database started (already defined)
 $result= mysql_query("SELECT * FROM Pcomments, Parliaments WHERE 
Pcomments.pcomment_id=Parliaments.parliament_id");


 if (!$result) print mysql_error();
 else {
 while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
 print "$row[name] - $row[comment]<br/>\n";
 }
 }
} 

 

?>

 

I know some of you will probably think its a stupid question but I'm going with 
the school of thought that says the only stupid question is the one that's not 
asked.

 

Thanks in anticipation of your positive responses.

 

Alugo Abdulazeez

www.frangeovic.com.

_________________________________________________________________
Show them the way! Add maps and directions to your party invites. 
http://www.microsoft.com/windows/windowslive/products/events.aspx

--- End Message ---
--- Begin Message ---
At 5:04 PM +0100 3/22/09, abdulazeez alugo wrote:
Hi guys,

I need help on something I'm working on and its really eating me up so I'll appreciate any help I can get on it.

I'm writing code for a site that posts a topic for discussion and accepts comments (Just like a parliament).

There are different discussions for every day and the comments should be displayed along with the corresponding topics per day.

Hi Alugo:

I wrote a similar thing for my site, see here: http://sperling.com

As you can see, on most pages people can add comment.

Considering such, the most important part I found was designing the tables for the database. I used two tables, which follow showing fields:

COMMENTS table
Fields
id <-- auto-increment id for comments
post_time  <-- time of this post
poster_id  <-- the id from the POSTERS table
page  <-- the page the poster commented on
comment  <-- the actual comment made by the poster
notify_me <-- an option for the poster to select IF they want to be notified of additional posts
approved <-- option for me to use if I want the post to be displayed

POSTERS table
Fields
id <-- auto-increment id for posters
time <-- time of first post (i.e., registration)
poster  <-- name of poster
email  <-- email of poster (after confirmation of email address)
ip  <-- ip of poster (taken from post)
web_site <-- web site of poster (if given)
banned <-- option for me to use if I want to ban this poster

So as you can see, this is one table for posters and each poster can post many comments (i.e., a "one to many" relationship).

Each time a post is made, the posting method checks the database for poster approval. Either the poster is approved, banned, or yet to be registered -- each path is followed accordingly.

Note as each page is loaded the comments are pulled from the database and shown, or not, depending upon if the poster is approved OR if I have overridden the post. This allows me to ban the post, but not the poster. But in most cases, if the poster post something that I don't like, then the poster is also banned.

HTH's

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Hi...

Working on a test app, and I need a web interface to test/view the
underlying information. Looking for (hopefully) quick pointers/suggestions.

I'm dealing with a number of cli web crawling apps that return data. I'm
trying to find a quick app that I can modify the db schema, as well as some
of the underlying logic to display my data.

my returned data consists of:
 university
   school
     dept
      class
       classname
       classID
       classdescription
       classA
       classB
       faculty


The above is a represenation of the levels of data. I'm looking to have
multiple tbls, each of which links to the child tbl...

I'm not a web dev, and i'm looking for some sort of web app that i might rip
apart/modify so i can start to be able to view this data on a web app..

i'm currently looking through sourceforge/freshmeat/etc...

thanks...



--- End Message ---
--- Begin Message ---
oh...

has anyone ever played/used/modified the webmin app??

i'm looking for a web based app/tool that i can modify to be able to manage
my distribbuted client/server crawler on my network of boxes. i'd rather
start with an existing framework/app that already kind of works with
modules/apps on a system, and then modify it to meet my needs...

i'm ultimately looking for a php based web app that i can modify to allow me
to schedule running my crawler... along with a huge number of additional
functions..

thanks



--- End Message ---
--- Begin Message ---
bruce wrote:
oh...

has anyone ever played/used/modified the webmin app??

i'm looking for a web based app/tool that i can modify to be able to manage
my distribbuted client/server crawler on my network of boxes. i'd rather
start with an existing framework/app that already kind of works with
modules/apps on a system, and then modify it to meet my needs...

i'm ultimately looking for a php based web app that i can modify to allow me
to schedule running my crawler... along with a huge number of additional
functions..

thanks


Way back when OS X 10.0 shipped I ported webmin to properly work with OS X (and even got the patch accepted into webmin upstream) - it isn't difficult to work with, but remember, it's perl, not php. People Hate Perl :p

It isn't difficult to write webmin modules.

--- End Message ---
--- Begin Message ---


----------------------------------------
> From: [email protected]
> To: [email protected]
> Subject: Re: [PHP] Having trouble with a form to mail script.
> Date: Sat, 21 Mar 2009 09:43:25 -0700
>
>
> On Mar 21, 2009, at 3:47 AM, Linda Stark wrote:
>>>>
>> $email = $_REQUEST['email'] ;
>>
>> $message = $_REQUEST['message'] ;
>>
>> mail( "[email protected]", "Feedback Form Results",
>>
>> $message, "From: $email" );
>>
>> header( "Location: http://www.mydomain.com/thankyou.html";
>> );
>>
>> ?>
>> The email is
>> received, but with a blank return email address and an empty
>> message. None of
>> the comments or form values get through - just a blank email sent to
>> my
>> address. Can anyone point me in the right direction – what am I
>> doing wrong?
>
> The PHP code above is only looking for values named "email" and
> "message". Your new form has values with many more different names.
> So you'll need to update your code in incorporate them. For example,
> one of your new forms values is "emailAddress", so your php code will
> need something like:
>
> $email_address = $REQUEST['emailAddress'];
>
> A second problem is that the code above is only sending back the
> contents of "message". But you will need to send back more. So you
> may want to create a variable called "$contents", which includes all
> the new fields on your longer form. Something like:
>
> $content = "Message: $message
";
> $content .= "Email: $emailAddress"
;
>
> Then update:
>
> mail( "[email protected]", "Feedback Form Results", $message, "From:
> $email" );
>
> with:
>
> mail( "[email protected]", "Feedback Form Results", $content, "From:
> $email" );
>
> But keep in mind, this is a very simple form, and does not account for
> many security measures and corrections. This will only mail you
> whatever the person initially inputs. It does not check for things
> like whether an email address was entered and it is wide open for spam.
>
> If you are doing the form yourself in order to study PHP, you may want
> to do some google searches on creating a secure web form. If you are
> building the form in order to get a quick working form, you may want
> to look into using a pre-made script with more advanced functionality.





Thanks so much for all your helpful advice yesterday and
today,

I read every response and I'm working on the script with
your suggestions.

Actually I bought a couple of php books too.

 

Actually DG, I'm glad you brought up the security issue,
because

yesterday I researched some pre made mail form scripts, I
was wondering

what you guys thought about the PHPMailer-FE from 

http://phpmailer.codeworxtech.com/index.php?pg=phpmailerfe

 

I'm think for now I should use a pre made and secure script
while I learn 

php and then maybe some time in the future I'll write my own
when I feel 

Confident.

 

The site claims it is a secure and regularly updated script,
do you guys agree?

 

Apparently in 2007 there was a security vulnerability in the
script and they went a long time without patching it…

 

Another point - I bought the book – “The Essential Guide to
Dreamweaver CS4 with CSS, Ajax, and PHP” by Powers and in it the author claims
that if you want to accept html mail, 
use this script, but he does not recommend
it because when browsers are configured to not accept html mail there should
also be a text alternative anyway.

 

He goes through a good tutorial on how to create a form mail
script for text only and includes the code snippets and claims it is a secure
script.  

 

What do you think would be better?  Use his code from his book?  Or use 
PHPMailer-FE?  Or would you recommend a different script
than that that accepts only non html mail?

 

I was also looking at the forms-to-go code generator which
is a drag and drop 
application which you can drop your form into and it creates
your php – does that application write secure code, or am I better off staying
away from it and going with a well written secure script?

 

I don't really care about file and photo uploads right now,
as long as I can get a basic email via the web form that’s all I need for
now...



_________________________________________________________________
Express your personality in color! Preview and select themes for Hotmail®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme

--- End Message ---
--- Begin Message ---

On Mar 22, 2009, at 12:46 PM, Linda Stark wrote:
what you guys thought about the PHPMailer-FE from

http://phpmailer.codeworxtech.com/index.php?pg=phpmailerfe

I'm not familiar with this.

You might want to check with your web provider. I'm with Pair and they make security recommendations for code and pre-made scripts.


if you want to accept html mail,
use this script, but he does not recommend
it because when browsers are configured to not accept html mail there should
also be a text alternative anyway.

That would depend on what the form is for. If the results are only going to a few people, and they accept HTML, it shouldn't be a problem. It is safer that way too, so your form can't be used to send off email to everywhere.

There's an awful lot of variables to consider.  This is a good start:
http://shiflett.org/blog/2005/dec/essential-php-security-forms-and-urls





--- End Message ---
--- Begin Message ---
Now it works...  I do not know why but it works.

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>                 Michelle Konzack
<http://www.can4linux.org/>                   Apt. 917
<http://www.flexray4linux.org/>               50, rue de Soultz
Jabber [email protected]           67100 Strasbourg/France
IRC #Debian (irc.icq.com)                     Tel. DE: +49 177 9351947
ICQ #328449886                                Tel. FR: +33  6  61925193

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
There are two example coming with "php-gettext" package.

However, it is realy easy since you have to use only:

    print T_gettext("Hello World");
or
    print sprintf(T_ngettext("%i Developer", 
                             "%i Developers", ${COUNT}), $COUNT);

Run the command

    xgettext -k T_gettext -k T_ -L PHP -o script.pot script.php

and then you have the Translation Template.

Copy it to your desired language like

    cp script.pot script.po

and translate the "msgstr".  Not call the command

    msgfmt -o script.mo script.po

and copy the file script.mo to your desired locale directory with e.g.

    cp script.mo /var/www/locale/de/LC_messages/

and then setup your script.php to use

----[ 'script.php' ]----------------------------------------------------
<?php

define(PROJECT_DIR, realpath('/var/www'));
define(LOCALE_DIR, PROJECT_DIR .'/locale');
define(DEFAULT_LOCALE, 'en_US');

require_once('/usr/share/php/php-gettext/gettext.inc');

$supported_locales = array('de_DE', 'de', 'en_US', 'en');
$encoding = 'UTF-8';

$locale = (isset($_GET['lang']))? $_GET['lang'] : DEFAULT_LOCALE;

T_setlocale(LC_MESSAGES, $locale);

$domain = 'script';

bindtextdomain($domain, LOCALE_DIR);
bind_textdomain_codeset($domain, $encoding);
textdomain($domain);

print T_gettext("The rest of your script");

?>
----8<------------------------------------------------------------------

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>                 Michelle Konzack
<http://www.can4linux.org/>                   Apt. 917
<http://www.flexray4linux.org/>               50, rue de Soultz
Jabber [email protected]           67100 Strasbourg/France
IRC #Debian (irc.icq.com)                     Tel. DE: +49 177 9351947
ICQ #328449886                                Tel. FR: +33  6  61925193

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Tony Marston wrote:
"Nitsan Bin-Nun" <[email protected]> wrote in message news:[email protected]...
Don't forget to attach the message to the list.

Regarding the frameworks, which of them, for your opinion, will take the
fastest time to learn and get into code?

Generally speaking if something is fast to learn it is also the first to run out of steam. If it doesn't have more features than you can learn in five minutes the it doesn't have enough features to do anything useful, or with any degree of flexibility.

Hello,

I changed the subject because I did not want to steal Nitsan's thread.
There seem to be a ton of frameworks, one-click installation web applications, the latest and greatest wiz-bang applications out there. I find myself extremely reluctant to dig into these code sets. It seems when I do attempt to use one of these pre-coded applications I end up eventually wanting to modify the code outside of the original extent of the project. Invariably I get frustrated and end up wishing I initially begun the development from scratch. Employers seem to be wanting me to have experience with all kinds of 'gimicky' solutions, but I am reluctant to be constantly learning new applications (that i'd prefer to rewrite myself). Am I just being hard headed and reluctant to change, or is my stance justified? I suppose the answer is the middle-path. That is, read some new projects, take the bits I like, leave the bits I don't, etc...The problem is this isn't very marketable. But I suppose, the proof is in the pudding. What a banal way to end an email, eh?

What are your thoughts in regard to these two forces: wiz-bang frameworks vs. raw php development?
thanks,



--- End Message ---
--- Begin Message ---
On Sun, 2009-03-22 at 10:54 -1000, Daniel Kolbo wrote:
>
> Hello,
> 
> I changed the subject because I did not want to steal Nitsan's thread.

I hope you started a "New" email and didn't just change the subject...
otherwise you've hijacked the thread. I can't tell I keep threading off.

> There seem to be a ton of frameworks, one-click installation web 
> applications, the latest and greatest wiz-bang applications out there.  
> I find myself extremely reluctant to dig into these code sets.  It seems 
> when I do attempt to use one of these pre-coded applications I end up 
> eventually wanting to modify the code outside of the original extent of 
> the project.  Invariably I get frustrated and end up wishing I initially 
> begun the development from scratch.  Employers seem to be wanting me to 
> have experience with all kinds of 'gimicky' solutions, but I am 
> reluctant to be constantly learning new applications (that i'd prefer to 
> rewrite myself).  Am I just being hard headed and reluctant to change, 
> or is my stance justified?  I suppose the answer is the middle-path.  
> That is, read some new projects, take the bits I like, leave the bits I 
> don't, etc...The problem is this isn't very marketable.  But I suppose, 
> the proof is in the pudding.  What a banal way to end an email, eh?
> 
> What are your thoughts in regard to these two forces: wiz-bang 
> frameworks vs. raw php development?
> thanks,

I have my own framework that I wrote from scratch. I still learn other
frameworks to some degree. Clients don't want you writing something from
scratch when you can use something off the shelf. Preferrably you can
hit the ground almost running with anything put before you, and
hopefully they can give you that benefit of the doubt. Do I suggest you
learn all frameworks? No! But do round yourself out and show that you
are flexible. Nobody wants an immovable object in front of them.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


--- End Message ---
--- Begin Message ---
Daniel Kolbo wrote:
> Tony Marston wrote:
>> "Nitsan Bin-Nun" <[email protected]> wrote in message
>> news:[email protected]...
>>  
>>> Don't forget to attach the message to the list.
>>>
>>> Regarding the frameworks, which of them, for your opinion, will take the
>>> fastest time to learn and get into code?
>>>     
>>
>> Generally speaking if something is fast to learn it is also the first
>> to run out of steam. If it doesn't have more features than you can
>> learn in five minutes the it doesn't have enough features to do
>> anything useful, or with any degree of flexibility.
>>
>>   
> Hello,
> 
> I changed the subject because I did not want to steal Nitsan's thread.
> There seem to be a ton of frameworks, one-click installation web
> applications, the latest and greatest wiz-bang applications out there. 
> I find myself extremely reluctant to dig into these code sets.  It seems
> when I do attempt to use one of these pre-coded applications I end up
> eventually wanting to modify the code outside of the original extent of
> the project.  Invariably I get frustrated and end up wishing I initially
> begun the development from scratch.  Employers seem to be wanting me to
> have experience with all kinds of 'gimicky' solutions, but I am
> reluctant to be constantly learning new applications (that i'd prefer to
> rewrite myself).  Am I just being hard headed and reluctant to change,
> or is my stance justified?  I suppose the answer is the middle-path. 
> That is, read some new projects, take the bits I like, leave the bits I
> don't, etc...The problem is this isn't very marketable.  But I suppose,
> the proof is in the pudding.  What a banal way to end an email, eh?
> 
> What are your thoughts in regard to these two forces: wiz-bang
> frameworks vs. raw php development?
> thanks,
> 
> 

Well, to your point and the OPs point, I use CakePHP, which for some
reason the OP wants to get away from.  In my opinion cake doesn't try to
do all things or be all things to all people.  Just like any framework
or class/function library, if you're going to use it you have to learn
it.  For me, Cake is RAD

I'm not a DB guy by trade, but have gotten myself into thinking of the
DB after the site/app functionality.  Then I whip up a DB schema, bake
and I have a strawman working app.  Then I start coding the real
functionality.  I tested qcodo briefly and it seemed very cool, cake but
lighter and primarily using AJAX.  I still like it, but it was way too
light for me at the time, i.e. no classes to do the mundane stuff, which
some call bloat.

I'm not really a Zend fan (because I'm a hobby programmer and not
die-hard OOP/pattern guy), but have been seeing the different code
generation/app layout/ORM maybe generation plans in the Zend_Tool piece.

FWIW, the only mature frameworks that I've seen are CakePHP, Symphony,
and maybe 1 or 2 that I can't remember.  Symphony for me at least is way
too config heavy, Zend is PEAR, just a class libray but with stricter
standards, and some of the others have promise but lack functionality or
don't have a strong developer/community base.

Just my 2 cents... Flame me away...!

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
My personal take on this goes something like this:

I'm not a huge fan of re-inventing the wheel. However, it seems that since
the first stable release of PHP 5 into the wild a much needed emphasis has
been placed on OOP solutions within the PHP world. Don't read me wrong, I
know the importance wasn't lost on folks who already had a good programming
head on their shoulders, yet, in all fairness our hands were a bit tied (and
I feel that I may receive some argument here) until PHP 5 reached its first
stable release. 

That being said, I find that quite a few of the frameworks still seem to be
fledglings and a lot of the new OS projects being built on them are like
wheels with some lumps. Even a few commercial projects seem to be like this.
I also have a positive outlook with PHP5 and 6 and that is that this
language is finally reaching maturity. It is something that I believe and
hope allow for continued growth of our new projects without feeling the need
to dump them like I saw with the PHP4 projects. 

On a final rambling note, I like some of the new frameworks I've looked into
recently, like CodeIgniter, Yii even Sapphire holds some promise (have a
look at the cleaner version in progress). I find myself wanting to add to
them, wanting to help improve them and occasionally I too have a fleeting
moment where I think "How would my framework be different if I built one
from scratch?" Then I realize I don't have that kind of time! lol My clients
are waiting. Also, I don't seem to have much trouble switching between
frameworks or languages for that matter (PERL, PHP, ASP(bleh), JavaScript,
ActionScript) and I guess because of that I find myself just trying to find
the best solution for the clients need at hand and build from there.


 

-----Original Message-----
From: Daniel Kolbo [mailto:[email protected]] 
Sent: Sunday, March 22, 2009 4:54 PM
To: [email protected]
Cc: Tony Marston
Subject: [PHP] Frameworks / obstinate?

Tony Marston wrote:
> "Nitsan Bin-Nun" <[email protected]> wrote in message 
> news:[email protected]...
>   
>> Don't forget to attach the message to the list.
>>
>> Regarding the frameworks, which of them, for your opinion, will take the
>> fastest time to learn and get into code?
>>     
>
> Generally speaking if something is fast to learn it is also the first to
run 
> out of steam. If it doesn't have more features than you can learn in five 
> minutes the it doesn't have enough features to do anything useful, or with

> any degree of flexibility.
>
>   
Hello,

I changed the subject because I did not want to steal Nitsan's thread.
There seem to be a ton of frameworks, one-click installation web 
applications, the latest and greatest wiz-bang applications out there.  
I find myself extremely reluctant to dig into these code sets.  It seems 
when I do attempt to use one of these pre-coded applications I end up 
eventually wanting to modify the code outside of the original extent of 
the project.  Invariably I get frustrated and end up wishing I initially 
begun the development from scratch.  Employers seem to be wanting me to 
have experience with all kinds of 'gimicky' solutions, but I am 
reluctant to be constantly learning new applications (that i'd prefer to 
rewrite myself).  Am I just being hard headed and reluctant to change, 
or is my stance justified?  I suppose the answer is the middle-path.  
That is, read some new projects, take the bits I like, leave the bits I 
don't, etc...The problem is this isn't very marketable.  But I suppose, 
the proof is in the pudding.  What a banal way to end an email, eh?

What are your thoughts in regard to these two forces: wiz-bang 
frameworks vs. raw php development?
thanks,





__________ Information from ESET Smart Security, version of virus signature
database 3953 (20090321) __________

The message was checked by ESET Smart Security.

http://www.eset.com

 

__________ Information from ESET Smart Security, version of virus signature
database 3953 (20090321) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 


--- End Message ---
--- Begin Message ---


Marc Christopher Hall wrote:
My personal take on this goes something like this:

I'm not a huge fan of re-inventing the wheel. However, it seems that since
the first stable release of PHP 5 into the wild a much needed emphasis has
been placed on OOP solutions within the PHP world. Don't read me wrong, I
know the importance wasn't lost on folks who already had a good programming
head on their shoulders, yet, in all fairness our hands were a bit tied (and
I feel that I may receive some argument here) until PHP 5 reached its first
stable release.
That being said, I find that quite a few of the frameworks still seem to be
fledglings and a lot of the new OS projects being built on them are like
wheels with some lumps. Even a few commercial projects seem to be like this.
I also have a positive outlook with PHP5 and 6 and that is that this
language is finally reaching maturity. It is something that I believe and
hope allow for continued growth of our new projects without feeling the need
to dump them like I saw with the PHP4 projects.
On a final rambling note, I like some of the new frameworks I've looked into
recently, like CodeIgniter, Yii even Sapphire holds some promise (have a
look at the cleaner version in progress). I find myself wanting to add to
them, wanting to help improve them and occasionally I too have a fleeting
moment where I think "How would my framework be different if I built one
from scratch?" Then I realize I don't have that kind of time! lol My clients
are waiting. Also, I don't seem to have much trouble switching between
frameworks or languages for that matter (PERL, PHP, ASP(bleh), JavaScript,
ActionScript) and I guess because of that I find myself just trying to find
the best solution for the clients need at hand and build from there.


-----Original Message-----
From: Daniel Kolbo [mailto:[email protected]] Sent: Sunday, March 22, 2009 4:54 PM
To: [email protected]
Cc: Tony Marston
Subject: [PHP] Frameworks / obstinate?

Tony Marston wrote:
"Nitsan Bin-Nun" <[email protected]> wrote in message news:[email protected]...
Don't forget to attach the message to the list.

Regarding the frameworks, which of them, for your opinion, will take the
fastest time to learn and get into code?
Generally speaking if something is fast to learn it is also the first to
run
out of steam. If it doesn't have more features than you can learn in five minutes the it doesn't have enough features to do anything useful, or with

any degree of flexibility.

Hello,

I changed the subject because I did not want to steal Nitsan's thread.
There seem to be a ton of frameworks, one-click installation web applications, the latest and greatest wiz-bang applications out there. I find myself extremely reluctant to dig into these code sets. It seems when I do attempt to use one of these pre-coded applications I end up eventually wanting to modify the code outside of the original extent of the project. Invariably I get frustrated and end up wishing I initially begun the development from scratch. Employers seem to be wanting me to have experience with all kinds of 'gimicky' solutions, but I am reluctant to be constantly learning new applications (that i'd prefer to rewrite myself). Am I just being hard headed and reluctant to change, or is my stance justified? I suppose the answer is the middle-path. That is, read some new projects, take the bits I like, leave the bits I don't, etc...The problem is this isn't very marketable. But I suppose, the proof is in the pudding. What a banal way to end an email, eh?

What are your thoughts in regard to these two forces: wiz-bang frameworks vs. raw php development?
thanks,





__________ Information from ESET Smart Security, version of virus signature
database 3953 (20090321) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature
database 3953 (20090321) __________

The message was checked by ESET Smart Security.

http://www.eset.com
Marc,

Thanks for the thoughts. [quote]I find myself just trying to find the best solution for the clients need at hand and build from there.[/quote] Certainly the above is the mainstream/business approach. After all, they (businesses) need solutions today and not tomorrow. However, this is the culture that only serves to exemplify my point. All of these one-click-solutions are for today, who is looking out for tomorrow? Who is doing the long term planning? Instead of our snake oil salesmen, who is selling long term stability/flexibility. Is it even possible to make money when thinking about the long term. Is there money for the conservative visionary or is it only for the radical lose cannon. I guess I really ought to set up a web maintenance company for all of these businesses that are going to find their framework has 'run out of steam' in a few years (or tomorrow).

P.S. I realize that this debate parallels the whole US economy, but, alas, when will fundamentals be rewarded...

P.P.S. I was blown away, perhaps you could even say i was ignited, when I first saw code video demonstration of CodeIgnitor

P.P.P.S. What might be nice is to have an online repository of "PHP community approved" classes, then programmers could mix and match 'modules' as needed...well now I am sounding like that snake oil salesman.
--- End Message ---
--- Begin Message ---
Davi Vidal wrote:
On 03/21/2009 10:19 AM, Andrea Giammarchi wrote:
Hi all,

I am inserting more than 5000 rows into sql database but its taking more
than 30 mins  to get it all the data inserted. I use union to insert
multiple rows of 20 at a time.

What is the best way to make insert sql statement run faster

Usually a single transaction is faster than an insert a time (with or without union)


    What do you mean?

START TRANSACTION;
INSERT;
INSERT;
INSERT;
COMMIT;

That's the right syntax. Are you using mysql? Are you using innodb tables? If you're using mysql but not innodb, then no point doing this since myisam is non-transactional.

What's the actual query you're running? You shouldn't need to use a union for a straight insert.

An insert-into-select query could use a union, but then how fast is the select statement by itself (without the insert) ?

--
Postgresql & php tutorials
http://www.designmagick.com/


--- End Message ---
--- Begin Message ---
Michael A. Peters wrote:
Michael A. Peters wrote:


At some point I'll get the guts to report it as a bug just to be told it isn't a bug with the standard response that says it isn't a bug and absolutely no explanation as to why.


Bug ID 47747

Clear demonstration test case -

http://www.clfsrpm.net/bugs/domattr.phps
http://www.clfsrpm.net/bugs/domattr.php

I'll wait to see what they say, but if anyone knows how to get the xml:lang from the attribute list w/o knowing it is xml: - I would really like to know.



It was my misunderstanding.
Properly fixing my code to deal with it is a PITA but is doable.

--- End Message ---

Reply via email to