473,324 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

What is the learning curve for PHP?

Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?

Thanks
KJW

Mar 30 '07 #1
26 9235
K.J.Williams wrote:
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?
Since you already know the basics of programming - conditional
loops, operators, scope, data types, etc - it should be
relatively quick to learn PHP.

The only part that might gum up the works is if you're not
well-versed in HTML/JavaScript.
Mar 30 '07 #2
K.J.Williams wrote:
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?

Thanks
KJW
Hi,

You have both a good background to start learning PHP fast.
In PHP you can work procedural. If you are confortable with the language,
you can start OOP too (no need, just another way of programming, cleaner in
some aspects).

PHP is easy to pick up.

Things to focus on from the start (in my humble opinion)
- Understand HTML forms
- Understand how PHP receives information (superglobal $_GET[] and $_POST[])
from the forms.
- keep paying attention to php.ini. It may seem like a dull piece of
settings in the beginning, but you'll understand more of it as you learn
more PHP. Just keep coming back there. :-)
- use www.php.net always to lookup functions.
Pay attention to the often usefull comments by other users.
- Get a good book (O'Reilly has a few good ones)
- If you recycle other people's code, never copy/paste, but just
rebuild/retype it yourself, using the examplecode only as a reference.
(This increases understanding in my opinion)
- If you plan on using a database, beware SQL injection. This involves
understanding of the database, php.ini (magic_quotes and such), and make it
a habbit of echo'ing all your SQL untill you are comfortable you know what
happens.
- Get a nice editor with syntax highlighting.
- important: make sure you let PHP see all the errors/notices/warning/etc.
(Again in php.ini: error_reporting)
- When confused, come to comp.lang.php, but you found that place already.
;-)
We have an active helpfull community here. This group is one of the
friendliest and helpful usenetgroups I have seen. You never have to wait
long for a response.

And of course: Enjoy!

Regards,
Erwin Moller
Mar 30 '07 #3
K.J.Williams wrote:
A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
PHP's syntax is fairly like C.

- Function calls are "function_name()"

- Lines end in semicolons

- Whitespace is mostly insignificant

- "if", "for", "while" and "switch" syntax is pretty much
the same

- Most of the mathematical, boolean, assignment and comparison
operators are the same

The biggest difference in syntax is that variables in PHP always begin
with a dollar sign, e.g. $foo.

However, PHP is a much higher level language than C. You rarely need to
worry about casting variables to a different type, and never have to deal
with pointers. Strings are a basic data type in PHP, and don't need to be
treated as an array of characters. Indeed, there isn't a character data
type -- characters are just strings with length 1.

PHP has a lot more functions built in to the language, compared to C where
a lot of functionality (e.g. database connectivity, regular expressions,
networking functions) needs to be imported through libraries.

PHP4 has a certain amount of OO support, and PHP 5 has almost as much OO
support as Java does; however, you don't have to use it!
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like bash shell scripting for Linux?
Assuming that your previous programming experience is with GUI or
command-line programming in C/VB, then probably the biggest change you'll
need to make is not the new programming language that you'll need to
learn, but the paradigm shift of moving from desktop programming to web
programming.

With desktop programming, you're drawing objects to the local screen, and
you can draw these objects whenever you like really. With web programming,
your program has no direct access to the screen, keyboard or mouse of the
client machine. All you get told is that someone has requested page X with
query string Y and post data Z. Your program has a few seconds to figure
out what data it needs to send back, assemble that into some HTML and
output that. Then the data goes back to the client, whose machine renders
it to their screen using a mechanism that is beyond your control. Fun, eh?

Seriously, I think the desktop->web paradigm shift is a much bigger leap
than the change of programming language. I'd suggest at first writing a
CGI program, such as a small web forum, in a language you're familiar with
(e.g. C, or bash scripting) at first, and getting a feel for how web
programming as a whole works, and then make the shift to doing it with
PHP, which will then be comparatively easy.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Mar 30 '07 #4
Toby A Inkster wrote:
K.J.Williams wrote:
>Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
With a good background in C, PHP is very easy.
PHP's syntax is fairly like C.
<snip>

Variable scope is worth looking at before you start:
http://uk2.php.net/manual/en/languag...bles.scope.php
The biggest difference in syntax is that variables in PHP always begin
with a dollar sign, e.g. $foo.
He, that's always the gotcha when you switch to PHP from C.
PHP has a lot more functions built in to the language, compared to C where
a lot of functionality (e.g. database connectivity, regular expressions,
networking functions) needs to be imported through libraries.
There are core functions, and then there are functions that need to be
compiled in (but usually are):
http://www.php.net/manual/en/functions.internal.php

It's worth remembering as a PHP noob that chances are, there's already
a function to do it.
PHP4 has a certain amount of OO support, and PHP 5 has almost as much OO
support as Java does; however, you don't have to use it!
If you want OO then it's probably best to go with a language that was
designed that way in the first place.

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
Mar 30 '07 #5
K.J.Williams schrieb:
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
PHP has a C background. A lot of functions that you know from C can be
used with PHP just like you know them. For example, there's the C
coder's much beloved sprintf(). The control strucutres like for() and
if() are also very much like C. PHP also shares with C++ the ability to
mix procedural and object oriented code. As for the VisualBASIC
programmer, there's much logic to gain and there are many oddities to
forget about ;-)
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
First success is easily obtained. That's why PHP is so popular. And the
quality of the online documentation at php.net is just great. The
hardest thing to understand when coding for the web with PHP is to
understand the oddities of the stateless HTTP protocol. You don't have
your PHP app running all day long! A request comes in, your script runs
and produces output and then the script dies. Persistence surviving a
single request has to be obtained by means of session, databases of the
use of shared memory segments.
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?
And how IS shell scripting for Linux for you? You can't assume everyone
feeling the same way about this...

OLLi

--
Kajiggers!
Mar 30 '07 #6
Oliver Grätz wrote:
mix procedural and object oriented code. As for the VisualBASIC
programmer, there's much logic to gain and there are many oddities to
forget about ;-)
What comes to mind is that a BASIC programmer might expect this:
if (func1() and func2()) { func3(); }
to evaluate func2() regardless of what func1() returns.

AIUI. IANABP. Well, not for many many years.

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
Mar 30 '07 #7
Well my friend who uses VB has a problem , AND IVE TOLD HIM MANY TIMES
about this...

HE USES GOTO.... for all of his jump routines in VB.
I said to him that the practice of using goto, is like
a garotte for programmers. How he lives with the frustration
I dont know - thats why I program in C not VB. My conversion
from BASIC to C long ago was caused by GOTO sphagetti code.
C has GOTO too... but I have avoided GOTO like the plague
ever since then and I hope I never use such a thing.

So my friend's concern is importing his tactics of using goto in PHP
from his practice in VB.

I hope PHP does not have a GOTO - no programmer ( except for those in
assembly ) should ever use a goto statement.

Should I assume PHP doesn't have a GOTO for my friends case?

Thanks again

On Mar 30, 2:30 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
K.J.Williams wrote:
A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?

PHP's syntax is fairly like C.

- Function calls are "function_name()"

- Lines end in semicolons

- Whitespace is mostly insignificant

- "if", "for", "while" and "switch" syntax is pretty much
the same

- Most of the mathematical, boolean, assignment and comparison
operators are the same

The biggest difference in syntax is that variables in PHP always begin
with a dollar sign, e.g. $foo.

However, PHP is a much higher level language than C. You rarely need to
worry about casting variables to a different type, and never have to deal
with pointers. Strings are a basic data type in PHP, and don't need to be
treated as an array of characters. Indeed, there isn't a character data
type -- characters are just strings with length 1.

PHP has a lot more functions built in to the language, compared to C where
a lot of functionality (e.g. database connectivity, regular expressions,
networking functions) needs to be imported through libraries.

PHP4 has a certain amount of OO support, and PHP 5 has almost as much OO
support as Java does; however, you don't have to use it!
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like bash shell scripting for Linux?

Assuming that your previous programming experience is with GUI or
command-line programming in C/VB, then probably the biggest change you'll
need to make is not the new programming language that you'll need to
learn, but the paradigm shift of moving from desktop programming to web
programming.

With desktop programming, you're drawing objects to the local screen, and
you can draw these objects whenever you like really. With web programming,
your program has no direct access to the screen, keyboard or mouse of the
client machine. All you get told is that someone has requested page X with
query string Y and post data Z. Your program has a few seconds to figure
out what data it needs to send back, assemble that into some HTML and
output that. Then the data goes back to the client, whose machine renders
it to their screen using a mechanism that is beyond your control. Fun, eh?

Seriously, I think the desktop->web paradigm shift is a much bigger leap
than the change of programming language. I'd suggest at first writing a
CGI program, such as a small web forum, in a language you're familiar with
(e.g. C, or bash scripting) at first, and getting a feel for how web
programming as a whole works, and then make the shift to doing it with
PHP, which will then be comparatively easy.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Apr 2 '07 #8
K.J.Williams wrote:
Should I assume PHP doesn't have a GOTO for my friends case?
There is a proposal for "goto" to be included in PHP 6, but it will
probably not be called "goto". And the one proposed is more like the
Perl concept of goto -- which has virtually nothing in common with the
BASIC goto. The Perl goto is a far more limited statement, which just
allows you to jump out of loops in a particular way.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 2 '07 #9
I was thinking about learning PHP, using PHP+GTK2. Will it let me
write scripts that produce client applications like Java?

Thanks again

On Mar 30, 2:30 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
K.J.Williams wrote:
A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?

PHP's syntax is fairly like C.

- Function calls are "function_name()"

- Lines end in semicolons

- Whitespace is mostly insignificant

- "if", "for", "while" and "switch" syntax is pretty much
the same

- Most of the mathematical, boolean, assignment and comparison
operators are the same

The biggest difference in syntax is that variables in PHP always begin
with a dollar sign, e.g. $foo.

However, PHP is a much higher level language than C. You rarely need to
worry about casting variables to a different type, and never have to deal
with pointers. Strings are a basic data type in PHP, and don't need to be
treated as an array of characters. Indeed, there isn't a character data
type -- characters are just strings with length 1.

PHP has a lot more functions built in to the language, compared to C where
a lot of functionality (e.g. database connectivity, regular expressions,
networking functions) needs to be imported through libraries.

PHP4 has a certain amount of OO support, and PHP 5 has almost as much OO
support as Java does; however, you don't have to use it!
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like bash shell scripting for Linux?

Assuming that your previous programming experience is with GUI or
command-line programming in C/VB, then probably the biggest change you'll
need to make is not the new programming language that you'll need to
learn, but the paradigm shift of moving from desktop programming to web
programming.

With desktop programming, you're drawing objects to the local screen, and
you can draw these objects whenever you like really. With web programming,
your program has no direct access to the screen, keyboard or mouse of the
client machine. All you get told is that someone has requested page X with
query string Y and post data Z. Your program has a few seconds to figure
out what data it needs to send back, assemble that into some HTML and
output that. Then the data goes back to the client, whose machine renders
it to their screen using a mechanism that is beyond your control. Fun, eh?

Seriously, I think the desktop->web paradigm shift is a much bigger leap
than the change of programming language. I'd suggest at first writing a
CGI program, such as a small web forum, in a language you're familiar with
(e.g. C, or bash scripting) at first, and getting a feel for how web
programming as a whole works, and then make the shift to doing it with
PHP, which will then be comparatively easy.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Apr 2 '07 #10
K.J.Williams wrote:
I hope PHP does not have a GOTO - no programmer ( except for those in
assembly ) should ever use a goto statement.
This depends on the language. Occasionally when writing C I've found
that the most readable way of structuring the code is a goto.

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
Apr 2 '07 #11
So today I went to my bookstore to pick up some stuff on
improving my programming skills for PHP.

1. I know HTML but I dont practice CSS in my own code
so I bought Cascading Style Sheets - The Definitive Guide
2nd Ed by Eric A. Meyer, published by O'reilly, to refresh my
memory on this (this book covers CSS2 & CSS2.1). I have tried CSS
on myspace.com and their server was terrible when I was trying
to customize my page layout. I have no idea what their using
but its terrible. The font colors wouldnt not work right.

Aside from that I think CSS is great but I need to practice it
more
so that it is useful with PHP web page generation.

2. I have JavaScript - The Definitive Guide 3rd Ed. by David Flanagan
published by O'reilly. I have had this book for a while so I am
taking the advice of learning to use HTML wtih Javascripting.
There is one problem with Javascripting ( and HTML ) the features
of
of the langauge is not totally universal with IE or Mozilla/Firefox/
Netscape
so in every Java Script, there has to be a conditional statement
which
catches the web browsers type and use the best most procedures -
this might
make my work with PHP not very easy for web page generation.

3. I bought PHP in a nutshell - A destop quick reference by Orielly -
this is
just another book that I got becuase I also have Perl in a
nutshell.

One crazy question is PHP derived from Perl , like C++ is derived
from C?

4. I got another book PHP - to actually learn it... its called :
Beginning PHP5 published by Dave W. Mercer ( and five other people
listed ) published by Wrox in 2004 - this is the latest newest book
that I saw.
I know that PHP6 is about, but this is as close as I could get for
a book
on the matter

I hope I made good choices since I was completely lost by the number
of books
on PHP that I could buy so I went with my best thoughts as I reviewed
them and
thats what I choose.

I read one book on PHP book where the author in the introduction
mentions on
one line :

Did I mention that PHP is open source ?

... twice through the intro.

Well any thoughts?

Thanks again
Apr 3 '07 #12
On 2007-04-03 06-22-12, K.J.Williams wrote:
1. [...] I have tried CSS on myspace.com and their server was terrible
when I was trying to customize my page layout. I have no idea what their
using but its terrible. The font colors wouldnt not work right.
If it can serve files, it's sufficient for CSS. Did you consider your HTML
or CSS might simply be wrong?

2. [...] There is one problem with Javascripting ( and HTML ) the
features of of the langauge is not totally universal with IE or
Mozilla/Firefox/ Netscape so in every Java Script, there has to be a
conditional statement which catches the web browsers type and use the
best most procedures - this might make my work with PHP not very easy
for web page generation.
Nope. JavaScript is what Netscape does. MSIE does not implement the whole
bunch of JavaScript functionality, but adds its own features. The result is
called JScript.

3. [...] One crazy question is PHP derived from Perl , like C++ is derived
from C?
In it's early days, PHP was just a bunch of Perl scripts. But that's
ancient PHP history.
Similarly, C++ isn't really a derive of C, even if it was years ago.
Nowadays, C++ bases on C features as well as C bases on C++ features.
Feature distribution works in both ways here.

4. I got another book PHP ...
If you want book, I can suggest the novels of Douglas Preston & Lincold
Child, Sidney Sheldon, Wolfgang Hohlbein (don't know the English
translations of him, though) and others.
If you want to learn PHP, however, your #1 resource is <http://php.netand
it's awesome manual.
Apr 3 '07 #13
On Apr 2, 11:27 pm, Simon Stienen <n...@news.slashlife.orgwrote:
On 2007-04-03 06-22-12, K.J.Williams wrote:
1. [...] I have tried CSS on myspace.com and their server was terrible
when I was trying to customize my page layout. I have no idea what their
using but its terrible. The font colors wouldnt not work right.

If it can serve files, it's sufficient for CSS. Did you consider your HTML
or CSS might simply be wrong?
I was using the syntax reciepe given by the people who have doctored
their myspace page
using CSS. I very well versed in HTML, but practice of CSS is new to
me.
>
2. [...] There is one problem with Javascripting ( and HTML ) the
features of of the langauge is not totally universal with IE or
Mozilla/Firefox/ Netscape so in every Java Script, there has to be a
conditional statement which catches the web browsers type and use the
best most procedures - this might make my work with PHP not very easy
for web page generation.

Nope. JavaScript is what Netscape does. MSIE does not implement the whole
bunch of JavaScript functionality, but adds its own features. The result is
called JScript.
So I would have to learn JScript and Javascript to do the equivalent
in my web pages?
for either MSIE or the Netscape variants?
>
3. [...] One crazy question is PHP derived from Perl , like C++ is derived
from C?

In it's early days, PHP was just a bunch of Perl scripts. But that's
ancient PHP history.
Similarly, C++ isn't really a derive of C, even if it was years ago.
Nowadays, C++ bases on C features as well as C bases on C++ features.
Feature distribution works in both ways here.
Well my understanding is that C++ is a addon to C, which adds OO
features, direct stream access,
a beter way of declaring and freeing memory (not that I dont mind
malloc() and free()),
you have a modified version of a struct that now allows its own
functions called class,
and then you have other little special operators such as scope
resolution to deal with that.
If you were to do only procedural work in C++ you do the same work in
C, just change your
classes to structs and strip out your class functions and make them as
stand alone
functions in the script. The only advantage I see in C++ is when I got
into dynamically
allocating memory in the form of a linear linked lists use nodes - it
can be done in C ,
but its alot harder with the syntax involved.

As hearsay, I have heard arguments about PHP is great for procedural
programming , terrible for
OO programming from Perl programmers. So the argument that they make,
in case, to me
at my college, 1. Perl a better shell script/cgi langauge than PHP in
Linux (all
Unix flavors) for that matter, 2. PHP is not designed for shell
scripting like Perl is.
PHP is strictly derived from PERL only for web-server - MySQL database
uses.

One question to ask ...

What do you think of PHP+GTK2 ?



Apr 3 '07 #14
On Apr 2, 8:22 pm, "K.J.Williams" <lordw...@quik.comwrote:
So today I went to my bookstore to pick up some stuff on
improving my programming skills for PHP.

1. I know HTML but I dont practice CSS in my own code
so I bought Cascading Style Sheets - The Definitive Guide
2nd Ed by Eric A. Meyer, published by O'reilly, to refresh my
memory on this (this book covers CSS2 & CSS2.1). I have tried CSS
on myspace.com and their server was terrible when I was trying
to customize my page layout. I have no idea what their using
but its terrible. The font colors wouldnt not work right.

Aside from that I think CSS is great but I need to practice it
more
so that it is useful with PHP web page generation.

2. I have JavaScript - The Definitive Guide 3rd Ed. by David Flanagan
published by O'reilly. I have had this book for a while so I am
taking the advice of learning to use HTML wtih Javascripting.
There is one problem with Javascripting ( and HTML ) the features
of
of the langauge is not totally universal with IE or Mozilla/Firefox/
Netscape
so in every Java Script, there has to be a conditional statement
which
catches the web browsers type and use the best most procedures -
this might
make my work with PHP not very easy for web page generation.

3. I bought PHP in a nutshell - A destop quick reference by Orielly -
this is
just another book that I got becuase I also have Perl in a
nutshell.

One crazy question is PHP derived from Perl , like C++ is derived
from C?

4. I got another book PHP - to actually learn it... its called :
Beginning PHP5 published by Dave W. Mercer ( and five other people
listed ) published by Wrox in 2004 - this is the latest newest book
that I saw.
I know that PHP6 is about, but this is as close as I could get for
a book
on the matter

I hope I made good choices since I was completely lost by the number
of books
on PHP that I could buy so I went with my best thoughts as I reviewed
them and
thats what I choose.

I read one book on PHP book where the author in the introduction
mentions on
one line :

Did I mention that PHP is open source ?

.. twice through the intro.

Well any thoughts?

Thanks again
Oreilly's books on PHP are good, also too is Sitepoint's Kevin Yank
PHP and Mysql

Apr 3 '07 #15
In article <11**********************@q75g2000hsh.googlegroups .com>,
K.J.Williams <lo******@quik.comwrote:
so in every Java Script, there has to be a conditional statement
which catches the web browsers type and use the best most
procedures - this might make my work with PHP not very easy for
web page generation.
Why not? PHP has an environment variable to tell you the client's user
agent string. You can then output whatever you want based on that.
One crazy question is PHP derived from Perl , like C++ is derived
from C?
PHP uses C++ syntax, but also makes use of some perl features such
as regular expression matching -- if you want them. To me, PHP
feels more like C++ without the strong variable typing constraints.
>I hope I made good choices since I was completely lost by the
number of books on PHP that I could buy so I went with my best
thoughts as I reviewed them and thats what I choose.
Personally I think you're buying too many books. The only thing I
ever needed for PHP was the online documentation at www.php.net.
The books are available for others to make money from you. Nothing
wrong with that, but if you already have a few programming languages
under your belt, you don't need yet another book for PHP, in my
opinion.

-A
Apr 3 '07 #16
2. I have JavaScript - The Definitive Guide 3rd Ed. by David Flanagan
published by O'reilly. I have had this book for a while so I am
taking the advice of learning to use HTML wtih Javascripting.
Here's something else to keep in mind...

Javascript and PHP have *very* similar syntax. Close enough to drive
you crazy when you find the differences.

To help my head, I code my JS like I code my PHP.

Yep! $ signs for all vars and the whole lot!

Yep! Makes the JS code look like PHP at first glance, but it also
helps my poor feeble brain when I read it.

But beware of the concantination symbol! PERIOD for PHP, PLUS for JS

OK, the array and classes are galaxies apart, but except that... (yes,
the list goes on) ;)

walter

Apr 4 '07 #17
I was going by the advice that I got on alt.comp.lang.learn.c-c++
group
that its best to have many reference books for knowing how to use a
langauge, I have at least 4 for books on C++ , 1 on C, 1 on C and C+
+...
and many of the authors hit and miss certain subjects.

I needed the CSS book becuase I dont know how to use CSS in HTML ,
I know HTML but not the integration CSS which is now a standard among
many businesses, along with that comes Javascripting - which I have
never
touched becuase of the frustration of non-standard HTML browsers such
as
MSIE, as for PHP , php in a nutshell was choosen as reference, and
the
other book published by wrox is to teach me.
And to go off on a tangent, as for a few programming langauges
I traded Commodore BASIC for C on my IBM - it took three years for me
to dewarp my mind from bad programming habits to develop good
programming habits
in C. HTML is a pseudo-programming langauge , ditto for Javascript.
The most
horrible langauges I have run into are COBOL, Pascal, Modula-2,
Fortran,
BASIC, and if not Visual BASIC in early versions. If and when Sunsoft
develops
a compiler that produce a independent machine code program from JAVA
code, I might
reconsider that langauge - that langauge is junk. Theres a whole
litany of religious
wars between JAVA and C++ programmers. But the most useful of all the
programming
langauges is assembly, the only langauge that has 3rd advantage over
all langauges.
Assembly langauge runs the fastest, has a 1 to 1 ratio of mnemonic to
machine code
translation ( yes that makes it a pain to program if you wanted to do
something big ),
but most of all you can revert any machine langauge back into assembly
langauge
and reverse engineer it to do something that it wasnt intended to do.
Now that means
you have to be a master of the machine your on. On newer machines that
have big
processors today, thats an undertaking task, but say long ago on a
Commodore 64 ,yes
it was - software piracy was rampant on that machine. And that
basically proves that
there can be no such thing as copyright protection scheme or anything
to prevent
software duplication. All software on CDs have to abide by a red book
standard?..
and that standard is available to anyone who builds hardware - or
software, or software
that copys that medium. And thats true for any standard among the
industry involved with
incoding of information mediums. The photocopier must have been the
biggest threat to
to the book industry, with the scanner following ( same technology ).

But to cut to the chase...

I want to use PHP to build a better nteractive web site with my web
clients.
Thats what I want

On Apr 3, 3:10 pm, a...@spamcop.net (axlq) wrote:
>
Personally I think you're buying too many books. The only thing I
ever needed for PHP was the online documentation atwww.php.net.
The books are available for others to make money from you. Nothing
wrong with that, but if you already have a few programming languages
under your belt, you don't need yet another book for PHP, in my
opinion.

-A

Apr 4 '07 #18
I think my friend is going to have more trouble with PHP than I am and
were
both going to have the same trouble of switching from the mentality of
developing
command line interface programs ( me for Linux ), and gui programs
( him for
windows ) to web based programs where there is no control over what
happens
on how it looks on the clients web browser. You just pray that it
looks
good. That will be a new concept, to learn.

On Apr 3, 10:18 pm, "otrWal...@gmail.com" <otrWal...@gmail.comwrote:
2. I have JavaScript - The Definitive Guide 3rd Ed. by David Flanagan
published by O'reilly. I have had this book for a while so I am
taking the advice of learning to use HTML wtih Javascripting.

Here's something else to keep in mind...

Javascript and PHP have *very* similar syntax. Close enough to drive
you crazy when you find the differences.

To help my head, I code my JS like I code my PHP.

Yep! $ signs for all vars and the whole lot!

Yep! Makes the JS code look like PHP at first glance, but it also
helps my poor feeble brain when I read it.

But beware of the concantination symbol! PERIOD for PHP, PLUS for JS

OK, the array and classes are galaxies apart, but except that... (yes,
the list goes on) ;)

walter

Apr 4 '07 #19
K.J.Williams wrote:
I needed the CSS book becuase I dont know how to use CSS in HTML ,
I know HTML but not the integration CSS which is now a standard among
many businesses
If you've not been using CSS, then the chances are, you've not been using
HTML properly either.
as for PHP , php in a nutshell was choosen as reference, and the
other book published by wrox is to teach me.
I agree that it's usually a good idea to have several books on a
programming language to be able to learn it. PHP is the exception though.

Firstly, PHP changes so often -- normally in backwards compatible ways,
true, but I don't think I've ever used a language where new features and
new functions are being added on such a frequent basis. Books become
obsolete very quickly. If you take a look at these two books you've got,
I'd bet that at least one of them teaches you the old PHP4 method for
object-oriented programming. Although that still works, PHP5 objects are
vastly more powerful.
HTML is a pseudo-programming langauge
HTML is not a programming language at all -- it's a data format, much like
JPEG or MP3 is.
ditto for Javascript.
Javascript is a fully featured programming object-oriented language. And
(browser compatibility problems aside) is actually rather pleasant to work
with. It's a bit like C or C++ in syntax, but without the need to worry
about pointers and memory locations; it has a good object orientation
model, but isn't militant about making you use it like Java is.
If and when Sunsoft develops a compiler that produce a independent
machine code program from JAVA code, I might reconsider that langauge -
that langauge is junk.
Consider it this way: a compiled C program will only run on the platform
it was compiled for. Say, for example, that you have a C program compiled
for Linux on the DEC Alpha processor. If you want to run it, you need to
buy a DEC Alpha processor -- they don't come cheap.

A compiled Java program will also only run on the platform that it was
compiled for. That platform is normally the Java virtual machine. So if
you want to run the program, then you need to buy a Java virtual machine.
Fortunately, they're free!

Whatsmore, there *is* a true compiler for Java -- it's part of the GCC
suite. See http://gcc.gnu.org/java/.

Java has many drawbacks, but device-independence is normally quoted as one
of its best features!
But the most useful of all the programming langauges is assembly
Nonsense. A programming language is only as useful as what people can do
with it. Given a week, and experienced, say, C programmer can do a lot
more in C than an experienced assembly programmer can do in assembly.

Sure, it's fast, and at certain times it's worth the programmer time to
drop down into assembly and eek a bit of extra speed out of the program.
But those situations are very rare; unless you're working on compression,
encryption, high-end 3D graphics or kernel development, you're unlikely to
encounter such a situation.
And that basically proves that there can be no such thing as copyright
protection scheme or anything to prevent software duplication.
http://en.wikipedia.org/wiki/Trusted_Computing

Summary: TC processors can be designed so that they refuse to run an
operating system unless it has been digitally signed. If you modify your
operating system, the signature will break, and you'll be unable to run
it; so for all intents and purposes, the OS cannot be modified. The TC
operating system similarly refuses to run a program unless it has been
signed; so for all intents and purposes, no programs can be modified.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 4 '07 #20
ot*******@gmail.com wrote:
To help my head, I code my JS like I code my PHP.
Yep! $ signs for all vars and the whole lot!
Does Javascript allow $ signs in variables? Hmmm... interesting.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 4 '07 #21
See my interjections to your comments below..

On Apr 4, 1:42 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
K.J.Williams wrote:
I needed the CSS book becuase I dont know how to use CSS in HTML ,
I know HTML but not the integration CSS which is now a standard among
many businesses

If you've not been using CSS, then the chances are, you've not been using
HTML properly either.
Thats true - I have learned to use HTML on my own and the limited book
choices that I was
given for learning HTML - I choose HTML for Dummies, and on line I
used some help from
several other sites on HTML. So I have used HTML effectively to my
uses but not to the
standard practice of using CSS. I have a program that I wrote in C
that automates the
script building of at least 314 html pages that I have that are in a
system I developed.
It works but I would like it to do *BETTER*. Theres always room for
doing better...in my book
(not the dummies book).
>
as for PHP , php in a nutshell was choosen as reference, and the
other book published by wrox is to teach me.

I agree that it's usually a good idea to have several books on a
programming language to be able to learn it. PHP is the exception though.

Firstly, PHP changes so often -- normally in backwards compatible ways,
true, but I don't think I've ever used a language where new features and
new functions are being added on such a frequent basis. Books become
obsolete very quickly. If you take a look at these two books you've got,
I'd bet that at least one of them teaches you the old PHP4 method for
object-oriented programming. Although that still works, PHP5 objects are
vastly more powerful.
HTML is a pseudo-programming langauge

HTML is not a programming language at all -- it's a data format, much like
JPEG or MP3 is.
I disagree.

HTML is an interpreted langauge that has a simple method of handling
wrong syntax, if the
web browser's interpreter parses a tag it doesnt recognize it ignores
it or if it does
recognize something that is like one of its tags but its incorrect
syntax it produces
undefined behavior. Otherwise, correct syntax will produce a result
from the interpreter.
>
ditto for Javascript.
My argument stands the same -- more or less for Javascript, its not
compiled therefore its
interpreted.

In my point of view - Javascript and HTML are programming langauges
from the stand point
they are interpreted - like Commodore's line numbered BASIC
>
Javascript is a fully featured programming object-oriented language. And
(browser compatibility problems aside) is actually rather pleasant to work
with. It's a bit like C or C++ in syntax, but without the need to worry
about pointers and memory locations; it has a good object orientation
model, but isn't militant about making you use it like Java is.
If and when Sunsoft develops a compiler that produce a independent
machine code program from JAVA code, I might reconsider that langauge -
that langauge is junk.

Consider it this way: a compiled C program will only run on the platform
it was compiled for. Say, for example, that you have a C program compiled
for Linux on the DEC Alpha processor. If you want to run it, you need to
buy a DEC Alpha processor -- they don't come cheap.

A compiled Java program will also only run on the platform that it was
compiled for. That platform is normally the Java virtual machine. So if
you want to run the program, then you need to buy a Java virtual machine.
Fortunately, they're free!
yeah but the designer of Java intended the langauge to be portable to
any machine that supports it and run it from a JVM, but its running
from a
second compiled form called byte code which depends on the JVM to run
it.
>
Whatsmore, there *is* a true compiler for Java -- it's part of the GCC
suite. Seehttp://gcc.gnu.org/java/.
Theres none for Windows XP, and secondly the compiler by gcc is has
bugs that
make certain features of Java not possible, some *.awt's are
icompatible
>
Java has many drawbacks, but device-independence is normally quoted as one
of its best features!
But the most useful of all the programming langauges is assembly

Nonsense. A programming language is only as useful as what people can do
with it. Given a week, and experienced, say, C programmer can do a lot
more in C than an experienced assembly programmer can do in assembly.

Sure, it's fast, and at certain times it's worth the programmer time to
drop down into assembly and eek a bit of extra speed out of the program.
But those situations are very rare; unless you're working on compression,
encryption, high-end 3D graphics or kernel development, you're unlikely to
encounter such a situation.
for todays applications - it assembly is good for optimization of
certain
parts of code or developing hardware drivers.
And that basically proves that there can be no such thing as copyright
protection scheme or anything to prevent software duplication.

http://en.wikipedia.org/wiki/Trusted_Computing

Summary: TC processors can be designed so that they refuse to run an
operating system unless it has been digitally signed. If you modify your
operating system, the signature will break, and you'll be unable to run
it; so for all intents and purposes, the OS cannot be modified. The TC
operating system similarly refuses to run a program unless it has been
signed; so for all intents and purposes, no programs can be modified.
No scheme is fool proof for any long term plan
>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Apr 4 '07 #22
Toby A Inkster wrote:
K.J.Williams wrote:

If you've not been using CSS, then the chances are, you've not been using
HTML properly either.
This comment doesn't really hold true, you can do good HTML without
knowing CSS. CSS didn't exist when HTML came out, but by the inference
in this comment it would mean hardly anyone every did any good HTML.

So it all depends on what version of HTML you're talking about, really
this would mean XHTML with CSS ?
Apr 4 '07 #23
K.J.Williams wrote:
See my interjections to your comments below..
Good, that's where we expect to find them.
HTML is a pseudo-programming langauge

HTML is not a programming language at all -- it's a data format, much
like JPEG or MP3 is.

I disagree.

HTML is an interpreted langauge that has a simple method of handling
Sheesh, I've been reading some weird stuff in this thread. HTML is not
a data format, it's not a programming language, it's a Markup Language.
Though if you've got to explain what that is to someone, calling it a
"data format" is probably a very good place to start.
yeah but the designer of Java intended the langauge to be portable to
any machine that supports it and run it from a JVM, but its running
from a second compiled form called byte code which depends on the JVM
to run it.
I was pretty sure that the original whitepaper [1] mentioned bytecode
and JVMs and yes, it does:
http://java.sun.com/docs/white/lange....doc1.html#402
Theres none for Windows XP, and secondly the compiler by gcc is has
Cygwin?
>http://en.wikipedia.org/wiki/Trusted_Computing

No scheme is fool proof for any long term plan
Something I can agree with you about.
>--
Shpxvat Google Groups. Toby's got a perfickly good sig-sep, but Google
ignores it. Google's "do no evil" mantra is starting to lose out to
a Microsoft-style "WE make the standards, you peasant" attitude.

[1] Can I just say that I read it when it came out? Can I?

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
Apr 4 '07 #24
On Mar 30, 2:31 am, "K.J.Williams" <lordw...@quik.comwrote:
Hello,

A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
bash shell scripting for Linux?

Thanks
KJW
Hello Friend
I also has exp in VB when I started PHP.
As said in one comment, It will be good to learn basic HTML first.
Then you can easily start with PHP and mysql.
You already know all the basic from another language so learning PHP
would be easy for you.

In PHP things will not so organised as VB. In PHP you can get
seperation of code through different
php page which can be included in any php pages like do from library.

Use this link:
http://satya61229.blogspot.com/2007/.../> simple.html

Apr 5 '07 #25
On Apr 4, 6:22 pm, Mary Pegg <inva...@invalid.comwrote:
K.J.Williams wrote:
See my interjections to your comments below..

Good, that's where we expect to find them.
HTML is a pseudo-programming langauge
HTML is not a programming language at all -- it's a data format, much
like JPEG or MP3 is.
I disagree.
HTML is an interpreted langauge that has a simple method of handling

Sheesh, I've been reading some weird stuff in this thread. HTML is not
a data format, it's not a programming language, it's a Markup Language.
Though if you've got to explain what that is to someone, calling it a
"data format" is probably a very good place to start.
yeah but the designer of Java intended the langauge to be portable to
any machine that supports it and run it from a JVM, but its running
from a second compiled form called byte code which depends on the JVM
to run it.

I was pretty sure that the original whitepaper [1] mentioned bytecode
and JVMs and yes, it does:http://java.sun.com/docs/white/lange....doc1.html#402
Theres none for Windows XP, and secondly the compiler by gcc is has

Cygwin?
>http://en.wikipedia.org/wiki/Trusted_Computing
No scheme is fool proof for any long term plan

Something I can agree with you about.
--

Shpxvat Google Groups. Toby's got a perfickly good sig-sep, but Google
ignores it. Google's "do no evil" mantra is starting to lose out to
a Microsoft-style "WE make the standards, you peasant" attitude.

[1] Can I just say that I read it when it came out? Can I?

--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".

Apr 5 '07 #26
Tyno Gendo wrote:
Toby A Inkster wrote:
>If you've not been using CSS, then the chances are, you've not been using
HTML properly either.

This comment doesn't really hold true, you can do good HTML without
knowing CSS.
*Can* do good HTML without knowing CSS, yes. I said, "chances are".

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 5 '07 #27

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
by: Marco | last post by:
Ive been using front page but it starts to anoy me when i need to change in the source things that i cant change while in the "normal" mode, specialy when working with tables its soo hard to tell...
23
by: darwinist | last post by:
What PHP Represents There is no shortage of complaints one could make about php as a language, and although the list does shrink with each release, some of them are inherent to the origins and...
28
by: Admin | last post by:
I am doing some research for a Python framework to build web applications. I have discarted Zope because from what I've read, the learning curve is too steep, and it takes more time to build...
8
by: Hermawih | last post by:
Hello , I want your opinion about this . In order to say it clearly , I think I have to describe it in long sentences . I could consider myself as Intermediate/Advance Access Developer ;...
8
by: scorpion53061 | last post by:
Hi, I am a vb.net guy......(I know boo hiss LOL) I was thinking of learning C# as well. Can I expect a hard road of it as far as a learning curve? As as side note, what made you choose...
8
by: Midnight Java Junkie | last post by:
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that...
7
by: dgk | last post by:
I'm trying to persuade my company to use ASP.NET for a development effort but I'm pretty weak in both ASP.NET and web development. I've explained that ASP.NET works by turning the controls on the...
8
by: Chris Asaipillai | last post by:
Hi there I have some questions for those experienced Visual Basic 6 programmers out there who have made the transition from VB6 to Vb.net. How long did it take you to learn at least the basic...
11
by: Paul Brady | last post by:
Apparently, I have been living on the wrong planet. I have written 15 databases in Microsoft Access in the past 10 years, some of which are split, one uses ODBC interface with a SQL server, one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.