Pre-configured CakePHP with common things like authentication - php

Has anyone come across a CakePHP system with pre-configured things like authentication with all the login/logout forms, etc? Most websites have some sort of a basic authentication system on top of which everything is built. I was hoping to not go about re-inventing the wheel setting up the most common pages like login, logout, forgot-password. Any help?

CakePHP Cookbook is a good place to start. There is a sample aplication with the authentication stuff done:
http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application

How about you build it the way you want and then reuse that in all of your projects.
It's what I do and it is very much in the spirit of OO and MVC.
In no time at all you'll have your own library of modules/functions or whatever you want to call them.

PoundCake Control Panel plugin

You might find Infinitas interesting. It's a full CMS, but you can probably trim out the core functionality and use that since it's under an MIT license. The names of the main people developing it (ceeram and dogmatic69) are responsible for some of the more interesting (to me) bugs and fixes in the CakePHP bug tracker. This implies that they understand the internals of the framework pretty well.
Try it out and let us know in a comment if it'll function for what you need.

Related

Basic User Management, For Custom Site

I have been looking at either coding from scratch a basic login page + session management user validation for a new website I intend to build.
I am wary that this may not be the safest thing for me to do on my own, so I am contemplating using joomla or wordpress for basic user authentication and then having the rest of the site pretty much customised. Is this a good idea, or am I going against how they were designed and is there a better framework I could be using for this simple task? I am not too concerned with language but asp.net or php are definitely preferred.
For ASP .NET you should use ASP .Net Membership
a series of tutorial regarding to implement asp .net membership can be find here
I use Joomla allot, but if everything else is custom, it would probably hold you back rather than help.
I would take a look at http://codeigniter.com and use one of the authentication plugins.
stackoverflow uses OpenIDs, which I think is pretty handy. This will manage your authentication, but you'll still need to "register" the users (ie their user name and profile and OpenID token) on your server. But I think authentication is the biggest headache, so with that out of the way, the rest is pretty standard.
I like WordPress a lot and think it's a good tool for certain things, but I don't think I'd use its codebase as a starting point for a new app. Try a more generic web-app framework in your preferred language... Yii or CakePHP if you want PHP... you'll find user/session/authentication plugins to get you started, and then you can go from there, with a relatively blank slate and the handy don't-reinvent-the-wheel tools a framework provides.

php login script

I am trying to develop a online software with PHP/MySQL. I need a good login class/script. I am gonna adapt it to my software.
By the way, I found http://usercake.com/.
What do you know about that?
I would prefer to write it myself, but if you're not confident with your PHP, I guess you could go with 3rd party. The benefit to writing it yourself is that you know exactly how it works and you can get it to look precisely how you want it to look, etc. shrug - maybe I'm just a purist.
I would suggest a framework. PHP has many. Zend, CakePHP, Prado the list goes on. Honestly? I suggest Yii. Been using it for months. It's totally MVC and has authentication built in as well as a good extension to expand the authentication capabilities.
http://www.yiiframework.com/

Which PHP framework should I use for this project?

I have ready numerous posts here on SO about framework1 vs framework2 however it seems to be alot of personal opinions that are one sided. Based on the following can someone tell me which framework would be ideal for my needs?
Build a rich featured API where other sites and devices can use the API to use website features and access it's content.
RSS Feeds with both XML and JSON for jQuery interaction.
Ability to use layouts / templates that are customizable.
Use of plugins so that I do not need to duplicate code.
Database querying with relationships.
GREAT documentation.
Actively supported.
Doesn't REQUIRE command line access.
Easy to manage file uploads and move the files around so only certain users can download them.
Customizable access level so users can have different access levels depending on which project/section they are viewing.
Low overhead usage.
SEO URLS that do not require the '/view','/edit','/add' in the urls (depending on which action you want to do.)
Support for jQuery
There have been a few frameworks I have seen that support some of these but not all. I am currently using CakePHP for one project but do not think it would fit my needs as the database querying can get horrendous. I have heard a little bit about CodeIgnitor however it doesn't seem to easily use templating (maybe I just misunderstood what I read).
If you could tell me which framework you think would be ideal for these needs and why that would be very helpful!
I'll just spamvertize my little framework overview table here. The simple table answers a few of your technical points:
http://matrix.include-once.org/framework/simple
Use the detail/feature view to cherrypick your options.
RSS isn't a standard feature even with the big frameworks, use a PEAR library
templates: all frameworks use them
plugins: depends on your concept of plugins, most frameworks are extensible though
look for "ORM"
GREAT documentation: that would limit you to codeigniter or cakephp
Doesn't REQUIRE command line access: except symfony+cake, few do
file uploads: this isn't a standard feature, but I'd just mix and match a library
Customizable access level: practically all frameworks come with a permission system
Support for jQuery: this is surprising. Prototype seems to be very strong, only half the frameworks use jQuery by default
CakePHP database querying doesn't have to be horrendous. (Though, I remember my first few projects were definitely hard on the database)
With the right optimization, normalization/de-normalization of your data, and a few tweaks here and there (persistent models comes to mind), you can accomplish everything you've inquired about with CakePHP, and keep your database load to a minimum.
That said, if you truly want to move to something else, I'd go with Zend Framework.
Symfony is bloated, (and yes, fanboys, this is still true).
Codeigniter is super lightweight, but you're going to be doing a LOT more work to accomplish your listed requirements. I've spun up two codeigniter applications, both relatively simple, and both took twice the work / twice the amount of new code than if I had gone with say, CakePHP.
A lot of religious fanaticism floating around when you talk about frameworks. But take a look at the documentation of Fat-Free Framework. It just might catch your fancy and requirements.
Before I answer, let me qualify that I'm certified on Zend, a frequent user of CodeIgniter, and daily user (and hater) of Symfony.
Zend's setup, especially if you're doing a small-medium sized site can be ugly. Especially using the data mapper strategy, you're talking a thousand or more lines of codes just for the model setup. CodeIgniter is much better setup-wise, but still not insignificant.
Command-line free --essentially-- knocks out Zend. It's doable, but not fun (see thousand lines of code, above) Built-in user auth isn't nearly as good on CodeIgniter as Zend, perhaps that's a serious knock....definitely no templating there. Symfony is flat-out done because of the addition of /view /edit, etc.
Hate to break it to you, but it seems that many users of all these frameworks are not native English speakers. Forget about Symfony, seems entirely eastern-European based. I'd hate to be a new-to-php user of Zend Framework with all the competing tuts with their assumptions of some semi-complex concepts. There's a reason that Zend's training is expensive and full.... Again, CodeIgniter is not horrible, but still can be frustrating.
Simply because of our extensive use of Jquery and desire to avoid a ton of hack-around, my company has dumped the frameworks altogether. Now setup is purposeful, not for a framework...just build a DAL, assemble classes, build views, and done. Established functions are re-purposed as "plugins" that we actually know and understand. Most interaction is Jquery based Ajax (sometimes XAJAX) which really doesn't take advantage of the frameworks anyway--and fights tooth and nail with Symfony. For those who argue that frameworks force MVC, I have a VP of Development who does that just fine, thank you. Perhaps it's not the right answer for you, but we're glad we went this route. It's saved weeks worth of documentation-hunting.

Integrating a user-facing PHP framework and an admin-facing PHP CMS

My company is looking at various PHP frameworks to build a customer's site. This is a shop that has some legacy in-house frameworks and we're trying to move away from that. In my spare time, I've coded in CodeIgniter and dabbled a bit in Kohana. I have yet to use a CMS like Joomla or Drupal, but I recognize that they're built using an MVC and PAC design pattern respectively. In starting my excavation, I came to the preliminary conclusion that it might make more sense to use something like CodeIgniter to build the user-facing portion of the site and something like Joomla to build the admin-facing portion of the site, such that Joomla is never loaded unless you specifically go to admin.xxxxx.com.
So following this logic (and please do let me know if it's very flawed), I'm here to ask if anyone's ever done anything like this before, and if so, what might be the best method of taking advantage of some of the more automated features of Joomla (sorry if I don't go into too much detail here...I haven't studied Joomla enough to know everything about it....please correct any gross cognitive errors!!) from within a more lightweight framework like CodeIgniter.
Or is this going down the wrong line of thinking? My first instinct is to just link the two by data in the database and never have them communicate directly, but I just wanted to be sure this was correct before I take it to my superiors.
Vielen dank, guys
Quite possibly flawed, all of these CMS's run on assuming that they are used for both admin and user site, the major problem this causes is that code and the way things work are very intertwined meaning that a simple 'hook in to the database' often isn't enough and you'll have to use most of the CMS code just to pull / put valid data - the other caveat with that is that if the admin is upgraded, it can easily change the database schema which would break your front end.
I'd highly recommend going with one or the other, either your own design using frameworks for admin and user site(s) - or just stick to single CMS and bolt on whatever functionality you need with plugins.
Best!
I Agree with Nathan.
When you're using pre-built frameworks you lack the control factor over the core elements, this is not good especially developing for a corporate system, you need to have full control over every part of the system for future developments / integration.
My advice is to start with a small but abstract system it would be more beneficial, my advice is to use a framework like codeignighter that consists of an MVC Pattern but also plays the simplicity role with ease.
Take a look at the OpenSource application called "OpenCart" which is a small MVC Store, the reason I say look at this is because it's an extremely basic MVC Pattern and can be abstracted for your applications.
Hope this information helps.
Regards.
When your using pre-built frameworks you lack the control factor over the core elements, this is not good especially developing for a corporate system, you need to have full control over every part of the system for future developments / integration.
Well I don't know if i would necessarily agree with you about this?

Easiest drop-in PHP authentication solution?

Forgive me if this has already been asked (and feel free to provide a reference and close this).
The ultimate goal is to associate some data with each user (obviously) and display that data to users differently based on their roles.
I have looked extensively for a simple, drop-in solution for authenticating users in PHP.
I am not looking for:
A CMS with authentication
A PHP MVC Framework
This project is too simple for both, and while it should go to production eventually, will be performed by novice programmers. I want to be teaching them PHP, not specifics for a CMS or a framework. I am not completely opposed to the idea of a framework, but all the frameworks I have looked at enforce MVC and that is too advanced a concept at this point.
I am looking for something that will allow me to easily register users, login users, and put users into roles. Ideally, this means having a library that will handle the database & encryption logic and provide me with a simple API to do the above. I prefer to provide the library with a database and let it do its thing without any interaction from me - storing data in the session is also preferable but not required.
I know I could easily do this myself, but I want to make things simple for those I am teaching. A library/component/etc is what I want for this. I've been all over PEAR, and the modules there seem overly complicated. The two authentication providers given in the PHP5 documentation seem unclear to me. Examples of those in action, if they do what I've described, would work. Any ideas?
Login Sessions
It's a little out-dated, but still comes with great concepts.

Categories