Basic User Management, For Custom Site - php

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.

Related

PHP, Zend Framework, Wordpress, need to find some clarity

First off, I'm new to web development. I am fairly comfortable with HTML/CSS, and I am building my first site for a friend's business. I want to include a contact form, so I downloaded one from CodeCanyon. It is perfectly fine, but I'm in this to learn how to do this, so I scrapped the downloaded form and set out to learn some PHP. (I realize that later on, from a profitability standpoint, it may be a wiser decision to use these types of plugins rather than doing it all myself; would love opinions on this as well).
I learnt how to write a simple e-mail contact form from some tutorials online, but quickly found there's much more to it when you get into address validation, and preventing spammers from hijacking your form, etc. Should I continue to try to learn how to do the whole thing myself? If so, What is the best resource available?
I noticed people saying great things about Zend framework. Can someone explain what it is in simple terms?
Also, I haven't used Wordpress yet, but it seems the best use of this (aside from using it to create quick websites on the cheap) is as a CMS so your clients can update their content later. Does Zend framework also have some kind of CMS element to it?
I know this is kind of a complicated series of questions, but I'm trying to get some clarity. To those of you who have been at this a while, all the different products, languages, acronyms, etc. may seem like a piece of cake, but to a newbie like me, its hard to figure it all out without some kind of sounding board.
Kind of an open question but:
Zend Framework is a set of libraries that help you create php applications. They have a set of predefined classes that simplify tasks like Access Control List (User Login and such) or access Google APIs (like calendar and email). To take advantage of those libraries you need to interact with them in the programing level. (that is, you need to know how to program in PHP and how to access those classes). Here's an example:
require_once('Loader/autoloader.php');
$acl = new Zend_Acl();
$acl->add(new Zend_Acl_Resource('view'));
$acl->add(new Zend_Acl_Resource('edit'));
$acl->allow('guest', null, 'view');
$acl->allow('editor', array('view', 'edit'));
This creates a User Role named guest and editor, and gives permissions accordingly.
Wordpress is a CMS (like joomla and Drupal, for instance). You don't need any PHP knowledge to create a site with these tools and you interact with the modules in the admin level. You can actually integrate Zend Framework (or any other framework) with those CMS, but then again you need not only knowledge in PHP but also in the framework itself and in the structure of the CMS.
To summarize, PHP is powerful yet relatively easy programming language. Should you decide to learn it, you should start by doing some basic tutorials like this one to familiarize yourself with the language. The learning curve might be a little steep but it pays off. Once you feel you can do most tasks, you can try to work with a framework (ZEND or SYMFONY, for instance)
If your only objective is just to build sites easily and quickly, you should use a CMS.

Drupal (or some other CMS) or a simple MVC-based PHP framework like CakePHP?

We have a dashboard that we'd like to build for our customers. This dashboard displays various statistics about one or more of their (business) Facebook Pages. The statistics are pulled from Facebook using their FQL and Graph APIs, stored locally in a MySQL database, and queried/derived/presented to the user based on dates requested and some other variables. Additionally, users will be able to take action on various items (e.g., reply to wall posts, etc.) using their JavaScript SDK.
One of the external developers we spoke with -- currently don't have any resources within the company with time to work on this -- has proposed building the system around Drupal. Now I'm a fan of CMS systems for web pages, blogs, etc. but using something like Drupal did not come to mind here as much of the functionality seems irrelevant.
Can someone please let me know the advantages and disadvantages of using Drupal for custom development work like this? While we're looking for an elegantly designed system that our developers (as we hire them) can maintain and extend over time, I'm not so sure a CMS is the way to go.
Thanks!
I wouldn't recommend Drupal at all for something like this. You don't really need a full-blown CMS like Drupal, and it would be pushing it to say you should use a framework such as CakePHP.
Personally, I would build this as a standalone app. I see no reason to get a framework involved unless you plan on expanding the APP considerably in the future.
Drupal is often called a content management framework because it's so extensible, and certainly you could implement the dashboard in Drupal. However, I would question the developer thoroughly about their rationale for using Drupal before consenting to it.
Everything you specified sounds like custom development and has nothing to do with content management. You're manipulating data from Facebook, not a database of content produced by an editor. Your data is custom data, not simple Drupal node data (title, body, etc). I would go with a general Web application framework such as CakePHP. That way you get templates and user authentication without all the CMS overhead.
While I don't think that Drupal is really necessary in this case, I think that the final decision lies with what the strengths of the contractors you are using are.
If Drupal will allow them to finish it more quickly, and more securely (due to the fact that Drupal will provide well test user authentication, used by many), then I would say let them go with Drupal.
That said, I do agree that Drupal sounds to be more than what is necessary, and there would probably be far less cruft if you used a simple framework.

When should I use a CMS over creating a website from scratch?

Lately I've been trying to learn ASP.NET. I've gone through the tutorials on the ASP.NET website, but for the most part I'm a complete beginner. I've also been working on creating a personal website, which I've opted to use the CMS Umbraco because it is based on ASP.NET.
Now my questions is not really specific to ASP or Umbraco. It could apply to PHP and Drupal or any other website framework and CMS. I'd like to know when and why a website should be created using an existing CMS technology (Umbraco, Drupal etc..), and when a website should be created from "scratch" using a base web application framework like ASP.NET, PHP, JSP etc..
It depends heavily on the CMS's (module/theme) API, for instance, one Drupal modularity in my opinion is its greatest strength, although learning Drupal itself is not to be taken lightly either. I've seen a lot of commercial sites done in Drupal, most of them look successful, but it made me think what was the total cost of creating the modules, customizing it, etc.
Since you mention you are a newbie in this stuff, do take in account all the stuff to take care of when you are creating a website from the scracth:
Security (XSS prevention, sql injection, blah blah)
Authentication
A flexible theme system (unless you mix html with code... good luck, although there are some really nice template system available for PHP 5)
Database Layer (just use an ORM)
Learning JavaScript, then learn jQuery, MooTools, etc.
Administration panel
Adding stuff like content management
But most importantly, plan something before doing it. Starting out just because you feel like without planning what you want and how will you implement it creates uncertainty, just too many doubts...
So start with a CMS, even for a personal site. There are solutions like Joomla! Drupal, SimpleCMS, some django CMS are also out there. Learn the language of the CMS and start creating your own module as you see fit. Always read their documentation, search in forums before asking, or search here in stackoverflow. Really.. just ask here.. better than googling for a solution :P
You should use a CMS because it's simpler. There are a lot of 'boilerplate' code that you don't need to rewrite. Some CMSes might also contain useful code like user authentication built in. You won't have to roll it your own way, saving time and if you aren't a good programmer, it might also be more secure. Not only that, using a popular CMS means you'll also have a bunch of modules that you can just plug in and use. You can now focus more on the design than the programming in less time.
When should you not use a CMS? If a CMS doesn't provide anything you need or it doesn't allow you to do what you envisioned.
First of all it depends on whether you intend to build a real-world professional website for commercial purpose. If you do, I have to tell you it takes at least 2 years full time self-study to be able to write a web site like that. Web development is not as simple as it's made out to be (Some ppl say you could manage ASP.Net in 3 months-that's due to ignorance). Not only that, it is extremely logically challenging.
So if you only intend to write one professional web site, the best choice would be to pay someone to do it. You only learn ASP.Net when you intend have have a career.
CMS website would be enough for personal website, but maybe not professional enough for "tasteful" commercial websites. Its looks and functions all look the same, maybe good enough for local appliance repairs shop, but not good enough if you want to show your business have "taste", which also implies money
The most important feature of the CMS is its simplicity and the management of data.This is why my big sites like stanford, whitehouse etc have their sites on CMS.Managing the data is not an easy task as it seems.
For me at least it would be better to at least try to create something from scratch I know that they're plenty CMS out there that make things easier but, again ... for me the best way of learning is doing things your self and discover and solve real issues rather than just read about them. if its something for you own and you can afford the developing, troubleshooting testing.. blah blah... do it your self, if its something for a client and you you have a due date I would rather use a CMS or if you want something between a framework such Cake PHP or Codeigniter.

Pre-configured CakePHP with common things like authentication

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.

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?

Categories