Quote from: BobRay at Feb 13, 2010, 12:07 AM
On the number of documents, it’s hard to say since it depends on the server and how you manage the cache. Common wisdom is that trouble starts around 5,000 documents, but I’ve never had enough myself to be a problem.
I’m not familiar with Quip or WP internals so I’m no help there.
OpenGeek is a fan of custom DB tables for this kind of thing that just hold the necessary data (modx documents have a lot of overhead that you don’t need to duplicate for every post or comment). He also advocates a custom caching system that’s tailored to your application. He could explain it much better than I could.
Again, my rule of thumb is any content that is presented in the same way and has a quantity in the 100’s should be modeled using custom data tables. PHP is designed to present dynamic views of such data, and sure, you can cheat by treating every piece of content you have as an actual Resource, but this transfers the overhead of a single dynamic view to your entire web site.
WP does this very well when used as a blog; it does not treat each post as a view in the system; rather the views are pulled on demand and dynamically rendered into a few distinct views as individual posts (one view), a summary of posts by dates (various additional views), or by tags/categories (a few more views), or as RSS (another view), etc. This allows your blog to scale, even if you have 1000’s of posts and/or comments. By creating a blogging system like this within the MODx framework, it too can scale in the same way (or even better by taking advantage of the almost limitless caching capabilities available in Revo).
I’m not saying you can’t create a minimalist blog by posting some Resources and summarizing them, in fact I’m constructing my own personal blog that way. But I’m not a prolific poster either, and will likely never reach 100 posts. If I do become prolific for some odd reason, I’ll be developing an add-on component for blogging as I described.
Quote from: mattcdavis1 at Feb 12, 2010, 10:02 PM
Also, are there built-in modx functions for making user input database safe? And for escaping output (neutralizing any javascript / html characters)? Or do we just use native php functions for this?
For example, I know with Zend I can use $this->escape($output) for displaying content and for inserting data to DB, nearly all input is automatically made DB safe using the insert method of the Zend_Db object.
All xPDO API calls (and thus all modX API calls) use PDO prepared statements, which automatically handle user input escaping. You can manually escape input using PDO’s quote() method as well, but it is recommended to always use prepared statements.