phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

split application and data into two root folders

Discuss the future of phpBB. It is still nesting in its mother's womb, but it will grow a little bigger each day. Participate in its design & planning here.

Re: split application and data into two root folders

Postby MartinTruckenbrodt » Wed Feb 08, 2012 5:18 pm

Hello brunoais,
that's wrong! Not all of the data is in the database!
Not all files are application files.

English ist not my native language. Perhaps I have some problems to explain what I mean?

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
MartinTruckenbrodt
 
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany

Re: split application and data into two root folders

Postby Ger » Mon Feb 20, 2012 12:53 pm

brunoais wrote:the data is in the database.
the application is in the files.
Not every data is in the database. When you attach a file to a post, it's stored in the ./files/ directory. When you upload an avatar, it's stored in the ./images/avatar/upload directory. When you backup your database or upload a MOD trough AutoMOD, they are stored in ./store. If I understand Martin Truckenbrodt correctly, he would like a structure like this:

root
|-application
|--admin
|--images
|--includes
|--styles

|-data
|--avatars
|--files
|--store


Doing so could be a nice approach. Of course there are the root dir files like index, viewtopic, vieforum, etc. I think they should remain in the root. However, just having a folder called data alone should cause a user to think twice before deleting.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because English isn't my mother tongue. My apologies in advance.
User avatar
Ger
Registered User
 
Posts: 179
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100

Re: split application and data into two root folders

Postby brunoais » Mon Feb 20, 2012 1:13 pm

^ Hum...
I don't really know if I understood correctly what you mean. Anyway, picking up what you wrote:
I always preferred to work in such way that all user access is made into generalist files index.php, viewtopic.php, etc... <- Seems like we both agree on this.
I always liked to separate the files that the browser user accesses (most or all .php, all .html/.htm, etc...) and the files that the browser accesses (.js, .css, .php (when accessed using ajax), etc...). The .js, .css, etc... may have the right to be in different directories depending on the number of files that exist.
I also like to send most of the program's logic into a directory for its own and block access to all access using .htaccess (in case of phpbb the use of empty .html is also a good idea. We don't know which servers do not allow .htaccess override). That separation of application and data seems appropriate for me (if I understood it right).
brunoais
Registered User
 
Posts: 627
Joined: Fri Dec 18, 2009 3:55 pm

Re: split application and data into two root folders

Postby MartinTruckenbrodt » Mon Feb 20, 2012 6:23 pm

Hello Ger,
I think only a index.php (redirecting to ./application/index.php) is needed in the base root folder.

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
MartinTruckenbrodt
 
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany

Re: split application and data into two root folders

Postby brunoais » Tue Feb 21, 2012 1:19 pm

MartinTruckenbrodt wrote:Hello Ger,
I think only a index.php (redirecting to ./application/index.php) is needed in the base root folder.

Bye Martin


I think it's better not to do that. We should stick with the generalist .php files in the root.
brunoais
Registered User
 
Posts: 627
Joined: Fri Dec 18, 2009 3:55 pm

Re: split application and data into two root folders

Postby callumacrae » Tue Feb 21, 2012 1:35 pm

brunoais wrote:
MartinTruckenbrodt wrote:Hello Ger,
I think only a index.php (redirecting to ./application/index.php) is needed in the base root folder.

Bye Martin


I think it's better not to do that. We should stick with the generalist .php files in the root.

+1

Also, this should never have been in the 3.2 forum as it is too big a change. It should have been in 4.0.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: split application and data into two root folders

Postby MartinTruckenbrodt » Tue Feb 21, 2012 9:42 pm

Hello brunoais,
if you will not move (nearly) all of the application files to the ./application folder then the original idea has not been realized.
Also this strict solution would make website integration (without using the phpBB template system) much more easier for beginners.

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
MartinTruckenbrodt
 
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany

Re: split application and data into two root folders

Postby DavidIQ » Tue Feb 21, 2012 10:32 pm

I'm not sure this will accomplish preventing what you're saying. There is currently a folder named files and users will still delete it or do other strange things to it. It does make a little sense what you're saying and we sort have something similar going on in phpBB.com already but we update from github and very few users would be doing something similar so I'm having a hard time seeing how the user will not do what they already do (delete the entire folder where phpBB sits at).

Moved to 4.0 discussion.
Image
User avatar
DavidIQ
MOD Team Leader
MOD Team Leader
 
Posts: 772
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Re: split application and data into two root folders

Postby MartinTruckenbrodt » Wed Feb 22, 2012 5:26 pm

Hello David,
the thing is not related to delete a folder manually. E.g. it's related to use a FTP client the wrong way or with wrong or dangerous settings. And then not to have a second backup. So no restore is possible and data is lost.

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs
MartinTruckenbrodt
 
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany

Re: split application and data into two root folders

Postby DavidIQ » Wed Feb 22, 2012 11:22 pm

MartinTruckenbrodt wrote:Hello David,
the thing is not related to delete a folder manually. E.g. it's related to use a FTP client the wrong way or with wrong or dangerous settings. And then not to have a second backup. So no restore is possible and data is lost.

Bye Martin

My comment still applies. All you'd be doing is changing the folder that the user would delete...via FTP or whatever other means they have to manipulate files on their server.
Image
User avatar
DavidIQ
MOD Team Leader
MOD Team Leader
 
Posts: 772
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Previous Next

Return to [4.x] Discussion

Who is online

Users browsing this forum: No registered users and 10 guests