Jump to content

heruwer

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by heruwer

  1. If you're familiar with C, then PHP won't be very foreign to you. Memory allocation and garbage collection is more automatic in PHP then it was in C, and things like variable references and arrays are conceptually different (references in PHP aren't the same as pointers in C, and things like arrays aren't stored in memory in PHP the way they are in C), but in general you will be able to pick it up easily. printf is still there if you need it, PHP has sscanf and fscanf and sprintf, the main difference between C and PHP is dealing with the fact that PHP is running on a web server and has access to various predefined variables, like the $_SERVER, $_GET, $_POST, $_SESSION, and $_COOKIE arrays, and also the fact that each PHP page essentially needs to be a standalone application, but it needs to check the application state using the predefined arrays (like the session) to tell the page how to proceed, where a C program just runs until you stop it. You can also choose if you want to use the newer object-oriented syntax more like C++, or the older functional or imperative syntax. Many of the built-in functions have support for both styles.
    Wow, that's scary... this is sort of the approach I was looking at for using C to do the server side... It looks like PHP has all this already figured out (and better than I would have myself). Good to know it's somewhat similar in syntax. I hate to use pointers in programs unless they are absolutely necessary - they can lead to serious problems when debug phase starts (maybe I'm weird for a C coder, but I'd rather a hundred extra lines of code that are readable and maintainable than one cryptic, unfathomable gem I can't figure out a year later. Of course, that's what comments are for, but I know how my mind works - what I think is important during coding turns out to not be really as interesting as I thought, but I digress.)I'm not crazy about OOP at all yet... every time I try to learn an OOP language (let's see now... Visual Basic, Java, Python, C++, GamBAS, Ruby, and a few others) I wind up with a headache during program design phase when I try to figure out what objects I need to create in order to get a task accomplished. It's a paradigm-shift kind of thing, I know, and sooner or later the lights will come on, but not just now. (I'm just way too comfortable with block-structured, procedural languages.)Oh, shoot. Gotta go - it's time to get back to work.Thanks again, all, for the great info to be found here.Later ON,Dave
  2. There are several open source AJAX "frameworks" out there. Even Microsoft has one (don't use it though). Google has one as well, the Google Web Toolkit. The Wikipedia page has examples in Javascript, C++, Java, .NET, PHP, and Python:http://en.wikipedia.org/wiki/Ajax_frameworkI agree about the ASP thing, but the people who built the w3schools site obviously preferred ASP so that's what we get all the examples in. It seems pretty outdated at this point, but that's the way it is.
    Thank you all for the responses and the good info. I'm definitely going to be looking at PHP, the Google Toolkit, and other resources mentioned. I just saw a nice article in Linux Journal on Mochikit (http://www.mochikit.org), which is another AJAX framework. That looks promising, too.I kinda thought C might be a bit heavy for this kind of stuff, but I'm more familiar with C than PHP - that's why I was considering it. One of the problems I have is the embarassment of riches in the computing world right now. There are so many ways to do any task or solve a particular problem that taking the time to choose the right tools can make a lot of difference in the finished product.Thanks Again, Everyone!Dave
  3. The noob speaks:Since I'm really new to AJAX and to Javascript, but not to Linux/FOSS, I'd like to see more stuff on it in a tutorial that does NOT rely on Active Server Pages for server-side stuff. I don't ever intend to learn ASP (I would prefer a more open technology), and need to know how to set up server-side processes with another technology. Would PHP be a good choice for this, or, maybe C (gcc)?Since the best code is code already written, are there server-side libraries anywhere which might be useful to someone wanting to use AJAX with a minimum of server-side programming?Or do I have this all sideways somehow?Thanks,Dave

×
×
  • Create New...