|
|
|
|
![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED]
Posts: 567 Joined: 13-October 06 From: Alberta, Canada Member No.: 31,584 myCENT:29.32 |
Post
#1
Dec 5 2007, 07:31 PM
So... whats your opinion on flat-file websites? You know, no databases, everything is stored in txt, php, or html documents... In my opinion I really like using them. This is mainly because I have yet to learn anything about databases Post any advantages or disadvantages you think they possess.... I like them because, for me, they are fairly easy to use once created. A disadvantage in my opinion is that it takes a while to code properly so it functions well. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [MODERATOR]
Posts: 2,762 Joined: 28-May 05 From: Devon, England Member No.: 7,593 ![]() myCENT:96.20 |
Post
#2
Dec 6 2007, 07:47 AM
Flat files are only really good for lists, and not a lot else. Like you say, coding them to act as databases, even in a very primitive way, takes time and effort to get right. Personally I would use a database such as SQLite for anything small scale that requires anything more than a list of single word terms to be stored. Once you learn how to effectively use databases there are all sorts of SQL commands and the like that you can use to simplify a variety of things you would usually have to code manually if you used flat files. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Post
#3
Dec 6 2007, 10:48 PM
When I make my webpages I use a flat file system only because I have no need for a database; however, I did have to create a PHP program to store emails and send period emails out to them. I would have much preferred to use a database system such as mySQL; however, I was not in control of the server and had no idea what was on it other than php and the admin never used mySQL before so I decided to use a flat-file system. So it is good when you can't use a database system; however, I know my code will begin to break down after awhile when the email list becomes too crowded. Flat-file systems are also harmful if you don't secure your code enough and someone decides to inject malicious code into the system and manages to destroy your site with it, but you can even have this problem with a regular database too. So, like I said before, I would prefer to make a mySQL database, but I have no experience in it so I stick with flat-file systems until I need to move over. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Post
#4
Dec 6 2007, 11:23 PM
I dont use flat files well files on their own just to hold data. Although I do keep a few arrays stored in a PHP file just to use it may be considered the same thing. There is an advantage here since its in a PHP file there is no wait time for retriving it from a database. If you have static data that seldom changes and is required often by many processes having this setup will be more effect then having them stored in a database. If on the other hand you have to update it often then flat files are very bad as its much slower to update because the program will have to read each line untill it finds the correct entry then perform the update. If the list gets very long it can be very slow. In this case a database is more effective. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 153 Joined: 9-April 07 From: Nebraska Member No.: 41,301 |
Post
#5
Dec 8 2007, 01:28 AM
It's a lot better to use a database if there are going to be a lot of people trying to change something at the same time. Like, if mySpace used flat files for everything, it would either end up going really slow, or it would just crash, and have a bunch of errors in all the files, because of people trying to change stuff at the same time. If you use a database, it usually has a built in way to protect against anything like that happening. Once you learn how to use SQL, it's a lot easier, and more efficient than flat files, unless you're not going to have many people on your site. It mostly depends on traffic, and the type of data you're trying to store. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [MODERATOR]
Posts: 4,933 Joined: 24-July 05 From: Linux, DOS and Windows…the good, the bad and the ugly Member No.: 9,787 ![]() myCENT:0.39 |
Post
#6
Dec 8 2007, 02:10 AM
As noted above, Databases are definitely the right approach to take for many (most) data storage techniques. They handle more users, more data, faster and more securely. No doubt about that. Site membership lists, download lists, and many more applications similar in nature are best handled via a Database Management system. On the other hand, Flat Files can work quite nicely for applications which are not large, or data intensive, or are static and the security of data is not an issue. Site menus, static lists might be handled by Flat Files where either a Database /system is not available, or is restricted in volume, or if the amount of data is small, so the overhead of a database is not required. Additionally, Flat Files are a nice, easy way to learn a scripting language without the burden of having to learn the Database System at the same time. Focus on learning the scripting language first and then the DBMS. Besides, by working with sequential Flat Files first, you will then also know the 'old-fashioned' methods and will appreciate the DBMS more... |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Post
#7
Dec 28 2008, 02:11 AM
I currently prefer flat files, actually. I've been messing with both CMS's and flat files, and I just find it much better for me. I cannot stand Mysql, and on my sites there is no need to log in. Only for the forums. First of all, I've never heard of the term "flat files," so yet again Trap17 teaches me something, Second of all, do you think it would be possible to upgrade a 'flat file' site to a CMS? At the moment there is no use for a CMS but in the future I may need a login or something(maybe Membership based site). This probably won't happen, so it's not a big *need*, it's just something to keep in mind. Thanks. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [MODERATOR]
Posts: 2,725 Joined: 22-June 05 From: 127.0.0.1 — no place like it. Member No.: 8,528 myCENT:40.50 |
Post
#8
Dec 28 2008, 12:52 PM
First of all, I've never heard of the term "flat files," so yet again Trap17 teaches me something, Second of all, do you think it would be possible to upgrade a 'flat file' site to a CMS? My website runs off of a flat-file CMS i made specifically for my site. Some discussion in this topic talks about that an actual database requires less work when coding a script to work with a database, is more secure, and is not prone to multiple-edition errors. I will say that that is not always the case, if at all. In my case, my flat-file CMS has not only allowed me to perform less management for my site than what i would have to normally have done if i had gone with a website that requires a database, but compared to the database CMS i have been working on (found in my signature), has a significantly smaller filesize than my database-based CMS. To emphasize a key advantage for my personal, flat-file CMS over a database-based CMS is that in order for my site to list the file i created, all i have to do is upload it into a folder that my script is told to scan in (which does not require to have any of my files to have write permissions). Database-based CMSs do similar but in their own way, but, as for my case, would not allow mass page-creation outside of a database restoration. From my experience it requires more work for a database-based CMS than a flat-file CMS, since there are less security concerns to worry about, and less files to perform different database-accessing tasks (whether it be for user login, page creation, page editing, etc). |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Post
#9
Dec 28 2008, 03:22 PM
Is it possible to use flat files for a type of forums as well? I think that it's how Craigslist has theirs set up, for example. I hate mysql with a passion. It often is slowed, there are database errors, etc. It's probably just my lack of knowledge about it, but still, if it can be done using html it would be best(especially for search engine optimization!) |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [MODERATOR]
Posts: 2,725 Joined: 22-June 05 From: 127.0.0.1 — no place like it. Member No.: 8,528 myCENT:40.50 |
Post
#10
Dec 28 2008, 07:26 PM
Is it possible to use flat files for a type of forums as well? I think that it's how Craigslist has theirs set up, for example. I've seen flat-file guestbooks before, but i'm not entirely sure how they get around certain security implications. There are also popular flat-file CMSs out there. If you examine their ways, you could eventually come up with a theory on how to build a flat-file forum. I'm not sure if Craig's List uses a flat-file forum, but if so, then i'm impressed. I haven't attempted to do any flat-file based scripts outside of CMS, shoutbox and image gallery, but a forum with multiple users that is flat-file based and secure would be interesting to see. I know you can place files outside of your public_html folder to access things from there, making certain things secure, but i haven't tested working with a script that creates everything outside of your public_html folder. I would assume that would be your best bet, though. |
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
36 | gamefreaksl | 45,319 | 2nd November 2009 - 04:43 AM Last post by: user681 |
|||
![]() |
38 | Roly | 58,229 | 4th November 2009 - 03:03 PM Last post by: TheDarkHacker |
|||
![]() |
17 | takato2100 | 2,602 | Yesterday, 02:25 PM Last post by: mahesh2k |
|||
![]() |
4 | zip_mc | 13,321 | 22nd September 2009 - 10:26 AM Last post by: akira550 |
|||
![]() |
3 | tomko | 8,763 | 6th August 2004 - 11:55 AM Last post by: triax |
|||
![]() |
56 | LILJOHN | 56,784 | 5th December 2008 - 04:51 PM Last post by: buxgoddess |
|||
![]() |
0 | slacker | 3,457 | 9th August 2004 - 05:53 AM Last post by: slacker |
|||
![]() |
4 | LuciferStar | 7,640 | 19th August 2004 - 01:39 AM Last post by: LuciferStar |
|||
![]() |
19 | odomike | 16,961 | 11th December 2004 - 05:30 PM Last post by: antitrust |
|||
![]() |
21 | djleli | 18,534 | 18th November 2009 - 12:21 PM Last post by: legend112 |
|||
![]() |
19 | Raptrex | 13,689 | 3rd September 2004 - 10:33 AM Last post by: wassie |
|||
![]() |
5 | Vacant | 5,651 | 3rd December 2008 - 02:43 AM Last post by: wingman23 |
|||
![]() |
72 | holyium | 43,171 | 31st May 2009 - 10:02 PM Last post by: nol |
|||
![]() |
26 | -prodigy- | 21,978 | 19th April 2008 - 08:19 AM Last post by: HyBriD54 |
|||
![]() |
2 | Jpacker | 4,086 | 27th August 2004 - 03:02 PM Last post by: OpaQue |
|||
|
Open Discussion | Time is now: 21st November 2009 - 12:35 PM |
Web Hosting Powered by ComputingHost.com.