Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm working on a small project, where I'm using the codeigniter php framework, but find it's got a bit too much bloat for my purpose.
Essentially I'd like something to make database interaction, sessions and validations simpler. MVC would be nice too.
What I'm looking for is something that has 10 php files tops.
When I'm adding some php functionality to a mostly html site, something like CodeIgniter just doesn't fit the bill.
Any suggestions ?
edit:
I'm not looking for a templating engine. And Kohona is a bit bigger than necessary (for me - for my purpose).
I came across elf-php, has anyone worked with that yet? IT looks like it has the essentials I'm looking for and some decent documentation. But this is just an impression.
It's hard for me to tell what the Fari-MVC does without playing around with it. I could go through the code and see the annotation, but I haven't found much else for docs.
You could always try MicroMVC. Looks like a small project created by SO user Xeoncross. No idea how good/complete it is...but it could be fun.
For this sort of sized site (and for somewhat larger ones too) I'd just use a template system and not worry about an MVC framework - even the lightest are lot of overhead for a few pages. I'd highly recommend TinyButStrong. It's simply superb - perfect separation of code and design, powerful but not overly complex, and integrates perfectly with Dreamweaver so you, or your designer, can design templates wysiwyg.
I've had a fair bit of success combining this with XAJAX, which isn't one of your more popular AJAX frameworks, but has some nice features. The beauty of just using a template system like TBS though is you can pull in whatever, and just whatever, libraries you need. Personally I dislike abstracting out SQL, but there's a fair number of stand-alone libraries to choose from if you so desire.
Fat-Free Framework is self-contained in a single 55KB file. If you want more features, there are plugins to extend it.
By the way, as a general answer, you can find a great amount of small php frameworks on Ohloh:
http://www.ohloh.net/tags/framework/php
You can then select the one you like based on previewing the source, the documentation quality, the number of users that use it etc.
There are some newer offerings to pick from now:
TinyMVC: http://www.tinymvc.com/
TinyPHP: http://tinyphp.us/
KissMVC: http://kissmvc.com/
I'm about to try doing a small project with TinyMVC.
This was 2009/2010, there are probably better things out there now.
Fari MVC Framework
Source: https://github.com/radekstepan/Fari-Framework
For example I wrote a chat app in it: https://github.com/radekstepan/Clubhouse
Soprano
Source: https://github.com/radekstepan/soprano
A good minimal example if you want to write your own.
Doesn't really answer the question... but if CI has a bit too much bloat for you, maybe you can try Kohana, which is a bit less bloated than CI (started as a fork).
Have you looked at CakePHP?
http://cakephp.org/
Related
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 6 years ago.
Improve this question
I intend to develop a Content Management System (CMS) like shown in the figure below;
Figure: Intended CMS design
Is it possible to completely develop it using PHP's standard library?
Do I need to use a PHP web framework? If so, why and what framework is ideal?
I hope to use MySQL as backend.
I hope to use below technologies as front end;
HTML5 and CSS3 - hard code by myself (Is there any framework or something make it easy? I heard something lesscss.org)
jQuery - to make HTML elements functional
Ajax - to avoid page refreshing
Bootstrap - to make my CMS responsive
Are there any technologies I do use, or any suggestions?
I prefer to improve my HTML, CSS, PHP and other technologies by learning and hard coding. So I hope not to use CMS like
joomla, WordPress, etc. Am I right?
Please note: I've already searched Google extensively before I put my questions here. But I am unable to confirm what I do next. Your comments are appreciated.
Your questions really look well researched and I think everybody with the intention of building a custom-made CMS has come to this point where they ask themselves these fundamental questions (in other words: good questions!). Now to some answers:
1) Yes it is possible.
2) Although building a CMS in pure, native, hard-coded PHP is possible, I wouldn't recommend it for production. You could do it, and you would largely profit from the experience, but there are many little problems (like Routing / User-Management / Authentication / Communicating with Database / Form-Building (like in your screenshot) / etc.) that are already solved by a good Framework.
Also as you are a beginner, you are naturally overwhelmed by the problems and decisions you have to solve/make. This is also a good point why a framework would be a good starter. Although some solutions are sometimes a little too opinionated, they still give you a good structure to start with and most of the times follow best practices of our industry.
Which framework is the most ideal for your project, you'll have to decide on your own, based on your requirements, but some common ones are:
Symfony (probably the most known and most used php-framework, but also very abstract / I would recommend this on a really big project, where you work in a team and you are aiming for flexible maintainability)
Laravel (excerpt from their website: An amazing ORM, painless routing, powerful queue library, and simple authentication give you the tools you need for modern, maintainable PHP.)
Silex (the little brother of Symfony, info from their website: Silex is a PHP microframework for PHP. It is built on the shoulders of Symfony2 and Pimple and also inspired by sinatra.)
FatFreeFramework (from their website: A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust web applications - fast!)
As I used Silex myself many times and also when I began with best-practice PHP, I recommend to start with it, if you decide to write your own CMS. I pretty fast did some Management-CMS similar to your screenshot with it (with their Form-Builder) and was happy with the result.
3) Again this is up to you. For the backend you will probably use MySQL anyway, if you just need a database. In the frontend using HTML5/CSS you could try jQuery and Bootstrap (and then here their less or sass implementation).
If you really don't have too much logic for your JavaScript, you could also try to just use native JS, without jQuery. This way you will also learn more about the language and have less vendor-dependencies the user has to download.
4) If you are really up to learning a lot, then yes, you should probably hand-code everything yourself. This way you also have total control of what code gets delivered to your user. That's a problem with most common CMS: they pollute your code through some other plugins or something and you quickly loose control over your output.
But if you need to be fast there are also CMS that address this issue by giving you total control over your output and giving you creative freedom, like MODX does.
In the end it is up to you and especially the needs of your project. If it's a simple website and you conveniently want to edit the content and also have some starter-help, then I recommend to use a CMS.
If you really want to learn about all this stuff and you have some special needs, then go on and code your custom-coded application. In any way: good luck! :)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
So far I've build my websites with Typo3 but it's a bit of a heavy beast for smaller sites. I've also done some projects with Drupal and Wordpress but my impression is that they mess up the HTML a lot and it is too much effort to "correct" them.
I like to build some smaller websites with HTML5 now and was wondering which PHP/MySQL-based CMS could be right for that.
In the end I went with Concrete5 as it was recommended to me by various people and seems to be very well-written! http://www.concrete5.org
Unfortunately, every publicly available stock CMS system will, ultimately, have the downfall of messy output. This stems from the fact that they attempt to be something for everyone, rather than a targeted product.
Rolling your own CMS is not that big of a challenge with a little PHP knowledge. If you're familiar enough to know what you want and how you would lay it out, there are a ton of great resources for developing your own CMS, including:
http://www.ssdtutorials.com/premium-tutorials/series/cms-dreamweaver.html
http://www.developphp.com/view.php?tid=322&t=Intro_How_to_Build_Custom_PHP_and_MySQL_CMS_Website_Software
http://www.packtpub.com/cms-design-using-php-and-jquery/book
http://www.packtpub.com/php-5-cms-framework-development-2nd-edition/book
Essentially, a simple CMS boils down to dynamic page generation with a server-side scripting language and templating, a database to store content, and a backend for management. At it's simplest, you have one page template (your content always is output to a simple template, as in a blog or something where you rarely have different types of output), and your backend consists of a log-in to password protect a form that updates your database.
To get back to the main point, however, HTML5 will only be involved in the output for client-side rendering. That is, if your template is HTML5, your site is HTML5 (for all intents and purposes, at least to your visitors).
A question like this will generally get a lot of opinionated, debate type responses because every developer has different opinions and different tool sets.
For smaller projects, I prefer to use some light weight components and build it rather than using a packaged CMS.
Me personally, for smaller projects:
HTML5 Boilerplate, it gives you a great starting point, and once you
have used it and are familiar you can quickly customize it to your
preferences. http://html5boilerplate.com/
FlourishLib, is a great no framework library, it is quick, easy to use and the documentation is great. http://www.flourishlib.com
jQuery, is a great tool for your JS needs.
I spent so much time playing around with other packaged CMS that I found I could have already had the project up and out the door by the time I tweaked the CMS to get what I wanted out of it.
And using this tools you can easily create your own boilerplate to get your project started quickly.
Again, this is just an opinion based on my preferences.
You can check out glFusion at http://www.glfusion.org with all the features it has right out of the box. Unlike allot of other CMS's glFusion is free, including the plugins. Latest version 1.3.0 as of the time of this posting, will have html5 and also be w3c validated.
If you are looking for a lightweight and fast cms build on HTML5 and CSS3 then Gecko should be the right one for you!
Check CouchCMS - i think it is the best one for your purpose www.couchcms.com
Perch CMS (not free but very cheap) is very lightwight, may want to take a look. http://grabaperch.com/
I really like GetSimple CMS. I use this on a majority of small projects because it is incredibly easy to set up. It is PHP powered, and does not require an SQL Database. Instead it uses XML files to store content.
http://get-simple.info/
As a previous poster mentioned, HTML5 Boilerplate and jQuery provide a quick way to get set up and I often use these in conjunction with each other.
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 8 years ago.
Improve this question
It's not hard to find example PHP code. The problem seems to be that most of it is frameworks/libraries/etc. This is great, but I'd like to see an example of an actual website.
This stems from my perception that I can't build anything but "toys." My websites tend to be fairly CRUDdy, and it feels like my sites are a bit of generic MVC stuff and a lot of "SELECT" and "INSERT" statements.
I just want some assurance that I'm not "doing it wrong" since these are personal projects, and I'd like to use them to get a job.
Below is a good site that also make its source available (which is very well commented and easy to follow/understand, from a Zend Framework standpoint)
http://www.dasprids.de/
Instructions/info for the source
http://www.dasprids.de/behind-the-site
Actual source
http://site.svn.dasprids.de/
Check out MediaWiki. That's the same software that runs Wikipedia, and it's open source.
It's worth noting that the php.net website is itself open source.
What about PHPBB, which is neither a framework, nor a library?
There are also plenty of Open Source websites you can find just by making some search. Especially blogs, content management systems, etc.
Edit: responding to the first comment to my answer, I want just to add that looking at Open Source websites would probably help to have an image of what large (or not so large) projects are, and also how things are done by experienced developers (for example using PDO, SQL transactions, templates, etc.).
But please take in account that most of the time, those projects are developed by several people. And since PHP does not have any coding standard and does everything possible to force the people to not use good practices, large, collaborative projects are not so good at improving your coding standard nor learning good practices. For this, books may me much more helpful, especially books about good practices.
It may be worth looking at wordpress. I haven't looked at the php behind it, but I know I learned a lot looking at the DB definitions.
Usually a framework is a good compromise between writing quality code and performance. Larger websites that need scale come up with their own custom hacks which eventually evolve into frameworks. In my experience writing in pure PHP it's too easy to go the quickest way to implementing a feature and end up with a mishmash of code, but others might be more disciplined.
It's not hard to find example PHP
code.
Good point is that you know how to find code. You said your code ends up in a generic MVC and CRUDdy, i think this is what most of the web applications around are doing. But the important thing to consider here is they do these MVC/CRUD stuffs in managed way and following standard Object Oriented Design Patterns.
If you want to get examples of real PHP applications then search for open source codes for that specific type application and not frameworks/libraries. Frameworks/libraries are a bunch of PHP CLASSES combined together following the application design architectures and they are supposed to provide you a code base to start your new project with existing set of usable codes, not that they give you the "application feel" rather "structured feel" at the starting point. But once you get along these frameworks/libraries working together to provide you a structured way to build your application, things will really ease later. Your job is guaranteed ;)
If you want to develop codes with these MVC frameworks then start with Codeigniter. It is well documented and as you stated your existing code turns out to be like MVC, you'll grab this framework and how to build with it in one shot. I've written a Hello World in Codeigniter you can refer to start with it. (Also Refer: Codeigniter Documentation)
To find code for real application (not frameworks/libraries) you might think of slightly changing your search queries, search for categories of web application or alike you want to see, not just for the code to do this and code to do that, always search for the better and efficient ways to code and develop things. Github, Sourceforge.net, Google Code are really great places to search for "real" & "cool" open source PHP applications.
Well, actually you can learn a lot by studying a solid framework like ie. the Zend Framework. If you would like to learn that I suggest you first have a look at the Zend Framework Quickstart and then start reading Surviving the deep end. Once you covered these, you should have learned the basics of the Zend Framework, and then you can start looking at open source projects that use it. As far as CMSes go, there are a few using the Zend Framework, like TomatoCMS and pimCore.
BTW Creating a website isn't exactly rocket science, most sites are in fact just a collection of dull CRUD screens (sometimes spiced up with some AJAX to deliver a better user experience) that are used to add content to the site...
On beta.mkforlag.com, where I try out new ideas and develop new pages and new layout for the main domain, most of the source code can be seen. Most of the site is in Swedish, but most of the php code (comments, variable names etc.) is in English.
You should also keep in mind that although I've been using PHP a couple of years I'm no PHP expert and most likely "doing it wrong" in many cases. If you're not that advanced, though, you may find at least some of my code useful.
My code of satya-weblog.com is almost live. I am using wordpress V 2.9, so download that and you know about my site!
Check at symfony framework also and you come to know of propel, yml etc
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 9 years ago.
Improve this question
I have a moderately simple assignment, to create a PHP/PDO site with login functionality and article retrieve/save/edit/search. No tags, nothing else.
Is this overkill to use some framework for this?
It it a good decision to use custom code + perhaps template system like Smarty for a simple site that will not grow too much?
Is there a software niche/best practices for small sites?
In a nutshell, I need logins/forms, but aren't frameworks like Zend or Cake too much for this?
I think that you can never go wrong by adding a framework to any size project. Anytime you can reuse something (and not reinvent the wheel) or leverage an existing code base to speed application development time, then do it.
Besides, you never know when your small to mid-size project suddenly grows to a large project. At least then you will have the pieces in place to grow your application and not have to start from scratch.
I'm a big fan of CodeIgniter, it would make setting up a simple website like this pretty painless. There is a fairly extensive stackoverflow answer about authentication libraries for CodeIgniter which would make login a breeze.
I would not suggest using a third party template library such as smarty. CodeIgniter has helper functions which can be used within 'views' which will allow you to do a lot of things quickly and painlessly, such as form creation.
I think using a framework is ideal for simple projects. They're quicker to set up and get going with. A framework may not be ideal if you need to fine tune how the site will run for reasons such as scalability or special requirements, or because you just don't like frameworks.
I'd suggest just using whatever parts of the Zend Framework you feel you need. Zend is very 'pick and choose' friendly.
That said, I recently used the ZF Application (MVC collection) for a two page site, just because it made things so easy. You don't need to have multiple controllers/models/view helpers to justify using a MVC framework.
Please don't user smarty. It's really unnecessary. PHP is it's own template language.
These posts on sitepoint tell the story well: #1, #2, #3
I've been using Kohana and I like it.
http://www.kohanaphp.com/
This guide got me started Kohana 101
For something that simple you can use a tiny framework like MicroMVC which comes with a equally small PDO based ActiveRecord-like database class.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am looking for a PHP blog engine which needs to be easy to redesign (CSS, HTML). It also needs to be free and have simple user interface so that the client doesn't struggle to add posts. Any suggestions?
Wordpress - I keep trying other blogs and I keep going back to wordpress. It's definitely the easiest I've used for customizing templates, and the admin UI is very nice.
I kinda like b2evo we used it on our site and modded it to great effect.
I hear Chyrp is nice. Textpattern gets some praise too.
I am using flatpress for over a year and i am not going to change it for nothing.
Flat text files, simply admin panel, a lot of useful plugins, templates, widgets, static pages, rss2-atom, categories, upload mechanism.
It's easy and super simply. And if your want backups, make a tar. If you want to transfer it, just copy the tar.
http://flatpress.org
I have been very impressed with WordPress since I started using it.
I have had a look at the CSS that sits behind and it has a good structure in my view. There are lots of templates and good information on building your own.
I have recently started looking at NetTuts mainly for the Ruby on Rails tutorial but there is lot of good tutorials on extented WordPress at http://nettuts.com/category/working-with-cmss/
Well, it's hard not to suggest Wordpress. Redesigning it isn't too terribly difficult, a monkey could use it, the admin interface is simple and easy on the eyes, and it has great community support. I'd recommend using the Automatic Upgrade plugin with it as well, so that your customer can always stay up to date as well (for security reasons).
It is not exactly a blog engine but you may find Typolight interesting. It is very easy to use and fairly extensible.
Wordpress is definately the answer here. It's got a large community that can assist, with a lot of available free themes you can use and customize to build your own template.
It is also easy to extend with a wide range of plugins.
There are a lot of Linux hosted servers that come with Wordpress preinstalled already to make it even easier, but the installation of it is simple and straight forward.
Only one answer, Wordpress. I have used it only a few times to customise but simply found that it can be done by editing the header and footer files along with the stylesheet.
What can be simpler.
I suggest you just give it a go before you look at others as you could deliberate for ages just to come back to it :)
In the blog specific package area I have used: Textpattern, Typolight, Nucleus, Serendipity and Wordpress. Hands down, Wordpress is the easiest for end-users to manage and, frankly, it is one of the easiest to template. The userbase for Wordpress is so large that you can easily find resources to help you out when you get stuck on something.
My only practical complaint about it is the need to set up caching so that it doesn't get bogged down by a Digg/Reddit/Etc. overload. However, if you set the cacheing up, you are good to go and can handle significant traffic.
Simple PHP Blog. very, VERY simple. Very lightweight. Completely customizable. you dont have to worry about using a database! I find it great! http://sourceforge.net/projects/sphpblog/
Go get it!