|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I am going to re-design URL
At present, the site consists of about 25 different html files© Each of those 25 files has a significant amount of the same information on it such as the menu ¥which sucks, but is being redone¤© I've noticed that it is a real pain in the *** if I want to change something in the menu, or make a table wider on each page because I have to edit 25 files© I was thinking I could do the page with perl and that way it would be far easier to update things site wide© I was wondering if perl is what I should use for doing something like this© I thought I would do something like store the data for each of the individual pages in a file and then open a file when needed so that my perl script isn't 200k + I realize that it would probably be best if I stored the info in a database, but I don't have ANY database experience right now, so that won't work© I would however like to eventually move to a database© What should I keep in mind to make it easy for me to change my site to use a database later? Thanks for reading |
|
#2
|
|||
|
|||
|
You could do it with Perl and a template based approach. Basically, you can have a HTML page which is dinamically created with data from an outer source (database, flat file, whatever).
But I personally think that you would do this far easier in PHP using its include() and require() functions. Basically, you could place the menu in a separate HTML file, and then use the following code on top of each page: Code:
<?php
include("menu.html");
?>
Its all up to you really. Template based approach has its advantages, but I think that the PHP way is far easier. HTH. P.S.: Site looks cool. I hope the new menu is as cool... ![]() |
|
#3
|
|||
|
|||
|
I don't know which development tools you're using to create your pages, but I frequently use Dreamweavers built-in templating system for small projects where the amount of pages doesn't exceed 30-40. The advantage of doing it this way is that you won't need a database for storing you pages, and you get to see the page as it was meant to look like while you're working on it.
|
|
#4
|
|||
|
|||
|
Yes, but I think the man wanted something dynamic, so...
|
|
#5
|
|||
|
|||
|
Thanks for the input© Regarding development tools, I'm just using a text editor© Programs like dreamweaver just don't help me much anymore because I know pretty much all the html tags©
just as an example, my friend used frontpage to make a really basic webpage© I was over there one time and I decided to view the source© All over the place there were references to fonts that most people wouldn't even have and the page would be broken in pre 6 versions of netscape because of the way the images were positioned©©©©© The short version of the story is I re-wrote the page with notepad© The html file was almost 20 times smaller©©©©©©no joke and it looked better and it is compatble with older browsers© I actually thought of PHP a little bit after I posted the initial message© I didn't know much about it, so I did a little reading, and for what I am doing it looks like a better solution© I have also heard that accessing databases is simpler using php than perl© |
|
#6
|
||||
|
||||
|
Quote:
Err...Dreamweaver and FrontPage are two different things. I confess that Dreamweaver will sometimes make clutter in your source, but most (99% actually) of the time it will create decent and clean code which will render just fine in older browsers. So don't dismiss it. On the other hand, hand-coding is still the best way to gain maximum performance. ![]() Quote:
Well, it just depends on what you mean by "easy". But for a beginner it can be easier to comprehend that Perl, especially since, in order to use DBI (the Perl interface to databases) you need to be comfortable with some advanced Perl stuff such as references, and so on. But for what you need to do, PHP is perfect. Just put the include() function on top of each page, and you will have the menu on each of your pages. Of course, if you need to change anything, you will have to change just one file! ![]() So, for something this small, use includes and PHP. If your site gets bigger, start thinking about some database. |
|
#7
|
|||
|
|||
|
Server-side includes
Think 1996... think Server-Side Includes!
![]() The average web host is far more likely to run SSI than PHP. Of course, if you've got PHP, go for it! If not, ask your hosting company if they run SSI. If they run Perl/CGI, they'll almost certainly run SSI. Just put your HTML menu code in a file and put this: <!--#include file="menu.html" --> or <!--#include virtual="/path/to/your/file.html" --> in your HTML file where you want the menu to appear. You'll have to save your new HTML file with the extension .shtml or sometimes .shtm or .stm. Find out which extension your server uses. There's a good SSI tutorial at http://library.thinkquest.org/15074/ssimain.html |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Is perl what I want??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|