Web Analytics Made Easy -
StatCounter General scripting/programming questions for you! - CodingForum

Announcement

Collapse
No announcement yet.

General scripting/programming questions for you!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • General scripting/programming questions for you!

    I want to make sure I get a few basics correct, and you guys know this stuff.

    Is it true that server-side material is becoming vastly more popular AND more powerful?

    It seems, and people have said in the past, that this is a major explosion.

    Also, can javascript do anything php can't?

    What does it mean to be a markup language? What's the underlying quality?

    Doesn't ASP focus (or am I wrong) on storing information on the user computer? If so, isn't most of this able to be done with php?

    Generally, where is the major focus of programming and of scripting? What are the dominant programming languages.

    Thanks - Trying to understand the fundamentals.

  • #2
    I'd have to say the 3 most dominant languages in my world are:

    C++
    PHP
    Perl

    Comment


    • #3
      Also, can javascript do anything php can't?
      javascript does things on the clients machine, ie: alerts, dhtml scripts, open new windows etc
      php has no idea what any of those things are, but it can query a database, create images, log information, which javascript can't do

      Comment


      • #4
        Good stuff.

        I am not familiar with what perl is - can someone tell me?

        I know what all the other things are.

        Comment


        • #5
          Re: General scripting/programming questions for you!

          Originally posted by MysteryMan
          [B]
          What does it mean to be a markup language? What's the underlying quality?
          Usually a markup language is uncompiled like HTML, or at least that is how I always thought of it.

          Doesn't ASP focus (or am I wrong) on storing information on the user computer? If so, isn't most of this able to be done with php?
          No... ASP is a server side language just like PHP. It just is another language and you can only use it on servers using IIS (mostly). It supports JScript, VBScript, and I believe like Perl syntax. VB is the most common though. PHP is platform independent though.
          OracleGuy

          Comment


          • #6
            Oracle - Excellent thanks.

            Seems like as I suspected, PHP is superior and rightly so....

            Comment


            • #7
              PHP and JavaScript don't make a good comparison because they are designed to do completely different things. I use both PHP and JavaScript together on my projects, frequently.
              PHP code is executed on the server, a static HTML document is compiled, and this result is sent to the client. Thus, PHP is useful for things that can only be done on the server, such as database access.
              Take, for example, an online form, which you fill out and submit. The data from the form can be sent to a PHP document on the server, which enters it into a database and sends back a friendly thanks. All that is ever sent back is HTML, and the client doesn't use up any CPU time.
              JavaScript, on the other hand, is embedded in the HTML document that is sent to the client, shoe-horned in with the <script> tag. It has control over the client's browser, only. JavaScript is perfect for when you want to make your page change after it has been loaded into the client's browser. Animation, rollovers, autoscrolling, field-verification...etc. are the sorts of things that JavaScript is good for.
              Using the same example, say we had an email-address field in our form, and we wanted to check and make sure that the user hadn't entered something like "jfelwifnhoweu" as an address. We could use JavaScript to check the field for tell-tale symbols such as @, and if they weren't found, display an error message (before going to another page), asking the user to fix that field.
              Technically, that function could be performed using PHP also, but to get PHP to do anything dynamic, the page has to be reloaded.

              I hope I have been some help to you, and if you want to know more, send me a private message.

              PS: One more thought. A Markup language is generally all about static layout, and can't perform logic.
              "Simplicity provides confidence, reliability, compactness, and speed."
              --Charles H. Moore

              Comment


              • #8
                Lep - That helps a lot. Now I know much more. Thanks!

                I believe me only question now is - what programming langaues (not scripting) are dominating?

                top 5 to top 3?

                Comment


                • #9
                  That's kinda of a hard question, there is no "correct" language or anything like that. As far as applications, C++ is pretty common.

                  But the more languages you know, the more valuable you are to a company. Like I know ColdFusion, I'd never create a new site with it... it is old and have some serious server issues but at work we had a project that was written back in the late 90s in it before ASP was worth anything that needed some re-design and it helped that I knew it. There are lots of companies with software that needs maintenance that could be years old and in some old language.

                  At work our standard that we have to write new development, for my team, is in C# since we can use it for web and applications and we're not mixing languages then.

                  I hoped that helped... lol....
                  OracleGuy

                  Comment


                  • #10
                    Originally posted by Leprechaun
                    A Markup language is generally all about static layout, and can't perform logic.
                    Not necessarily - XSL is a markup language that performs logic and computation. SMIL is a markup language and it creates time-based animation.
                    Last edited by brothercake; Feb 20, 2004, 01:39 AM.
                    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

                    Comment


                    • #11
                      I'm quite surprised that no one mentioned Java yet...

                      MysteryMan, the question which languages are the truely dominant one is too broad to answer. The answer depends fully upon the environment the applications. For instance, if you think about Embedded Systems, you won't find many high-level languages like PHP or ASP, but rather a lot C or a special dialect of Java. Programming for the Mac is different than for Unix or Windows. It all depends.

                      As an attempt to narrow down your question, let's look at the most dominant languages used now to produce server-side applications (like a CMS or weblog), ordered by popularity top-down:

                      PHP
                      ASP
                      Perl
                      ColdFusion
                      JSP

                      The perceived dominance of PHP is due to the fact that PHP ships with most Linux distro's, is free to use, and as such relatively ship to include in a hosting package. The language itself has not a steep learning curve like Java and you're getting quite far with a little script hacking.

                      However, this is only true for small- to mid-size applicatons. The order changes the more expensive and bigger the server applications get, and how much they are integrated in a company wide business tier, you will see much more Java and hence JSP (Java Server Pages) and Servlets used. At the very top (seen from project costs) you'll only have Java vs. C#, although the trend seems to go a little to use scripting languages like PHP for the presentation tier.

                      I hope I made any sense here...
                      De gustibus non est disputandum.

                      Comment


                      • #12
                        Well, I thought I'd jump in here as well.

                        To me markup languages are a way of adding semantics to data, or describing a set of data. The most common of these is HTML which is a way of describing information for the web. XML / XHTML are cousins to HTML (maybe parents???) but they still are a method of describing the data.

                        Next we have scripting languages. These are generally non-compiled languages that are processed by some type of script interpreter. They come in all types of flavors and can be used both server and client side. I would have to say the populariity (in the web world) is pretty close to this:

                        Server side:
                        ---------------------
                        PHP
                        VBScript (ASP and it's .net buddies)
                        PERL
                        JSP
                        Python
                        Cold Fusion
                        JavaScript

                        Client Side:
                        ---------------------
                        Javascript
                        VBScript
                        PerlScript (ok, this one is really small, but it exists)

                        Next we have compiled languages. These require some type of program to take the source code and change it into (for lack of a better term) machine code. This is usually known as a compiler. Today, the most popular are something like:

                        C / C++
                        Java / Beans / and all it's buddies
                        Visual Basic (and it's .net buddies)
                        C#
                        FORTRAN

                        Of course, I don't have the stats, but that's how it seems to be. Could be a little off though.
                        Create accessible online surveys -::- Koobten.com - compare netbook prices and reviews -::- Affordable, reliable hosting for less than $20 per year
                        Zend Certified Engineer

                        Comment


                        • #13
                          Weyall...I'm surprised I managed to stay away from this convo as long as I did, lol.

                          It will be difficult to not reiterate what others have already said, but I'll put things in the shortest, simplest forms I can.


                          1. Server-Side Scripting Languages
                          These are written in various languages (PHP, ASP, Perl, ColdFusion) to perform various "on-the-server" processes, like write data to a file, dynamically create folders/files, open connections to other applications on other servers, access databases. These languages run in the context of the system they are on (security-wise). They are usually considered to have unrestricted access the server they run on. Think "Major Processing"

                          2. Client-Side Scripting Languages
                          Think "JavaScript" and "VBScript" (though there are others). The key to these is that after the entire page is loaded and the client's browser takes over, these languages kick in. Think "Minor Processing"

                          3. Stand-alone Programming
                          The Biguns here (IMO) are:
                          C++, C#, Visual Basic, Java, Fortran, Cobol.
                          These are the foundational languages people use to write applications. Java is a sick hybrid.....that is wicked cool.... anyway... These guys are either compiled into an executable, or they have a run-time engine that translates the code into what is easiest to think of as a "Virtual executable". Think "Wow. Ubercool Processing".

                          Where things get tricky is that PHP & ASP both allow you to embed their little nuggets of code directly into a HTML file. But that isn't spectacular if you think about the way that requesting a file off of a webserver works:

                          1. The server listens on a port (usually port 80, for web)
                          2. The client attempts to connect to said port
                          3. Server & Client agree and connect
                          4. The Client sends a request for something (like "/files/mypic.jpg")
                          5. The server examines this, and depending on its configuration, it responds. In the case of a .HTM file, the server (usually, again, configuration-dependant), spits the file to the client
                          6. The client says "Thanks"
                          7. Server says "no problem"
                          8. The connection is closed.

                          now what ASP and php do is they say in step 5..."depending on the file type requested, parse it through the PHP or ASP engine first...THEN spit it out". That's where they can get confusing.

                          What's even more freaky is when you begin thinking of PHP as one of those "Stand-alone Programming" languages....heh...but that's another story.


                          Perl was originally written to handle complex text files. Due to it's awesomeness at said functions, it has been integrated heavily into most *nix distributions.

                          PHP was built to handle web-based server-side processing. It's good at that.

                          ASP was an attempt to leverage existing technologies (JavaScript and VBScript) as a server-side language, capable of accessing server-side and client-side objects (like .COMs)

                          ColdFusion well....it sucks. Forget about it.

                          There are other languages out there as well, like BASH, SMIL, SVG, XML, XSL, Python, Lingo, REXX, BML blah blah blah....

                          (thats a mix of different kinds, including markup languages).

                          I think of markup languages as just that. They're designed to markup text, ie format it in some way. HTML is a markup language, to format documents for the web. Scripting languages are usually designed to manipulate in some way.

                          hth,
                          -Celt

                          Comment

                          Working...
                          X