PDA

View Full Version : Coding all from scratch or using a CMS/CMF ?


GeorgeA
03-17-2007, 11:36 AM
Do you code your websites from scratch or use a CMS/CMF to make your life easier ? Of course,I'm referring to somewhat dynamic websites (php&mysql type of sites).

I for one , use a CMS/CMF called ModX that is extremely flexible , tried Joomla in the past , and making templates for it was such a hassle.So now,I'm sold to this CMS , as it can do whatever I want it to do,and more,and I can extend functionality as I wish. (warning: a bit steep initial learn curve).

What are the reasons for someone to actually write his entire site from scratch (assuming it will be often updated , and page will be added ) ? I think one would say efficiency,but considering that some CMSs implement caching, I don't think you can beat that without a lot of work. About security ... well,using an open-source app,you can spot any vulnerabilities,and if you don't , maybe someone else will ( crackers will do that too unfortunately ) ,but , for your code you can also miss some things.

Then there's the time invested in website development, and the results you get in that amount of time.Having to re-invent the wheel could take quite some time.

So, why do you use/not use CMSs(content management system)/CMFs(content management framework) , what do they lack so you could use them,what are the bad parts in using one(e.g.:data lock-in for some systems).

Henrik
03-17-2007, 12:08 PM
Unless you have very specific needs it always pays off to customize an "out of the box"-product.

GeorgeA
03-17-2007, 01:42 PM
And your personal favorite is.. ? :)

Kevin
03-17-2007, 03:20 PM
I use a perl-based CMS called Coranto on my personal web site. It's basically dead at this point, and not commonly enough used to be the target of too many exploits it seems. I've used it for many years, and since it creates all static pages for the most part, you have to actually find the installation of the script in order to exploit it.

adb22791
03-17-2007, 04:10 PM
I find myself forced to try and code my own. I've tried everything from Joomla to Subdreamer, and nothing really seems to work the way I want it to. Plus, it's already so expensive for us who aren't very designer-oriented to find a good design (unless you find it on oswd (http://www.oswd.org) :D ), why make it harder by having to rip the design apart and apply it to some backwards templating system?


Alex

GeorgeA
03-17-2007, 04:41 PM
Well adb22791, I would like you to introduce you to the ModX way of templating stuff.
Lets say you've got your template sorted out and designed.
In the region you want your content to appear,you drop a tag named [*content*], where you want a footer , you drop a chunk named {{footer}} that can contain html text and can call php scripts even (called snippets in modx). Same goes for whatever part you have in mind. You just make {{chunks}}, drop them where you want them in a page,and they'll just appear with whatever you put in them (including html,php scripts,document specific variables -these are really neat..if you have a hierarchical structure ,you can inherit a value,code,etc. from the upper level,get the value from a Mysql query,from some php code or from a file). It's really that flexible!

Edit: it takes less then 15 minutes(and that takes that long only if you're a beginner just starting to learn modx) to convert a design into a modx template .

Henrik
03-18-2007, 12:35 PM
And your personal favorite is.. ? :)


Joomla or Drupal I'd say.

Karl
03-18-2007, 03:09 PM
Any CMS that uses dynamic pages for everything is just a simple waste of resources. Going with something, such as Kevin suggested, that creates static pages would definitely be the way to go on anything with a decent amount of traffic. The difference between the two configurations is staggering in many cases. We host some sites on multiple high end servers because of load reasons, etc. while a similar site, with more traffic, works fine on one lower end system, all because of the way their site is setup and coded. The more static content you have, the better.

GeorgeA
03-18-2007, 04:10 PM
Any CMS that uses dynamic pages for everything is just a simple waste of resources.
Well, how about a site with dynamic pages that can get a full page cached,or just some part of it (so some features remain dynamic) ? ;)

Henrik
03-18-2007, 04:54 PM
I agree with you fully, though most CMS has an option to generate static documents for all or the most requested pages. Many newspapers run PolyPoly, which has this function, to mention one example.

Kevin
03-19-2007, 01:28 AM
Well, how about a site with dynamic pages that can get a full page cached,or just some part of it (so some features remain dynamic) ? ;)

That's certainly better. Obviously, as your usage grows, the more you can pull from cache and not have to put together on the fly can stretch quite a bit more life out of the same equipment and save you money. For example, if you have a comments section on your site, rather than building the comments and count dynamically from a database, generating static text includes that are updated only when something changes can make page generation much faster and produce significantly less load.

Some of the worst possible things you can do on heavily loaded site are generating random content or summaries of content (especially from huge database tables) or keeping track of the number of users and what they're doing at any given moment for display.

Also, there's quite a bit of value in extra RAM, because content read directly from the disk will be cached by the OS kernel in the spare RAM until it's needed for running programs or the content on disk is changed, which can greatly reduce the load on your disks, which are basically the slowest hardware in your server, assuming you don't read from a serial port. :)

ManagerJosh
04-22-2007, 10:11 PM
After examining ModX, one thing that it lacks for me is the ability to manage news, media and download content. This is extremely important to me.

GeorgeA
04-23-2007, 09:49 AM
Managing news is done trough a snippet that is bundled with the default install. It's called Ditto(if you've installed the default modx and checked the "install sample site" you would have seen that it also installs a blog) , and work for news, blogs, and coupled with other snippets it can make blog archives, and calendars with news. You can customize the output trough chunks,so it can be displayed however you want it , with whatever data you need.

For media,if you are referring to picture, there is an excellently implemented solution called MaxiGallery(uses some AJAX) and we also have a Gallery 2 Integration snippet.

About managing downloads,how would this fit your needs? http://modxcms.com/FileDownload-2.5-1255.html

There are a lot of resources available as either snippets/plugins/modules that are not bundled by default,and of great use.You can browse them here:
http://modxcms.com/resources or http://www.modxcms.com/repository-tag-cloud.html .

I like ModX a lot because of it's flexibility (it really has very few competitors in this area). If you need help with anything , ask me , or in the official forum(it's an active forum).

PS:On a unrelated note:It ranks #1 on Google for: AJAX CMS , and #2 for: SEO CMS. :P

ManagerJosh
04-23-2007, 10:00 AM
Downloads still not what I'm looking for. I need huge space for customizations and details, not just some block for adding comments to a file.

GeorgeA
04-23-2007, 10:52 AM
Well you could create a template for the element that will be downloaded, and make sure it uses TVs (template variables) so you can customize everything you want related to that item. Then, you create each item as a page using that template you just created. You can create the pages on whatever hierarchy you want to, and even use a TV so you add tags to them, and display all of the items on other pages by tags,by date added,by menu index,published date etc. You could set a TV to store number of downloads, and sort items by number of numbers. If need be, there is also a CssStarRating snippet so your users can rate the item. Also , you can allow them to comment on the downloads (using Jot).

I recommend you read the documentation about chunks/TVs/snippets. Once you get it , you'll see there's nothing you CAN'T do :P.

Justec
04-23-2007, 06:01 PM
I usually make my own code. It took time the first time, but I can reuse a lot of it on new sites I make. I did however us OScommerece as a base for an ecommerce site and just mod'd the hell out of it to make it up to my standards.

Senad
04-23-2007, 06:05 PM
Ahhh all this talk of coding and variables brings back "fun times" and reminds me why I decided to go for a Masters in Network Security in the first place :D.

Myself, I personally like to use simple PHP scripting alongside static php pages with XML/VBulletin Integration ;) (or for you not into VBulletin..phpBB or whatever is "hot" these days...SMF?). Easy, simple and a managers blessing :). I'm too paranoid about network, network security stuff and hackers to have time to sit down and learn how to code go into more complexity :P.

ManagerJosh
04-23-2007, 11:13 PM
Well you could create a template for the element that will be downloaded, and make sure it uses TVs (template variables) so you can customize everything you want related to that item. Then, you create each item as a page using that template you just created. You can create the pages on whatever hierarchy you want to, and even use a TV so you add tags to them, and display all of the items on other pages by tags,by date added,by menu index,published date etc. You could set a TV to store number of downloads, and sort items by number of numbers. If need be, there is also a CssStarRating snippet so your users can rate the item. Also , you can allow them to comment on the downloads (using Jot).

I recommend you read the documentation about chunks/TVs/snippets. Once you get it , you'll see there's nothing you CAN'T do :P.
We're talking lots of data here needed to be added in, not just a simple link or detail or two. I'm more into user-created and managed downloads and media, not all admin managed.