|
||
|
|||||||
| Script Languages Perl/PHP/Python/Ruby so on and so forth. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
Well, the time has come to write my own thread
.I'm just wondering if anyone has had much experience with Python based web frameworks such as Django, CherryPy, TurboGears, etc? I don't know if i should stick with the normal PHP set up. I wish to run a simple CMS (they all seem like overkill to me), however I am looking for certain features:
I've a newbie to this sorta stuff (as you can probably tell) and I'm just looking for some opinions. Thanks for reading!
__________________
Use the middle mouse button on Here for forum rules, if nothing happens get firefox and try again!!! |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
|
A piece of advice: go with PHP.
It's stable like a rock, has broad community support. I'm a big python fan, don't get me wrong. I use it to develop a lot of my prototype algorithms at work and for experiments with things at home. You won't be sorry with PHP, If you're into RunUO, you might also think about ASPs with C#. I haven't done those, but I'm sure that they would compliment your developing skill set. C// |
|
|
|
|
|
#3 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
|
ASP.NET is evil. If you're developing, and already know C# well, you might look at that. Otherwise, I would echo Courageous, and say PHP 4tw.
__________________
Goodbye, folks. |
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
I would say if you are experienced with J2EE, use AppFuse (WebWork as UI framework) but it looks like your project will not necessarily need lots of feature and stuff there.
Go with ASP.NEt or PHP.
__________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." |
|
|
|
|
|
#5 (permalink) |
|
Forum Expert
|
Thanks for your thoughts, I think I'll just go ahead with PHP then.
I dont know if i should write my own simple CMS (trust me, it'll be VERY simple) in php using some kinda of framework such as Zend or CakePHP (haven't really looked at them yet). Or should I use a fully made engine such as drupal?
__________________
Use the middle mouse button on Here for forum rules, if nothing happens get firefox and try again!!! |
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
|
Well, if you're going to go straight into CMS, I suggest you look at the latest Plone. Particularly if you already know Python.
If you're going to dabble with custom content production of your own, PHP will be much better. But if what you want is a full CMS suite, go the Plone route. You won't be sorry. Anyway, if you have or can get your own Apache going, it's like a right of passage to install modphp, and do a little php'ing. So maybe you should do this anyway, just for fun, you know? ![]() C// |
|
|
|
|
|
#11 (permalink) |
|
Account Terminated
Join Date: Jun 2004
Location: Cincinnati, Ohio
Age: 20
Posts: 3,954
|
Ruby is growing at an exponential rate. Compare the community size five years ago to the community size today and the growth is just rediculous. Python wins for now... but give Ruby a little more time. ;D
Nice to see you posting again Courageous. I always enjoy reading your posts. |
|
|
|
|
|
#12 (permalink) |
|
Forum Expert
|
Thanks for all your replys
.I have went ahead with PHP and came out with a script... I'm just wondering if i'm going in the right direction. The index.php takes arguments (I googled some 'PHP Templating' articles) to what static page should be shown... such as index.php?p=infoContact will show the site with Contact me in the content section (if that makes sense)... In fact, i'll post code: index.php: Code:
<?PHP /* index.php */
require 'includes/db_connect.php';
if (isset($_GET['p']) == True) {
$pageName=$_GET['p'];
} else {
$pageName='home';
}
include('content/'.$pageName.'.php');
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<?php if ($pageName == 'home'){echo '<title>Kenny\'s Krib</title>';}else{echo '<title>Kenny\'s Krib: '.$pageTitle.'</title>';} ?>
<link rel="stylesheet" href="pk1.css" type="text/css" />
</head>
<body>
<div id="main">
<div align="center">
<a href="./"><img src="images/KKrib-title.png" width="865" height="142"></a>
</div>
<div style="float: left; width: 12%;">
<?php include('indexMenu.php'); ?>
</div>
<div>
<div ID="content">
<h2><?php echo $pageTitle; ?></h2>
<br>
<h3><?php echo $pageContent; ?></h3>
</div>
</div>
<div id="footer">
<i>Copyleft © KKrib 2006</i>
</div>
</div>
</body>
</head>
</html>
content/infoContact.php: Code:
<?PHP /* home.php */
$pageTitle = "Contact me";
$pageContent = "
You may contact me at any time using one of these methods:
<ul>
<li>ICQ: 64045040</li>
<li>MSN or EMAIL: peter.kinney-at-btinternet.com</li>
<li>Yahoo: PeterK_Dec98</li>
<li>UO: KnightShade (UODreams.it) </li>
</ul>
<p align=\"center\"><img src=\"images/uosig2.png\" width=\"400\" height=\"250\"></p>
";
?>
Here's a simple sample of what i've done: http://petkin.freehostia.com/KKrib1/ u can use test/test to login. Thanks in advance, and sorry for bumping!
__________________
Use the middle mouse button on Here for forum rules, if nothing happens get firefox and try again!!! Last edited by Kenny164; 08-29-2006 at 09:59 PM. |
|
|
|
|
|
#13 (permalink) |
|
Forum Expert
|
Good start, but your implementation has more holes than emental cheese
Several articles on SitePoint should shine more light on this issue, for example http://www.sitepoint.com/article/php-security-blunders
__________________
Angels are falling the very last time, down they're burning in hate and decline, unfaithful and violent we're breaking the spell, we're god, we're scissor, in heaven and hell! |
|
|
|
|
|
#14 (permalink) | |
|
Forum Expert
|
Quote:
![]() I'm just wondering though, to display other pages such as the 'Contact Admin' (only link that works btw, heh). The link goes to index.php?p=infoContact... which pulls the content from a variable stored in /content/infoContact.php. This is good for serving up static pages with no scripts. But what if i want to run php code thats stored on another page? For example, If i want a news section (or my Patch log). Which I should update when I make changes to the RunUO server, I'm going to make it load entrys from a MySQL database. Should I create another PHP script such as Patches.php, and not use the index.php?p= ? Thanks again.
__________________
Use the middle mouse button on Here for forum rules, if nothing happens get firefox and try again!!! |
|
|
|
|
|
|
#15 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Age: 30
Posts: 880
|
This does not look like much of a CMS to me, it looks more of just a way to show all your pages off of one URL. If your manually creating all the included content pages, why not just link to the content pages themselves and instead include headers and footers. If there's no dynamic data and your editing the files by hand then there really is no need to try and simulate a CMS.
The purpose of a CMS is so that the user never needs to get their hands dirty in the code or have to manually create internal pages (such as your doing now with your include/contents/page system). As has been echoed by arul, you do have security problems in your current design. For starters your not doing any sanity checks on the GET data, this could lead to some troubles, especially with exposing your server structure. My advice would be to pick up a real CMS application, I find Wordpress to be very friendly, easy to install and not that large (in my opinion). There are others equally good but definately more involved such as Joomla/Mambo, PHPNuke and others. I hope this advice is welcomed. |
|
|
|
|
|
#16 (permalink) |
|
Forum Novice
Join Date: Oct 2005
Posts: 142
|
Wow, everyone pretty much said it.
The reason PHP is so popular is because it's particularly easy to use. Someone with practically no programming history can pick it up, and if you pick at it long enough and hit the documentation you can figure every part of the code out. It also integrates very easily with databases. Up until recently, the only way I knew to send or retrieve data from a SQL database from a program was to open an external PHP page and do the work through that. Thank god for .NET 3.0!! You can also find an incredible amount of documentation and coding already done in PHP, so if you're just starting out in web framework you'll have more specific support (PHP is intended for web-work). Hope I helped! |
|
|
|
|
|
#17 (permalink) |
|
Account Terminated
Join Date: Mar 2007
Posts: 58
|
Yep php all the way. Stay away from the MS rip offs of it like asp and such. I've had to work based off existing asp /.net stuff and its the most messy and horrid thing to work with. php is simple, powerful, and based on free/open source software.
|
|
|
|
|
|
#19 (permalink) |
|
Newbie
Join Date: Mar 2004
Posts: 15
|
Find a nice CMS your happy with that allows you to fairly easily create Components/Modules for it such as Joomla, GeekLog, Drupal and such.
If you really really want to go python go Zope and take a look at some of their CMS Modules, then add your own programmed content into it. Of the two, I say go with what your most familiar with. Here's a site, deals mostly with PhP and Security, but the general practices are good regardless of language. PHP Security Consortium ~K |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|