Welcome to WebmasterWorld Guest from 22.214.171.124
I would guess that close to 40% of all dynamic websites are using a combination of VB and JScript. That's hardly lame and crippled.
40%? Maybe - I don't have the hard number. But from the Netcraft's figure of percentage of web sites running Apache, I really doubt it. Anyway, I am actually not a web-programmer by trade, and I've only used ASP+VB for 6 months, mainly to debug a COM object I wrote. That was VB 5, and things might have changed over the last year and half. I've been using PHP on various projects for the past three years, and it is currently my main server-end web language. Even that, I don't think PHP is a nice language, especially when it borrows lots of syntax of C and Perl.
From a programmer point of view, VB/JScript does not provide a lot of power in its language syntax to build up modular code. It just seems to be impossible (to me at least) to build a large and maintain-able dynamic web site using VB or JScript alone without using some COM objects. I guess many people are using it because (1) it comes with their web server (2) even non-programmer can write VB from their MS Office experience (3) no one bothered to consider an alternative. If these people have tried some other languages (Python, Ruby, etc), they would wonder why they would start programming in VB in the first place.
Okay. PHP is better, but I think it has lots of problems as well. It might have lots of built-in functions and modules, but each module just dump their functions into the global name space. It is particular frustrating to integrate multiple PHP products onto one page, when the variables and functions in the global scope just have conflicts with each other. You *can* use "class" to simulate name-space in PHP, but (1) it looks like a hack (2) not many products out there are doing that. Quite a lot of syntax are 'hackish' to me, as they borrow heavily from C and Perl. It is also quite difficult to produce reusable and componentised modules, even though PEAR tries to rectify that...
Enough rant for today. Still searching for a perfect server-side scripting language...
no one bothered to consider an alternative.
Personally I much prefer scripting in C-like languages (JScript, PHP etc) than basic but I've got to say that I really hate PHPs object delimiter thingy:
Who came up with -> anyway?
However, in the case you referenced, it may have been that ASP, even for ASP wizards with their own Wizarding Site, doesn't run so well on non-MS OS's:
User-Agent: Sam Spade 1.14
HTTP/1.1 302 Found
Date: Fri, 19 Apr 2002 21:53:21 GMT
Server: Apache/1.3.20 Sun Cobalt (Unix) mod_throttle/3.1.2 mod_ssl/2.8.4 OpenSSL/0.9.6b PHP/4.0.6 mod_auth_pam_external/0.1 FrontPage/126.96.36.199 mod_perl/1.25
i dont think it will be too long until we see a strain of asp which is far more advanced than the current version - but still they will own the market by not letting it run on other platforms - with all this said and done there will always be many different server platforms that support certain languages - but asp is certainly not something to rule out.
with packages like ultradev as you'll know you can output many different languages - namely one cold fusion which is i believe one of the most advanced coding languages out there. surely to a degree using programmes like this to output makes some sense as there are features built into the application that will show you where you are going right or wrong. hand code will always take longer to learn as you're either adapting existing code or starting from scratch. this i guess makes it more specialised, however with an ever changing market place and new technologies it wont be too long until there is a new 'buzz' word or language which people will jump the band wagon with.
i am be no means a hardened microsoft fan
It sounds to me like you mean that you have mostly static content that you want to plug into a template dynamically. Is that right?
Then all you need to learn in PHP is how to use
include() and require(). This is really easy. If I'm correct, write back...
If you mean including content from a database, again this is still fairly simple if what you want to include is simple. I think that complexity increases fairly linearly with PHP. However, you will need to learn basic PHP programming and at least basic SQL. It's not necessarily hard, but you will need to have an interest in programming
I assume that you have a server with PHP set up on it. If not, go to www.php.net and download the binaries you need (Lin/Win/etc).
Please note that PHP comments are delimited by // (or /* */).
1. Create a page that looks just like you want.
2. Cut chunks out to create the components you want, such as header, footer, side-bar. Save as "header.php" etc.
3. Now create a file called something like "template.php" and have code like this
<?php // now we switch to php with the <?php tag
// we include our header code
// filename is here a relative path. This should be the *filesystem* path and not the *server* path
// don't forget your ";"
<!-- back to HTML - the ?> closes PHP -->
<!-- now we get our page-specific content for this page
include($include_filename); // here we use a variable, denoted in PHP with a $.
// This adds a step, but it will make
// it easier to get more complex as you expand
// your PHP knowledge.
I use CSS instead of tables and other things, but this should get you going.
4. Now save your "content" in a file called
This is content that should plug right into your table in the content field.
5. Create a file called my-great-article.php and it shoudl consist of the following,
$include_filename = "my-great-article.html";
Now, when you access "my-great-article.php" via your server (not by opening the file in your browser - it needs to be parsed by the PHP processor), you should have your template with your file inserted.
Honestly, this is sort of a stupid way to do this, but it's real simple and allows for the possibility of expanding as you learn how to do database queries and generate dynamic links and so on and so on.
Does this help?