Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed May 22, 2013 2:34 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

Next website development article?
Poll ended at Sat Jun 25, 2011 10:57 am
PHP 52%  52%  [ 11 ]
Javascript 48%  48%  [ 10 ]
Total votes : 21
Author Message
 Post subject: Vote for the next article - PHP or Javascript
PostPosted: Wed Jun 15, 2011 10:57 am 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
Folks,

Following on from my articles introducing Stylesheets and Web page layout.....

http://wiki.sandaysoft.com/a/Stylesheets
http://wiki.sandaysoft.com/a/Webpage_layout

I'm trying to decide on my next topic -- Javascript or PHP. Both are equally useful to the modern website developer!

Please take a moment to vote -- I will let it run for a week or so and then do which ever one is most popular.

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Wed Jun 15, 2011 11:04 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
David, how about adding JQuery and JSON to your ToDo list?

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Wed Jun 15, 2011 11:08 am 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
TBH, the Javascript would include jQuery as it makes things much simpler than 'raw' Javascript. I could certainly write something on JSON too but not in an intro article, but maybe on its own.

I think each of these two topics (PHP and JS) spawn a few sub-topics like MySQL, JSON, AJAX techniques. I could be busy :lol:

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Wed Jun 15, 2011 11:17 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Its funny but the other day I wondered how JQuery performed against raw JavaScript, after Googling for a while it seems it is about 500-600 times slower processing 'large' pages. So the convenience comes at a cost - as ever. Now I really must learn JQuery... :lol:

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Wed Jun 15, 2011 10:17 pm 
Offline

Joined: Mon Aug 23, 2010 5:04 pm
Posts: 38
Location: Cornwall, England
Weather Station: Davis Vantage Pro 2
Operating System: Windows XP
David
I, for one, would find it very helpful if you could add to the excellent articles that you have already written for the Wiki. I have voted for PHP, however what about a brief general article on the what/why/whens of PHP and Javascript?

From reading many of the messages on the forum I can just about understand the programs listed and it seems as though they both can do similar things but I can't find out which is best to use for which purpose.

For example:
    PHP has the advantage that it is all on the server side - so what?
    Javascript has the ability to do timings, does PHP?

Sorry if these are all very basic questions but I would like to know when to use PHP, when to use Javascript and what are the advantages/disadvantages of both.

These questions could also be applied, it seems, to other choices, for example the different graphing methods that have been quoted on the message board.

Thanks for all your work on the Wiki - very useful.

Graham

_________________
Graham

Weather in Poundstock, Cornwall, England


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Wed Jun 15, 2011 11:12 pm 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 351
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
Graham64 wrote:
David
I, for one, would find it very helpful if you could add to the excellent articles that you have already written for the Wiki. I have voted for PHP, however what about a brief general article on the what/why/whens of PHP and Javascript?

From reading many of the messages on the forum I can just about understand the programs listed and it seems as though they both can do similar things but I can't find out which is best to use for which purpose.

For example:
    PHP has the advantage that it is all on the server side - so what?
    Javascript has the ability to do timings, does PHP?

Sorry if these are all very basic questions but I would like to know when to use PHP, when to use Javascript and what are the advantages/disadvantages of both.

These questions could also be applied, it seems, to other choices, for example the different graphing methods that have been quoted on the message board.

Thanks for all your work on the Wiki - very useful.

Graham


I second Graham64 ideas. David is so knowledgable on these subjects. I am still trying to understand so much :o
I now have a paid webhost that offers MySql data bases, but I have no idea how to send data to them.... :oops: !!

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Thu Jun 16, 2011 9:18 am 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
Ok, here are some basics on the different technologies. Broadly speaking (before anyone starts chipping in with the , "Ah, but..." comments) !!


HTML
All web pages are written using the HTML language -- this describes the content of the page and how a page is laid out. HTML is sent from a web server and the browser then displays it.

CSS (Stylesheet)
This is used in conjunction with HTML to style your page (colour, position, etc). Again this is sent from the webserver and the browser uses it to display the page

Javascript
This is a language used by your browser to manipulate the page being displayed on screen. It is always executed on the browser (so all the work is done on the users machine -- pc/mac/phone, etc). JavaScript is supported by all modern browsers, incudling some mobile phones (iPhone, Andriod, etc). The user does have the option to turn off Javascript (some consider it a security risk) however by default it is turned on and most modern sites rely heavily on Javascript. IE has one of the worst iplementations of Javascript (mostly for speed) but is much better in IE8/9

PHP
This is loosely based on the Javascript language (for syntax). It's major difference is that it is run on the webserver BEFORE the HTML page is sent to the users browser. It never runs on the browser. PHP is typically used to add logic/intelligent to a web page. (example,you have data from a Cumulus webtag to say it is raining, so show a picture of a cloud) Whatever output PHP produces must be in HTML. So, when you request a web page from the server containing PHP the web server will execute this, build the resultant page (in HTML), and send the result to the browser. PHP must be enabled on the webserver. Most good hosting firms enable it by default. Most free hosts do not.

When to use JS (Javascript) or PHP ?

Using PHP is much faster (usually) as all the work is done on the webserver (which is fast) and the result is sent to you
Javascript is slower as all the JS code is sent to the browser, then executed on the PC, and the page updated
A user may have JS disabled, so you might need to consider that your page will not work
If you do not have PHP on your webserver you need to use JS!

To be honest, you will probably use both.

If you look at this page...http://www.grantownweather.co.uk/realtime it starts off as PHP so that I can use logic on the web server to build the page and send the results. I then use Javascript to update the page every 30 seconds and highlight changes in yellow.

What about Ajax?
Ajax is, in essence, a concept not a new language. It's basically JavaScript and it works in the background while you are viewing a page on the browser. In the above example, I am actually using Ajax methods to go back to the webserver and get data every 30 seconds; I then use Javascript to update the page layout/content

and jQuery?
This is simply a library of Javascript code (functions). Using jQuery I can use simple commands to do tasks that would take several lines of Javascript. jQuery is Javascript.

any questions? LOL Hope that helped ;)

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Thu Jun 16, 2011 10:36 am 
Offline
User avatar

Joined: Thu Dec 17, 2009 2:03 pm
Posts: 787
Location: Hurstpierpoint, West Sussex, UK
Weather Station: WH1081
Operating System: Windows XP & 7 Pro
Thanks David - CRYSTAL! :)

_________________
Neil
Hurstpierpoint Weather

Image


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Thu Jun 16, 2011 12:22 pm 
Offline

Joined: Mon Aug 23, 2010 5:04 pm
Posts: 38
Location: Cornwall, England
Weather Station: Davis Vantage Pro 2
Operating System: Windows XP
David
Thanks very much, that is just what I wanted - a concise summary in one place. I, for one, will find it very useful.

What about putting it on the Wiki as a good starting point that can easily be found for those of us new to a lot of the languages etc?

Graham

_________________
Graham

Weather in Poundstock, Cornwall, England


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Thu Jul 14, 2011 10:38 pm 
Offline
User avatar

Joined: Wed Dec 16, 2009 2:32 am
Posts: 150
Location: Wairoa, Hawkes Bay. New Zealand.
Weather Station: La Crosse WS1081
Operating System: Windows XP, XP Pro & Win 7
Thanks for the summary David.

I see php won the poll so now I wait for my php lessons :)

_________________
Wairoa, Hawkes Bay, New Zealand Weather Station.
http://wairoa.net/weather/index.htm
Image


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Sat Dec 17, 2011 11:02 am 
Offline
User avatar

Joined: Sun Jul 03, 2011 6:23 pm
Posts: 324
Location: Eastleigh, Hampshire, UK
Weather Station: Davis VP2 - 24hr FARS
Operating System: Windows 7 - 64 bit
Does the PHP article exist yet? I need to start somewhere :D

Duke

_________________
Duke

Nightingale Weather PHP
Eastleigh, Hampshire, UK


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Sat Dec 17, 2011 11:35 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17564
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
David seems to be taking a sabbatical. Hopefully he'll be back before long.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Sun Dec 18, 2011 5:17 pm 
Offline
User avatar

Joined: Sun Jul 03, 2011 6:23 pm
Posts: 324
Location: Eastleigh, Hampshire, UK
Weather Station: Davis VP2 - 24hr FARS
Operating System: Windows 7 - 64 bit
In it's abscence can anyone suggest a good place to start?

Duke

_________________
Duke

Nightingale Weather PHP
Eastleigh, Hampshire, UK


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Sun Dec 18, 2011 6:37 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17564
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
php.net is a good place for information on PHP. There's a getting started tutorial here - http://php.net/manual/en/tutorial.php

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Vote for the next article - PHP or Javascript
PostPosted: Mon Dec 19, 2011 3:25 pm 
Online

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1794
Location: World...
Weather Station: No weather station
Operating System: No operating system
Another good Internet location would be W3Schools' PHP Tutorial...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: gemini06720 and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group