May 27, 2013

Why Shall i use a PHP Framework

Khan Koder’s Question:

I m New to WEB Development I use Apache2.0i and NOTEPAD++ for web development i came to hear about some new words CAKEPHP, CodeINgniter Zend Etc.

Can any one please Tell me in detail why do i need Frameworks what is the benefit of these frameworks i dont really understand these frameworks.

You would just never find a good example of raw PHP code over the whole internet.
So, learning raw PHP you will learn ancient techniques and bad practices as well.

While framework tutorials will teach you a better ways, good practices and safer code.

Despite this question is very unwelcomed in this community. I would like to point you http://www.phpframeworks.com/‎

And please focus on core PHP if you are starting on PHP Development, it will make you much stronger.

August 15, 2012

Would it be better to build a CMS from scratch?

Question by user1599841

I need a website that has log ins, individual account feature can run custom jquery, php code page and display table from database with great flexibility, (If not this is where the jQuery and custom PHP comes in) easy customizable theming and layouts and about 5 – 7 php pages.

Would i be better off writing my own CMS or use which are already available on the Internet?

Which CMS would you recommend? I’ve browsed Drupal and Joomla videos and i can’t find any in depth detail to how flexible these are. They seems to be tailored to blogs and non programming managements.

Or, maybe i should be looking at a framework instead? I don’t want to pick wrong CMS. Please suggest me to make the right choice.

Answer by Starx

If you are not a programmer yourself, then there is no other options but to choose those which are already available.

Since scalability is the big question here, if you are a programmer/developer then adding and modifying features to an pre existing system is not so a big problem. Some of the reasons to consider open source softwares:

  • They have near zero amateur mistakes, on coding standards.
  • Codes are thoroughly check again and again by developers and other interested contributors over and over again.
  • Support can be found very easily.
  • Issues are regularly fixed and upgraded version are available.
  • System are tested to provide maximum performance.

Which CMS would you recommend?

This is a question only you can answer. Read about the CMS itself. Learn about the features that it provides. If they are enough for what you are trying to build, then pick that one, or else see another CMS.

I can’t find any in depth detail to How flexible these are?

This is a mis-understading. CMSs like Joomla, Drupal they have been around for a very long time. They are continuously improved and debugged. Support for them are globally available through sites like Stackoverflow itself. The massive global community only expands these systems.

Many developers or agencies build plugins, extensions for these CMS system. How are they doing that? Every system can be scaled and is flexible. It depends on you, how much you can work with it.


Where as,

You are a very enthusiastic programmer, and just like to build application your way just to enjoy the thrill of bugs and enjoy banging your head most of time 😉 and learn a lot at the same time then why not? build your own system.

March 18, 2012

How to load the db class after the session in CodeIgniter

Question by yeah its me

when i want to make a foreach($_SESSION[‘banners’]->result() as $banner), i get this error:

The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "CI_DB_mysql_result" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition in….

how can i load the db class after the session, i am using the native session $_SESSION, i dont want to use the codeigniter sessions because they have problems in IE, how can i resolve this problem?? or what function i need to use to load the DB class after the session in CI?

Answer by Starx

Use the native Codeigniter Session, to avoid such problems. To fix the problem with IE, make the following changes on config.php

$config['sess_cookie_name']        = 'ci_session'; 

to

$config['sess_cookie_name']        = 'cisession';

  • Initiate the library like this $this->load->library('session');

  • Set data in the session like this $this->session->set_userdata('item', 'value');

  • And read the values like $this->session->userdata('item');

Then on your application you will able to use it like this

foreach($this->session->userdata('banners') ->result() as $banner) {}
November 14, 2010

who can suggest one PHP framework?

Question by user507206

Possible Duplicate:
What PHP framework would you choose for a new application and why?

Just like codeingiter or cakephp..yes, i used it before,but who can give me some more chices?
also mvc,support cache,light,qucik and small~~

Thank you very much!

Answer by Alan Haggai Alavi

See phpframeworks.com for a comparison.

August 2, 2010

Do you know a css framework like Clever CSS?

Question by NeDark

I found some time ago a CSS framework like Clever CSS but I don’t remember its name and I can’t find it now.

Do you know CSS Frameworks like Clever CSS? It was like Clever CSS, but more powerful.

Thanks.

EDIT: I have just realized it is actually a css preprocessor, it is like Less CSS too.

Answer by user194743

It resembles Sass somewhat:

table.hl
  margin: 2em 0
  td.ln
    text-align: right

li
  font:
    family: serif
    weight: bold
    size: 1.2em

Answer by Starx

There are many

check this link, here is a nice review of most popular frameworks

http://speckyboy.com/2008/03/28/top-12-css-frameworks-and-how-to-understand-them/

I have used Elements and it is very powerful

http://elements.projectdesigns.org/

...

Please fill the form - I will response as fast as I can!