PHP or AJAX - which is better for me to focus my attention on?

Discussion in 'Programming' started by mnymkr, Jul 12, 2006.

  1. #1
    I have enjoyed learning about php. I really like it because everything happens server side. I try to design many of my sites without requiring the user to have anything ie Flash, Javascript.

    However AJAX is fascinating to me.

    What do you think?
     
    mnymkr, Jul 12, 2006 IP
  2. duilen

    duilen Active Member

    Messages:
    354
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Go with Ruby on Rails. It's easier than PHP and has AJAX built in.
     
    duilen, Jul 12, 2006 IP
  3. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You are talking about two different things, one server side and one client side technology. They each get different things done. So it's not a matter of either or, just depends on what you need done.
     
    T0PS3O, Jul 12, 2006 IP
  4. mmariusel

    mmariusel Well-Known Member

    Messages:
    562
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    135
    #4
    Depending on what you want to concentrate. If you develop small website or wit an budget under 20.000 you should consider php. If you need salabilit yand some other things php is not so good you should consider also asp, jsp etc
     
    mmariusel, Jul 12, 2006 IP
  5. mnymkr

    mnymkr Well-Known Member

    Messages:
    2,328
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    120
    #5
    wow thanks for the quick responses.

    I am very interested in learning a language. I am just trying to pick the correct one for me at this juncture. What are the pros and cons of some of them?

    I have read about Ruby on Rails although I am not sure exactly what it is.

    Which language is likely to endure the test of time?
     
    mnymkr, Jul 12, 2006 IP
  6. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well, if you like getting things done efficiently I would recommend PHP or PERL. If you like making fun things that are very interactive you could try out AJAX. I don't see AJAX as anything that should be required due to the many people who disable javascript.
     
    giraph, Jul 12, 2006 IP
  7. mnymkr

    mnymkr Well-Known Member

    Messages:
    2,328
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    120
    #7
    But you see AJAX everywhere when you look up Web 2.0 . No that I think it is required but I know years ago I read how everyone was down on javascript and now its the next new thing. Really confusing. :confused:

    How does Ruby compare to PHP? Will it take it over?
     
    mnymkr, Jul 12, 2006 IP
  8. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I was gonna look into Ruby soon, i've heard about it and it seems intriguing :D

    I started slowly changing pages on my site over to AJAX, and it saves on page loads, so thats a plus. Most people have JS enabled, so i usually dont get any problems from that
     
    decepti0n, Jul 13, 2006 IP
  9. xeno

    xeno Peon

    Messages:
    788
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You could even combine AJAX with PHP to make some nice apps. You could even use Flash as an interface to serve your PHP requests, which is similar to AJAX. That's my favorite way to do it.
     
    xeno, Jul 13, 2006 IP
  10. Rjx

    Rjx Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    AJAX is useful, but pretty much just a flashy gadget, although there are numerous benefits to learning javascript itself. Ruby on Rails is just another MVC framework, and from my experience not a terribly good one (although personally i love the ruby language myself). There's a lot of hype surrounding it from the Web 2.0 crowd, giving it far more attention than it probably deserves. As far as MVC frameworks go, Struts (Java) or Django (Python) is probably a better bet.

    Just my 2 cents!
     
    Rjx, Jul 14, 2006 IP
  11. Mk3890

    Mk3890 Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    PHP is more important, AJAX is useless if you don't have a dynamic backend for it too use.

    Like Rjx said AJAX is a flashy gadet
     
    Mk3890, Jul 14, 2006 IP
  12. mnymkr

    mnymkr Well-Known Member

    Messages:
    2,328
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    120
    #12
    I just don't know enough. I know Ajax is client side and php is server side. Where does Ruby fit in to this? Should my host have it set up where I can write in Ruby? Or am I asking that incorrectly?
     
    mnymkr, Jul 17, 2006 IP
  13. DrMalloc

    DrMalloc Peon

    Messages:
    130
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Ruby is a scripting language, like php or python. They all enable you to write dynamic pages, and they all run server-side. Frameworks (like Ruby on Rails) are helper libraries written in a scripting language to aid the building of larger/more complex web applications faster and easier.

    To explain server-side languages a little more clearly, when a person requests a page, the server will send the request data on to the scripting language. The scripting language will then process the request, execute any logic/commands and then return the results to the user. The role ends there.

    By contrast, client-side languages run after the page has been recieved (like javascript) to control certain elements of the page, allow effects or data validation.

    What AJAX does is bridge the two, updates to the page can be made from the server, the client-side javascript will request new data from the web server and add it to the current page without any refreshing.

    I think i may have just confused you more, apologies if i did!
     
    DrMalloc, Jul 18, 2006 IP
  14. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Hi,
    I found this free AJAX library for PHP that maks AJAX very eay to use. You can use it to redirect a javascript function to call a PHP function!! Cool huh?

    http://www.modernmethod.com/sajax/

    I haven't used Ruby. I did take some tutorials on it and download it too. But I am too addicted to PHP to use it. :D

    Thomas
     
    coderlinks, Jul 23, 2006 IP