Suggestion for using Drupal Comment in PHP Application - php

I'm developing a web Application using PHP. And there i need to use commenting system. One of my senior suggested me to use Drupal for the commenting system, i referred some websites, but i got a contradicting answers. Some of them says "integrating Drupal with any website application will not be consistent". Is that right? Or may i use Drupal comments in my PHP Application?
I know this is not a programming question, still i need to get some experts advice for this. so i post my question here.

In short, if the rest of your project is built in Drupal, then absolutely use Drupal's comment system. If not, you're probably better off using something else.
Drupal is a flexible content management system and framework that provides way more out-of-the-box functionality than just comments. The comment system is relatively tightly coupled to Drupal's nodes and entities and isn't currently intended to be used stand alone. Using just the comment module in Drupal would entail quite a bit of work just in disabling the parts you wouldn't be using and then figuring out how to integrate with the parts you needed. You would be in uncharted territory, with little to no documentation available to help you figure out how to do all that.
If you just need a comment system, you're better off using a stand-alone comment service (such as Disqus or IntenseDebate) or using a package tailored for comments (such as juvia or EasyPageComments) or writing your own comment system.

Related

Port Codeigniter App to PyroCMS

I'm working on a web application in Codeigniter. I'd like to integrate the functionality of my application with a CMS so that site admins can easily update the site (about pages, blog, etc). Is this easily done with PyroCMS or another Codeigniter-based CMS? Will I need to drastically restructure my existing app?
From my own experience integrating an app inside Expression Engine I can say that a CMS changes the way you usually work with CI. So be prepared to make some adjustments. Every CMS will come with it's perks and differences. It shouldn't be a big problem though.
If you want to use PyroCms take a look at this doc first:
http://www.pyrocms.com/docs/2.0/developers/creating-custom-modules
If you're looking for alternatives, there are a lot. It seems almost everyone working with CI has made it's own.
Here are a few:
http://www.ionizecms.com/
http://www.halogy.com/
http://codefight.org/
http://www.getfuelcms.com/
Also make sure you check out CI Bonfire, it's not a CMS but does help you when you start up a new project with a basic admin wrapper, which is sometimes more useful than a CMS:
http://cibonfire.com/
This was answered a year ago and answered well, but my support guy has forwarded me a few emails from users asking about this page.
When people talk about Content Management Systems they often suddenly get the idea of rigid backends where you applications have to follow specific rules. While PyroCMS certainly has a few conventions you are free to build your modules just like they are a CodeIgniter application, on the frontend or the backend.
If you want to use Models, Controllers, Views, REST API's, SOAP, whatever the hell, then you can do that.
But, we also offer some awesome tools to make building modules CRAZY-fast. Hate writing CRUD? Well don't bother. Using the Streams API you can leverage the build in "Custom Data" system we use to rock out chunks of interface for you.
Using PyroCMS for your application is certainly not "hacking it into a CMS", this is the exact use-case it was built for.
If you have an existing application, while you can't "put PyroCMS into your app" you can certainly convert your application to a module easy enough.
The simplest way of doing it is to write your models around the CMS' database. Host the CMS at a subdomain with authentication for your admins. (admin.mysite.com) or something and then use the same database to power your front-end for your site.
Is it the best approach? Probably not.
Will it work? Yes.
You will probably find it hard to expand vertically & add new features if you're relying on a 3rd party CMS for data entry & backend.

can you create sites automatically (with a html page) with drupal on the same server?

I've read that you can host multiple drupal sites, while they use the same core files(so not needing to copy a few megabytes for each site). I wanted to ask if there is an automated tool that can create a new site, while let you choose a template and then connecting it to the drupal system?
Are there tools like that(with a web layout)?
I would really like to get a few pointers as to how, lets say a company for building websites, will be able to use an automated system to build sites easily. I also understand that with drupal you have alot of manuver to edit your own code, when lets say you want some future in one of the sites. Is it pure php/html or in order to do that you have to delve into core Drupal futures? Also what are the chances that somebody already did it before and you can use this module?
Last, if a company wants to move to a Drupal system (web development company), how much of a transformation is it? Should they be Drupal core experts in order to not lose themself? Or they can keep a drupal base while still using the regular html/php? I really appreciate any leads.
Thanks.
*the questions is also intended to Joomla.
To answer your first question, the Aegir project is a system whereby you can use Drupal to create and manage Drupal sites. That includes installing from install profiles--which are sort of like site templates--or a distribution (Drupal installations pre-packaged with modules). The downside is that installation is fairly involved, more so than just Drupal itself. There's a lot of documentation on the Drupal groups site for Aegir. For a straight multi-site install, there's some documentation on the subject, but the install instructions with the software come with help that you should consult first.
As for your second question, the answer is (unfortunately) "it depends". Knowledge of PHP, especially "the Drupal way", plus integration with the community, are huge plusses. If you intend to join the community, immediately sign up both yourself and all developers an account on Drupal.org and, if you find solutions to bugs or other problems, providing back is a sign of goodwill, and it usually pays back dividends (one example: you submit a patch, it gets included in a module, and then the community maintains it for you). Developers need not be experts with Drupal core, but they need to be pretty comfortable with learning the API and knowing how to create sites for clients in general. First start with requirements gathering, then see how it fits into the Drupal way of doing things. If it doesn't fit, then use the right tool.
That's a tip of the iceberg view from the developer's point of view (as opposed to the businessman's point of view). There are plenty of companies that do only Drupal and there are plenty of companies where Drupal is one tool they use out of many.

Any PHP Frameworks that use a Layout and Block system like Magento? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
While it is most typically touted as a fully-featured shopping cart system, Magento is an awesome framework to boot. Of particular awesomeness is the layout system. In essence a page is created from "Blocks" which all inherit from an abstract class which does not assume the use of template files. These blocks are assembled according to a layout which is the composition of a bunch of XML files being merged together to describe a hierarchical structure of blocks for each page (inheritance supported for DRY). I love this system but Magento is a very heavy framework.
Are there any other frameworks which use a similar system? I.e. layouts that are defined outside of the template files as described above. PHP 5.3 is preferable but would consider frameworks in other languages.
I would stick with magento if you already managed to get your head around it. Why waste time learning another system? If speed is the problem, spend some time on optimising magento (there is a whitepaper on the subject which is a good place to start) and look into installing apc. It gives my magento installations a hell of a boost.
Not strictly a framework, But Drupal pretends to be a web-application-framework. You can strip Drupal to its bare bones and develop your own modules on top of it. Using its blocks system and templating engine.
Yep, Zend Framework can definitely be modified to allow for a Magento-style layout engine, and it doesn't have to be as complex a customisation as Magneto probably makes it.
In fact, I was so compelled to have this myself, and not let it beat me, I decided to start implementing the same form of layout engine myself in my own library I use for Zend.
From this came my first blog post on my new blog, and my first ever post on SO
BTW, thanks for bringing ModMan for Magento to life Colin.
Building a Magento-style Layout Engine for your Zend Framework Library
Take a look at Symfony Templating component. It is fast, lightweight and powerful.
If you don't like PHP code inside templates, try Twig.
Both libs are standalone, support template inheritance and are easily extensible.
Look at Symfony 2.0, it still in beta. http://symfony-reloaded.org/
The Zend Framework is one such framework, which has almost the same structure as Magento and uses the correct MVC architecture (as many other versions of MVC architectures exist, which are implemented in many available PHP frameworks).
However, the Magento framework has been greatly modified by Varien, to suit its requirements, thus providing support for controlling templates & modules using XML configuration files. Also I think that this is Magento framework's unique characteristic feature.
So, all in all, I think Magento (with its barebones) must be used as you already are using & so does "silvo".
Hope it helps.
I am currently working on CakePhp. It uses layout system. Also there is elements that you can create blocks on layout. It may work for you. Also not so hard to learn.
Magento is build on Zend Framework. So, you may use this framework. But these days, almost all php frameworks use layouting system.
You can also consider Yii Framework and Doo PHP
Suggest you take a look at Agavi http://www.agavi.org as it sounds like it does what you want.

Which PHP CMS do you recommend for a website? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am building a website and need to use a CMS.
If I use an already made CMS, I need to be able to extend it easily.
Is there a specific CMS that you recommend or should I make my own?
OpenSourceCMS is an excellent place to start. They offer demos, user rankings, etc. of many different CMS systems.
You can also find relevant questions here on stackoverflow by searching for "php cms".
Personally, I like Drupal, MODx and Concrete5. Drupal and MODx because of their extensibility, Concrete5 because of its simplicity.
I have found SilverStripe to be quite useful, used it on an intranet project - built in authorization, nice content editing built in, easy templating language, workflow, content versioning. I also like that they have good documentation and Help. The Demo is also impressive.
http://drupal.org/ comes highly recommended.
good community and plugins/addons.
Josh
If you are looking for simplicity try Concrete5 or MODx. They are both easy to install and work with.
Had the opportunity to use Joomla, there are many plugins/templates/tutorials and a few books out there. If you are good in php you will find it very easy to create your own plugins or extend existing functionality. However big drawbacks are the many exploits and some limitations (only mysql as a database, versioning of articles, detailed permissions, multilingual support) that hopefully will all be fixed with Joomla 1.6.
The beauty of most good packages is it won't hurt you too much to get dirty with a few of the well managed and easily installed packages to see what's best for you.
I have stumbled through Drupal and ended up on Joomla. I found Drupal to be highly powerful and technical. Joomla is the same, but seems to do straight-forward stuff a bit easier. Both work quite well.
If your application is very simple, Concrete5 is definitely worth looking at. I go with Joomla for most projects right now and am keeping a close eye on Concrete5...
Let us know what you went with and why!
I really like SilverStripe's admin and extendability.
Right now, I'm running http://gallery1401.com/ on SilverStripe.
It has nice image upload, and custom fields, and rails-like associations and data management.
Runs on a typical php/mysql stack, with strictly object-oriented architecture.
I'm surprised no one mentioned ExpressionEngine. It is not free (that's probably why) but it's PHP, has a thriving community, a lot of plugins (good ones not free, but a php programmer could consider this a possible revenue source). It's built on a PHP framework - Code Ignitor.
I'm playing with Concrete5 right now - I really love the in page editing. It's MVC based, extensible. Simpler (so far) than EE, EE is easy to use and template, simpler than Drupal. Drupal is amazingly powerful, but as others have noted there is a steep learning curve. Even if you're a php whiz you have to learn "the Drupal way" to template, to code, everything, it's really quite involved. That said, Drupal can really do anything and powers some very robust and high profile sites and has a huge community.
UDPATE: MODX Revolution (v2) is no longer "brand spankin' new. Use v2 instead of v1.
If integrating custom design is a big factor I highly recommend using MODx (v1 since v2 is still brand spankin' new). It's loved a lot by designers and developers alike. I have heard good things about EE, concrete5 and SilverStripe though. I really only know MODx though. The design integration rules (no themes to mess with like many other CMSs). Very extendable for PHP ninjas as well and the community is SUPER helpful and friendly. Hope this helps someone as I know I'm replying a year and a half later from the last post!
its sad that no one seems to include wordpress in these discussion
my recomandation is wordpress.org but it also can be wordpress MU and MU in combination with buddypress
one great advantage of wordpress is plugins
it has if not the most extensive plugin selection
and on top of that the same goes for its template selection
please do check them out
I haven't been impressed by CMSses out so far, but Concrete5 and MODx are definitely two to check out.
I'd like to see the documentation and community of Concrete5 grow into something as big as Joomla or Drupal. That will only happen with more users, but it's good enough to get started with right now.
If you want to go the "Rails way", you may want to check out CakePHP, a rapid development framework that adapts most of Rails' functionalities. Also VERY easy to extend!

Does anyone write really long, complex PHP apps? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
It's hard for me to imagine a php script that is more than a few hundred lines of code. It seems that, for a non-persistent environment, web-based scripting is usually done is small chunks and used for the purpose of delivering a portion of a website to the end user. I'd like to know if people are developing any type of large, or persistent, or complex apps with php, and what is it exactly you are working on. I've only done small projects for small websites, so I don't know what can be accomplished on a larger scale. It would also be nice to know what libraries you are using, and what other technologies you are integrating with. Please enlighten me so I can start to dream of bigger things!
I would look at some of the well-known open source web apps that use PHP to get a good sense of what can be accomplished, and how PHP is used in each of them. The advantage is that since they are all open source, you can actually look at the PHP code to see how various functionality was implemented.
Some good examples to look at include:
WordPress
TextPattern
MediaWiki
PhpBB *questionable code quality
SugarCRM
Joomla
Drupal
Also look at some of the popular frameworks to see what kind of functionality they offer (this should give you a good sense of what types of things PHP is most often used for):
Zend Framework
CakePHP
CodeIgniter
Symfony
For my day-job we run everything in PHP - our front-end website, our backend for agents and employees, inventory, server control interfaces, etc. These are everything from spiffy new AJAX-enabled Zend Framework apps to legacy code that we haven't ported yet. On top of that we use things like Mantis (bug tracking built in PHP), Mediawiki, and phpMyAdmin.
The only thing that isn't PHP are vendor apps because vendors love Java. The one ASP.NET application we have was actually abandoned by the vendor during the project (not really a knock against ASP.NET, that app was just the perfect definition of a runaway project and would have failed no matter what language it was written in).
With mature frameworks like Zend Framework, CodeIgnitor, and CakePHP creating just about anything in PHP is possible.
The biggest problem developing large scale programs is definitely keeping them maintainable in the long-term. Initially, a program starts out all full of ideal methods and ideas, but keeping the integrity intact, especially, over time fails, in my opinion, more often than not.
In addition, scope creep is your enemy. You HAVE to reign that in ASAP.
As far as large scale programs go the company I work for has a few internal programs constantly under development. One example is our proprietary website engine. It's a very large code-base that includes a dozen modules (user management, survey system, blogs, user galleries, etc) that allows us to build our clients sites rapidly.
We also develop our own internal project management program for managing our clients work.
You should definitely be thinking in terms of scale in the long term. In almost every project I've worked on there's a permission/group element for users involved. You might want to start thinking about the possibilities and issues involved in that and work up to more complicated functionality.
MediaWiki is one of the largest public PHP apps, and it's got very nice code. . I know some larger ones, but they're utterly awful and you'd learn nothing by reading them.
There are lots of complex OpenSource php applications. For example, the Drupal CMS, which can be considered a platform in its own right for developing other web sites.
You can browse through the source code online: http://cvs.drupal.org/viewvc.py/drupal/drupal/
+1 for Wilco
I have a software I use for some of my clients, it's a CMS, Blog, eCommerce beast, the code base is HUGE, but everything cooperates with each other nicely.
My company works on educational software. We've recently started doing web-based content delivery, including video and audio, with the backend written entirely in PHP using MySQL. We have two primary apps, one which lives on our servers and one which is delivered to the customer. One clocks in at ~42,000 lines of code (using a physical line count) and one at ~68,000 lines.
We use PEAR extensively and a recently started project is using the Zend Framework.
We use PHP at our company. (We do online language learning: http://www.livemocha.com. You should go take a look at the site. Yes, it's sort of a shameless plug, but it's also topical. :-) )
I can't give you a precise number of users, but we put out a press release a while back celebrating hitting the 3 million mark. That's a pretty large scale as web apps go.
We build on the CakePHP framework, which is based on an MVC architecture... at least in theory. In practice, they auto-generate certain methods for the models which tend to have the result of pushing some pieces of model code (caching, deciding which DB to use) into the controllers. They also have a few localization issues in 1.2 that make me think this part of the framework hasn't really reached maturity yet. That said, I find CakePHP pretty comfortable to work with overall, and you should at least take a look at it if you're considering implementing a large-scale web app in PHP. It has some excellent documentation available as well (google for "CakePHP bakery").
Get CodeIgniter and rebuild Amazon or Ebay. If you can dream it you can build it in PHP but you might not be able to maintain it because it is so easy to created bad code that works. PHP.net is your friend. Whatever framework you use make sure your read the User Guide and let it guide you.
I can't believe nobody has mentioned the MVC pattern yet. IMO, it's one of the best things you can use to help you maintain large codebases.

Categories