Apologies if this is not the right place to ask but here goes...
What should I use to create a simple web application for our website?
I'm the IT guy for a small non-profit. On our website we have a page with a large form in which users can fill out information on an application form. The information gets sent to a MySQL db. This data can then be accessed and edited by a couple of members of staff behind a logged-in part of the website. There's only two dbs being used: the main one with all the data and the one used for login details for the web app. It's all done with PHP and functionally is fairly simple - just a form with lots of fields to collect data and a basic secure "manager" page to do a bit of stuff with that data.
The problem is that we need to make changes to the app, and to extend its functionality quite a lot. I have a little bit of experience playing around with PHP but I've taken one look at the code used and decided it'll take too long to decipher it and see what's happening where. The code is uncommented and a bit of a mess.
I'm starting to think that rather than investing time to relearn what little I knew about PHP and untangle all the code, I might invest the time in learning another language and/or framework to get this done. I want the resulting web app to be a lot easier to maintain in future by me or anyone else who comes along and has to make a change.
Would you recommend using Django/Python for a project like this? Zend/PHP? Just PHP and notepad? I want the app to be done fairly quickly so the less steep the learning curve the better. Many thanks for you time.
Another good PHP framework is CodeIgniter.
They also have a good webcast that outlines how to begin with the framework as well as create a simple blog [tutorial].
I would recommend a PHP framework, such as CakePHP. Spend 20 minutes of your time and follow their blog tutorial.
Using PHP alone can be tricky, especially when you will have to deal with security issues.
From what I can see you have asked 2 questions.
1. Should you maintain and extend the current code base or do a rewrite?
Rewrites always take longer than you think. And even if you do the rewrite to avoid learning the codebase you would still need to learn the current codebase to ensure you capture the current functionality before adding any new features in the rewritten codebase.
I would keep the current codebase and maybe do some refactoring as you add features.
What should language and frameworks should you use?
I would stick with PHP, CakePHP is a solid framework and so is Zend. I would read up on both and do a couple of tutorials and make your decision.
As Anax states, I'd suggest that you look to use PHP. If code is already implemented then you have a start.
PHP isn't hard to re/learn. I know some don't like it, others like it but simple fact, either way it isn't hard to learn. But, more importantly consider the following:
You obviously have access to the hardware stack required to use PHP and MySQL. Introducing a new language/technology may cause unforeseen issues with getting a production site set up.
Now this doesn't mean that you can't write certain components in other languages. You could, if you were so inclined. But you probably shouldn't be so fast to get rid of PHP just to learn another language. Do you have important (technical) compelling reasons to use something other than PHP?
If you are mostly concerned about the spaghetti code in place, you can get that anywhere -- even new development. Better to re-factor the code and fix and add to what you have than start from scratch.
I can offer some general considerations:
Whatever language you choose, get a good IDE for it. Having automatic syntax validation and code completion helps a lot if you're a beginner. Don't use plain text editors.
Teaching yourself how to code well will make for a very frustrating experience unless you have a lot of patience. This generally comes from being really sure that you want to do it.
Be very conservative in your time estimates. Having many setbacks is guaranteed if you're a beginner.
Start out by focusing on reading about writing code, not focusing on writing code. If you're learning Python, read the official tutorial first. The same goes for PHP.
I'm about to start creating a new website that has standard user management (customers login and handling (change customer details etc) + my own functionality. I'm looking for the most efficient way to do it. I know PHP/CSS/Jquery quite well.
I have looked into Drupal as a starting point and found it too cumbersome for my needs.
CodeIgniter and PHPcake seems not to be efficient because I'll spend time learning the platform instead of developing (which I would love to do, but not currently).
It seems that what I need is a skeleton of PHP site that simply handles users functionality. Surprisingly I couldn't find one.
Could you recommend a starting point such as an open source website code that I can easily cut the user management part from? Or another option which is more streightforward than learning a new platform/framework?
To be honest, to get started in a framework like CodeIgniter you shouldn't need more than 5 to 15 minutes of learning time (a CI "skeleton" is extremely easy to do).
Yes, it may have plenty of tools/helpers/libraries but for the most part the learning curve is extremely shallow.
As to the users functionality, there are a couple of user-made libraries that may suit your needs - a comprehensive list with detailed functionality can be found here: what-code-igniter-authentication-library-is-best
Quite honestly, if you are going to use one of the existing platforms out there you are going to have to put the effort in to learning the architecture of it and then adapting to it to further develop on it.
Also, user management is a pain but really shouldn't take you THAT long to implement. If that's all you want, I'd say roll your own because then you are going to be that much more familiar with it. Anything that someone else has written you are going to have to learn about.
If all you want is authorization, start with Pear::Auth. It's probably a little less than you're looking for, but that may be preferable to a solution that's heavier than you desire.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am wondering why this framework (QCodo) is almost forgotten and totally unpopular.
I've started using it a few years ago and it is the only thing that keeps me with PHP. Yeah ... its development is stuck (that's why there is now more active branch Qcubed) but it is still very good piece of software.
Its main advantages:
Event driven (something like asp.net) no spaghetti code
Powerful code generation
good ORM
follows DRY
very simple AJAX support
is fun to write
Since then I wanted to be trendy and checked Django but I cannot write normal request-based web application (it just doesn't feel right).
Don't believe? chess.com is written with it and surely there are plenty others.
My 2 questions are:
Have you heard of it (PHP people)?
If you are using it what is your opinion about it (show us examples of your work)
Thanks
I've used PHP a lot for many years and never heard of it.
The creator(s) of Qcodo never really promoted the framework, and thus, didn't generate a large following. I believe they created it mostly for their own use, but also offered it up to others. It is awesome if you are looking for a code-generating framework. It does have a learning curve. So to get the most use of it, it's best to spend time studying the examples.
Qcodo has really had no active development for well over a year and there doesn't appear to be much chance that development will continue on Qcodo anytime soon. Qcodo appears to be dying a slow death.
Qcubed, a branch of Qcodo, is under active development and has been since Nov 2008. It was created by users of Qcodo who got frustrated with the lack of Qcodo progress. If you are just getting started, start here and not with Qcodo. But use Qcodo forums to search for problems/questions you may have.
Qcodo and Qcubed are fantastic frameworks. Don't discount or underestimate them just because you've not heard of them.
Emulating ASP.NET or Wicket in PHP is not a good thing to do. Moreover, the code style does not look good to me.
$this->btnSavePage = new QButton($this);
$this->btnSavePage->Text = "Save";
$this->btnSavePage->Visible = false;
$this->btnCancelEdit = new QButton($this);
$this->btnCancelEdit->Text = "Cancel";
$this->btnCancelEdit->Visible = false;
Hungarian notation? OMG. I need to create a big object to create a button? Heavy weight to me.
Yes, we do use it at Chess.com and overall have been very happy with it. It can get problematic trying to figure out how/where to store all those QFormStates when you're getting well over a million pageviews a day. Every page view is its own QFormState! We solved this by putting all of them into memcache! It does have a bit of a learning curve, but once you know it, you never really need documentation any more. I actually have moved away from using QQ entirely, and use all custom sql in our ORM files. QQ is just not powerful enough to do heavily optimized queries and highly tuned queries is more important than database abstraction. After all, the site needs to function and be fast. Here is one example ORM static method in our User class to load a random user from the database (we used to use this to show a random "user spotlight" on our members page). Notice how it uses the slave database, not our master (custom built function). It also uses memcache so that the randomized user only changes every 10 minutes (600s).
public static function LoadRandom($blnAvatarRequired = true, $blnForce = false) {
$strCacheKey = MyMemcache::QueryToKey("User->LoadRandom()");
if($blnForce || false === ($objUser = MyMemcache::G()->GetQuery($strCacheKey))) {
$objDatabase = QApplication::GetSlaveDbConnection();
$DaysAgo = new QDateTime(QDateTime::Now);
$DaysAgo->AddDays(-10); //make sure this is an active member
// Setup the SQL Query
$strAvatarReq = $blnAvatarRequired ? ' and u.has_avatar':'';
$strQuery = "
select
u.*
from
user u
where
u.is_enabled=1 and
u.create_date > '$DaysAgo'
$strAvatarReq
order by
rand()
limit
1
";
// Perform the Query and Instantiate the Result
$objDbResult = $objDatabase->Query($strQuery);
$objUser = User::InstantiateDbRow($objDbResult->GetNextRow());
MyMemcache::G()->SetQuery($strCacheKey, $objUser, null, 600);
}
return $objUser;
}
Qcubed and Qcodo are used by us in 3 projects and these ones are the cleanest and easiest to maintain projects we ever had! This is great stuff and easy to understand.
Just go into the code you won't need much manuals.
Qcubed community is much stronger at the moment so you might want to check in Qcodo forum for your answers on basic problems, but post on the Qcubed forum.
We will continue to stay with this fantastic product and community!
Regards,
tronics
http://www.twitter.com/qcodo
No, I'd never heard of it.
The main ones I've heard of are Zend, CakePHP, Symfony, Code Igniter, and one or two other ones I can't recall the names of right off the bat.
I've been doing PHP work on and off for about 3 years and have never heard of it. Ask anyone to name a PHP frameworks and you're gonna get the usual suspects: Code Igniter, Cake, Zend, etc.
Guess QCodo devs need to work on their marketing a bit!
I've been using QCodo for 2 years and now I'm with QCubed.
This is the nice way to develop and maintain web applications, as well as, the easiest way to deploy code and test it. Remember that QCubed is now growing in acceptance and it's good for all QCodo's Community.
I think that frameworks can save a lot of development time but it many cases it's not recommended for all yours web developments.
I started to use it two years ago. The pro:
code generation from the database
ORM object oriented
simple use of ajax
Cons:
qcubed community is not so skilled to carry on a project with new good ideas
the new code is not at the level of Mike Ho.
bugs in the state of qforms, the forms of qcodo/qcubed.
is not popular.
they do not want to go ahead and use DDD and forward engineering.
the forms only works with js enabled.
is written in PHP.
new plugin system poorly designed.
At the moment, Grails seems to be the best framework, very DDD oriented, with the possibility to use any existing Java code, good template library, possibility to use different js frameworks, built on Hibernate and Spring. With Grails is possible to write simple web app or financial application.
I hope not to use PHP in the future, but since I know Qcubed/Qcodo I will use it if it will be necessary. For newbies, I reccomend Symfony, bigger community, mre plugins, feature rich, it has a more secure future.
Updates:
No database migrations, no way to track database schema changes
No schema reflecting which tables are generated
It is not designed to real TDD, it is not easy to test models, controllers and views. They just added a testing framework to an unfriendly testing web framework
QForms still bugged and can loose status when using several controls and trigger Ajax error and blocking the application.
The ORM is very boring to use in the long term (lots of chatty/redundant code) and cannot be tested with a tool like Rails console, in the end it takes less time to use pure SQL and test it with phpMyAdmin.
Bugs in the ORM too, sometimes I get a string when I declared the field as integer (code-generated queries).
There is not a front controller and a routing system and the framework is inside the public path! The plug-ins are installed in the public path too!
Strange directory structure not similar to other MVC frameworks and they thing that the M stands for ORM only instead of model.
not link_to tag like Rails or Symfony and many other tags.
Over complex metacontrols that are useful to waste time only.
Framework focused in scaffolding when in Rails it is not used a lot since most of the developers use a user centric design instead of data centric one.
The views are full of object->render and JS and custom controls are a pain to be customized, and instead of staying inside a template are inside a class with logic session .. everything.
It does not work with PHP 5.3 (not tested but should be resolved) and on Quercus.
Rails/Grails has ton of plugin doing everything.
I could continue but I think you get the idea. Just learn Rails or Grails for few months then let me know what you think.
I am moving my Qcodo project to Rails and I have a wonderful environment, nice community and most of the innovation in the web is around Ruby and Rails. Rails has been voted several times as best web development tool and is the only one that can substitute Java or .net
While I have heard of it (Qcodo... not this fork) I never looked into using it. There are tons of frameworks and only so much need. PR and mindshare are hugely important in such a situation and Qcodo never really had either. Now that I am settled on a handful I have no time, nor inclination, to start learning a new framework.
This Swim Log uses it mySwimLog
I've been using QCodo since beta 2, and am now a core contributer of QCubed, so yes, I've heard of it.
What initially drew me to the framework was the code generation. I came from asp.net, and codesmith, and was very pleased to find a framework that gave me both the event-driven approach of asp.net and the code generation of codesmith.
I also love that it's all pure OO PHP, which means I don't have to learn a new language to develop my PHP app, and customizing any aspect of the framework that doesn't behave like I want is simple.
All of this has resulted in us being able to produce an easy to maintain and robust Learning Management System that we have sold to and host for numerous Fortune 500 companies.
There are some downsides, such as the runtime overhead of an ORM approach, but the readability and clean layout of the code results in the ability to more easily streamline other aspects of the application, and significantly reduces both development time, and the number of bugs produced.
Since QCubed is a community driven project, anyone is able to submit tickets, suggest improvements or discuss changes, it's very clear where the project is going, and very open to constructive feedback.
In defense of some of the negative things said here, I will simply point out that tickets for most of the supposed "problems" simply have never been created. And I would encourage anyone that does encounter any of them to please create a ticket for us to look at at http://qcu.be.
OK, Here is something I want to tell about this Qcodo / Qcubed thing:
Its brilliant. I just have no words about how great it is. You say CodeIgniter? Symfony? I say Qcubed.
It was when I wanted to start off the project I am working on and I looked into all those and through a Wikipedia article, landed on Qcodo site, and then on Qcubed...and I was surprised.
The features I loved the most:
No SQL queries needed. Of course, it can be done but most things are taken care of!
Speration of Templates from the core functionality.
Creating custom controls is a piece of CAKE (and its not CAKEPHP).
Totally Even driven. Saving states is like..."where does that happen?"
NO LEARNING CURVE. Just look at Yii or Symfony exmaples and then go for Qcubed examples. Its much simpler compared to others.
Full AJAX support. I love this.
No JavaScripting. Ask it to do something as a 'javascript' action, it is done by javascript. Change one word to 'QAjaxAction' and it goes to ajax. Change again, page reloads. What more do you want?
Autocomplete, typecasting (both automated and manual control) and what not!
Inline editing of almost anything!
yeah, there are a few cherries on the ice cream when it comes to Yii. But I think Qcodo has more inside.
You say Authentication support? Well, I created one to integrate with Qcubed in 1 day. It saved a week of lerning headaches with other frameworks. Qcubed rocks.
yes, I hate its slow development. But I think its near to complete! (may be I know too few things but anything I am capable of imagining seems to get solved through Qcubed).
I wish it was more popular...I would have saved me a week of search before landing on their pages.
I have used QCodo/QCubed for 1.5 years now. Started with my own framework, which at some point seemed messy. That's when I started looking for a more mature framework. Luckily I found QCodo. Since then I have never even considered looking for something else. The framework is so flexible and powerful, that you can do everything you want with it.
I had almost no experience with event-driven architecture. So, the beginning was somewhat hard, cause there was few documentation available. But community itself is very active and you probably get answer to your newbie questions in 1-2 days (sometimes even in hours). But currently the documentation level is way better and community is even more active :)
Nothing I can complain about. And if I have some problems/suggestions, I will try to discuss those with core developers. Whining about stuff without constructive discussion is lame imho.
I have used QCodo/QCubed for 3-4 successful projects now. The more I use it, the more I like it :) And also, I'm trying to help developing even better framework whenever I have spare time. And I can say, that I have had more than 10 people, who I have convinced to start using QC now ;) And I hope there will be many more.
QCubed totally rocks!
Never heard of it.
Been doing PHP on and off 4+ years
http://www.piranhamethod.com/2009/04/09/qcodoqcubed/
I have heard of it and I love it.
I also came from a dotNet / Codesmith environment. When I picked up a project that wanted to translate a dotNet site to PHP I looked for a framework that could best emulate the way the original application's logic was set up. What I found was either bloated frameworks or frameworks that did not completely fulfill the projects requirements.
I accidentally found QCodo while researching using the MyGeneration tool for PHP code generation. I have not looked back since. The ease of use, ability to quickly build complex applications and the true OO approach QCodo now QCubed uses makes it the best framework for my purposes.
I've been using QCodo, ZCodo and now QCubed for quite a while now.
I actually picked it as a replacement for CakePHP, which at the time of my need, wasn't mature enough to do the things I wanted.
I'm super happy with it as a framework; it abstracts things just enough, but not too much that you lose sight of the programming.
I plan on using it for any development project I'm responsible for in the future, and I'm looking forward to QCubed being the best community maintained framework for PHP5 out there.
The quick reason is that popularity and success do not generally go with what's technically best. I'm sure any techie can come up with numerous examples. There are numerous things that can promote mediocre solutions, like marketing, first-mover advantage, being a touch better in some area that catches people's attention, being used in some high-profile application, or just plain luck.
The other reason is that what appears technically best to you may not appear so to somebody who's doing something different.
I think that QCubed is great and mainly because of the way you can use Ajax (you dont have to write Jscript and you dont have to use jQuery).
One very useful document: http://www.qcodo.com/demos/QcodoClassLibrary.pdf
I chose QCodo 4 years ago to develop our product. I've never regretted - now we're 3 developpers on the thing, and any non-OOP solution wouldn't work. We have installed almost 50 customers with it - on Apache, IIS, my SQL and SQLServer platforms, Linux or W2003.
F
The design is brilliant, code-generation is great, and it's really easy to develop, extend, and maintain. I can't read any other code now...
Yes, marketing is quite poor, and the project used to depend just on the creator (Mike Ho). All of it moved to Git recently, and marketing should be better soon. And, now Mike Ho is back !!!
I have used it in few projects involving Flash remoting but I only use the ORM in the framework as I don't really like EDP stuffs like .NET. The flow doesn't seems right at all for stateless web. It's great if the ORM can be released as a separate component.
I never heard about it.
I didn't used it.
qcubed community is not so skilled to carry on a project with new good ideas
Nonsense
the new code is not at the level of Mike Ho.
Nonsense
bugs in the state of qforms, the forms of qcodo/qcubed.
??
is not popular.
So what
they do not want to go ahead and use DSL and forward engineering.
Your point? Every framework that doesn't want to go your route is wrong? I for one would not want the suggestions you have made
the forms only works with js enabled.
You have to be kidding right? If users don't have JS enabled, then they're in the stone age...
is written in PHP.
No comment
new plugin system poorly designed.
Based on what do you say that? I would say nonsense to this as well
Clearly there is some hidden agenda with this poster...I've also had a close look at Symphony - and I would go with QCubed over Symphony every single time. For big apps or small
Hey I have a question regarding the compatibility of ColdFusion and PHP.
We built a community website which is based on ColdFusion. Is it altogether possible to add features such as blogs, and other community features to our website in PHP?
I mean to combine both PHP and ColdFusion together.
Thanks very much for the help!
I think it can be done, if you're using ColdFusion 8. I know that Sean Corfield has a project on RIAForge doing this sort of thing, and there are a string of posts on his blog, starting with this one:
http://corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_running_PHP
All of this being said, it will be easier to integrate products from the same core language. There are hundreds of open source options for different things in ColdFusion. RIAForge.org is a good place to start.
Yes, it's possible. You would have to probably integrate the PHP application's session management into your Coldfusion application's session management.
I recently did that with a PHP shopping cart into Coldfusion because I didn't have the time or resources available to get the same results in Coldfusion -- often the great and polished pieces in CF can cost some money, and with PHP its a gamble or a time pit to get it to dance how you want.
Second, there might already be blogs, forums, etc that suit your needs made in Coldfusion. Check them out. You might be able to stay more towards one platform. Chances are you might want a PHP solution because it has addons or something else that you don't want to program.
I like your best-of-breed approach, Coldfusion overall has a lot more commercial development than open source when it comes to large packages that are incredibly featured.
Best of luck, be sure to share what you end up doing.
Your question wasn't really focused enough to give a single direct correct answer.
We built a community website which is
based on ColdFusion. Is it altogether
possible to add features such as
blogs, and other community features to
our website in PHP?
I mean to combine both PHP and
ColdFusion together.
When you say you want to "combine" them, what exactly do you mean? They can both co-exist on a web server and both have access to the same database; so if you want both PHP and ColdFusion applications to have access to the same data, that is not a problem at all. There would be some concerns about locking and race conditions, but from an "is this possible?" standpoint, the answer is undoubtedly YES.
Sharing session, client, or other special scopes/variables from CF to PHP should be possible with some clever programming, but would be tricky. It would depend entirely on your needs and your implementation.
If you're looking for applications to add to your community, I would recommend that you try to find something in CFML that suits your needs before you go the route of attempting to mix CFML and PHP. There are tons of free open source applications including blogs and wikis written in CFML available on RIAForge, and other websites. Canvas Wiki, and Codex Wiki are solutions that focus strictly on Wiki functionality, and there are others that include Wiki functionality as part of a larger package. Searching for "blog" in the ColdFusion category on RIAForge shows no less than 6 blogging applications like BlogCFC and others, and that doesn't even include my personal favorite, Mango Blog.
I think Corfield's way is not (very) suitable for standalone apps like blogs and forums. But it can help with sharing sessions.
On the other hand, these types of software are not so good in CF world.
I'd better proposed to play with webserver settings. Can't say much about IIS, but in Apache you are typically using different handlers for .cfm and .php files. Possible problem here is index file, that can be index.cfm or index.php. In this case .htaccess rules should help.
So, tuning webserver allows to use PHP apps in subdirectories of CF application.
Additional possibility is using subdomains, this even easier to set up, that can fit your needs. Say, blog.website.com and forum.website.com
Hope this helps.
To question owner: sorry for such odd reply, I just can't comment here yet. And sorry for small offtop too.
To Ray Camden: yes I am saying that there're not so good opensource forums/blogs for CF as for PHP. I am happy to know about Galleon and BlogCFC. But if talking about features -- they in 2006 of PHP analogues, especially Galleon. BlogCFC grows and getting better fast.
Anyway, I have a suspicion that many of BlogCFC users using it because it is written in CFML. And me too, partially.
Problem is not these two applications, they can fit someone's needs. Problem is that there're no alternatives. Or maybe I am wrong here and there's lots of another cool apps of these types?
And yes. Maybe there're another amazing proprietary blogs/forums, but we're not talkin about them now right?