PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 16th, 2013, 05:03 AM
alimosavi alimosavi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 7 alimosavi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 12 sec
Reputation Power: 0
Lightbulb Open source CMS Develop

Hi
I try to develop a cms ,
i welcome any help or opinion

root file : index.php , .htaccess
folders :
==>core
--> includes { bootstrap.inc.php , dbconnect.inc.php , patch.inc.php , ...)
--> modules {user , content , menu , sys , box }
--> style {css , img , template }
==>server
--> default {config.php}
--> example.com {config.php , modules , style , files}
==>main
--> files
--> library
--> modules
--> style
---->default {template , css , img }


I will upload the files soon as possible ...

Reply With Quote
  #2  
Old February 16th, 2013, 03:34 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
Although I am certainly no expert i have a bad feeling with the global variables you use for your database connection. Aren't constants or static variables more suited for this?
(love to hear it from the experts )
__________________
PHP Tutorial

Last edited by aeternus : February 16th, 2013 at 03:36 PM.

Reply With Quote
  #3  
Old February 16th, 2013, 06:01 PM
Jacques1's Avatar
Jacques1 Jacques1 is offline
pollyanna
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 2012
Location: Germany
Posts: 2,033 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 6 Days 20 h 57 m 29 sec
Reputation Power: 812
Hi,

I agree that you do overuse global variables. In the long run, this will make the code very obscure and error-prone, because you simply have no control over which variable has which value.

Global variables are acceptable for small scripts that only generate a single page. But for a complex project like a CMS, you need to reduce global variables to an absolute minimum. I mean, you certainly don't want hundreds of strange variables floating around everywhere, each one carrying the risk of accidentally overwriting it.

Also, please get rid of the old MySQL extension and use one of the modern replacements. The PHP manual has a big red warning on each page of the old extension, but obviously this zombie functionality just won't die -- thanks to hundreds of bad tutorials still promoting it.

No offense, but I'm rather sceptical about your approach. Your code isn't particularly bad or something, but it's not exactly up to date. Do you really want to build your whole CMS from a bunch of loose functions and global variables like people did in the 90s? I mean, PHP has evolved since, it has object-oriented features, database abstraction layers, extensive frameworks etc.

To put it bluntly: I think that if you go on like that, you might end up with a 100,000 lines long unmaintanable reinvention of the wheel.

I'm not saying this to put you down! Your concept looks good, and I think it's great to start your own project. But I'd advise you to take some monthts (or even years) to plan and investigate current software and techniques before you actually start programming. Look into frameworks like Symfony or CodeIgniter, see how other CMS do it, inform yourself of security and current best practices, gather experience etc.

You'll get a better result at the end.

Reply With Quote
  #4  
Old February 17th, 2013, 12:50 AM
alimosavi alimosavi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 7 alimosavi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 12 sec
Reputation Power: 0
Quote:
Originally Posted by Jacques1
Hi,

I agree that you do overuse global variables. In the long run, this will make the code very obscure and error-prone, because you simply have no control over which variable has which value.
....


tnx , i start it for learn php and complete a project that may help others to start sample site ,
thank you to share me your experiences,
i try to apply these ideas and make clean codes ,
the project start on Feb 13 2013

Reply With Quote
  #5  
Old February 17th, 2013, 05:36 AM
Jacques1's Avatar
Jacques1 Jacques1 is offline
pollyanna
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 2012
Location: Germany
Posts: 2,033 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 6 Days 20 h 57 m 29 sec
Reputation Power: 812
Well, if you stick to your original scheduling and continue to work on the code, that's pretty much the opposite of what I suggested.

But that's up to you, of course.

Reply With Quote
  #6  
Old February 20th, 2013, 09:13 AM
alimosavi alimosavi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 7 alimosavi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 12 sec
Reputation Power: 0
Thanks guys ...

I publish basic code ( that not clearly , result 1 week work only )
I am newbie in php therefore get me you suggestions please ...

https://github.com/wishcms/wishcms

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Open source CMS Develop

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap