+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: PHP or Javascript

  1. #1
    phazzedout's Avatar
    phazzedout is offline x10 Sophmore phazzedout is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    CA, United States
    Posts
    230

    PHP or Javascript

    I was asked by my father to build him a website with a contact form, image galleries, sending images of his products through emails, other things like that. Which language would it be best to build that kind of website with. Would it be easier and better with PHP or Javascript. Ruby would also be fine.
    "Words convey the mental treasures of one period to the generations that follow; and laden with this, their precious freight, they sail safely across gulfs of time in which empires have suffered shipwreck and the languages of common life have sunk into oblivion." - Anonymous

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: PHP or Javascript

    PHP and Ruby are server side. JS is (mostly) client side (there is such a thing as server-side JS, but it's uncommon). They're used for different things. If you're thinking of using X10, the X10 servers (at least, the free ones) don't appear have a Ruby interpreter installed. Even if Ruby on Rails were installed, it's more for web apps than web sites in general (though you could approach the site as an app). They have Python, but no web framework to go with it, such as Django. Similar situation for Perl. Basically, Perl and Python on X10 are used for CGI scripts.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    cybrax's Avatar
    cybrax is offline x10 Elder cybrax is on a distinguished road
    Join Date
    Aug 2009
    Location
    UK
    Posts
    699

    Re: PHP or Javascript

    To be honest, you'll need to use both PHP and Javascript.

    PHP for the form to email side of things and javascript for menu and galleries.

    http://www.tele-pro.co.uk/scripts/contact_form/ form to mail script generator
    fill in the blanks, cut/paste and upload to your server.. simples tweek as neeed.

    http://www.dynamicdrive.com/dynamicindex4/indexb.html for all the javascript
    The code must flow.
    Project 157: Latest UK Jobs direct to your mobile phone
    New Domain under construction: Lovelogic.net
    home for some new projects that we can't keep here ;)


  4. #4
    phazzedout's Avatar
    phazzedout is offline x10 Sophmore phazzedout is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    CA, United States
    Posts
    230

    Re: PHP or Javascript

    Thank you both of you. You are right, Ruby on Rails is not on the free servers, do not know why since it is free. Oh well.

    I guess I will have to refresh my memory on Javascript and learn much more PHP.

    Thank you. I tried building him a website 2 years ago when all I knew was HTML, CSS, and some Javascript. It was an epic fail. Now I know more so we will have to see.
    "Words convey the mental treasures of one period to the generations that follow; and laden with this, their precious freight, they sail safely across gulfs of time in which empires have suffered shipwreck and the languages of common life have sunk into oblivion." - Anonymous

  5. #5
    cybrax's Avatar
    cybrax is offline x10 Elder cybrax is on a distinguished road
    Join Date
    Aug 2009
    Location
    UK
    Posts
    699

    Re: PHP or Javascript

    Don't fret.. you should see some of my portfolio that was done circa 1995. I cringe just looking at the designs.

    Just keep it clean and simple, remember that visitors want informative and useful content and they want it fast. They do not care how many hours you spent photoshopping the background image or logo to get it looking nice. Get it working then make it pretty, not the other way around.


    Incidently now that Google has revealed it tweaks web site ranking using the page loading times as well the whole design/ build community is having kittens. Those heavily relient on graphics, Msql backends or FLASH particulary so, even overdoing it with the client side javascript could have consequences for the SEO.
    The code must flow.
    Project 157: Latest UK Jobs direct to your mobile phone
    New Domain under construction: Lovelogic.net
    home for some new projects that we can't keep here ;)


  6. #6
    dbantner is offline x10Hosting Member dbantner is an unknown quantity at this point
    Join Date
    Jan 2010
    Posts
    34

    Re: PHP or Javascript

    I just read an article on slashdot.org that was saying that Java was losing ground and losing favorability because of, some people think, Microsoft. But who knows. I personally like php because I believe it's faster and easier to use. Plus gained ground very quickly in the beginning and has done nothing but grow by leaps and bounds.


  7. #7
    essellar's Avatar
    essellar is online now Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,152

    Re: PHP or Javascript

    Quote Originally Posted by cybrax View Post
    To be honest, you'll need to use both PHP and Javascript.

    PHP for the form to email side of things and javascript for menu and galleries.
    The real answer to the question is both, of course -- but don't ever require your users to use JavaScript. In this case (on x10Hosting), you would build a PHP site that does everything you need the site to do, including the image galleries. If you really want to do things right, the site should be completely usable (if ugly) without any CSS or JavaScript at all. You can then modify the pages you have created with (first) CSS, to make the site more attractive and define "activity areas" clearly to make the site more usable, then JavaScript to make the application more responsive in the browser (by preloading images, doing the gallery paging on a single page, validating form data in the browser, and so on). Not only does that make Google (and other web crawlers) happy, it means that more users can access and make use of the site on more devices.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  8. #8
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: PHP or Javascript

    You should build it in PHP. Every browser supports PHP, and not all browsers support javascript.

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  9. #9
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: PHP or Javascript

    Quote Originally Posted by Alex Mac View Post
    Every browser supports PHP, and not all browsers support javascript.
    No browser supports PHP because it's a server side scripting language. You could, I suppose, create a browser extension to support client-side PHP (like the old Tcl plugin).
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  10. #10
    Tariqul Islam's Avatar
    Tariqul Islam is offline x10 Sophmore Tariqul Islam is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    Bangladesh
    Posts
    182

    Re: PHP or Javascript

    In your issue I think PHP, MySQL is the best. For form validation you can use JavaScript. Also for beautification you will need CSS.



+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Javascript Help
    By driveflexfuel in forum Programming Help
    Replies: 2
    Last Post: 11-30-2009, 04:09 AM
  2. javascript
    By rick8028 in forum Scripts & 3rd Party Apps
    Replies: 6
    Last Post: 05-31-2009, 12:28 PM
  3. Javascript
    By as4s1n in forum Free Hosting
    Replies: 1
    Last Post: 05-03-2009, 02:24 PM
  4. javascript and external javascript files problem
    By delon in forum Programming Help
    Replies: 6
    Last Post: 04-27-2008, 12:41 AM
  5. javascript help
    By cowctcat in forum Programming Help
    Replies: 4
    Last Post: 04-04-2008, 10:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers