Hide all references to framework cakePHP - cakephp

For security purposes id like to hide all references to the CakePHP framework that I have used to build my site. Can anyone offer any help on the best way to go about this pls? so far Google hasn't yielded any useful results.

The real, non-sarcastic answer is:
There's absolutely no reason to hide the fact that your app was built in CakePHP - for security purposes, or any other purposes. Just don't worry about it.

For debug mode 2 (which you must have for a production site) as far as i have seen only cookie has a mention of cakephp which you can remove simply using
Configure::write('Session.cookie', YourCustomCookieName);

Related

Know any documentation for taking existing cakephp site and integrating into Croogo?

My employer runs a website with a homebrewed CMS that it has outgrown. I would prefer to use Django, but since everything is already in PHP, and I know the Cakephp framework, I'm going to just rebuild it in Cake. I've already done the gap analysis between the current site and the Cake version and it looks doable.
However, I need the site to have a CMS and don't want to put one together myself. I'd rather not reinvent the wheel. Croogo seems like the most actively developed and positively reviewed Cake CMS, so I'm leaning in that direction.
The trouble is I can't find any detailed documentation of how Croogo handles the database relative to Cake. I understand there is a direct link between the two, but is that enough for me to just trust that I can easily take an existing Cake site and magically integrate that with Croogo? I have a strong feeling that it won't be that simple.
I plan on to creating a fake croogo site to try to look behind the curtain, but I'd rather not have to reverse engineer the whole thing. So, does anyway know a bit about my scenario or have a resource they can point me to?
I doubt I'm the only one who wants to migrate an existing site to Croogo.
It really isn’t that difficult to build something in CakePHP. As long as your database is normalised, and you have your models set up correctly, you can easily “bake” something specific to your needs. User authentication with bcrypt-hashed password is easy to add, as is authentication and ACL.
I have a starting point that covers the above that I use for each CakePHP project, and can quickly build bespoke websites in CakePHP with little effort, without having to shoe-horn it into a CMS or plugin. Once you go down that road and start working around a particular CMS or plugin, you’ll find yourself quickly in the same position (outgrowing your chosen CMS/plugin’s capabilities) as opposed to building something that’s fit for purpose.

In Drupal should I use content-types or database abstraction layer?

I posted a question on the Drupal forum about whether I should build my database in Drupal using content-types or the database abstraction layer and schema module: [here][1]
Any advice would be greatly appreciated.
[1]: https://drupal.stackexchange.com/questions/98020/should-i-use-content-types-or-database-abstraction-layer
I'd recommend using content types.
For a PHP coder, sometimes using the Drupal User Interface to build things feels non-intuitive, but in the long run you're going to benefit a lot from doing things "the drupal way.
Once you reverse engineer your need into a content type and all it's associated fields, install the modules that provide those field types and set things up, you'll start to see the benefits.
Validation on all the data-entry froms will already be done for you.
Multiple display modes are available for your data (email addresses can be shown with or without mailto: links, images can be shown using any of Drupal's image styles)
Integration with other Drupal modules already exists, and will be supported (almost anything built with fields is available to views)
By writing your own schema you'll need to handle all these things yourself (and more), and not just once, but you'll need to maintain all that custom code over time.
Learn to leverage the community and all the great work that's been done already, you'll save yourself time in the long run :)
What i see you are going to have shop site.
You may tray this:
https://drupal.org/project/commerce_kickstart
, i've found it usefull once. It's drupal distribution with nice themed shop rady to use straight forward.
And of course do it with content type + views + entity reference modules.
Here is a link to a comment that answers the question I asked. It backs up what arpitr outlined in their answer on the orignal post on the drupal forum, whose answer is also in agreement with jenlampton's suggestion above.
https://drupal.org/comment/7848011#comment-7848011
I will implement my system using node entities until the need arises to build a custom entity (if it ever does).
The top answer in this forum give a good way to evaluate whether to use nodes or custom build an entity:
https://drupal.stackexchange.com/questions/22586/when-is-it-appropriate-to-create-an-entity-versus-just-adding-a-new-content-type

Is using scaffolding in cakephp good practice?

I am using CakePHP. I have learnt about the concept of scaffolding in it, it seems to be good concept. But my question is that Is it a good practice to use scaffolding for production level app development as official CakePHP documentation says that It isn’t meant to be completely flexible, it’s meant as a temporary way to get up and going..
Thanks in advance.
The documentation says that it's not flexible enough. However it still works, also when debug level is 0.
Scaffolding is Automatic CRUD creation. cakephp generates CRUD when you bake.
Scaffold has the advantage that it's meant for early stage of development.
For more read
http://www.indywebshop.com/bestpractices/2007/06/13/early-impressions-of-cakephp/
but i suggest not to use it because at any stage you will need to write your own code.
But for application which are not frequently get changed its really helps.
I would like to say it is useful for MVP if you want to hack up a web app fast.
But a no no if you want production grade end product

Internationalization and Localization in CakePHP 2.1

I am building a dual language app in CakePHP 2.1.x because of the great reviews of Cake's "built-in" localization features. However, I am wrestling with getting this powerful feature to work.
I know that this topic has been tackled for previous versions of Cake (here, here, here, and here), but it hasn't been solved for Cake 2.x. I am also referencing these articles in the cookbook (yes, I've read the manual):
http://book.cakephp.org/2.0/en/core-libraries/internationalization-and-localization.html
http://book.cakephp.org/2.0/en/core-libraries/behaviors/translate.html
Couple of things -- I do not want to do separate subdomains for each language. Instead, I prefer URL based language switching with the click of a button (in this case, a flag icon). The site will be actively maintained, so the content needs to update dynamically. Asking the client to maintain two separate sites/databases is out of the question.
I have Translate behavior set up for my PostModel, but I can't tell if it's working. I also initialized I18n by running I18n in the console, have confirmed the database tables exist, have set up my .po files, and have wrapped all my content in __(). However, when I change the default language in my browser to French, the site remains in English.
I've tried the P28n Component, but I think it's outdated for Cake 2.x. I also tried URL-based language switching based on this nuts-and-bolts-of-cakephp article, but apparently it's incompatible with the new CakePHP API.
Can anyone point me in the direction of a tutorial or instructions that work with CakePHP 2.x? One not already referenced here?
Update: I found this article: http://www.localizingjapan.com/blog/2011/11/10/localizing-a-cakephp-application/comment-page-1/#comment-7467. Does anyone know where you place the code for CakeSession::write('Config.language', 'fre'); and setlocale("LC_ALL", "fr_FR.utf8");?
Simply put the code in AppController::beforeFilter() and set the values based on however you retrieve the language, from a post request or a part of the URL.

Which is the easier CMS to integrate with CakePHP?

I was trying develop a website with Cakephp and Joomla... But lately I've been founding a lot of barriers that create difficulties implementing things that would have been a lot easier if I only developped using one of the components.
So, in your point of view (as someone with more experience than me), is it worth to integrate CakePhp with a CMS?
If yes, what do you think its the best and easier CMS to integrate with?
Or use Croogo (http://croogo.org/)
A CakePHP CMS. I like Croogo's implementation more than Wildflower and the admin UI looks a bit similar to Wordpress.
From my point of view i wouldn't try. I think there would be a lot of crossover functionality and a lot of conflict. Either use Cake and write a CMS and the other elements you want or pick a CMS and develop the other elements you want as add-ins/plugins.
Joomla, Drupal, Xaraya, Expression-engine etc are all extensible so pick the one that is the best fit and has the ability to be extended or maybe already has plugins you require.
Another option would be to use Joomla as the CMS and Cake for the other element you want, keep them as separate entities but skin then identically and make the navigation seamless. In this case about the only thing you would need to integrate would be state.
There are some out there already that are on Cake from the ground up. Wildflower for example
http://wf.klevo.sk/
I have a cakephp site that is running wordpress in it's public_html/blog folder and it is doing great.
They are basically two separate sites, with two separate backend but it is fairly easy to create a model for the wordpress database if you want to pull in any data (eg. posts, pages, comments) and use it in the cakephp site.
As far a integrating the two I don't think it is a good idea if it needs to be a seamless experience for the backend users, most frontend users won't notice the difference because you can use the same style sheet and images.
If you want any more about my experiences with the combination let me know!
Cakeui is a rip of Croogo. Infinitas CMS could be what you're looking for if you want a full blown application or check this site for a list of good CakePHP Cms
As the developer of Croogo, I will be biased and recommend you to check it out at http://croogo.org. It comes with a web based installer too and you should be up and running in minutes.
Another CakePHP based CMS is Infinitas which has more features (including shopping cart). Both are based on the latest version of the framework (1.3 at the moment) and are actively developed.
I wrote a lot of CMS type apps with Cake and was thinking along the same lines. I've tried Joomla, Drupal and Wordpress but still had a dirty feeling in my mouth that I was failing by using Cake just for the sake of it or vice versa.
The most important common denominator, in my experience, is the back-end. It is re-used most often, but gets the least input.
Now I have built my own CMS with CakePHP. The intention is to 'opensource' it, but it's not quite ready yet.
I don't think it is worth the headache trying to combine, then maintain Cake and a 3rd party CMS. Save your best modules and components and build your own. The blog tutorial will give you a good head start and you can cherrypick what you like from other sources, rewriting it to suit your ideals. The benefit is you will then know the CMS inside out and have it working just the way you want. You'll learn a lot along the way as well.

Resources