I'm developing a car buying and selling website in php, currently what i'm planning is all the pages and the blog will be done using wordpress and other functionalities i'll develop as independent application and will connect it with wordpress using the funct开发者_高级运维ion.php file. Only user management and posting for page and blog will be done by wordpress.
Including the database table will be custom. Is this a good idea? Will i get into any bottleneck?
Admin will only be uposting to news. Users will post their cars for sale after login. They can search and rate also...
To answer your question, let's look at the most common options:
- Build from Scratch
- Build using Framework such as Zend, Cake, etc...
- Build using Content Manager such as Joomla, Drupal, etc..
- Build using WordPress
Build from Scratch This is the most time consuming. The benefits include complete control over the database and code - perhaps giving improvements in speed and resource management. The cons are the time to develop with additional time needed for testing and debugging (since all of the code is untested).
Build using Framework A framework gives you the pieces that you need to build the site. It includes many of the benefits from the build from scratch option without the concern of 100% untested code. The only downside is having to take time to learn the framework and its gotchas (they all have little things that will bite during the learning curve).
Build using Content Manager WordPress is not a true CMS like Drupal or Joomla. A CMS gives the ability for users to edit pages (with permission) while allowing customization via plug-in or code change. Like WP a CMS may have plug-in functionality to do everything you need. However, if there is a problem then you may find yourself debugging someones plug-in code.
Build using WordPress WP is a blogging platform. It is now being used in a more CMS like fashion with the aide of plug-ins and developer know-how. If you have a news site, blog, media site, etc... then WP is excellent. If you are creating a site for buying and selling then there are plug-ins to do that. However, you still have the same problems of the CMS in that if there is a bug you may have to figure out plug-in code to fix.
Conclusion: The idea of using anything other than write from scratch is to speed up development time and make the end result more solid in terms of pre-tested code. WP is a great platform and could serve you well but if the only thing being posted is news then a simple PHP blog class may do the trick.
If you are going to spend allot of time customizing WP (especially the database) then I would recommend using a Framework like Cake or Zend and writing most of it yourself. If you are writing a site to display media then WP is a no brainer.
What do you mean by "connect it with wordpress using the function.php file"?
I've delevoped http://storelocator.no on top of WP. I've created WP templates which have custom code and retrieves data from it's own tables. This way I can create pages in WP and select which template to use. Good for page navigation.
As for pages that is completely separeted from WP, but you still want to use WP functions, just include the following at the top of the PHP file:
require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');
You can use WP function to validate data instead of creating your own validation code (you can save time here). See available functions here: http://codex.wordpress.org/Function_Reference/get_template_directory_uri
精彩评论