# New website: Use CMS or build from ground-up?



## 3870x2 (May 5, 2012)

I am about to embark on creating a website for a small metropolitan area where users have a common forum to post things for sale, and also a community forum.  The community forum is an easy one due to there being many great systems out there, some even free.

I am not sure if there is a Content Management System directly aimed at what I am looking to do, and building from the ground up could take a long time.  I don't want to reinvent the wheel so to speek when developing this system, but if I have to, I will start from scratch.

To be more specific, this is going to be like craigslist, but only local to about a population of 200,000.  As a guide, I will take things I have learned from a company like Bookoo, which makes http://www.campbellyardsales.com.

I am willing to invest a great deal of time and money, and am not looking for business advice or realizations.  I am well versed in programming languages, and have created websites.  Interacting with SQL and PHP are my weak points, as I have minimal experience, but will definitely learn.  This website must be able to function on a remote hosted server at first.  Depending on the popularity, the system will be upgraded as needed.

This website will be free to all users.

Thank you all for your time in reading this, I look forward to your suggestions!


----------



## W1zzard (May 5, 2012)

Given your previous experience in programming and that a SQL and PHP project will be a rewarding learning experience I'd say make your own.

You really want to use PHP, Apache and MySQL. Don't worry about performance, do things the easy most productive way.

If you have a forum software, consider using the forum for content/user/permissions storage (that's how we do it at TPU). Saves a lot of time because you don't have to code the backend admin stuff.

Also I strongestly recommend using a templating system like smarty (best one I know of).

I'm not a big fan of PHP MVC or other frameworks. Separating some stuff into classes might help with maintanability, but PHP works great without. At TPU only like 50% of our code is in classes, I work on it from time to time, objectifying old code, but it's barely worth it.

If you have any specific questions once you are further with the project and have exhausted your Google options, ask me any time.

Security is important, make sure to escape all user input, query strings and anything else that comes in externally. If you use numeric input values (e.g. for ids in urls), make sure you put those in quotes before sending to mysql. "SELECT foo FROM bar WHERE id=$id" is bad because -1 (which might pass "is numeric" checks) will break the SQL statement. SELECT foo FROM bar WHERE id='$id' = good


----------



## Disparia (May 5, 2012)

Ground up! (my knee jerk reaction)


But now that I've read your post, it can go either way. With a limited user base your site won't require a lean from-scratch framework nor would you need to have some elaborate setup to handle the load. As well, everything to get a community forum up and running is available in many forms. Unless there is something unique you want this site to feature, you'll probably find the right wheels for it.

Biggest thing seems to be giving it a consistent feel that reflects your locale, as well as any interaction between software from different parties.


----------



## PopcornMachine (May 5, 2012)

I'm old school.  Use Perl cgi to generate html and make calls to MySQL.


----------



## W1zzard (May 5, 2012)

PopcornMachine said:


> I'm old school.  Use Perl cgi to generate html and make calls to MySQL.



unless you are some sort of perl guru i doubt your productivity creating and maintaining perl code is better than vs. a typical php programmer.


----------



## 3870x2 (May 5, 2012)

Looks like ill build mostly from the ground up using the forum softwares database.

It also looks like I will have quite some learning to do altogether.  I was expecting this to be a very long project, and plan to embrace that and the learning I plan to do.

Can anyone give me a great centralized location to better learn interactions between the front-end programming and SQL/PHP?

Thank you all for your help so far.


----------



## W1zzard (May 5, 2012)

3870x2 said:


> Can anyone give me a great centralized location to better learn interactions between the front-end programming and SQL/PHP?



you can do the simple approach just building your query as string, connect to database, iterate over results, do stuff.


```
// connect to database here
  $SQL="SELECT * FROM newsiconslist ORDER BY label;";
  $result=mysql_query($SQL) or die ("Invalid query: " . mysql_error());
  while($row=mysql_fetch_assoc($result))
  { // do stuff }
```

many people prefer some sort of database abstraction layer: http://www.php.net/manual/en/refs.database.abstract.php

if you build a system from the ground up this could be a viable choice


----------



## Kreij (May 5, 2012)

Bah, be a man !! ... use ASP.NET with C# code-behind on a SQLServer backend.


----------



## W1zzard (May 5, 2012)

Kreij said:


> Bah, be a man !! ... use ASP.NET with C# code-behind on a SQLServer backend.



and get locked in the microsoft corner ?

oh and for client side javascript, jquery is good stuff, we started using it at tpu a few months ago, and it increases productivity a ton. just make sure your site is completely usable with js disabled


----------



## Kreij (May 5, 2012)

Someone has to be a Microsoft fanboy. Might as well me me. lol
I'm worked in most of the MS langauges and extensively with SQLServer, so I'm more familiar with them. Even though they are proprietary ("locked in their corner") they do have some nice stuff.


----------



## W1zzard (May 5, 2012)

Kreij said:


> Someone has to be a Microsoft fanboy. Might as well me me. lol
> I'm worked in most of the MS langauges and extensively with SQLServer, so I'm more familiar with them. Even though they are proprietary ("locked in their corner") they do have some nice stuff.



asp.net has nice stuff, but i find that not enough to justify the increased cost and platform requirements.


----------



## PopcornMachine (May 5, 2012)

W1zzard said:


> unless you are some sort of perl guru i doubt your productivity creating and maintaining perl code is better than vs. a typical php programmer.



Maybe not.  Only know a little php.  

I do know Perl pretty well.  Been using it for over 10 years. Works for me.


----------



## 3870x2 (May 5, 2012)

PopcornMachine said:


> Maybe not.  Only know a little php.
> 
> I do know Perl pretty well.  Been using it for over 10 years. Works for me.



If I were to follow this line of thinking, I would still be programming in qbasic


----------



## W1zzard (May 5, 2012)

3870x2 said:


> If I were to follow this line of thinking, I would still be programming in qbasic



those people use vb.net now


----------



## PopcornMachine (May 5, 2012)

3870x2 said:


> If I were to follow this line of thinking, I would still be programming in qbasic



Well, if I were you I would just use PHP.  That's the thing to learn now.  

There is a wealth of information out there on it.  And database access is pretty straight forward.

I have thought about switching over one of these days, but just a creature of habit I guess.

The example Wizard gave shows how simple it is.  Of course there's all the parsing and formatting and html generation.  But that's the fun stuff! 

But I certainly wouldn't pay money.  Too many free ways to make a web site.


----------



## Disparia (May 5, 2012)

Kreij said:


> Someone has to be a Microsoft fanboy. Might as well me me. lol
> I'm worked in most of the MS langauges and extensively with SQLServer, so I'm more familiar with them. Even though they are proprietary ("locked in their corner") they do have some nice stuff.



It's true (mostly) 

These days PHP/IIS (7.0, 7.5) is at the level of PHP/Apache thanks to work done my MS to improve installation and reduce nuances of PHP in Windows. They also provide the driver for MSSQL connectivity now (before you had to use an antiquated driver or generic ODBC, sucked). So it all comes down to familiarity with platform and/or cost, if they apply.

I use whatever I'm told to use (contract worker)


----------



## PopcornMachine (May 5, 2012)

Forgot to add that I embed a lot of Javascript too.  Very handy stuff.

You can take a look here: http://popcornmachine.net


----------



## Kreij (May 5, 2012)

W1zzard said:


> those people use vb.net now



This from the guy still using MFC and GDI+. 

Yeah, it's hard to compete with "Free" (MySQL), and websites with unlimitted storage and bandwidth are crazy cheap nowadays (unless you want a dedicated server).


----------



## W1zzard (May 5, 2012)

Kreij said:


> This from the guy still using MFC



no requirement for .net runtime and stopping people from disassembling my stuff are major factors.

i do some c# for simple software that's used internally and requires no hardware access

i doubt .net would increase my productivity much though. i'm really good with mfc, making custom components etc is no problem.



Kreij said:


> unless you want a dedicated server


dedicated is dirt cheap too, especially with virtualized taken into account


----------



## Kreij (May 5, 2012)

I know, W1zz, we talked about what you use for GPU-Z before and why.
Just a friendly jab. 

I've created static classes to address the shortcomings of some of the MS APIs, so I just drop them into projects when I need them with no loss of productivity for what I mostly do (database apps).

I have my domain parked on a non-dedicated server with no limits on bandwidth and storage (although it is Linux and MySQL) for $6 a month. I remember when you couldn't even GET a GB of storage if you wanted it. This is also the reason that "cloud based" backup companies are quite the rip-off from my perspective.

What kind dedicated pricing are you seeing? Still seems pricey for a start-up site.


----------



## 3870x2 (May 5, 2012)

Ive seen dedicated hosting around $350, and I am not in the position just yet to launch it from home, though by the time the site is coded and ready to launch, I probably will be.

EDIT: This was checked a while back, and from surpasshosting.com


----------



## Kreij (May 5, 2012)

Inmotion has dedicated servers starting at $200/mo. Didn't look at the details though.
I'll get my site up and running as soon as I come up with something to do with it.


----------



## Athlon2K15 (May 5, 2012)

PopcornMachine said:


> Forgot to add that I embed a lot of Javascript too.  Very handy stuff.
> 
> You can take a look here: http://popcornmachine.net



if i ever need old NBA scores i know where to go now!!


----------



## W1zzard (May 5, 2012)

check webhostingtalk forums dedicated offers section for good priced servers.

honelive.com has great prices, we use them for our email server and techpowerup.org. never had any issues. there are many providers offering dedicateds around $50 and below. 

for bigger hosting go with softlayer. they are awesome and we never looked back. make sure to ask for a custom quote


----------



## 3870x2 (May 5, 2012)

Not going to be big at first, and assuming this is successful, I should see no more traffic than 10-20k uniques per day.
After skimming w3schools.com, it seems that programming the site will be fairly easy, albeit very time consuming.
I know that Surpasshosting has an excellent control panel, which is always a good thing.


----------



## Kreij (May 5, 2012)

Where are you at, 3870? (I mean location on the planet, not how far programming.  )


----------



## 3870x2 (May 5, 2012)

I am in southwest missouri (Joplin Missouri)


----------



## Kreij (May 5, 2012)

Create a LLC for this endeavor. PM me for why if you are not familiar with doing this.


----------



## remixedcat (May 6, 2012)

Kreij said:


> Bah, be a man !! ... use ASP.NET with C# code-behind on a SQLServer backend.



On Windows Server 8!!!!


----------



## remixedcat (May 6, 2012)

Kreij said:


> Create a LLC for this endeavor. PM me for why if you are not familiar with doing this.



Business Filings inc. Is a great place to get it done.... cheap and easy...


----------



## 3870x2 (May 6, 2012)

What is the take on creating a webpage in HTML5?  I am fairly versed in HTML, but have only barely skimmed the capabilities of 5.

Is it worth looking over, or just stick with what I know?¿


----------



## Aquinus (May 6, 2012)

3870x2 said:


> Not going to be big at first, and assuming this is successful, I should see no more traffic than 10-20k uniques per day.
> After skimming w3schools.com, it seems that programming the site will be fairly easy, albeit very time consuming.
> I know that Surpasshosting has an excellent control panel, which is always a good thing.



I'm currently building a web application on top of a framework that I've developing at the same time. I wouldn't recommend using it since it is still a bit unstable, but have you considered something like CodeIgniter, CakePHP, or FuelPHP? I've used CodeIgniter for making a fully implemented web application and I was pretty happy with what it had to offer and how quickly it ran.

http://codeigniter.com/

Not that you're interested in what I'm doing but all of that is here (I haven't pushed in a while, so it is a little out of date, I'll fix that now.): https://github.com/jrdoane/PlumPHP


----------



## Disparia (May 6, 2012)

3870x2 said:


> What is the take on creating a webpage in HTML5?  I am fairly versed in HTML, but have only barely skimmed the capabilities of 5.
> 
> Is it worth looking over, or just stick with what I know?¿



Use the new doctype: <!DOCTYPE html>

All the major browsers are at varying level of support for HTML5 features, but there is a handful of new elements that all support, for several versions now.

header, footer, nav, (and more), may not be as game changing as canvas, video, or audio but they make writing out the CSS and binding events easier. Well, maybe not easier, but simpler and a more semantic design. 

Not that those other ones can't be used, video for instance is recognized by most, though codec support isn't standardized. Luckily they made it easy for a browser to find one that it can use:


```
<video>
  <source src="DiabloIII_CowLevel.mp4" type="video/mp4">
  <source src="DiabloIII_CowLevel.ogg" type="video/ogg">
  <source src="DiabloIII_CowLevel.webm" type="video/webm">
  <p>Please update your browser.</p>
</video>
```


----------



## Ross211 (May 6, 2012)

3870x2 said:


> I am in southwest missouri (Joplin Missouri)



3870x2, I'm only about 25 minutes away from you - I'm in Pittsburg.  I'd be glad to show you some of my custom built web applications using PHP, MySQL, and jQuery / JavaScript.  I'd also be interested in helping if you would like.


----------



## 3870x2 (May 6, 2012)

Ross211 said:


> Thank you for this... I'm taking one of my last courses for an undergraduate in Information Systems and I argued with my instructor about why it is important to put quotes around variables in SQL statements regardless of whether they are numeric or not.
> 
> My instructor still thinks it is bad practice but I'm so sick of college and taking horseshit from instructors that just glance over powerpoints before giving lecture and have never developed a database driven application
> 
> ...



I went to school at pittsburg state university back in 2004-2006.  I currently work in the IT department at Downstream Casino.  Born and raised in Columbus.


----------



## Aquinus (May 6, 2012)

Ross211 said:


> My instructor still thinks it is bad practice but I'm so sick of college and taking horseshit from instructors that just glance over powerpoints before giving lecture and have never developed a database driven application



Well, I am a developer and I will tell you that it is bad style to not include single quotes. Not to say you can't or that it is even worse that you might be using negative integers on a primary key. It also adds consistency to your queries and makes sure that everything is the same way instead of one method for integers and another method for strings.


----------

