Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2013, 02:34:37 AM

Login with username, password and session length
Search:     Advanced search
The look of the forum is still being worked on. Thank you for your patience.
193705 Posts in 16235 Topics by 17056 Members
Latest Member: MckaulieDeaux

* Home Help Login Register
AppleGeeks.com  |  Help / Advice  |  Programming  |  Topic: thoughts and ramblings ... web development related 0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: thoughts and ramblings ... web development related  (Read 4259 times)
OrcishIncubus
Hero Member
*****
Posts: 3868


Life taken = work work


« on: February 05, 2009, 04:50:37 PM »

I'm slowly going to be building a web site for my mom for a business she's wanting to pursue, and I say slowly because I have a lot on my plate between school and work.

I finally copied the templates that I use at work so I can start planning to build the website.

My problem is a web programming language.

I was introduced to ASP as my first language, and that's about all I know, but through here and through people I know, I've heard that ASP fails, horribly.  So... what other server-side web language should I use? I'm going to be making this as dynamic as I'm used to... as in, "including" files that I use multiple times with
Code:
<!-- #include virtual="" -->
. From what I remember, this bit of code doesn't work in standard HTML because it's an ASP bit of code... so while I'm open to the idea of learning something new, I need to know what I could use that will do this.

I'm not after anything overly fancy right now because ... I have enough on my plate right now, maybe in the summer I'll dip into something a little fancier to spice it up, but I just need something that works, and ASP does work, but when I do have the time to make it better, I don't want to be smashing my head into a wall because I don't know how to get something to work when it would be easier to use another language...
Logged


All in all in, all in a day.
A day it changes everything.
aprendiz
Hero Member
*****
Posts: 601


"Be the change you want to see in the world"Gandhi


WWW
« Reply #1 on: February 05, 2009, 05:12:37 PM »

the best programming languages are as far as a know PHP and .NET, in my opinion i'd recommend using PHP because is open source and there are a lot of tutorials and people willing to help besides is very stable and efficient
Logged

je fais rien, mais je le fais bien, i do nothing, but i do it properly
Keizuki
Hero Member
*****
Posts: 1364


wth is personal text?!


WWW
« Reply #2 on: February 06, 2009, 09:11:14 AM »

I second PHP. Amazingly simple to use and the documentation on the PHP.net site is enough for anyone to learn the basics of the language in no time. Going by the .NET documentation for C# I am so glad I don't have to use it. And personally I find PHP a lot faster to use and develop with than any .NET language (remembers the horrors of C# and DirectX programming...).

For a PHP example of your ASP code something like this would be fine...

Code:
<?php

include(&#39;includes/my_include.php&#39;);

?>

<html>
<head>

</head>

<body>
<?php

// function from my_include.php
foobar();

?>

</body>
</html>
Logged

EU Dragonblight - lvl 80 Hunter - Vance - LF more instance goers! Cheesy
OrcishIncubus
Hero Member
*****
Posts: 3868


Life taken = work work


« Reply #3 on: February 06, 2009, 09:56:35 AM »

mm, wouldn't be including a function, just HTML code...

for the project I'm working on now at work involves a "mainHeader" which holds all the HTML code to start up the page, including the html, head, CSS calls, and the body tag.

I also have a right navigational bar and a left navigational bar that I include, so if a change needs to be made, I only have to do it to one versus 20...

I'll see about finding a book on php at the library..
Logged


All in all in, all in a day.
A day it changes everything.
Keizuki
Hero Member
*****
Posts: 1364


wth is personal text?!


WWW
« Reply #4 on: February 06, 2009, 11:37:49 AM »

To further extend my example of my_include.php...

This file could contain...

Code:
<?php
function foobar()
{
    echo <<<END

Page Content Part 1.

END;
}

function 
morefoobar()
{
    echo <<<END

Page Content Part 2.

END;
}
?>

With each function containing a different part of the page.

This makes editing very convenient as you only need to edit one file, and as the functions can accept parameters you can tailor certain parts of the page to that particular page.

Including page content is the same as a function. Just with functions you can place all the include files content in one file. From personal experience I've found having a header, index / whatever, footer and others got to time consuming to maintain or even remember what file contained what code.

I also know why your doing it, write it once and forget about it. Saves HD space and you time from crawling through the same code repeatedly, but ultimately it doesn't reduce the amount of bandwidth used.
« Last Edit: February 06, 2009, 11:44:10 AM by Keizuki » Logged

EU Dragonblight - lvl 80 Hunter - Vance - LF more instance goers! Cheesy
Hellmark
Global Moderator
Hero Member
*****
Posts: 2459

Mac Mini, 1.42ghz, 512mb, 80gig, and Tiger - RAWR!


WWW
« Reply #5 on: February 06, 2009, 12:07:29 PM »

As someone who does ASP and PHP, go PHP. ASP has, a lot of, quirky issues. I really hate it.

And with using functions, yes, is is handy at times. I still like using seperate files for header, footer, and for totally unrelated body content, but for things that are related it is nice to have it all in one place.
Logged
Keizuki
Hero Member
*****
Posts: 1364


wth is personal text?!


WWW
« Reply #6 on: February 06, 2009, 12:26:07 PM »

Either way you do it is fine, I'm just backing my personal preference coming from a background of web development revolving round a few hundred files that are either full of crap or nothing. God I hate working on someone else's work, especially when they have no concept of organization or coding standards let alone web standards.

I guess the best route is to split page content into a few files as possible - index, header, footer, and other main pages. Then include them as normal HTML code. To make things even easier, if there are functions you use repeatedly, for instance I use my own wrapped mysql_query() function you can put it in an include called functions.php which is included before your header or anything else.
Logged

EU Dragonblight - lvl 80 Hunter - Vance - LF more instance goers! Cheesy
OrcishIncubus
Hero Member
*****
Posts: 3868


Life taken = work work


« Reply #7 on: February 06, 2009, 02:01:59 PM »

I get designs in publisher and have to build a page from scratch from those.

It honestly makes my job way easier than it may sound.  No real design is required on my part beyond making a few graphics that weren't already made, and I know what the website is supposed to look like, I don't have to second guess myself saying "Does this look right?"

in my opinion, if it's HTML code that you use more than once, then make it an include file.

I forget how many include files I'm up to in my current project... at least three or four...

but I honestly don't do a lot of web programming, everything I've done so far is HTML/CSS, I'm trying to get into vbscript but I really haven't had a job that encourages me to do so, which is why I guess ASP works fine for me... the most I've done is a few response.write commands but I can't remmeber how long ago it was that I was tooling around with that...
« Last Edit: February 06, 2009, 02:05:55 PM by OrcishIncubus » Logged


All in all in, all in a day.
A day it changes everything.
OrcishIncubus
Hero Member
*****
Posts: 3868


Life taken = work work


« Reply #8 on: February 07, 2009, 03:01:14 PM »

double post:

I can't believe my library has NO books on PHP... wtf!...

guess I have to look elsewhere or try to find another library that can ship a book on it to here...

that's a bit ridiculous though, I can find a computer book on just about anything else BUT php...
Logged


All in all in, all in a day.
A day it changes everything.
Pages: [1] Go Up Print 
AppleGeeks.com  |  Help / Advice  |  Programming  |  Topic: thoughts and ramblings ... web development related
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.088 seconds with 19 queries.